|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75694 - in trunk/libs/config/test: . all
From: bdawes_at_[hidden]
Date: 2011-11-27 11:19:59
Author: bemandawes
Date: 2011-11-27 11:19:55 EST (Sun, 27 Nov 2011)
New Revision: 75694
URL: http://svn.boost.org/trac/boost/changeset/75694
Log:
char16_t and char32_t tests: removed dependencies on Unicode literals, add test for implementations that are typedefs and so not really conforming. Unicode literal test: now check for all three forms of Unicode literals - u8, u, and U.
Text files modified:
trunk/libs/config/test/all/Jamfile.v2 | 2 +-
trunk/libs/config/test/boost_no_char16_t.ipp | 13 ++++++++++---
trunk/libs/config/test/boost_no_char32_t.ipp | 13 ++++++++++---
trunk/libs/config/test/boost_no_unicode_literals.ipp | 2 ++
trunk/libs/config/test/config_info.cpp | 4 ++++
trunk/libs/config/test/config_test.cpp | 2 +-
6 files changed, 28 insertions(+), 8 deletions(-)
Modified: trunk/libs/config/test/all/Jamfile.v2
==============================================================================
--- trunk/libs/config/test/all/Jamfile.v2 (original)
+++ trunk/libs/config/test/all/Jamfile.v2 2011-11-27 11:19:55 EST (Sun, 27 Nov 2011)
@@ -1,7 +1,7 @@
#
# Regression test Jamfile for boost configuration setup.
# *** DO NOT EDIT THIS FILE BY HAND ***
-# This file was automatically generated on Wed Jul 13 18:50:14 2011
+# This file was automatically generated on Sun Nov 27 09:43:19 2011
# by libs/config/tools/generate.cpp
# Copyright John Maddock.
# Use, modification and distribution are subject to the
Modified: trunk/libs/config/test/boost_no_char16_t.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_char16_t.ipp (original)
+++ trunk/libs/config/test/boost_no_char16_t.ipp 2011-11-27 11:19:55 EST (Sun, 27 Nov 2011)
@@ -13,12 +13,19 @@
namespace boost_no_char16_t {
-void quiet_warning(const char16_t*){}
+// Microsoft VC++ 2010, and possibly other compilers, provides
+// a typedef for char16_t rather than a new type. We want that
+// to be an error, so provide an overloaded function that will
+// be ambiguous if char16_t is just a typedef.
+void f(const char16_t*){}
+void f(const unsigned short*){}
+void f(const unsigned int*){}
+void f(const unsigned long*){}
int test()
{
- const char16_t* p = u"abc";
- quiet_warning(p);
+ const char16_t* p;
+ f(p);
return 0;
}
Modified: trunk/libs/config/test/boost_no_char32_t.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_char32_t.ipp (original)
+++ trunk/libs/config/test/boost_no_char32_t.ipp 2011-11-27 11:19:55 EST (Sun, 27 Nov 2011)
@@ -12,12 +12,19 @@
namespace boost_no_char32_t {
-void quiet_warning(const char32_t*){}
+// Microsoft VC++ 2010, and possibly other compilers, provides
+// a typedef for char32_t rather than a new type. We want that
+// to be an error, so provide an overloaded function that will
+// be ambiguous if char16_t is just a typedef.
+void f(const char32_t*){}
+void f(const unsigned short*){}
+void f(const unsigned int*){}
+void f(const unsigned long*){}
int test()
{
- const char32_t* p = U"abc";
- quiet_warning(p);
+ const char32_t* p;
+ f(p);
return 0;
}
Modified: trunk/libs/config/test/boost_no_unicode_literals.ipp
==============================================================================
--- trunk/libs/config/test/boost_no_unicode_literals.ipp (original)
+++ trunk/libs/config/test/boost_no_unicode_literals.ipp 2011-11-27 11:19:55 EST (Sun, 27 Nov 2011)
@@ -17,6 +17,8 @@
int test()
{
const char* c8 = u8"";
+ const char16_t* c16 = u"";
+ const char32_t* c32 = U"";
quiet_warning(c8);
return 0;
}
Modified: trunk/libs/config/test/config_info.cpp
==============================================================================
--- trunk/libs/config/test/config_info.cpp (original)
+++ trunk/libs/config/test/config_info.cpp 2011-11-27 11:19:55 EST (Sun, 27 Nov 2011)
@@ -1102,6 +1102,10 @@
+
+
+
+
// END GENERATED BLOCK
PRINT_MACRO(BOOST_INTEL);
Modified: trunk/libs/config/test/config_test.cpp
==============================================================================
--- trunk/libs/config/test/config_test.cpp (original)
+++ trunk/libs/config/test/config_test.cpp 2011-11-27 11:19:55 EST (Sun, 27 Nov 2011)
@@ -1,4 +1,4 @@
-// This file was automatically generated on Wed Jul 13 18:50:14 2011
+// This file was automatically generated on Sun Nov 27 09:43:19 2011
// by libs/config/tools/generate.cpp
// Copyright John Maddock 2002-4.
// Use, modification and distribution are subject to the
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