Skip to content

Commit e8f11c4

Browse files
committed
single
1 parent 70fe377 commit e8f11c4

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

test/testsuppressions.cpp

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ class TestSuppressions : public TestFixture {
219219
files["test.cpp"] = strlen(code);
220220

221221
Settings settings;
222-
settings.jobs = 1;
222+
settings.jobs = 2;
223223
settings.inlineSuppressions = true;
224224
settings.severity.enable(Severity::information);
225225
if (!suppression.empty()) {
@@ -247,7 +247,7 @@ class TestSuppressions : public TestFixture {
247247
files["test.cpp"] = strlen(code);
248248

249249
Settings settings;
250-
settings.jobs = 1;
250+
settings.jobs = 2;
251251
settings.inlineSuppressions = true;
252252
settings.severity.enable(Severity::information);
253253
if (!suppression.empty()) {
@@ -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)