From f9bd589abbf26612c2200e5bbf4072033d4829e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 13 Jul 2019 07:29:06 +0200 Subject: [PATCH] testrunner: Make a few tests more 'proper' --- test/testvalueflow.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/testvalueflow.cpp b/test/testvalueflow.cpp index a5855b910..74834f409 100644 --- a/test/testvalueflow.cpp +++ b/test/testvalueflow.cpp @@ -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);