Changed to use the lightweight test framework - we can now test with a much wider range of compilers.

[SVN r57942]
This commit is contained in:
John Maddock
2009-11-26 12:59:39 +00:00
parent ac155d3843
commit b83327861c
7 changed files with 145 additions and 148 deletions

View File

@ -17,7 +17,7 @@
// use int64_t instead of long long for better portability
#include <boost/cstdint.hpp>
#include <boost/test/test_tools.hpp>
#include <boost/detail/lightweight_test.hpp>
/*
* General portability note:
@ -52,22 +52,22 @@ void runtest(const char * type, T)
<< "; min is " << make_char_numeric_for_streaming((traits::min)())
<< ", max is " << make_char_numeric_for_streaming((traits::max)())
<< std::endl;
BOOST_CHECK(traits::is_specialized);
BOOST_TEST(traits::is_specialized);
#if defined(BOOST_MSVC) && (BOOST_MSVC <= 1200)
// MSVC++ 6.0 issues a LNK1179 error (duplicate comdat) when the compiler
// generates different symbol names with a very long common prefix:
// the dummy "&& true" disambiguates between the symbols generated by this
// BOOST_CHECK instantiation and the preceding one.
BOOST_CHECK(traits::is_integer && true);
// BOOST_TEST instantiation and the preceding one.
BOOST_TEST(traits::is_integer && true);
#else
BOOST_CHECK(traits::is_integer);
BOOST_TEST(traits::is_integer);
#endif
BOOST_CHECK(traits::is_integral == true);
BOOST_CHECK(traits::const_min == (traits::min)());
BOOST_CHECK(traits::const_max == (traits::max)());
BOOST_TEST(traits::is_integral == true);
BOOST_TEST(traits::const_min == (traits::min)());
BOOST_TEST(traits::const_max == (traits::max)());
}
int test_main(int, char*[])
int main(int, char*[])
{
runtest("bool", bool());
runtest("char", char());