Skip to content

Commit

Permalink
Fix serialization tests
Browse files Browse the repository at this point in the history
  • Loading branch information
austinschneider committed Feb 10, 2024
1 parent a7d107c commit 195afd6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
10 changes: 3 additions & 7 deletions projects/dataclasses/private/test/InteractionRecord_TEST.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ TEST(Serialization, Save)
},\n\
\"PrimaryID\": {\n\
\"cereal_class_version\": 0,\n\
\"IDSet\": true,\n\
\"MajorID\": 1,\n\
\"MinorID\": 1\n\
},\n\
Expand All @@ -305,16 +306,11 @@ TEST(Serialization, Save)
],\n\
\"PrimaryHelicity\": 1.0,\n\
\"TargetID\": {\n\
\"IDSet\": false,\n\
\"MajorID\": 0,\n\
\"MinorID\": 0\n\
},\n\
\"TargetMass\": 1.0,\n\
\"TargetMomentum\": [\n\
1.0,\n\
2.0,\n\
3.0,\n\
4.0\n\
],\n\
\"TargetHelicity\": 1.0,\n\
\"InteractionVertex\": [\n\
1.0,\n\
Expand All @@ -333,7 +329,7 @@ TEST(Serialization, Save)
4.0\n\
]\n\
],\n\
\"SecondaryHelicity\": [\n\
\"SecondaryHelicities\": [\n\
1.0\n\
],\n\
\"InteractionParameters\": [\n\
Expand Down
12 changes: 11 additions & 1 deletion projects/dataclasses/private/test/InteractionSignature_TEST.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,17 @@ TEST(Serialization, Save)
oarchive(cereal::make_nvp("InteractionSignature", A));
}

std::string expected = "{\n \"InteractionSignature\": {\n \"cereal_class_version\": 0,\n \"PrimaryType\": -11,\n \"TargetType\": -11,\n \"SecondaryTypes\": [\n -11,\n 11\n ]\n }\n}";
std::string expected = "{\n\
\"InteractionSignature\": {\n\
\"cereal_class_version\": 0,\n\
\"PrimaryType\": -11,\n\
\"TargetType\": -11,\n\
\"SecondaryTypes\": [\n\
-11,\n\
11\n\
]\n\
}\n\
}";
EXPECT_EQ(ss.str(), expected);
}

Expand Down

0 comments on commit 195afd6

Please sign in to comment.