Skip to content

Commit e07cb80

Browse files
committed
Make generate_and_run_more_tests happy
1 parent dcfafee commit e07cb80

1 file changed

Lines changed: 20 additions & 20 deletions

File tree

tools/run_more_tests.sh

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -7,90 +7,90 @@ python tools/extracttests.py --code=test1 $1
77

88
cd test1
99

10-
../cppcheck -q . 2> 1.txt
10+
../cppcheck -q --template=cppcheck1 . 2> 1.txt
1111

1212

1313
# (!x) => (x==0)
1414
sed -ri 's/([(&][ ]*)\!([a-z]+)([ ]*[&)])/\1\2==0\3/' *.cpp
15-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
15+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
1616

1717
# (x==0) => (0==x)
1818
sed -ri 's/([(&][ ]*)([a-z]+)[ ]*==[ ]*0([ ]*[&)])/\10==\2\3/' *.cpp
19-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
19+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
2020

2121
# (0==x) => (!x)
2222
sed -ri 's/([(&][ ]*)0[ ]*==[ ]*([a-z]+)([ ]*[&)])/\1!\2\3/' *.cpp
23-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
23+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
2424

2525

2626

2727

2828
# if (x) => (x!=0)
2929
sed -ri 's/(if[ ]*\([ ]*[a-z]+)([ ]*[&)])/\1!=0\2/' *.cpp
30-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
30+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
3131

3232
# while (x) => (x!=0)
3333
sed -ri 's/(while[ ]*\([ ]*[a-z]+)([ ]*[&)])/\1!=0\2/' *.cpp
34-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
34+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
3535

3636
# (x!=0) => (0!=x)
3737
sed -ri 's/([(&][ ]*)([a-z]+)[ ]*!=[ ]*0([ ]*[&)])/\10!=\2\3/' *.cpp
38-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
38+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
3939

4040
# (0!=x) => (x)
4141
sed -ri 's/([(&][ ]*)0[ ]*!=[ ]*([a-z]+[ ]*[&)])/\1\2/' *.cpp
42-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
42+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
4343

4444

4545
# (x < 0) => (0 > x)
4646
sed -ri 's/([(&][ ]*)([a-z]+)[ ]*<[ ]*(\-?[0-9]+)([ ]*[&)])/\1\3>\2\4/' *.cpp
47-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
47+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
4848

4949
# (x <= 0) => (0 >= x)
5050
sed -ri 's/([(&][ ]*)([a-z]+)[ ]*<=[ ]*(\-?[0-9]+)([ ]*[&)])/\1\3>=\2\4/' *.cpp
51-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
51+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
5252

5353
# (x > 0) => (0 < x)
5454
sed -ri 's/([(&][ ]*)([a-z]+)[ ]*<=[ ]*(\-?[0-9]+)([ ]*[&)])/\1\3>=\2\4/' *.cpp
55-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
55+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
5656

5757
# (x >= 0) => (0 <= x)
5858
sed -ri 's/([(&][ ]*)([a-z]+)[ ]*<=[ ]*(\-?[0-9]+)([ ]*[&)])/\1\3>=\2\4/' *.cpp
59-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
59+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
6060

6161
# (x == 123) => (123 == x)
6262
sed -ri 's/([(&][ ]*)([a-z]+)[ ]*==[ ]*(\-?[0-9]+)([ ]*[&)])/\1\3==\2\4/' *.cpp
63-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
63+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
6464

6565
# (x != 123) => (123 != x)
6666
sed -ri 's/([(&][ ]*)([a-z]+)[ ]*\!=[ ]*(\-?[0-9]+)([ ]*[&)])/\1\3!=\2\4/' *.cpp
67-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
67+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
6868

6969

7070

7171
# (0 < x) => (x > 0)
7272
sed -ri 's/([(&][ ]*)(\-?[0-9]+)[ ]*<[ ]*([a-z]+)([ ]*[&)])/\1\3>\2\4/' *.cpp
73-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
73+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
7474

7575
# (0 <= x) => (x >= 0)
7676
sed -ri 's/([(&][ ]*)(\-?[0-9]+)[ ]*<=[ ]*([a-z]+)([ ]*[&)])/\1\3>=\2\4/' *.cpp
77-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
77+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
7878

7979
# (0 > x) => (x < 0)
8080
sed -ri 's/([(&][ ]*)(\-?[0-9]+)[ ]*<=[ ]*([a-z]+)([ ]*[&)])/\1\3>=\2\4/' *.cpp
81-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
81+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
8282

8383
# (0 >= x) => (x <= 0)
8484
sed -ri 's/([(&][ ]*)(\-?[0-9]+)[ ]*<=[ ]*([a-z]+)([ ]*[&)])/\1\3>=\2\4/' *.cpp
85-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
85+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
8686

8787
# (123 == x) => (x == 123)
8888
sed -ri 's/([(&][ ]*)(\-?[0-9]+)[ ]*==[ ]*([a-z]+)([ ]*[&)])/\1\3==\2\4/' *.cpp
89-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
89+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
9090

9191
# (123 != x) => (x <= 123)
9292
sed -ri 's/([(&][ ]*)(\-?[0-9]+)[ ]*\!=[ ]*([a-z]+)([ ]*[&)])/\1\3!=\2\4/' *.cpp
93-
../cppcheck -q . 2> 2.txt && diff 1.txt 2.txt
93+
../cppcheck -q --template=cppcheck1 . 2> 2.txt && diff 1.txt 2.txt
9494

9595

9696
cd ..

0 commit comments

Comments
 (0)