Skip to content

Commit ce3a5e9

Browse files
jgwilson42peterschrammel
jgwilson42
authored andcommitted
Basic tests for java goto-diff
1 parent 3bf9987 commit ce3a5e9

File tree

30 files changed

+288
-0
lines changed

30 files changed

+288
-0
lines changed
670 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
public class Test {
2+
3+
public int bar(int x) {
4+
if (x < 10) {
5+
return x;
6+
} else {
7+
return x / 10;
8+
}
9+
}
10+
}
697 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
3+
public int foo(int x) {
4+
if (x > 10) {
5+
return x;
6+
} else {
7+
return x * 10;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
new.jar
3+
old.jar --json-ui
4+
// Enable multi-line checking
5+
activate-multi-line-match
6+
EXIT=0
7+
SIGNAL=0
8+
"deletedFunctions": \[\n {\n "name": "java::Test\.foo:\(I\)I",\n "sourceLocation": {\n "file": "Test\.java",\n "function": "java::Test\.foo:\(I\)I",\n "line": "4"\n }\n }\n \],
9+
"modifiedFunctions": \[ \],
10+
"newFunctions": \[ \],
11+
--
12+
^warning: ignoring
697 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
public int foo(int x) {
3+
// This is a new comment
4+
if (x > 10) {
5+
return x;
6+
} else {
7+
return x * 10;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
697 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
3+
public int foo(int x) {
4+
if (x > 10) {
5+
return x;
6+
} else {
7+
return x * 10;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
new.jar
3+
old.jar --json-ui
4+
// Enable multi-line checking
5+
activate-multi-line-match
6+
EXIT=0
7+
SIGNAL=0
8+
"deletedFunctions": \[ \],
9+
"modifiedFunctions": \[ \],
10+
"newFunctions": \[ \],
11+
--
12+
^warning: ignoring
697 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
public int foo(int y) {
3+
// This is a new comment
4+
if (y > 10) {
5+
return y;
6+
} else {
7+
return y * 10;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
697 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
3+
public int foo(int x) {
4+
if (x > 10) {
5+
return x;
6+
} else {
7+
return x * 10;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
new.jar
3+
old.jar --json-ui
4+
// Enable multi-line checking
5+
activate-multi-line-match
6+
EXIT=0
7+
SIGNAL=0
8+
"deletedFunctions": \[ \],
9+
"modifiedFunctions": \[ \],
10+
"newFunctions": \[ \],
11+
--
12+
^warning: ignoring
704 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
3+
public int foo(int x, int y) {
4+
if (x > 10) {
5+
return x;
6+
} else {
7+
return y * 10;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
703 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
3+
public int foo(int x, int y) {
4+
if (x > 10) {
5+
return x;
6+
} else {
7+
return x * 10;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
new.jar
3+
old.jar --json-ui
4+
// Enable multi-line checking
5+
activate-multi-line-match
6+
EXIT=0
7+
SIGNAL=0
8+
"deletedFunctions": \[ \],
9+
"modifiedFunctions": \[\n {\n "name": "java::Test\.foo:\(II\)I",\n "sourceLocation": {\n "file": "Test\.java",\n "function": "java::Test\.foo:\(II\)I",\n "line": "4"\n }\n }\n \],\n
10+
"newFunctions": \[ \],
11+
--
12+
^warning: ignoring
724 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
public class Test {
2+
3+
public int foo(int x, int y) {
4+
if (x > 10) {
5+
return x;
6+
} else {
7+
return x * y;
8+
}
9+
}
10+
11+
public int foo(int x) {
12+
if (x > 10) {
13+
return x;
14+
} else {
15+
return x * 10;
16+
}
17+
}
18+
19+
public int bar(int x) {
20+
if (x < 10) {
21+
return x;
22+
} else {
23+
return x / 10;
24+
}
25+
}
26+
}
697 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
3+
public int foo(int x) {
4+
if (x > 10) {
5+
return x;
6+
} else {
7+
return x * 10;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
new.jar
3+
old.jar --json-ui
4+
// Enable multi-line checking
5+
activate-multi-line-match
6+
EXIT=0
7+
SIGNAL=0
8+
"deletedFunctions": \[ \],
9+
"modifiedFunctions": \[ \],
10+
"newFunctions": \[\n {\n "name": "java::Test\.foo:\(II\)I",\n "sourceLocation": {\n "file": "Test.java",\n "function": "java::Test\.foo:\(II\)I",\n "line": "4"\n }\n }\n \],
11+
--
12+
^warning: ignoring
697 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
public int foo(int x) {
3+
if (x > 10) {
4+
return x;
5+
} else {
6+
int y = x * 10;
7+
return y;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
697 Bytes
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
public class Test {
2+
3+
public int foo(int x) {
4+
if (x > 10) {
5+
return x;
6+
} else {
7+
return x * 10;
8+
}
9+
}
10+
11+
public int bar(int x) {
12+
if (x < 10) {
13+
return x;
14+
} else {
15+
return x / 10;
16+
}
17+
}
18+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
CORE
2+
new.jar
3+
old.jar --json-ui
4+
// Enable multi-line checking
5+
activate-multi-line-match
6+
EXIT=0
7+
SIGNAL=0
8+
"deletedFunctions": \[ \],
9+
"modifiedFunctions": \[ \],
10+
"newFunctions": \[ \],
11+
--
12+
^warning: ignoring

0 commit comments

Comments
 (0)