Skip to content

Commit f7cd161

Browse files
author
Daniel Kroening
authored
Merge pull request #2371 from diffblue/fix-tests2
make test independent of index type
2 parents f5f32da + 82753bc commit f7cd161

File tree

4 files changed

+28
-28
lines changed
  • jbmc/regression/jbmc/json_trace3
  • regression/goto-analyzer
    • approx-array-variable-const-fp
    • no-match-dereference-const-pointer-const-array-literal-pointer-const-fp
    • no-match-pointer-const-struct-array-literal-non-const-fp

4 files changed

+28
-28
lines changed

jbmc/regression/jbmc/json_trace3/test.desc

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Test.class
44
activate-multi-line-match
55
EXIT=0
66
SIGNAL=0
7-
"lhs": "dynamic_2_array\[1L\]",\n *"mode": "java",\n *"sourceLocation": \{\n *"bytecodeIndex": "15",\n *"file": "Test\.java",\n *"function": "java::Test\.main:\(\[J\)V",\n *"line": "6"\n *\},\n *"stepType": "assignment",\n *"thread": 0,\n *"value": \{\n *"binary": "0000000000000000000000000000000000000000000000000000000000000001",\n *"data": "1L",\n *"name": "integer",\n *"type": "long",\n *"width": 64
7+
"lhs": "dynamic_2_array\[1L?\]",\n *"mode": "java",\n *"sourceLocation": \{\n *"bytecodeIndex": "15",\n *"file": "Test\.java",\n *"function": "java::Test\.main:\(\[J\)V",\n *"line": "6"\n *\},\n *"stepType": "assignment",\n *"thread": 0,\n *"value": \{\n *"binary": "0000000000000000000000000000000000000000000000000000000000000001",\n *"data": "1L",\n *"name": "integer",\n *"type": "long",\n *"width": 64
88
--
99
"name": "unknown"
1010
^warning: ignoring

regression/goto-analyzer/approx-array-variable-const-fp/test.desc

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ CORE
22
main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44
^Removing function pointers and virtual functions$
5-
^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f2 THEN GOTO [0-9]$
6-
^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f3 THEN GOTO [0-9]$
7-
^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f4 THEN GOTO [0-9]$
5+
^\s*IF fp_tbl\[.*i\] == f2 THEN GOTO [0-9]$
6+
^\s*IF fp_tbl\[.*i\] == f3 THEN GOTO [0-9]$
7+
^\s*IF fp_tbl\[.*i\] == f4 THEN GOTO [0-9]$
88
^EXIT=0$
99
^SIGNAL=0$
1010
--
11-
^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f1 THEN GOTO [0-9]$
12-
^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f5 THEN GOTO [0-9]$
13-
^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f6 THEN GOTO [0-9]$
14-
^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f7 THEN GOTO [0-9]$
15-
^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f8 THEN GOTO [0-9]$
16-
^\s*IF fp_tbl\[\(signed (long )*long int\)i\] == f9 THEN GOTO [0-9]$
11+
^\s*IF fp_tbl\[.*i\] == f1 THEN GOTO [0-9]$
12+
^\s*IF fp_tbl\[.*i\] == f5 THEN GOTO [0-9]$
13+
^\s*IF fp_tbl\[.*i\] == f6 THEN GOTO [0-9]$
14+
^\s*IF fp_tbl\[.*i\] == f7 THEN GOTO [0-9]$
15+
^\s*IF fp_tbl\[.*i\] == f8 THEN GOTO [0-9]$
16+
^\s*IF fp_tbl\[.*i\] == f9 THEN GOTO [0-9]$
1717
^warning: ignoring
1818
function \w+: replacing function pointer by 9 possible targets

regression/goto-analyzer/no-match-dereference-const-pointer-const-array-literal-pointer-const-fp/test.desc

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ CORE
22
main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44
^Removing function pointers and virtual functions$
5-
^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f1 THEN GOTO [0-9]$
6-
^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f2 THEN GOTO [0-9]$
7-
^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f3 THEN GOTO [0-9]$
8-
^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f4 THEN GOTO [0-9]$
9-
^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f5 THEN GOTO [0-9]$
10-
^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f6 THEN GOTO [0-9]$
11-
^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f7 THEN GOTO [0-9]$
12-
^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f8 THEN GOTO [0-9]$
13-
^\s*IF \*container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f9 THEN GOTO [0-9]$
5+
^\s*IF \*container_ptr->fp_tbl\[.*1\] == f1 THEN GOTO [0-9]$
6+
^\s*IF \*container_ptr->fp_tbl\[.*1\] == f2 THEN GOTO [0-9]$
7+
^\s*IF \*container_ptr->fp_tbl\[.*1\] == f3 THEN GOTO [0-9]$
8+
^\s*IF \*container_ptr->fp_tbl\[.*1\] == f4 THEN GOTO [0-9]$
9+
^\s*IF \*container_ptr->fp_tbl\[.*1\] == f5 THEN GOTO [0-9]$
10+
^\s*IF \*container_ptr->fp_tbl\[.*1\] == f6 THEN GOTO [0-9]$
11+
^\s*IF \*container_ptr->fp_tbl\[.*1\] == f7 THEN GOTO [0-9]$
12+
^\s*IF \*container_ptr->fp_tbl\[.*1\] == f8 THEN GOTO [0-9]$
13+
^\s*IF \*container_ptr->fp_tbl\[.*1\] == f9 THEN GOTO [0-9]$
1414
^EXIT=0$
1515
^SIGNAL=0$
1616
--

regression/goto-analyzer/no-match-pointer-const-struct-array-literal-non-const-fp/test.desc

+9-9
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ CORE
22
main.c
33
--show-goto-functions --verbosity 10 --pointer-check
44
^Removing function pointers and virtual functions$
5-
^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f1 THEN GOTO [0-9]$
6-
^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f2 THEN GOTO [0-9]$
7-
^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f3 THEN GOTO [0-9]$
8-
^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f4 THEN GOTO [0-9]$
9-
^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f5 THEN GOTO [0-9]$
10-
^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f6 THEN GOTO [0-9]$
11-
^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f7 THEN GOTO [0-9]$
12-
^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f8 THEN GOTO [0-9]$
13-
^\s*IF container_ptr->fp_tbl\[\(signed (long )*long int\)1\] == f9 THEN GOTO [0-9]$
5+
^\s*IF container_ptr->fp_tbl\[.*1\] == f1 THEN GOTO [0-9]$
6+
^\s*IF container_ptr->fp_tbl\[.*1\] == f2 THEN GOTO [0-9]$
7+
^\s*IF container_ptr->fp_tbl\[.*1\] == f3 THEN GOTO [0-9]$
8+
^\s*IF container_ptr->fp_tbl\[.*1\] == f4 THEN GOTO [0-9]$
9+
^\s*IF container_ptr->fp_tbl\[.*1\] == f5 THEN GOTO [0-9]$
10+
^\s*IF container_ptr->fp_tbl\[.*1\] == f6 THEN GOTO [0-9]$
11+
^\s*IF container_ptr->fp_tbl\[.*1\] == f7 THEN GOTO [0-9]$
12+
^\s*IF container_ptr->fp_tbl\[.*1\] == f8 THEN GOTO [0-9]$
13+
^\s*IF container_ptr->fp_tbl\[.*1\] == f9 THEN GOTO [0-9]$
1414
^EXIT=0$
1515
^SIGNAL=0$
1616
--

0 commit comments

Comments
 (0)