Skip to content

Commit d4bb686

Browse files
committed
tidy
1 parent 1e72beb commit d4bb686

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

library/testing/TestSDKStatefile.cxx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ int TestSDKStatefile([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
8888
const std::string relContent{ std::istreambuf_iterator<char>(relStream),
8989
std::istreambuf_iterator<char>() };
9090
test("file inside statefile dir stored as relative path",
91-
relContent.find("\"local_cow.vtp\"") != std::string::npos, true);
91+
relContent.find(R"("local_cow.vtp")") != std::string::npos, true);
9292
f3d::engine relDst = f3d::engine::createNone();
9393
relDst.loadStatefile(relStatefilePath);
9494
test("relative file restored", relDst.getScene().getAddedFiles().size(), static_cast<size_t>(1));
@@ -100,22 +100,21 @@ int TestSDKStatefile([[maybe_unused]] int argc, [[maybe_unused]] char* argv[])
100100

101101
// Loading a statefile without an options entry is valid
102102
f3d::engine noOptEng = f3d::engine::createNone();
103-
noOptEng.loadStatefileFromString("{ \"files\": [] }");
103+
noOptEng.loadStatefileFromString(R"({ "files": [] })");
104104
test(
105105
"no option statefile leaves no added file", noOptEng.getScene().getAddedFiles().empty(), true);
106106

107107
// Options that do not exist or cannot be parsed are skipped with a warning, not a failure
108108
f3d::engine optEng = f3d::engine::createNone();
109-
optEng.loadStatefileFromString("{ \"options\": { \"not.a.real.option\": \"1\" } }");
110-
optEng.loadStatefileFromString("{ \"options\": { \"render.line_width\": \"not_a_number\" } }");
109+
optEng.loadStatefileFromString(R"({ "options": { "not.a.real.option": "1" } })");
110+
optEng.loadStatefileFromString(R"({ "options": { "render.line_width": "not_a_number" } })");
111111
test("invalid options are skipped", optEng.getScene().getAddedFiles().empty(), true);
112112

113113
// Restoring a camera into an engine without a window is skipped with a log, not a failure
114114
f3d::engine noWinEng = f3d::engine::createNone();
115115
noWinEng.loadStatefileFromString(
116-
"{ \"camera\": { \"position\": [0.0, 0.0, 1.0], "
117-
"\"focal_point\": [0.0, 0.0, 0.0], \"view_up\": [0.0, 1.0, 0.0], "
118-
"\"view_angle\": 30.0 } }");
116+
R"({ "camera": { "position": [0.0, 0.0, 1.0], "focal_point": [0.0, 0.0, 0.0], )"
117+
R"("view_up": [0.0, 1.0, 0.0], "view_angle": 30.0 } })");
119118
test("camera without window is skipped", noWinEng.getScene().getAddedFiles().empty(), true);
120119

121120
// Failure modes

0 commit comments

Comments
 (0)