-
Notifications
You must be signed in to change notification settings - Fork 286
Fixing inheritance issue for java programs. #1064
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
smowton
merged 1 commit into
diffblue:test-gen-support
from
Degiorgio:fix/inherited_methods
Jul 3, 2017
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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,38 @@ | ||
| default: tests.log | ||
|
|
||
| test: | ||
| @if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \ | ||
| ../failed-tests-printer.pl ; \ | ||
| exit 1 ; \ | ||
| fi | ||
|
|
||
| tests.log: ../test.pl | ||
| @if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \ | ||
| ../failed-tests-printer.pl ; \ | ||
| exit 1 ; \ | ||
| fi | ||
|
|
||
| show: | ||
| @for dir in *; do \ | ||
| if [ -d "$$dir" ]; then \ | ||
| vim -o "$$dir/*.java" "$$dir/*.out"; \ | ||
| fi; \ | ||
| done; | ||
|
|
||
| clean: | ||
| find -name '*.out' -execdir $(RM) '{}' \; | ||
| find -name '*.gb' -execdir $(RM) '{}' \; | ||
| $(RM) tests.log | ||
|
|
||
| %.class: %.java ../../src/org.cprover.jar | ||
| javac -g -cp ../../src/org.cprover.jar:. $< | ||
|
|
||
| nondet_java_files := $(shell find . -name "Nondet*.java") | ||
| nondet_class_files := $(patsubst %.java, %.class, $(nondet_java_files)) | ||
|
|
||
| .PHONY: nondet-class-files | ||
| nondet-class-files: $(nondet_class_files) | ||
|
|
||
| .PHONY: clean-nondet-class-files | ||
| clean-nondet-class-files: | ||
| -rm $(nondet_class_files) |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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,5 @@ | ||
| CORE | ||
| test.class | ||
| --function test.check | ||
| ^EXIT=0$ | ||
| ^SIGNAL=0$ |
This file contains hidden or 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 A | ||
| { | ||
| public int toInt() | ||
| { | ||
| return 12345; | ||
| } | ||
| } | ||
|
|
||
| class B extends A | ||
| { | ||
| } | ||
|
|
||
| class test | ||
| { | ||
| void check() | ||
| { | ||
| B b=new B(); | ||
| assert(b.toInt()==12345); | ||
| } | ||
| } |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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,5 @@ | ||
| CORE | ||
| test.class | ||
| --function test.check | ||
| ^EXIT=0$ | ||
| ^SIGNAL=0$ |
This file contains hidden or 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,24 @@ | ||
| class A | ||
| { | ||
| protected int toInt() | ||
| { | ||
| return 12345; | ||
| } | ||
| } | ||
|
|
||
| class B extends A | ||
| { | ||
| public void secondary() | ||
| { | ||
| assert(toInt()==12345); | ||
| } | ||
| } | ||
|
|
||
| class test | ||
| { | ||
| void check() | ||
| { | ||
| B b=new B(); | ||
| b.secondary(); | ||
| } | ||
| } |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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,5 @@ | ||
| CORE | ||
| test.class | ||
| --function test.check | ||
| ^EXIT=0$ | ||
| ^SIGNAL=0$ |
This file contains hidden or 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,24 @@ | ||
| class Z | ||
| { | ||
| public int toInt() | ||
| { | ||
| return 12345; | ||
| } | ||
| } | ||
|
|
||
| class A extends Z | ||
| { | ||
| } | ||
|
|
||
| class B extends A | ||
| { | ||
| } | ||
|
|
||
| class test | ||
| { | ||
| void check() | ||
| { | ||
| B b=new B(); | ||
| assert(b.toInt()==12345); | ||
| } | ||
| } |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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,5 @@ | ||
| CORE | ||
| test.class | ||
| --function test.check | ||
| ^EXIT=0$ | ||
| ^SIGNAL=0$ |
This file contains hidden or 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,28 @@ | ||
| class A | ||
| { | ||
| public int toInt() | ||
| { | ||
| return 12345; | ||
| } | ||
| } | ||
|
|
||
| class B extends A | ||
| { | ||
| public int toInt() | ||
| { | ||
| return 9999; | ||
| } | ||
| } | ||
|
|
||
| class Z extends B | ||
| { | ||
| } | ||
|
|
||
| class test | ||
| { | ||
| void check() | ||
| { | ||
| Z z=new Z(); | ||
| assert(z.toInt()==9999); | ||
| } | ||
| } |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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,5 @@ | ||
| CORE | ||
| test.class | ||
| --function test.check | ||
| ^EXIT=0$ | ||
| ^SIGNAL=0$ |
This file contains hidden or 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,21 @@ | ||
| interface A | ||
| { | ||
| public int toInt(); | ||
| } | ||
|
|
||
| class B implements A | ||
| { | ||
| public int toInt() | ||
| { | ||
| return 12345; | ||
| } | ||
| } | ||
|
|
||
| class test | ||
| { | ||
| void check() | ||
| { | ||
| B b=new B(); | ||
| assert(b.toInt()==12345); | ||
| } | ||
| } |
This file contains hidden or 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,10 @@ | ||
| package temp; | ||
|
|
||
| class A | ||
| { | ||
| int toint() | ||
| { | ||
| return 123456; | ||
| } | ||
| } | ||
|
|
This file contains hidden or 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,9 @@ | ||
| package temp; | ||
|
|
||
| public class B extends A | ||
| { | ||
| public int check() | ||
| { | ||
| return toint(); | ||
| } | ||
| } |
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains hidden or 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,5 @@ | ||
| CORE | ||
| test.class | ||
| --function test.check | ||
| ^EXIT=0$ | ||
| ^SIGNAL=0$ |
This file contains hidden or 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 @@ | ||
| import temp.B; | ||
|
|
||
| public class test | ||
| { | ||
| public void check() | ||
| { | ||
| B myObject = new B(); | ||
| assert(myObject.check()==123456); | ||
| } | ||
| } | ||
|
|
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not join the declaration with the assignment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure, I follow, can you elaborate please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was just a silly comment. Please disregard.