aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolás Alvarez <nicolas.alvarez@gmail.com>2014-06-21 01:36:04 -0300
committerNicolás Alvarez <nicolas.alvarez@gmail.com>2014-06-27 21:44:46 -0300
commit55c055470aa4f8e153688c7720811c6413d71346 (patch)
treef17278a7b919ef3978a3a899d576bbe1aa964d08
parentd213cf146e9548a2f75b5084b679bf5dbad680b8 (diff)
downloadkconfig-55c055470aa4f8e153688c7720811c6413d71346.tar.gz
kconfig-55c055470aa4f8e153688c7720811c6413d71346.tar.bz2
Fix build on Visual C++ 2010.
Visual C++ 2010 throws an internal compiler error trying to compile kconfigtest, since 5f4dc2973f. I couldn't figure out a non-intrusive code tweak that would work around the ICE, so I had to skip compiling this particular initialization code on this particular compiler version, and skip running the test that relies on it (testEnums). The dummy=42 entry is so that the config group isn't empty, which makes testGroupCopyTo and testReparent still run and pass, so we don't need to skip them. REVIEW:118852
-rw-r--r--autotests/kconfigtest.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/autotests/kconfigtest.cpp b/autotests/kconfigtest.cpp
index a8482b70..b621ac55 100644
--- a/autotests/kconfigtest.cpp
+++ b/autotests/kconfigtest.cpp
@@ -166,10 +166,15 @@ void KConfigTest::initTestCase()
cg.writePathEntry("homepathescape", HOMEPATHESCAPE);
cg = KConfigGroup(&sc, "Enum Types");
+#if _MSC_VER == 1600
+ cg.writeEntry("dummy", 42);
+#else
+ //Visual C++ 2010 throws an Internal Compiler Error here
cg.writeEntry("enum-10", Tens);
cg.writeEntry("enum-100", Hundreds);
cg.writeEntry("flags-bit0", Flags(bit0));
cg.writeEntry("flags-bit0-bit1", Flags(bit0 | bit1));
+#endif
cg = KConfigGroup(&sc, "ParentGroup");
KConfigGroup cg1(&cg, "SubGroup1");
@@ -560,6 +565,12 @@ void KConfigTest::testComplex()
void KConfigTest::testEnums()
{
+ //Visual C++ 2010 (compiler version 16.0) throws an Internal Compiler Error
+ //when compiling the code in initTestCase that creates these KConfig entries,
+ //so we can't run this test
+#if _MSC_VER == 1600
+ QSKIP("Visual C++ 2010 can't compile this test");
+#endif
KConfig sc(TEST_SUBDIR "kconfigtest");
KConfigGroup sc3(&sc, "Enum Types");