Skip to content

Commit 153f88f

Browse files
committed
TestSuppressions: enabled all asserts in runChecks()
1 parent 406dd78 commit 153f88f

1 file changed

Lines changed: 4 additions & 8 deletions

File tree

test/testsuppressions.cpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -298,9 +298,8 @@ class TestSuppressions : public TestFixture {
298298
" a++;\n"
299299
"}\n",
300300
"uninitvar:test.cpp"));
301-
//TODO_ASSERT_EQUALS("", "[test.cpp]: (information) Unmatched suppression: uninitvar\n", errout.str());
301+
ASSERT_EQUALS("", errout.str());
302302

303-
// TODO: add assert - gives different result with threads/processes
304303
// suppress uninitvar for this file only, without error present
305304
(this->*check)("void f() {\n"
306305
" int a;\n"
@@ -315,9 +314,8 @@ class TestSuppressions : public TestFixture {
315314
" a++;\n"
316315
"}\n",
317316
"*:test.cpp"));
318-
//TODO_ASSERT_EQUALS("", "[test.cpp]: (information) Unmatched suppression: *\n", errout.str());
317+
ASSERT_EQUALS("", errout.str());
319318

320-
// TODO: add assert - gives different result with threads/processes
321319
// suppress all for this file only, without error present
322320
(this->*check)("void f() {\n"
323321
" int a;\n"
@@ -334,14 +332,13 @@ class TestSuppressions : public TestFixture {
334332
"uninitvar:test.cpp:3"));
335333
ASSERT_EQUALS("", errout.str());
336334

337-
// TODO: add assert - gives different result with threads/processes
338335
// suppress uninitvar for this file and line, without error present
339336
(this->*check)("void f() {\n"
340337
" int a;\n"
341338
" b++;\n"
342339
"}\n",
343340
"uninitvar:test.cpp:3");
344-
//TODO_ASSERT_EQUALS("[test.cpp:3]: (information) Unmatched suppression: uninitvar\n", "", errout.str());
341+
ASSERT_EQUALS("[test.cpp:3]: (information) Unmatched suppression: uninitvar\n", errout.str());
345342

346343
// suppress uninitvar inline
347344
ASSERT_EQUALS(0, (this->*check)("void f() {\n"
@@ -464,15 +461,14 @@ class TestSuppressions : public TestFixture {
464461
""));
465462
ASSERT_EQUALS("", errout.str());
466463

467-
// TODO: add assert - gives different result with threads/processes
468464
// suppress uninitvar inline, without error present
469465
(this->*check)("void f() {\n"
470466
" int a;\n"
471467
" // cppcheck-suppress uninitvar\n"
472468
" b++;\n"
473469
"}\n",
474470
"");
475-
//TODO_ASSERT_EQUALS("[test.cpp:4]: (information) Unmatched suppression: uninitvar\n", "", errout.str());
471+
ASSERT_EQUALS("[test.cpp:4]: (information) Unmatched suppression: uninitvar\n", errout.str());
476472

477473
// #5746 - exitcode
478474
ASSERT_EQUALS(1U,

0 commit comments

Comments
 (0)