diff options
author | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-11-03 19:08:01 +0100 |
---|---|---|
committer | Steven Le Rouzic <steven.lerouzic@gmail.com> | 2024-12-20 15:35:58 +0100 |
commit | 6726a96f0cf3c230e9caa2abd40fcfbf03fe73a4 (patch) | |
tree | 7507aca9aeec5870090e2cc8be0b03b21301ef1f /asl/tests/format_tests.cpp | |
parent | c6a4aa13c256a65123355636d30f4a7b38c4fccf (diff) |
A bunch of cleanup
Diffstat (limited to 'asl/tests/format_tests.cpp')
-rw-r--r-- | asl/tests/format_tests.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
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);
|