// (C) Copyright Daniel James 2005. // Use, modification and distribution are subject to the // Boost Software License, Version 1.0. (See accompanying file // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) #include #define BOOST_AUTO_TEST_MAIN #include #include #include #include #include "./compile_time.hpp" BOOST_AUTO_UNIT_TEST(string_tests) { BOOST_CHECK(compile_time_tests::success); boost::hash x1; boost::hash x2; BOOST_CHECK_EQUAL(x1("Hello"), x2(std::string("Hel") + "lo")); BOOST_CHECK_EQUAL(x1(""), x2(std::string())); } #if !defined(BOOST_NO_STD_WSTRING) BOOST_AUTO_UNIT_TEST(wstring_tests) { BOOST_CHECK(compile_time_tests::success); boost::hash x1; boost::hash x2; BOOST_CHECK_EQUAL(x1(L"Hello"), x2(std::wstring(L"Hel") + L"lo")); BOOST_CHECK_EQUAL(x1(L""), x2(std::wstring())); } #endif