Skip to content

Commit

Permalink
[NFC][libc++][format] Enable unit tests.
Browse files Browse the repository at this point in the history
The GCC failures were partly fixed in D124103.

The format functions tests are fixed on GCC but they require a huge
amount of RAM (>10 GB). This fails with parallel testing in the CI. It
can be solved by splitting the test, but GCC-12 will be released shortly
and might fix the memory usage in these tests. Therefore these tests
remain disabled.

Reviewed By: #libc, ldionne

Differential Revision: https://reviews.llvm.org/D124335
  • Loading branch information
mordante committed Apr 28, 2022
1 parent de7cee2 commit d03bc24
Show file tree
Hide file tree
Showing 15 changed files with 3 additions and 31 deletions.
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// This test requires the dylib support introduced in D92214.
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
Expand Down
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// This test requires the dylib support introduced in D92214.
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12|13|14|15}}
Expand Down
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// <format>

Expand Down
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// <format>

Expand Down
Expand Up @@ -8,8 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// UNSUPPORTED: libcpp-has-no-wide-characters
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// Validate it works regardless of the signedness of `char`.
// RUN: %{cxx} %{flags} %{compile_flags} -fsigned-char -fsyntax-only %s
Expand Down
Expand Up @@ -8,8 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// XFAIL: libcpp-has-no-wide-characters
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// <format>

Expand Down
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// <format>

Expand Down
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// <format>

Expand Down
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// <format>

Expand Down
Expand Up @@ -8,8 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-localization
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
Expand Down
Expand Up @@ -8,8 +8,6 @@
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-localization
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// REQUIRES: locale.en_US.UTF-8
// REQUIRES: locale.fr_FR.UTF-8
Expand Down
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// <format>

Expand Down
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// <format>

Expand Down
Expand Up @@ -7,8 +7,6 @@

// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: libcpp-has-no-incomplete-format
// TODO FMT Evaluate gcc-11 status
// UNSUPPORTED: gcc-11

// <format>

Expand Down
Expand Up @@ -2526,10 +2526,10 @@ void format_tests(TestFunction check, ExceptionTest check_exception) {
// Note 128-bit support is only partly implemented test the range
// conditions here.
static constexpr auto fmt = string_literal("{}");
std::basic_string<CharT> min = std::format(fmt.sv<CharT>(), std::numeric_limits<long long>::min());
std::basic_string<CharT> min = std::format(fmt.template sv<CharT>(), std::numeric_limits<long long>::min());
check.template operator()<"{}">(std::basic_string_view<CharT>(min),
static_cast<__int128_t>(std::numeric_limits<long long>::min()));
std::basic_string<CharT> max = std::format(fmt.sv<CharT>(), std::numeric_limits<long long>::max());
std::basic_string<CharT> max = std::format(fmt.template sv<CharT>(), std::numeric_limits<long long>::max());
check.template operator()<"{}">(std::basic_string_view<CharT>(max),
static_cast<__int128_t>(std::numeric_limits<long long>::max()));
check_exception("128-bit value is outside of implemented range", SV("{}"),
Expand All @@ -2552,7 +2552,7 @@ void format_tests(TestFunction check, ExceptionTest check_exception) {
// Note 128-bit support is only partly implemented test the range
// conditions here.
static constexpr auto fmt = string_literal("{}");
std::basic_string<CharT> max = std::format(fmt.sv<CharT>(), std::numeric_limits<unsigned long long>::max());
std::basic_string<CharT> max = std::format(fmt.template sv<CharT>(), std::numeric_limits<unsigned long long>::max());
check.template operator()<"{}">(std::basic_string_view<CharT>(max),
static_cast<__uint128_t>(std::numeric_limits<unsigned long long>::max()));
check_exception("128-bit value is outside of implemented range", SV("{}"),
Expand Down

0 comments on commit d03bc24

Please sign in to comment.