P0482R5 char8_t: Updates to existing standard library tests
authorTom Honermann <tom@honermann.net>
Fri, 22 Feb 2019 01:16:08 +0000 (01:16 +0000)
committerJonathan Wakely <redi@gcc.gnu.org>
Fri, 22 Feb 2019 01:16:08 +0000 (01:16 +0000)
commit59019b4223633066d86d46147bc2c01de8d9da22
tree79b2a1ebd43116878ad44eb2391e5b02f0d8555d
parent65bbaf3125f7c92be32e2e3b6c07e63e8ab0ccbc
P0482R5 char8_t: Updates to existing standard library tests

This patch augments existing tests to validate behavior for char8_t.  In
all cases, added test cases are cloned from existing tests for wchar_t
or char16_t.

A few tests required updates to line numbers for diagnostic messages.

2019-02-22  Tom Honermann  <tom@honermann.net>

* testsuite/18_support/byte/ops.cc: Validate
std::to_integer<char8_t>, std::to_integer<char16_t>, and
std::to_integer<char32_t>.
* testsuite/18_support/numeric_limits/dr559.cc: Validate
std::numeric_limits<char8_t>.
* testsuite/18_support/numeric_limits/lowest.cc: Validate
std::numeric_limits<char8_t>::lowest().
* testsuite/18_support/numeric_limits/max_digits10.cc: Validate
std::numeric_limits<char8_t>::max_digits10.
* testsuite/18_support/type_info/fundamental.cc: Validate
typeinfo for char8_t.
* testsuite/20_util/from_chars/1_c++20_neg.cc: New test, validating
std::from_chars with char8_t.
* testsuite/20_util/hash/requirements/explicit_instantiation.cc:
Validate explicit instantiation of std::hash<char8_t>.
* testsuite/20_util/is_integral/value.cc: Validate
std::is_integral<char8_t>.
* testsuite/20_util/make_signed/requirements/typedefs-4.cc:
Validate std::make_signed<char8_t>.
* testsuite/21_strings/basic_string/cons/char/deduction.cc:
Validate u8string construction from char8_t sources.
* testsuite/21_strings/basic_string/types/pmr_typedefs.cc: Validate
std::pmr::u8string.
* testsuite/21_strings/basic_string_view/operations/compare/
char/70483.cc: Validate substr operations on u8string_view.
* testsuite/21_strings/basic_string_view/typedefs.cc: Validate that
the u8string_view typedef is defined.
* testsuite/21_strings/char_traits/requirements/
constexpr_functions.cc: Validate char_traits<char8_t> constexpr
member functions.
* testsuite/21_strings/char_traits/requirements/
constexpr_functions_c++17.cc: Validate char_traits<char8_t> C++17
constexpr member functions.
* testsuite/21_strings/headers/string/types_std_c++0x.cc: Validate
that the u8string typedef is defined.
* testsuite/22_locale/locale/cons/unicode.cc: Validate the presence
of the std::codecvt<char16_t, char8_t, std::mbstate_t> and
std::codecvt<char32_t, char8_t, std::mbstate_t> facets.
* testsuite/29_atomics/atomic/cons/assign_neg.cc: Update line
numbers.
* testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
* testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
Likewise.
* testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
* testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
Validate std::atomic<char8_t>::is_always_lock_free
* testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
Update line numbers.
* testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
Likewise.
* testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
Likewise.
* testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
Validate std::experimental::pmr::u8string.
* testsuite/experimental/string_view/typedefs.cc: Validate that the
u8string_view typedef is defined.
* testsuite/util/testsuite_common_types.h: Add char8_t, char16_t and
char32_t to the typelists.

From-SVN: r269089
29 files changed:
libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/18_support/byte/ops.cc
libstdc++-v3/testsuite/18_support/numeric_limits/dr559.cc
libstdc++-v3/testsuite/18_support/numeric_limits/lowest.cc
libstdc++-v3/testsuite/18_support/numeric_limits/max_digits10.cc
libstdc++-v3/testsuite/18_support/type_info/fundamental.cc
libstdc++-v3/testsuite/20_util/from_chars/1_c++20_neg.cc [new file with mode: 0644]
libstdc++-v3/testsuite/20_util/hash/requirements/explicit_instantiation.cc
libstdc++-v3/testsuite/20_util/is_integral/value.cc
libstdc++-v3/testsuite/20_util/make_signed/requirements/typedefs-4.cc
libstdc++-v3/testsuite/21_strings/basic_string/cons/char/deduction.cc
libstdc++-v3/testsuite/21_strings/basic_string/types/pmr_typedefs.cc
libstdc++-v3/testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc
libstdc++-v3/testsuite/21_strings/basic_string_view/typedefs.cc
libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions.cc
libstdc++-v3/testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc
libstdc++-v3/testsuite/21_strings/headers/string/types_std_c++0x.cc
libstdc++-v3/testsuite/22_locale/locale/cons/unicode.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/assign_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic/cons/copy_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/assign_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/cons/copy_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/is_always_lock_free.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc
libstdc++-v3/testsuite/29_atomics/atomic_integral/operators/increment_neg.cc
libstdc++-v3/testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc
libstdc++-v3/testsuite/experimental/string_view/typedefs.cc
libstdc++-v3/testsuite/util/testsuite_common_types.h