|
@@ -3,7 +3,7 @@
|
|
* Company: Lynar Studios
|
|
* Company: Lynar Studios
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
* E-Mail: webmaster@lynarstudios.com
|
|
* Created: 2020-08-17
|
|
* Created: 2020-08-17
|
|
- * Changed: 2020-08-27
|
|
|
|
|
|
+ * Changed: 2020-09-04
|
|
*
|
|
*
|
|
* */
|
|
* */
|
|
|
|
|
|
@@ -351,7 +351,7 @@ namespace {
|
|
ls_std::File file {path};
|
|
ls_std::File file {path};
|
|
file.createNewFile();
|
|
file.createNewFile();
|
|
ls_std::FileWriter writer {file};
|
|
ls_std::FileWriter writer {file};
|
|
- writer.write(R"({"class":"Long","value":1990})");
|
|
|
|
|
|
+ writer.write(R"({"value":1990})");
|
|
|
|
|
|
auto serializable = std::make_shared<ls_std::SerializableJSONLong>(x);
|
|
auto serializable = std::make_shared<ls_std::SerializableJSONLong>(x);
|
|
x->setSerializable(std::dynamic_pointer_cast<ls_std::ISerializable>(serializable));
|
|
x->setSerializable(std::dynamic_pointer_cast<ls_std::ISerializable>(serializable));
|
|
@@ -374,10 +374,10 @@ namespace {
|
|
auto serializable = std::make_shared<ls_std::SerializableJSONLong>(x);
|
|
auto serializable = std::make_shared<ls_std::SerializableJSONLong>(x);
|
|
x->setSerializable(std::dynamic_pointer_cast<ls_std::ISerializable>(serializable));
|
|
x->setSerializable(std::dynamic_pointer_cast<ls_std::ISerializable>(serializable));
|
|
|
|
|
|
- ASSERT_STREQ(R"({"class":"Long","value":3})", x->marshal().c_str());
|
|
|
|
|
|
+ ASSERT_STREQ(R"({"value":3})", x->marshal().c_str());
|
|
|
|
|
|
*x = 17;
|
|
*x = 17;
|
|
- ASSERT_STREQ(R"({"class":"Long","value":17})", x->marshal().c_str());
|
|
|
|
|
|
+ ASSERT_STREQ(R"({"value":17})", x->marshal().c_str());
|
|
}
|
|
}
|
|
|
|
|
|
TEST_F(LongTest, parse)
|
|
TEST_F(LongTest, parse)
|
|
@@ -405,7 +405,7 @@ namespace {
|
|
auto serializable = std::make_shared<ls_std::SerializableJSONLong>(x);
|
|
auto serializable = std::make_shared<ls_std::SerializableJSONLong>(x);
|
|
x->setSerializable(std::dynamic_pointer_cast<ls_std::ISerializable>(serializable));
|
|
x->setSerializable(std::dynamic_pointer_cast<ls_std::ISerializable>(serializable));
|
|
|
|
|
|
- x->unmarshal(R"({"class":"Long","value":1989})");
|
|
|
|
|
|
+ x->unmarshal(R"({"value":1989})");
|
|
|
|
|
|
ASSERT_EQ(1989, *x);
|
|
ASSERT_EQ(1989, *x);
|
|
}
|
|
}
|