Skip to content

Commit 0d96b0d

Browse files
author
Owen Jones
committed
Add test for string initializers
1 parent ce771d5 commit 0d96b0d

File tree

7 files changed

+46
-1
lines changed

7 files changed

+46
-1
lines changed

jbmc/regression/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ add_subdirectory(jbmc)
77
add_subdirectory(strings-smoke-tests)
88
add_subdirectory(jbmc-strings)
99
add_subdirectory(jdiff)
10+
add_subdirectory(janalyzer)
1011
add_subdirectory(janalyzer-taint)
1112
add_subdirectory(jbmc-concurrency)
1213
add_subdirectory(jbmc-inheritance)

jbmc/regression/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# For the best possible utilisation of multiple cores when
22
# running tests in parallel, it is important that these directories are
33
# listed with decreasing runtimes (i.e. longest running at the top)
4-
DIRS = janalyzer-taint \
4+
DIRS = janalyzer \
5+
janalyzer-taint \
56
jbmc \
67
jbmc-concurrency \
78
jbmc-inheritance \
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
add_test_pl_tests(
2+
"$<TARGET_FILE:janalyzer>"
3+
)

jbmc/regression/janalyzer/Makefile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
default: tests.log
2+
3+
include ../../src/config.inc
4+
5+
test:
6+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/janalyzer/janalyzer
7+
8+
tests.log: ../$(CPROVER_DIR)/regression/test.pl
9+
@../$(CPROVER_DIR)/regression/test.pl -p -c ../../../src/janalyzer/janalyzer
10+
11+
show:
12+
@for dir in *; do \
13+
if [ -d "$$dir" ]; then \
14+
vim -o "$$dir/*.java" "$$dir/*.out"; \
15+
fi; \
16+
done;
17+
18+
clean:
19+
find -name '*.out' -execdir $(RM) '{}' \;
20+
find -name '*.gb' -execdir $(RM) '{}' \;
21+
$(RM) tests.log
Binary file not shown.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
class Basic1
2+
{
3+
public static void main(String[] args) {
4+
String s = "Hello ";
5+
s += "World!";
6+
if(s.equals("Hello World!"))
7+
System.out.printf("Hello World!");
8+
}
9+
};
10+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CORE
2+
Basic1.class
3+
--location-sensitive --constants --show
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
Hello_20 = \{ \.@class_identifier="java::java\.lang\.String" \};
7+
java::java\.lang\.String\.Literal\.Hello_20=\{ \.@class_identifier="java::java\.lang\.String" \}
8+
--
9+
^warning: ignoring

0 commit comments

Comments
 (0)