Skip to content

Commit a1f285d

Browse files
Add test for hashcons warning
Co-authored-by: michael-schwarz <13812333+michael-schwarz@users.noreply.github.com>
1 parent 6f83ac0 commit a1f285d

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// Test to verify warning is issued when hashconsing is disabled but ARG or Apron is enabled
2+
int main(void) {
3+
return 0;
4+
}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
Test that warning is issued when hashconsing is disabled but ARG is enabled:
2+
3+
$ goblint --disable ana.opt.hashcons --enable exp.arg.enabled 52-hashcons-warning.c 2>&1 | grep -i "hashcons"
4+
[Warning] Hashconsing (ana.opt.hashcons) is disabled, but is implicitly enabled because ARG is enabled (exp.arg.enabled)
5+
6+
Test that warning is issued when hashconsing is disabled but Apron is enabled:
7+
8+
$ goblint --disable ana.opt.hashcons --set ana.activated[+] apron 52-hashcons-warning.c 2>&1 | grep -i "hashcons"
9+
[Warning] Hashconsing (ana.opt.hashcons) is disabled, but may be required for Apron domain (ana.activated includes 'apron')
10+
11+
Test that no warning is issued when hashconsing is enabled with ARG:
12+
13+
$ goblint --enable ana.opt.hashcons --enable exp.arg.enabled 52-hashcons-warning.c 2>&1 | grep -i "hashcons"
14+
[1]
15+
16+
Test that no warning is issued when hashconsing is enabled with Apron:
17+
18+
$ goblint --enable ana.opt.hashcons --set ana.activated[+] apron 52-hashcons-warning.c 2>&1 | grep -i "hashcons"
19+
[1]
20+
21+
Test that no warning is issued when hashconsing is disabled without ARG or Apron:
22+
23+
$ goblint --disable ana.opt.hashcons 52-hashcons-warning.c 2>&1 | grep -i "hashcons"
24+
[1]

0 commit comments

Comments
 (0)