summaryrefslogtreecommitdiff
path: root/asl/format_tests.cpp
diff options
context:
space:
mode:
authorSteven Le Rouzic <steven.lerouzic@gmail.com>2024-10-10 23:38:35 +0200
committerSteven Le Rouzic <steven.lerouzic@gmail.com>2024-12-20 15:35:58 +0100
commite020805cb140ed98d09e606a867b910fce78ad15 (patch)
tree08e79fbfa9e799b15f170bdeb198c2ba19287189 /asl/format_tests.cpp
parent8dfd173285df515fe9b41d970321da9d049460f8 (diff)
Integers formatting
Diffstat (limited to 'asl/format_tests.cpp')
-rw-r--r--asl/format_tests.cpp20
1 files changed, 20 insertions, 0 deletions
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;
}