Skip to content

Commit abb1b9c

Browse files
committed
Add char8_t tests to lightweight_test_test6
1 parent a35b062 commit abb1b9c

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

test/lightweight_test_test6.cpp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// Test BOOST_TEST_EQ with character types
22
//
3-
// Copyright 2020 Peter Dimov
3+
// Copyright 2020, 2025 Peter Dimov
44
// Distributed under the Boost Software License, Version 1.0.
55
// https://www.boost.org/LICENSE_1_0.txt
66

@@ -19,14 +19,23 @@ int main()
1919

2020
#if !defined(BOOST_NO_CXX11_CHAR16_T)
2121

22+
BOOST_TEST_EQ( u'A', u'A' );
2223
BOOST_TEST_EQ( (char16_t)1, (char16_t)1 );
2324

2425
#endif
2526

2627
#if !defined(BOOST_NO_CXX11_CHAR32_T)
2728

29+
BOOST_TEST_EQ( U'A', U'A' );
2830
BOOST_TEST_EQ( (char32_t)1, (char32_t)1 );
2931

32+
#endif
33+
34+
#if defined(__cpp_char8_t) && __cpp_char8_t >= 201811L
35+
36+
BOOST_TEST_EQ( u8'A', u8'A' );
37+
BOOST_TEST_EQ( (char8_t)1, (char8_t)1 );
38+
3039
#endif
3140

3241
return boost::report_errors();

0 commit comments

Comments
 (0)