Skip to content

Commit 272b16d

Browse files
committed
Use fancy C++ strings
The CI doesn't like having too many escaped characters in a normal string
1 parent e029637 commit 272b16d

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

test/CoreTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -880,7 +880,7 @@ TEST_CASE( "no_file_ending", "[core]" )
880880
TEST_CASE( "backend_via_json", "[core]" )
881881
{
882882
std::string encodingVariableBased =
883-
"{\"backend\": \"json\", \"iteration_encoding\": \"variable_based\"}";
883+
R"({"backend": "json", "iteration_encoding": "variable_based"})";
884884
{
885885
Series series(
886886
"../samples/optionsViaJson",
@@ -905,7 +905,7 @@ TEST_CASE( "backend_via_json", "[core]" )
905905
Series series(
906906
"../samples/optionsViaJsonOverwritesAutomaticDetection.sst",
907907
Access::CREATE,
908-
"{\"adios2\": {\"engine\": {\"type\": \"bp4\"}}}" );
908+
R"({"adios2": {"engine": {"type": "bp4"}}})" );
909909
}
910910
REQUIRE( auxiliary::directory_exists(
911911
"../samples/optionsViaJsonOverwritesAutomaticDetection.bp" ) );
@@ -925,7 +925,7 @@ TEST_CASE( "backend_via_json", "[core]" )
925925
#endif
926926
#endif
927927
std::string encodingFileBased =
928-
"{\"backend\": \"json\", \"iteration_encoding\": \"file_based\"}";
928+
R"({"backend": "json", "iteration_encoding": "file_based"})";
929929
{
930930
/*
931931
* Should we add JSON options to set the filebased expansion pattern?

test/SerialIOTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3620,7 +3620,7 @@ variableBasedSingleIteration( std::string const & file )
36203620
Series writeSeries(
36213621
file,
36223622
Access::CREATE,
3623-
"{\"iteration_encoding\": \"variablebased\"}" );
3623+
R"({\"iteration_encoding\": \"variablebased\"})" );
36243624
REQUIRE(
36253625
writeSeries.iterationEncoding() ==
36263626
IterationEncoding::variableBased );
@@ -4307,7 +4307,7 @@ extendDataset( std::string const & ext )
43074307
Dataset ds1{
43084308
Datatype::INT,
43094309
{ 5, 5 },
4310-
"{ \"resizable\": true, \"resizeble\": \"typo\" }" };
4310+
R"({ "resizable": true, "resizeble": "typo" })" };
43114311
Dataset ds2{ Datatype::INT, { 10, 5 } };
43124312

43134313
// array record component -> array record component

0 commit comments

Comments
 (0)