From 7038adb4f5347fa87f278f7e704b560a3fce9044 Mon Sep 17 00:00:00 2001 From: Patrick Urbanke Date: Wed, 29 Nov 2023 19:55:10 +0100 Subject: [PATCH] Updated the test for the tagged union --- tests/json/test_tagged_union2.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/json/test_tagged_union2.hpp b/tests/json/test_tagged_union2.hpp index 3dac1168..597016c5 100644 --- a/tests/json/test_tagged_union2.hpp +++ b/tests/json/test_tagged_union2.hpp @@ -11,18 +11,18 @@ namespace test_tagged_union2 { struct Circle { - using Tag = rfl::Literal<"Circle">; + using Tag = rfl::Literal<"circle", "Circle">; rfl::Field<"radius", double> radius; }; struct Rectangle { - using Tag = rfl::Literal<"Rectangle">; + using Tag = rfl::Literal<"rectangle", "Rectangle">; rfl::Field<"height", double> height; rfl::Field<"width", double> width; }; struct Square { - using Tag = rfl::Literal<"Square">; + using Tag = rfl::Literal<"square", "Square">; rfl::Field<"width", double> width; }; @@ -33,6 +33,6 @@ void test() { const Shapes r = Rectangle{.height = 10, .width = 5}; - write_and_read(r, R"({"shape":"Rectangle","height":10.0,"width":5.0})"); + write_and_read(r, R"({"shape":"rectangle","height":10.0,"width":5.0})"); } } // namespace test_tagged_union2