Skip to content

Commit 00fe583

Browse files
committed
Add missing character formatting coverage
This is covered by the libfly Catch2 reporter, but that shouldn't be relied on for coverage.
1 parent b4d46ca commit 00fe583

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/types/string/format.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ CATCH_TEMPLATE_TEST_CASE("Format", "[string]", char, wchar_t, char8_t, char16_t,
217217
CATCH_SECTION("Alignment default is based on presentation type")
218218
{
219219
test_format(FMT("{:6}"), FMT("ab "), FLY_STR(char_type, "ab"));
220+
test_format(FMT("{:6}"), FMT(" a"), FLY_CHR(char_type, 'a'));
220221
test_format(FMT("{:6}"), FMT(" 1"), 1);
221222
test_format(FMT("{:6b}"), FMT(" 11"), 0b11);
222223
test_format(FMT("{:6.2f}"), FMT(" 3.14"), 3.14);
@@ -225,6 +226,7 @@ CATCH_TEMPLATE_TEST_CASE("Format", "[string]", char, wchar_t, char8_t, char16_t,
225226
CATCH_SECTION("Alignment may be set to left-alignment")
226227
{
227228
test_format(FMT("{:<6}"), FMT("ab "), FLY_STR(char_type, "ab"));
229+
test_format(FMT("{:<6}"), FMT("a "), FLY_CHR(char_type, 'a'));
228230
test_format(FMT("{:<6}"), FMT("1 "), 1);
229231
test_format(FMT("{:<6b}"), FMT("11 "), 0b11);
230232
test_format(FMT("{:<6.2f}"), FMT("3.14 "), 3.14);
@@ -233,6 +235,7 @@ CATCH_TEMPLATE_TEST_CASE("Format", "[string]", char, wchar_t, char8_t, char16_t,
233235
CATCH_SECTION("Alignment may be set to right-alignment")
234236
{
235237
test_format(FMT("{:>6}"), FMT(" ab"), FLY_STR(char_type, "ab"));
238+
test_format(FMT("{:>6}"), FMT(" a"), FLY_CHR(char_type, 'a'));
236239
test_format(FMT("{:>6}"), FMT(" 1"), 1);
237240
test_format(FMT("{:>6b}"), FMT(" 11"), 0b11);
238241
test_format(FMT("{:>6.2f}"), FMT(" 3.14"), 3.14);

0 commit comments

Comments
 (0)