From 6726a96f0cf3c230e9caa2abd40fcfbf03fe73a4 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sun, 3 Nov 2024 19:08:01 +0100 Subject: A bunch of cleanup --- asl/tests/format_tests.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'asl/tests/format_tests.cpp') diff --git a/asl/tests/format_tests.cpp b/asl/tests/format_tests.cpp index f4ca2cf..81395c2 100644 --- a/asl/tests/format_tests.cpp +++ b/asl/tests/format_tests.cpp @@ -34,7 +34,7 @@ public: } }; -ASL_TEST(Format) +ASL_TEST(format_args) { StringSink sink; @@ -79,7 +79,12 @@ ASL_TEST(Format) sink.reset(); asl::format(&sink, "{{{}}} }", "CHEESE"); ASL_TEST_ASSERT(strcmp(sink.cstr(), "{CHEESE} }") == 0); +} +ASL_TEST(format_integers) +{ + StringSink sink; + sink.reset(); asl::format(&sink, "{} {} {}", 0, 1, 2); ASL_TEST_ASSERT(strcmp(sink.cstr(), "0 1 2") == 0); @@ -99,7 +104,12 @@ ASL_TEST(Format) sink.reset(); asl::format(&sink, "{} {} {} {}", -1, -23, -456, -7890); ASL_TEST_ASSERT(strcmp(sink.cstr(), "-1 -23 -456 -7890") == 0); +} +ASL_TEST(format_boolean) +{ + StringSink sink; + sink.reset(); asl::format(&sink, "{} {}", true, false); ASL_TEST_ASSERT(strcmp(sink.cstr(), "true false") == 0); -- cgit