diff --git a/tests/src/unit-udt_macro.cpp b/tests/src/unit-udt_macro.cpp index 397b91338..ce4ebe260 100644 --- a/tests/src/unit-udt_macro.cpp +++ b/tests/src/unit-udt_macro.cpp @@ -34,23 +34,24 @@ SOFTWARE. #include using nlohmann::json; -namespace persons { +namespace persons +{ #define PERSON_CLASS_BODY(ClassName, Visibility) \ -Visibility: \ + Visibility: \ std::string name = ""; \ int age = 0; \ json metadata = nullptr; \ \ - public: \ + public: \ bool operator==(const ClassName& rhs) const \ { \ return name == rhs.name && age == rhs.age && metadata == rhs.metadata; \ } \ ClassName() = default; \ ClassName(std::string name_, int age_, json metadata_) \ - : name(std::move(name_)) \ - , age(age_) \ - , metadata(std::move(metadata_)) \ + : name(std::move(name_)) \ + , age(age_) \ + , metadata(std::move(metadata_)) \ {} \ std::string getName() const \ { \ @@ -66,7 +67,7 @@ Visibility: \ } #define ALPHABET_CLASS_BODY(ClassName, Visibility) \ - public: \ + public: \ bool operator==(const ClassName& other) const \ { \ return a == other.a && \ @@ -96,7 +97,7 @@ Visibility: \ y == other.y && \ z == other.z; \ } \ -Visibility: \ + Visibility: \ int a = 0; \ int b = 0; \ int c = 0; \ @@ -220,14 +221,14 @@ struct TestTypePair #define PERSON_TYPES_TO_TEST \ TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair TEST_CASE_TEMPLATE("Serialization/deserialization via NLOHMANN_DEFINE_TYPE_INTRUSIVE and NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE", PairT, PERSON_TYPES_TO_TEST) #undef PERSON_TYPES_TO_TEST @@ -265,13 +266,13 @@ TEST_CASE_TEMPLATE("Serialization/deserialization via NLOHMANN_DEFINE_TYPE_INTRU } } -#define PERSON_TYPES_TO_TEST \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair +#define PERSON_TYPES_TO_TEST \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair TEST_CASE_TEMPLATE("Serialization/deserialization via NLOHMANN_DEFINE_TYPE_INTRUSIVE_WITH_DEFAULT and NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE_WITH_DEFAULT", PairT, PERSON_TYPES_TO_TEST) #undef PERSON_TYPES_TO_TEST @@ -326,13 +327,13 @@ TEST_CASE_TEMPLATE("Serialization/deserialization via NLOHMANN_DEFINE_TYPE_INTRU } } -#define ALPHABET_PAIRS \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair, \ - TestTypePair +#define ALPHABET_PAIRS \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair, \ + TestTypePair TEST_CASE_TEMPLATE("Serialization/deserialization of classes with 26 public/private member variables via NLOHMANN_DEFINE_TYPE_INTRUSIVE and NLOHMANN_DEFINE_TYPE_NON_INTRUSIVE", PairT, ALPHABET_PAIRS) #undef ALPHABET_PAIRS