Skip to content

Commit 89bef24

Browse files
committed
make test independent of index type
1 parent e2e6d82 commit 89bef24

File tree

3 files changed

+27
-27
lines changed
  • 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

3 files changed

+27
-27
lines changed

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

Lines changed: 9 additions & 9 deletions
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

Lines changed: 9 additions & 9 deletions
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

Lines changed: 9 additions & 9 deletions
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)