Fixed #7999 (Inline suppressions do not work under weird circumstances)
This commit is contained in:
parent
383e1b7cd1
commit
0cc41f44b8
|
@ -0,0 +1,2 @@
|
|||
#include <1.h>
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
// cppcheck-suppress zerodiv
|
||||
const int x = 10000 / 0;
|
||||
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
# python -m pytest test-inline-suppress.py
|
||||
|
||||
import os
|
||||
import re
|
||||
from testutils import cppcheck
|
||||
|
||||
def test1():
|
||||
ret, stdout, stderr = cppcheck('--inline-suppr proj-inline-suppress')
|
||||
assert ret == 0
|
||||
assert len(stderr) == 0
|
||||
|
||||
def test2():
|
||||
ret, stdout, stderr = cppcheck('proj-inline-suppress')
|
||||
assert ret == 0
|
||||
assert len(stderr) > 0
|
||||
|
Loading…
Reference in New Issue