testrunner: Make a few tests more 'proper'

This commit is contained in:
Daniel Marjamäki 2019-07-13 07:29:06 +02:00
parent 61dcf10b6c
commit f9bd589abb
1 changed files with 3 additions and 3 deletions

View File

@ -3912,7 +3912,7 @@ private:
Settings s;
s.allFunctionsAreSafe = true;
code = "void f(short x) {\n"
code = "short f(short x) {\n"
" return x + 0;\n"
"}";
values = tokenValues(code, "+", &s);
@ -3920,7 +3920,7 @@ private:
ASSERT_EQUALS(-0x8000, values.front().intvalue);
ASSERT_EQUALS(0x7fff, values.back().intvalue);
code = "void f(__cppcheck_in_range__(0,100) short x) {\n"
code = "short f(__cppcheck_in_range__(0,100) short x) {\n"
" return x + 0;\n"
"}";
values = tokenValues(code, "+", &s);
@ -3928,7 +3928,7 @@ private:
ASSERT_EQUALS(0, values.front().intvalue);
ASSERT_EQUALS(100, values.back().intvalue);
code = "void f(unsigned short x) [[expects: x <= 100]] {\n"
code = "unsigned short f(unsigned short x) [[expects: x <= 100]] {\n"
" return x + 0;\n"
"}";
values = tokenValues(code, "+", &s);