Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r56183 - sandbox/explore/libs/explore/test
From: jeff_at_[hidden]
Date: 2009-09-14 09:31:37


Author: jefffaust
Date: 2009-09-14 09:31:36 EDT (Mon, 14 Sep 2009)
New Revision: 56183
URL: http://svn.boost.org/trac/boost/changeset/56183

Log:
Test against compiler with no intrinsic wchar_t. Fix tests to handle issues not related to our library.
Text files modified:
   sandbox/explore/libs/explore/test/boost_explore_test_tools.hpp | 8 ++++++++
   sandbox/explore/libs/explore/test/custom_format_simple.cpp | 20 ++++++++++----------
   sandbox/explore/libs/explore/test/std_list.cpp | 17 +++++++++--------
   3 files changed, 27 insertions(+), 18 deletions(-)

Modified: sandbox/explore/libs/explore/test/boost_explore_test_tools.hpp
==============================================================================
--- sandbox/explore/libs/explore/test/boost_explore_test_tools.hpp (original)
+++ sandbox/explore/libs/explore/test/boost_explore_test_tools.hpp 2009-09-14 09:31:36 EDT (Mon, 14 Sep 2009)
@@ -20,6 +20,14 @@
 
 typedef boost::mpl::list<char, wchar_t> test_types;
 
+// a few tests have trouble with no intrinsic wchar_t. These troubles are not
+// related to our libraries, but cause compilation or tests to fail.
+#if defined(BOOST_NO_INTRINSIC_WCHAR_T)
+typedef boost::mpl::list<char> safe_test_types;
+#else
+typedef test_types safe_test_types;
+#endif
+
 template<typename C>
 struct test_traits;
 

Modified: sandbox/explore/libs/explore/test/custom_format_simple.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/custom_format_simple.cpp (original)
+++ sandbox/explore/libs/explore/test/custom_format_simple.cpp 2009-09-14 09:31:36 EDT (Mon, 14 Sep 2009)
@@ -1,11 +1,11 @@
 // Boost.Explore library
-
-// Copyright Jared McIntyre 2007. Use, modification and
-// distribution is 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)
-
-// For more information, see http://www.boost.org
+//
+// Copyright (C) 2007, Jared McIntyre
+// Copyright (C) 2009, Jeffrey Faust
+//
+// Distributed under 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)
+//
 
 #define BOOST_TEST_MODULE PrintLib
 #include <boost/test/unit_test.hpp>
@@ -94,7 +94,8 @@
     BOOST_CHECK_EQUAL(output(str_out), "<=\\1**first//#\\2**second//=>");
 }
 
-BOOST_AUTO_TEST_CASE_TEMPLATE( get_sticky_values_test, C, test_types )
+// safe_test_types: boost test tools have trouble with no intrinsic wchar_t
+BOOST_AUTO_TEST_CASE_TEMPLATE( get_sticky_values_test, C, safe_test_types )
 {
     using namespace boost::explore;
     typename test_traits<C>::stream_type str_out;
@@ -108,8 +109,7 @@
     BOOST_CHECK_EQUAL( get_assoc_item_end(str_out).c_str(), str_to<C>("") );
     
     str_out << basic_stream_format;
-
-
+
     BOOST_CHECK_EQUAL( get_start(str_out).c_str(), str_to<C>("<=") );
     BOOST_CHECK_EQUAL( get_separator(str_out).c_str(), str_to<C>("#") );
     BOOST_CHECK_EQUAL( get_end(str_out).c_str(), str_to<C>("=>") );

Modified: sandbox/explore/libs/explore/test/std_list.cpp
==============================================================================
--- sandbox/explore/libs/explore/test/std_list.cpp (original)
+++ sandbox/explore/libs/explore/test/std_list.cpp 2009-09-14 09:31:36 EDT (Mon, 14 Sep 2009)
@@ -1,11 +1,11 @@
 // Boost.Explore library
-
-// Copyright Jared McIntyre 2007. Use, modification and
-// distribution is 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)
-
-// For more information, see http://www.boost.org
+//
+// Copyright (C) 2007, Jared McIntyre
+// Copyright (C) 2009, Jeffrey Faust
+//
+// Distributed under 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)
+//
 
 #define BOOST_TEST_MODULE PrintLib
 #include <boost/test/unit_test.hpp>
@@ -14,7 +14,8 @@
 #include <boost/explore/iterator_range.hpp>
 #include "boost_explore_test_tools.hpp"
 
-BOOST_AUTO_TEST_CASE_TEMPLATE( basic_list_stream_test, C, test_types )
+// safe_test_types: trouble streaming complex to wchar_t stream with no intrinsic wchar_t
+BOOST_AUTO_TEST_CASE_TEMPLATE( basic_list_stream_test, C, safe_test_types )
 {
     typename test_traits<C>::stream_type str_out;
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk