aboutsummaryrefslogtreecommitdiffstats
path: root/nihil.ucl/tests/emit.cc
diff options
context:
space:
mode:
Diffstat (limited to 'nihil.ucl/tests/emit.cc')
-rw-r--r--nihil.ucl/tests/emit.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/nihil.ucl/tests/emit.cc b/nihil.ucl/tests/emit.cc
index c7f9757..a8487c6 100644
--- a/nihil.ucl/tests/emit.cc
+++ b/nihil.ucl/tests/emit.cc
@@ -18,14 +18,8 @@ TEST_CASE("ucl: emit to std::ostream", "[ucl]")
auto strm = std::ostringstream();
strm << obj;
- REQUIRE(strm.str() ==
-"{\n"
-" \"int\": [\n"
-" 1,\n"
-" 42,\n"
-" 666\n"
-" ]\n"
-"}");
+ // The ostream emitter produces JSON.
+ REQUIRE(strm.str() == std::format("{:j}", obj));
}
TEST_CASE("ucl: emit JSON with std::format", "[ucl]")