-
Notifications
You must be signed in to change notification settings - Fork 340
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix and Test String.equals(Object) Implementation in JPF (#491)
* adding a test for equals method * Add test for equals method in JPF
- Loading branch information
1 parent
6233e3b
commit 17cfba7
Showing
4 changed files
with
24 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
After. |
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
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,15 @@ | ||
package java11; | ||
|
||
import gov.nasa.jpf.util.test.TestJPF; | ||
import org.junit.Test; | ||
public class StringEqualsTest extends TestJPF { | ||
@Test | ||
public void testStringEqual_differentObj(){ | ||
if(verifyNoPropertyViolation()){ | ||
String word="a"; | ||
boolean actual=word.equals(new Object()); | ||
boolean expected =false; | ||
assertEquals(expected,actual); | ||
} | ||
} | ||
} |