Lines Matching refs:std

63         std::string prefix;  in SetUp()
65 auto name = std::filesystem::path(n); in SetUp()
66 auto path = std::filesystem::path(mFilesDir.path) / name; in SetUp()
68 std::ofstream touch{path}; in SetUp()
71 prefix = std::filesystem::path(mFilesDir.path) / ""; in SetUp()
76 auto name = std::filesystem::path(n); in SetUp()
77 auto path = std::filesystem::path(mEmptyDir.path) / name; in SetUp()
79 std::ofstream touch{path}; in SetUp()
81 prefix = std::filesystem::path(mEmptyDir.path) / ""; in SetUp()
91 void expectContent(const std::string &name, const T &value) { in expectContent()
92 mExpectedContent[name] << value << std::endl; in expectContent()
97 void updateContent(const std::string &name, const T &value) { in updateContent()
98 std::ofstream(mFileMap[name]) << value << std::endl; in updateContent()
102 void expectAndUpdateContent(const std::string &name, const T &value) { in expectAndUpdateContent()
110 std::ifstream file{a.second}; in verifyContents()
111 std::string expect = mExpectedContent[a.first].str(); in verifyContents()
112 std::string actual = std::string(std::istreambuf_iterator<char>(file), in verifyContents()
113 std::istreambuf_iterator<char>()); in verifyContents()
119 static bool isRequired(const std::string &name) { in isRequired()
121 if (std::string(n) == name) { in isRequired()
128 static auto ParamNameFixup(std::string str) { in ParamNameFixup()
129 std::replace(str.begin(), str.end(), '/', '_'); in ParamNameFixup()
134 std::unique_ptr<Vibrator::HwApi> mHwApi;
135 std::unique_ptr<Vibrator::HwApi> mNoApi;
136 std::map<std::string, std::string> mFileMap;
139 std::map<std::string, std::stringstream> mExpectedContent;
154 auto skip = std::string(GetParam()); in TEST_P()
156 std::unique_ptr<HwApi> hwapi; in TEST_P()
157 std::string prefix; in TEST_P()
160 auto name = std::string(n); in TEST_P()
161 auto path = std::string(dir.path) + "/" + name; in TEST_P()
166 std::ofstream touch{path}; in TEST_P()
169 prefix = std::filesystem::path(dir.path) / ""; in TEST_P()
184 public WithParamInterface<std::tuple<std::string, std::function<T>>> {
187 return ParamNameFixup(std::get<0>(info.param)); in PrintParam()
189 static auto MakeParam(std::string name, std::function<T> func) { in MakeParam()
190 return std::make_tuple(name, func); in MakeParam()
198 auto func = std::get<1>(param); in TEST_P()
205 auto func = std::get<1>(param); in TEST_P()
220 auto name = std::get<0>(param); in TEST_P()
221 auto func = std::get<1>(param); in TEST_P()
230 auto name = std::get<0>(param); in TEST_P()
231 auto func = std::get<1>(param); in TEST_P()
240 auto name = std::get<0>(param); in TEST_P()
241 auto func = std::get<1>(param); in TEST_P()
264 auto name = std::get<0>(param); in TEST_P()
265 auto func = std::get<1>(param); in TEST_P()
266 int8_t value = std::rand(); in TEST_P()
275 auto name = std::get<0>(param); in TEST_P()
276 auto func = std::get<1>(param); in TEST_P()
277 int8_t value = std::rand(); in TEST_P()
297 auto name = std::get<0>(param); in TEST_P()
298 auto func = std::get<1>(param); in TEST_P()
299 uint8_t value = std::rand(); in TEST_P()
308 auto name = std::get<0>(param); in TEST_P()
309 auto func = std::get<1>(param); in TEST_P()
310 uint8_t value = std::rand(); in TEST_P()
329 auto name = std::get<0>(param); in TEST_P()
330 auto func = std::get<1>(param); in TEST_P()
331 uint32_t value = std::rand(); in TEST_P()
340 auto name = std::get<0>(param); in TEST_P()
341 auto func = std::get<1>(param); in TEST_P()
342 uint32_t value = std::rand(); in TEST_P()
362 using SetStringTest = HwApiTypedTest<bool(Vibrator::HwApi &, std::string)>;
366 auto name = std::get<0>(param); in TEST_P()
367 auto func = std::get<1>(param); in TEST_P()
368 std::string value = TemporaryFile().path; in TEST_P()
377 auto name = std::get<0>(param); in TEST_P()
378 auto func = std::get<1>(param); in TEST_P()
379 std::string value = TemporaryFile().path; in TEST_P()