-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Tests for scope changes for variables and functions
- Loading branch information
1 parent
8ee1956
commit e4a2763
Showing
16 changed files
with
153 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
public class Test { | ||
|
||
private int foo(int x) { | ||
if (x > 10) { | ||
return x; | ||
} else { | ||
return x * 10; | ||
} | ||
} | ||
|
||
protected int bar(int x) { | ||
if (x < 10) { | ||
return x; | ||
} else { | ||
return x / 10; | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CORE | ||
new.jar | ||
old.jar --json-ui | ||
// Enable multi-line checking | ||
activate-multi-line-match | ||
EXIT=0 | ||
SIGNAL=0 | ||
"deletedFunctions": \[ \],\n "modifiedFunctions": \[\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 "newFunctions": \[ \], | ||
-- | ||
^warning: ignoring | ||
-- |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
public class Test { | ||
|
||
private int y = 5; | ||
|
||
public int foo(int x) { | ||
if (x > 10 && y > 5) { | ||
return y; | ||
} else { | ||
return y * 10; | ||
} | ||
} | ||
|
||
public int bar(int x) { | ||
if (x < 10) { | ||
return x; | ||
} else { | ||
return x / 10; | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
public class Test { | ||
|
||
public int y = 5; | ||
|
||
public int foo(int x) { | ||
if (x > 10 && y > 5) { | ||
return y; | ||
} else { | ||
return y * 10; | ||
} | ||
} | ||
|
||
public int bar(int x) { | ||
if (x < 10) { | ||
return x; | ||
} else { | ||
return x / 10; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CORE | ||
new.jar | ||
old.jar --json-ui | ||
// Enable multi-line checking | ||
activate-multi-line-match | ||
EXIT=0 | ||
SIGNAL=0 | ||
"deletedFunctions": \[ \],\n "modifiedFunctions": \[\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": "6"\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": "14"\n }\n }\n \],\n "newFunctions": \[ \], | ||
-- | ||
^warning: ignoring | ||
-- |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
class Test { | ||
|
||
public int y = 5; | ||
|
||
public int foo(int x) { | ||
if (x > 10 && y > 5) { | ||
return y; | ||
} else { | ||
return y * 10; | ||
} | ||
} | ||
|
||
public int bar(int x) { | ||
if (x < 10) { | ||
return x; | ||
} else { | ||
return x / 10; | ||
} | ||
} | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
public class Test { | ||
|
||
public int y = 5; | ||
|
||
public int foo(int x) { | ||
if (x > 10 && y > 5) { | ||
return y; | ||
} else { | ||
return y * 10; | ||
} | ||
} | ||
|
||
public int bar(int x) { | ||
if (x < 10) { | ||
return x; | ||
} else { | ||
return x / 10; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
CORE | ||
new.jar | ||
old.jar --json-ui | ||
// Enable multi-line checking | ||
activate-multi-line-match | ||
EXIT=0 | ||
SIGNAL=0 | ||
"deletedFunctions": \[ \],\n "modifiedFunctions": \[\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": "6"\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": "14"\n }\n }\n \],\n "newFunctions": \[ \], | ||
-- | ||
^warning: ignoring | ||
-- |