From e020805cb140ed98d09e606a867b910fce78ad15 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Thu, 10 Oct 2024 23:38:35 +0200 Subject: Integers formatting --- asl/format_tests.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'asl/format_tests.cpp') diff --git a/asl/format_tests.cpp b/asl/format_tests.cpp index 2288a77..55ed97b 100644 --- a/asl/format_tests.cpp +++ b/asl/format_tests.cpp @@ -78,5 +78,25 @@ int main() asl::format(&sink, "{{{}}} }", "CHEESE"); assert(strcmp(sink.cstr(), "{CHEESE} }") == 0); + sink.reset(); + asl::format(&sink, "{} {} {}", 0, 1, 2); + assert(strcmp(sink.cstr(), "0 1 2") == 0); + + sink.reset(); + asl::format(&sink, "{} {} {}", 10, 11, 12); + assert(strcmp(sink.cstr(), "10 11 12") == 0); + + sink.reset(); + asl::format(&sink, "{} {} {}", 100, 101, 102); + assert(strcmp(sink.cstr(), "100 101 102") == 0); + + sink.reset(); + asl::format(&sink, "{} {} {}", 1000, 1001, 1002); + assert(strcmp(sink.cstr(), "1000 1001 1002") == 0); + + sink.reset(); + asl::format(&sink, "{} {} {} {}", -1, -23, -456, -7890); + assert(strcmp(sink.cstr(), "-1 -23 -456 -7890") == 0); + return 0; } -- cgit