From: Vadim Zeitlin <vadim@wxwidgets.org>
Date: Mon, 12 Jul 2010 22:50:37 +0000 (+0000)
Subject: Blind VC6 compilation fix for VarArgTestCase.
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/71e33c7524c79ac68c69bd1f31fc04f5394be1d6?ds=sidebyside

Blind VC6 compilation fix for VarArgTestCase.

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
---

diff --git a/tests/strings/vararg.cpp b/tests/strings/vararg.cpp
index 1aae2d1434..b1670dfa98 100644
--- a/tests/strings/vararg.cpp
+++ b/tests/strings/vararg.cpp
@@ -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