You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<error id="nullPointerRedundantCheck" severity="warning" msg="Either the condition 'p' is redundant or there is possible null pointer dereference: p." verbose="Either the condition 'p' is redundant or there is possible null pointer dereference: p." cwe="476" file0="{}" remark="boom">
Copy file name to clipboardExpand all lines: test/testerrorlogger.cpp
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ class TestErrorLogger : public TestFixture {
64
64
TEST_CASE(DeserializeInvalidInput);
65
65
TEST_CASE(SerializeSanitize);
66
66
TEST_CASE(SerializeFileLocation);
67
-
TEST_CASE(SerializeAndDeserializeRemark);
67
+
TEST_CASE(SerializeAndDeserialize);
68
68
69
69
TEST_CASE(substituteTemplateFormatStatic);
70
70
TEST_CASE(substituteTemplateLocationStatic);
@@ -353,6 +353,7 @@ class TestErrorLogger : public TestFixture {
353
353
"1 1"
354
354
"17 Programming error"
355
355
"17 Programming error"
356
+
"0 "
356
357
"0 ", msg_str);
357
358
358
359
ErrorMessage msg2;
@@ -397,6 +398,7 @@ class TestErrorLogger : public TestFixture {
397
398
"8 test.cpp"
398
399
"17 Programming error"
399
400
"17 Programming error"
401
+
"0 "
400
402
"0 ";
401
403
ErrorMessage msg;
402
404
ASSERT_THROW_INTERNAL_EQUALS(msg.deserialize(str), INTERNAL, "Internal Error: Deserialization of error message failed - invalid CWE ID - not an integer");
@@ -412,6 +414,7 @@ class TestErrorLogger : public TestFixture {
412
414
"8 test.cpp"
413
415
"17 Programming error"
414
416
"17 Programming error"
417
+
"0 "
415
418
"0 ";
416
419
ErrorMessage msg;
417
420
ASSERT_THROW_INTERNAL_EQUALS(msg.deserialize(str), INTERNAL, "Internal Error: Deserialization of error message failed - invalid hash - not an integer");
@@ -427,6 +430,7 @@ class TestErrorLogger : public TestFixture {
427
430
"8 test.cpp"
428
431
"17 Programming error"
429
432
"17 Programming error"
433
+
"0 "
430
434
"0 ";
431
435
ErrorMessage msg;
432
436
ASSERT_THROW_INTERNAL_EQUALS(msg.deserialize(str), INTERNAL, "Internal Error: Deserialization of error message failed - invalid CWE ID - out of range (limits)");
@@ -448,6 +452,7 @@ class TestErrorLogger : public TestFixture {
448
452
"1 0"
449
453
"33 Illegal character in \"foo\\001bar\""
450
454
"33 Illegal character in \"foo\\001bar\""
455
+
"0 "
451
456
"0 ", msg_str);
452
457
453
458
ErrorMessage msg2;
@@ -475,6 +480,7 @@ class TestErrorLogger : public TestFixture {
475
480
"1 1"
476
481
"17 Programming error"
477
482
"17 Programming error"
483
+
"0 "
478
484
"1 "
479
485
"27 654\t33\t[]:;,()\t:/,;\tabcd:/,", msg_str);
480
486
@@ -487,12 +493,24 @@ class TestErrorLogger : public TestFixture {
0 commit comments