some update.

This commit is contained in:
ykiko
2024-09-19 14:51:56 +08:00
parent 53aeb39f16
commit ebddecede8
18 changed files with 247 additions and 30 deletions

26
tests/Support/JSON.cpp Normal file
View File

@@ -0,0 +1,26 @@
#include <gtest/gtest.h>
#include <Support/JSON.h>
namespace {
using namespace clice;
TEST(JSON, Point) {
json::Object object;
object["x"] = 1;
object["y"] = 2;
struct Point {
int x;
int y;
};
auto point = clice::json::deserialize<Point>(std::move(object));
ASSERT_EQ(point.x, 1);
ASSERT_EQ(point.y, 2);
// auto result = clice::json::serialize(point);
// ASSERT_EQ(result, json::Value(std::move(object)));
}
} // namespace