Skip to content

Commit c2007b2

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

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

test/CoreTest.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -872,7 +872,7 @@ TEST_CASE( "no_file_ending", "[core]" )
872872
Series(
873873
"../samples/no_extension_specified",
874874
Access::CREATE,
875-
"{\"backend\": \"json\"}" );
875+
R"({"backend": "json"})" );
876876
}
877877
REQUIRE(
878878
auxiliary::file_exists( "../samples/no_extension_specified.json" ) );
@@ -881,7 +881,7 @@ TEST_CASE( "no_file_ending", "[core]" )
881881
TEST_CASE( "backend_via_json", "[core]" )
882882
{
883883
std::string encodingVariableBased =
884-
"{\"backend\": \"json\", \"iteration_encoding\": \"variable_based\"}";
884+
R"({"backend": "json", "iteration_encoding": "variable_based"})";
885885
{
886886
Series series(
887887
"../samples/optionsViaJson",
@@ -906,7 +906,7 @@ TEST_CASE( "backend_via_json", "[core]" )
906906
Series series(
907907
"../samples/optionsViaJsonOverwritesAutomaticDetection.sst",
908908
Access::CREATE,
909-
"{\"adios2\": {\"engine\": {\"type\": \"bp4\"}}}" );
909+
R"({"adios2": {"engine": {"type": "bp4"}}})" );
910910
}
911911
REQUIRE( auxiliary::directory_exists(
912912
"../samples/optionsViaJsonOverwritesAutomaticDetection.bp" ) );
@@ -918,15 +918,15 @@ TEST_CASE( "backend_via_json", "[core]" )
918918
Series series(
919919
"../samples/optionsPreferJsonOverEnvVar.bp",
920920
Access::CREATE,
921-
"{\"backend\": \"ADIOS2\"}" );
921+
R"({"backend": "ADIOS2"})" );
922922
REQUIRE( series.backend() == "ADIOS2" );
923923
}
924924
REQUIRE( auxiliary::directory_exists(
925925
"../samples/optionsPreferJsonOverEnvVar.bp" ) );
926926
#endif
927927
#endif
928928
std::string encodingFileBased =
929-
"{\"backend\": \"json\", \"iteration_encoding\": \"file_based\"}";
929+
R"({"backend": "json", "iteration_encoding": "file_based"})";
930930
{
931931
/*
932932
* Should we add JSON options to set the filebased expansion pattern?
@@ -942,7 +942,7 @@ TEST_CASE( "backend_via_json", "[core]" )
942942
error::WrongAPIUsage );
943943
}
944944
std::string encodingGroupBased =
945-
"{\"backend\": \"json\", \"iteration_encoding\": \"group_based\"}";
945+
R"({"backend": "json", "iteration_encoding": "group_based"})";
946946
{
947947
Series series(
948948
"../samples/optionsViaJsonPseudoFilebased%T.json",

test/SerialIOTest.cpp

+2-2
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\": \"variable_based\"}" );
3623+
R"({"iteration_encoding": "variable_based"})" );
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)