From bf776044d895d8c8287116529dfb293d2dde6f6e Mon Sep 17 00:00:00 2001 From: PKEuS Date: Fri, 17 Feb 2012 16:09:24 +0100 Subject: [PATCH] Fixed compiler error --- test/testclass.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/test/testclass.cpp b/test/testclass.cpp index 1b27fc82a..9c9a38c95 100644 --- a/test/testclass.cpp +++ b/test/testclass.cpp @@ -6367,23 +6367,23 @@ private: } void constIfCfg() { - const char code[] = "class foo {\n" - " void f() { }\n" + const char code[] = "struct foo {\n" + " int i;\n" + " void f() {\n" + //"#ifdef ABC\n" + //" i = 4;\n" + //"endif\n" + " }\n" "};"; Settings settings; settings.addEnabled("style"); - settings.ifcfg = false; - checkConst(code, &settings); - ASSERT_EQUALS("[test.cpp:2]: (style) Technically the member function 'foo::f' can be const.\n", errout.str()); - - settings.ifcfg = true; - checkConst(code, &settings, false); - ASSERT_EQUALS("", errout.str()); - checkConst(code, &settings, true); - ASSERT_EQUALS("[test.cpp:2]: (style) Technically the member function 'foo::f' can be const.\n", errout.str()); + ASSERT_EQUALS("[test.cpp:3]: (style) Technically the member function 'foo::f' can be const.\n", errout.str()); + + checkConst(code, &settings, false); // TODO: Set inconclusive to true (preprocess it) + ASSERT_EQUALS("", errout.str()); } void constFriend() { // ticket #1921