Skip to content

Commit 2145c4a

Browse files
Update testvalueflow.cpp
1 parent 129dba1 commit 2145c4a

1 file changed

Lines changed: 0 additions & 61 deletions

File tree

test/testvalueflow.cpp

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -9334,67 +9334,6 @@ class TestValueFlow : public TestFixture {
93349334
ASSERT_EQUALS(false, testValueOfX(code, 5U, 0));
93359335
}
93369336

9337-
void valueFlowImpossibleMinMax()
9338-
{
9339-
const char* code;
9340-
9341-
code = "void f(int a, int b) {\n"
9342-
" int x = a < b ? a : b;\n"
9343-
" return x;\n"
9344-
"}\n";
9345-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "a", 1));
9346-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "b", 1));
9347-
9348-
code = "void f(int a, int b) {\n"
9349-
" int x = a > b ? a : b;\n"
9350-
" return x;\n"
9351-
"}\n";
9352-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "a", -1));
9353-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "b", -1));
9354-
9355-
code = "void f(int a, int b) {\n"
9356-
" int x = a > b ? b : a;\n"
9357-
" return x;\n"
9358-
"}\n";
9359-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "a", 1));
9360-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "b", 1));
9361-
9362-
code = "void f(int a, int b) {\n"
9363-
" int x = a < b ? b : a;\n"
9364-
" return x;\n"
9365-
"}\n";
9366-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "a", -1));
9367-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "b", -1));
9368-
9369-
code = "void f(int a) {\n"
9370-
" int x = a < 0 ? a : 0;\n"
9371-
" return x;\n"
9372-
"}\n";
9373-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "a", 1));
9374-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, 1));
9375-
9376-
code = "void f(int a) {\n"
9377-
" int x = a > 0 ? a : 0;\n"
9378-
" return x;\n"
9379-
"}\n";
9380-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "a", -1));
9381-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, -1));
9382-
9383-
code = "void f(int a) {\n"
9384-
" int x = a > 0 ? 0 : a;\n"
9385-
" return x;\n"
9386-
"}\n";
9387-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "a", 1));
9388-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, 1));
9389-
9390-
code = "void f(int a) {\n"
9391-
" int x = a < 0 ? 0 : a;\n"
9392-
" return x;\n"
9393-
"}\n";
9394-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, "a", -1));
9395-
ASSERT_EQUALS(true, testValueOfXImpossible(code, 3U, -1));
9396-
}
9397-
93989337
void valueFlowImpossibleIncDec()
93999338
{
94009339
const char* code;

0 commit comments

Comments
 (0)