@@ -122,7 +122,7 @@ class GetStringTaskTypeTest : public ::testing::TestWithParam<TaskTypeTestCase>
122
122
std::string temp_path;
123
123
124
124
void SetUp () override {
125
- temp_path = std::filesystem::temp_directory_path () / " test_settings.json" ;
125
+ temp_path = ( std::filesystem::temp_directory_path () / " test_settings.json" ). string () ;
126
126
auto j = ppc::util::InitJSONPtr ();
127
127
(*j)[" tasks" ][" all" ] = " ALL" ;
128
128
(*j)[" tasks" ][" stl" ] = " STL" ;
@@ -156,7 +156,7 @@ TEST_NOLINT(GetStringTaskTypeStandaloneTest, ThrowsIfFileMissing) {
156
156
}
157
157
158
158
TEST (GetStringTaskTypeStandaloneTest, ReturnsUnknownForInvalidEnum) {
159
- std::string path = std::filesystem::temp_directory_path () / " tmp_settings.json" ;
159
+ std::string path = ( std::filesystem::temp_directory_path () / " tmp_settings.json" ). string () ;
160
160
std::ofstream (path) << R"( {"tasks":{"seq":"SEQ"}})" ;
161
161
162
162
auto result = GetStringTaskType (ppc::core::TypeOfTask::kUnknown , path);
@@ -171,14 +171,14 @@ TEST_NOLINT(GetStringTaskTypeEdgeCases, ThrowsIfFileCannotBeOpened) {
171
171
}
172
172
173
173
TEST_NOLINT (GetStringTaskTypeEdgeCases, ThrowsIfJsonIsMalformed) {
174
- std::string path = std::filesystem::temp_directory_path () / " bad_json.json" ;
174
+ std::string path = ( std::filesystem::temp_directory_path () / " bad_json.json" ). string () ;
175
175
std::ofstream (path) << " { this is not valid json " ;
176
176
EXPECT_THROW_NOLINT (GetStringTaskType (ppc::core::TypeOfTask::kSEQ , path), nlohmann::json::parse_error);
177
177
std::filesystem::remove (path);
178
178
}
179
179
180
180
TEST_NOLINT (GetStringTaskTypeEdgeCases, ThrowsIfJsonValueIsNull) {
181
- std::string path = std::filesystem::temp_directory_path () / " null_value.json" ;
181
+ std::string path = ( std::filesystem::temp_directory_path () / " null_value.json" ). string () ;
182
182
std::ofstream (path) << R"( {"tasks": { "seq": null }})" ;
183
183
184
184
EXPECT_THROW_NOLINT (GetStringTaskType (ppc::core::TypeOfTask::kSEQ , path), nlohmann::json::type_error);
@@ -187,7 +187,7 @@ TEST_NOLINT(GetStringTaskTypeEdgeCases, ThrowsIfJsonValueIsNull) {
187
187
}
188
188
189
189
TEST (GetStringTaskTypeEdgeCases, ReturnsUnknownIfEnumOutOfRange) {
190
- std::string path = std::filesystem::temp_directory_path () / " ok.json" ;
190
+ std::string path = ( std::filesystem::temp_directory_path () / " ok.json" ). string () ;
191
191
std::ofstream (path) << R"( {"tasks":{"seq":"SEQ"}})" ;
192
192
auto result = GetStringTaskType (ppc::core::TypeOfTask::kUnknown , path);
193
193
EXPECT_EQ (result, " unknown" );
0 commit comments