From be2bae0a14ade4e40acf740921995b357882f305 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 12 Jul 2004 23:02:03 +0000 Subject: [PATCH] Don't run the locale tests when locales aren't supported [SVN r23470] --- test/tribool_io_test.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/test/tribool_io_test.cpp b/test/tribool_io_test.cpp index a7ff77c..fa0256f 100644 --- a/test/tribool_io_test.cpp +++ b/test/tribool_io_test.cpp @@ -8,7 +8,10 @@ #include #include #include -#include + +#ifndef BOOST_NO_STD_LOCALE +# include +#endif int test_main(int, char*[]) { @@ -41,6 +44,7 @@ int test_main(int, char*[]) << std::endl; BOOST_TEST(out.str() == "2"); +#ifndef BOOST_NO_STD_LOCALE const std::numpunct& punct = BOOST_USE_FACET(std::numpunct, out.getloc()); @@ -67,9 +71,9 @@ int test_main(int, char*[]) << std::endl; BOOST_TEST(out.str() == "indeterminate"); -#if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) +# if BOOST_WORKAROUND(BOOST_DINKUMWARE_STDLIB, == 1) // No template constructors, so we can't build the test locale -#else +# else // Give indeterminate a new name, and output it via boolalpha std::locale global; std::locale test_locale(global, new indeterminate_name("maybe")); @@ -79,7 +83,8 @@ int test_main(int, char*[]) std::cout << "Output indeterminate (boolalpha - \"maybe\"): " << out.str() << std::endl; BOOST_TEST(out.str() == "maybe"); -#endif +# endif +#endif // ! BOOST_NO_STD_LOCALE // Checking tribool input