]> git.saurik.com Git - wxWidgets.git/commitdiff
Blind VC6 compilation fix for VarArgTestCase.
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Jul 2010 22:50:37 +0000 (22:50 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 12 Jul 2010 22:50:37 +0000 (22:50 +0000)
VC6 tries to use inaccessible copy ctor of the variable passed to
wxString::Format() for some reason.

Just disable the test for it, it's not worth trying to understand this
compiler, and our code gets tested with other ones anyhow.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

tests/strings/vararg.cpp

index 1aae2d1434892e8a8b14957bcbb30506049c6ff6..b1670dfa982121836969be7fdae627f9defd02b4 100644 (file)
@@ -216,8 +216,11 @@ void VarArgTestCase::ArgsValidation()
     WX_ASSERT_FAILS_WITH_ASSERT( wxString::Format("foo%n", ptr) );
     WX_ASSERT_FAILS_WITH_ASSERT( wxString::Format("foo%i%n", 42, &swritten) );
 
-#if !defined(HAVE_TYPE_TRAITS) && !defined(HAVE_TR1_TYPE_TRAITS)
-    // this fails at compile-time with <type_traits>
+    // the following test (correctly) fails at compile-time with <type_traits>
+    // and it also (wrongly) fails when using VC6 because it somehow tries to
+    // use (inaccessible) VarArgTestCase copy ctor (FIXME-VC6)
+#if !defined(HAVE_TYPE_TRAITS) && !defined(HAVE_TR1_TYPE_TRAITS) && \
+        !defined(__VISUALC6__)
     VarArgTestCase& somePOD = *this;
     WX_ASSERT_FAILS_WITH_ASSERT( wxString::Format("%s", somePOD) );
 #endif