summaryrefslogtreecommitdiffstats
path: root/libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp')
-rw-r--r--libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp72
1 files changed, 1 insertions, 71 deletions
diff --git a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
index 6d233f80ac53..772cffbc33d4 100644
--- a/libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
+++ b/libcxx/test/libcxx/utilities/format/format.string/format.string.std/std_format_spec_bool.pass.cpp
@@ -197,76 +197,6 @@ constexpr void test_as_string() {
}
template <class CharT>
-constexpr void test_as_char() {
-
- test({.type = _Flags::_Type::__char}, 1, CSTR("c}"));
-
- // *** Align-fill ***
- test({.alignment = _Flags::_Alignment::__left, .type = _Flags::_Type::__char},
- 2, CSTR("<c}"));
- test({.alignment = _Flags::_Alignment::__center,
- .type = _Flags::_Type::__char},
- 2, "^c}");
- test(
- {.alignment = _Flags::_Alignment::__right, .type = _Flags::_Type::__char},
- 2, ">c}");
-
- test({.fill = CharT('L'),
- .alignment = _Flags::_Alignment::__left,
- .type = _Flags::_Type::__char},
- 3, CSTR("L<c}"));
- test({.fill = CharT('#'),
- .alignment = _Flags::_Alignment::__center,
- .type = _Flags::_Type::__char},
- 3, CSTR("#^c}"));
- test({.fill = CharT('0'),
- .alignment = _Flags::_Alignment::__right,
- .type = _Flags::_Type::__char},
- 3, CSTR("0>c}"));
-
- // *** Sign ***
- test_exception<Parser<CharT>>(
- "A sign field isn't allowed in this format-spec", CSTR("-c}"));
-
- // *** Alternate form ***
- test_exception<Parser<CharT>>(
- "An alternate form field isn't allowed in this format-spec", CSTR("#c}"));
-
- // *** Zero padding ***
- test_exception<Parser<CharT>>(
- "A zero-padding field isn't allowed in this format-spec", CSTR("0c}"));
-
- // *** Width ***
- test({.width = 0, .width_as_arg = false, .type = _Flags::_Type::__char}, 1,
- CSTR("c}"));
- test({.width = 1, .width_as_arg = false, .type = _Flags::_Type::__char}, 2,
- CSTR("1c}"));
- test({.width = 10, .width_as_arg = false, .type = _Flags::_Type::__char}, 3,
- CSTR("10c}"));
- test({.width = 1000, .width_as_arg = false, .type = _Flags::_Type::__char}, 5,
- CSTR("1000c}"));
- test({.width = 1000000, .width_as_arg = false, .type = _Flags::_Type::__char},
- 8, CSTR("1000000c}"));
-
- test({.width = 0, .width_as_arg = true, .type = _Flags::_Type::__char}, 3,
- CSTR("{}c}"));
- test({.width = 0, .width_as_arg = true, .type = _Flags::_Type::__char}, 4,
- CSTR("{0}c}"));
- test({.width = 1, .width_as_arg = true, .type = _Flags::_Type::__char}, 4,
- CSTR("{1}c}"));
-
- // *** Precision ***
- test_exception<Parser<CharT>>(
- "The format-spec should consume the input or end with a '}'", CSTR("."));
- test_exception<Parser<CharT>>(
- "The format-spec should consume the input or end with a '}'", CSTR(".1"));
-
- // *** Locale-specific form ***
- test({.locale_specific_form = true, .type = _Flags::_Type::__char}, 2,
- CSTR("Lc}"));
-}
-
-template <class CharT>
constexpr void test_as_integer() {
test({.alignment = _Flags::_Alignment::__right,
@@ -401,7 +331,6 @@ constexpr void test() {
test({}, 0, CSTR("}"));
test_as_string<CharT>();
- test_as_char<CharT>();
test_as_integer<CharT>();
// *** Type ***
@@ -413,6 +342,7 @@ constexpr void test() {
test_exception<Parser<CharT>>(expected, CSTR("F}"));
test_exception<Parser<CharT>>(expected, CSTR("G}"));
test_exception<Parser<CharT>>(expected, CSTR("a}"));
+ test_exception<Parser<CharT>>(expected, CSTR("c}"));
test_exception<Parser<CharT>>(expected, CSTR("e}"));
test_exception<Parser<CharT>>(expected, CSTR("f}"));
test_exception<Parser<CharT>>(expected, CSTR("g}"));