Skip to content

Commit

Permalink
Merge pull request #1705 from jgwilson42/goto-diff-tests
Browse files Browse the repository at this point in the history
Goto diff tests and access qualifier comparison
  • Loading branch information
peterschrammel authored Jan 23, 2018
2 parents bc145fd + e4a2763 commit e6fe617
Show file tree
Hide file tree
Showing 62 changed files with 630 additions and 0 deletions.
Binary file added regression/goto-diff/java-add-package/new.jar
Binary file not shown.
20 changes: 20 additions & 0 deletions regression/goto-diff/java-add-package/new/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package foo;

public class Test {
public int foo(int x) {
if (x > 10) {
return x;
} else {
int y = x * 10;
return y;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
Binary file added regression/goto-diff/java-add-package/old.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions regression/goto-diff/java-add-package/old/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class Test {

public int foo(int x) {
if (x > 10) {
return x;
} else {
return x * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
12 changes: 12 additions & 0 deletions regression/goto-diff/java-add-package/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
new.jar
old.jar --json-ui
// Enable multi-line checking
activate-multi-line-match
EXIT=0
SIGNAL=0
"deletedFunctions": \[\n {\n "name": "java::Test\.<init>:\(\)V",\n "sourceLocation": {\n "file": "Test\.java",\n "function": "java::Test\.<init>:\(\)\V",\n "line": "1"\n }\n },\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 {\n "name": "java::Test\.bar:\(I\)I",\n "sourceLocation": {\n "file": "Test\.java",\n "function": "java::Test.bar:\(I\)I",\n "line": "12"\n }\n }\n \],\n
"modifiedFunctions": \[ \],
"newFunctions": \[\n {\n "name": "java::foo\.Test\.<init>:\(\)V",\n "sourceLocation": {\n "file": "foo/Test\.java",\n "function": "java::foo\.Test\.<init>:\(\)V",\n "line": "3"\n }\n },\n {\n "name": "java::foo\.Test\.foo:\(I\)I",\n "sourceLocation": {\n "file": "foo/Test\.java",\n "function": "java::foo\.Test\.foo:\(I\)I",\n "line": "5"\n }\n },\n {\n "name": "java::foo\.Test\.bar:\(I\)I",\n "sourceLocation": {\n "file": "foo/Test\.java",\n "function": "java::foo\.Test\.bar:\(I\)I",\n "line": "14"\n }\n }\n \],
--
^warning: ignoring
Binary file added regression/goto-diff/java-del-package/new.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions regression/goto-diff/java-del-package/new/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class Test {

public int foo(int x) {
if (x > 10) {
return x;
} else {
return x * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
Binary file added regression/goto-diff/java-del-package/old.jar
Binary file not shown.
20 changes: 20 additions & 0 deletions regression/goto-diff/java-del-package/old/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package foo;

public class Test {
public int foo(int x) {
if (x > 10) {
return x;
} else {
int y = x * 10;
return y;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
12 changes: 12 additions & 0 deletions regression/goto-diff/java-del-package/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
new.jar
old.jar --json-ui
// Enable multi-line checking
activate-multi-line-match
EXIT=0
SIGNAL=0
"deletedFunctions": \[\n {\n "name": "java::foo\.Test\.<init>:\(\)V",\n "sourceLocation": {\n "file": "foo/Test\.java",\n "function": "java::foo\.Test\.<init>:\(\)V",\n "line": "3"\n }\n },\n {\n "name": "java::foo\.Test\.foo:\(I\)I",\n "sourceLocation": {\n "file": "foo/Test\.java",\n "function": "java::foo\.Test\.foo:\(I\)I",\n "line": "5"\n }\n },\n {\n "name": "java::foo\.Test\.bar:\(I\)I",\n "sourceLocation": {\n "file": "foo/Test\.java",\n "function": "java::foo\.Test\.bar:\(I\)I",\n "line": "14"\n }\n }\n \],
"modifiedFunctions": \[ \],
"newFunctions": \[\n {\n "name": "java::Test\.<init>:\(\)V",\n "sourceLocation": {\n "file": "Test\.java",\n "function": "java::Test\.<init>:\(\)\V",\n "line": "1"\n }\n },\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 {\n "name": "java::Test\.bar:\(I\)I",\n "sourceLocation": {\n "file": "Test\.java",\n "function": "java::Test.bar:\(I\)I",\n "line": "12"\n }\n }\n \],\n
--
^warning: ignoring
Binary file added regression/goto-diff/java-deleted-function/new.jar
Binary file not shown.
10 changes: 10 additions & 0 deletions regression/goto-diff/java-deleted-function/new/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
public class Test {

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
Binary file added regression/goto-diff/java-deleted-function/old.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions regression/goto-diff/java-deleted-function/old/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class Test {

public int foo(int x) {
if (x > 10) {
return x;
} else {
return x * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
12 changes: 12 additions & 0 deletions regression/goto-diff/java-deleted-function/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
new.jar
old.jar --json-ui
// Enable multi-line checking
activate-multi-line-match
EXIT=0
SIGNAL=0
"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 \],
"modifiedFunctions": \[ \],
"newFunctions": \[ \],
--
^warning: ignoring
Binary file added regression/goto-diff/java-mod-comment/new.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions regression/goto-diff/java-mod-comment/new/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class Test {
public int foo(int x) {
// This is a new comment
if (x > 10) {
return x;
} else {
return x * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
Binary file added regression/goto-diff/java-mod-comment/old.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions regression/goto-diff/java-mod-comment/old/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class Test {

public int foo(int x) {
if (x > 10) {
return x;
} else {
return x * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
12 changes: 12 additions & 0 deletions regression/goto-diff/java-mod-comment/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
new.jar
old.jar --json-ui
// Enable multi-line checking
activate-multi-line-match
EXIT=0
SIGNAL=0
"deletedFunctions": \[ \],
"modifiedFunctions": \[ \],
"newFunctions": \[ \],
--
^warning: ignoring
Binary file added regression/goto-diff/java-mod-identifier/new.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions regression/goto-diff/java-mod-identifier/new/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class Test {
public int foo(int y) {
// This is a new comment
if (y > 10) {
return y;
} else {
return y * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
Binary file added regression/goto-diff/java-mod-identifier/old.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions regression/goto-diff/java-mod-identifier/old/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class Test {

public int foo(int x) {
if (x > 10) {
return x;
} else {
return x * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
12 changes: 12 additions & 0 deletions regression/goto-diff/java-mod-identifier/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
new.jar
old.jar --json-ui
// Enable multi-line checking
activate-multi-line-match
EXIT=0
SIGNAL=0
"deletedFunctions": \[ \],
"modifiedFunctions": \[ \],
"newFunctions": \[ \],
--
^warning: ignoring
Binary file added regression/goto-diff/java-mod-identifier2/new.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions regression/goto-diff/java-mod-identifier2/new/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class Test {

public int foo(int x, int y) {
if (x > 10) {
return x;
} else {
return y * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
Binary file added regression/goto-diff/java-mod-identifier2/old.jar
Binary file not shown.
18 changes: 18 additions & 0 deletions regression/goto-diff/java-mod-identifier2/old/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
public class Test {

public int foo(int x, int y) {
if (x > 10) {
return x;
} else {
return x * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
12 changes: 12 additions & 0 deletions regression/goto-diff/java-mod-identifier2/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
new.jar
old.jar --json-ui
// Enable multi-line checking
activate-multi-line-match
EXIT=0
SIGNAL=0
"deletedFunctions": \[ \],
"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
"newFunctions": \[ \],
--
^warning: ignoring
Binary file added regression/goto-diff/java-mod-package/new.jar
Binary file not shown.
20 changes: 20 additions & 0 deletions regression/goto-diff/java-mod-package/new/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.diffblue.foo;

public class Test {

public int foo(int x) {
if (x > 10) {
return x;
} else {
return x * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
Binary file added regression/goto-diff/java-mod-package/old.jar
Binary file not shown.
20 changes: 20 additions & 0 deletions regression/goto-diff/java-mod-package/old/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package foo;

public class Test {
public int foo(int x) {
if (x > 10) {
return x;
} else {
int y = x * 10;
return y;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
12 changes: 12 additions & 0 deletions regression/goto-diff/java-mod-package/test.desc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
CORE
new.jar
old.jar --json-ui
// Enable multi-line checking
activate-multi-line-match
EXIT=0
SIGNAL=0
"deletedFunctions": \[\n {\n "name": "java::foo\.Test\.<init>:\(\)V",\n "sourceLocation": {\n "file": "foo/Test\.java",\n "function": "java::foo\.Test\.<init>:\(\)V",\n "line": "3"\n }\n },\n {\n "name": "java::foo\.Test\.foo:\(I\)I",\n "sourceLocation": {\n "file": "foo/Test\.java",\n "function": "java::foo\.Test\.foo:\(I\)I",\n "line": "5"\n }\n },\n {\n "name": "java::foo\.Test\.bar:\(I\)I",\n "sourceLocation": {\n "file": "foo/Test\.java",\n "function": "java::foo\.Test\.bar:\(I\)I",\n "line": "14"\n }\n }\n \],
"modifiedFunctions": \[ \],
"newFunctions": \[\n {\n "name": "java::com\.diffblue\.foo\.Test\.<init>:\(\)V",\n "sourceLocation": {\n "file": "com/diffblue/foo/Test\.java",\n "function": "java::com\.diffblue\.foo\.Test\.<init>:\(\)\V",\n "line": "3"\n }\n },\n {\n "name": "java::com\.diffblue\.foo\.Test\.foo:\(I\)I",\n "sourceLocation": {\n "file": "com/diffblue/foo/Test\.java",\n "function": "java::com\.diffblue\.foo\.Test\.foo:\(I\)I",\n "line": "6"\n }\n },\n {\n "name": "java::com\.diffblue\.foo\.Test\.bar:\(I\)I",\n "sourceLocation": {\n "file": "com/diffblue/foo/Test\.java",\n "function": "java::com\.diffblue\.foo\.Test.bar:\(I\)I",\n "line": "14"\n }\n }\n \],\n
--
^warning: ignoring
Binary file added regression/goto-diff/java-new-function/new.jar
Binary file not shown.
26 changes: 26 additions & 0 deletions regression/goto-diff/java-new-function/new/Test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
public class Test {

public int foo(int x, int y) {
if (x > 10) {
return x;
} else {
return x * y;
}
}

public int foo(int x) {
if (x > 10) {
return x;
} else {
return x * 10;
}
}

public int bar(int x) {
if (x < 10) {
return x;
} else {
return x / 10;
}
}
}
Binary file added regression/goto-diff/java-new-function/old.jar
Binary file not shown.
Loading

0 comments on commit e6fe617

Please sign in to comment.