mirror of
https://github.com/boostorg/core.git
synced 2025-05-11 05:07:39 +00:00
Add test for BOOST_TEST_EQ and character types
This commit is contained in:
parent
f7c1f6c6ab
commit
2642ad4562
@ -97,6 +97,8 @@ run lightweight_test_test4.cpp
|
||||
run lightweight_test_test5.cpp
|
||||
: : : $(pedantic-errors)
|
||||
<toolset>gcc-4.4.7:<cxxflags>-Wno-sign-compare ;
|
||||
run lightweight_test_test6.cpp
|
||||
: : : $(pedantic-errors) ;
|
||||
|
||||
run-fail lightweight_test_all_eq_test.cpp ;
|
||||
run-fail lightweight_test_all_with_fail.cpp ;
|
||||
|
33
test/lightweight_test_test6.cpp
Normal file
33
test/lightweight_test_test6.cpp
Normal file
@ -0,0 +1,33 @@
|
||||
// Test BOOST_TEST_EQ with character types
|
||||
//
|
||||
// Copyright 2020 Peter Dimov
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// https://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
#include <boost/core/lightweight_test.hpp>
|
||||
#include <boost/config.hpp>
|
||||
|
||||
int main()
|
||||
{
|
||||
BOOST_TEST_EQ( 'A', 'A' );
|
||||
BOOST_TEST_EQ( (char)1, (char)1 );
|
||||
BOOST_TEST_EQ( (unsigned char)1, (unsigned char)1 );
|
||||
BOOST_TEST_EQ( (signed char)1, (signed char)1 );
|
||||
|
||||
BOOST_TEST_EQ( L'A', L'A' );
|
||||
BOOST_TEST_EQ( (wchar_t)1, (wchar_t)1 );
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_CHAR16)
|
||||
|
||||
BOOST_TEST_EQ( (char16_t)1, (char16_t)1 );
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_CHAR32)
|
||||
|
||||
BOOST_TEST_EQ( (char32_t)1, (char32_t)1 );
|
||||
|
||||
#endif
|
||||
|
||||
return boost::report_errors();
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user