Skip to content

Commit

Permalink
shoaib1/issue#439
Browse files Browse the repository at this point in the history
i have added the test - public void testEqualsWithNonStringObject() - to verify my updated code
  • Loading branch information
sshaikshoaib committed Jun 25, 2024
1 parent c827afe commit 36333b3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/tests/gov/nasa/jpf/test/java/lang/StringTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ public void testEquals() {
assert !a.equals(c);
}
}

@Test
public void testEqualsWithNonStringObject() {
if (verifyNoPropertyViolation()) {
String a = "one two";
assert !a.equals(new Object());
}
}

@Test
public void testIndexOf() {
Expand Down

0 comments on commit 36333b3

Please sign in to comment.