-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposed changes. Not sure they are working though.
- Loading branch information
Showing
10 changed files
with
114 additions
and
52 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
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
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 |
---|---|---|
@@ -1 +1 @@ | ||
version=2022.9.4 | ||
version=2022.10.0 |
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
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
42 changes: 42 additions & 0 deletions
42
src/test/java/examples/java/receiver/tripleequalswithasserts/Correct.java
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,42 @@ | ||
package examples.java.receiver.tripleequalswithasserts; | ||
|
||
import edu.illinois.cs.cs125.jenisol.core.EdgeType; | ||
import edu.illinois.cs.cs125.jenisol.core.RandomType; | ||
import edu.illinois.cs.cs125.jenisol.core.SimpleType; | ||
import java.util.Random; | ||
|
||
public class Correct { | ||
private final String string; | ||
private final double first; | ||
private final double second; | ||
|
||
public Correct(String setString, double setFirst, double setSecond) { | ||
assert setString != null; | ||
assert setFirst >= -90.0 && setFirst <= 90.0; | ||
assert setSecond >= -180.0 && setSecond <= 180.0; | ||
string = setString; | ||
first = setFirst; | ||
second = setSecond; | ||
} | ||
|
||
@SimpleType private static final double[] SIMPLE_DOUBLES = new double[] {8.8}; | ||
|
||
@EdgeType | ||
private static final double[] EDGE_DOUBLES = | ||
new double[] { | ||
-180.1, -180.0, -179.9, -90.1, -90.0, -89.9, 89.9, 90.0, 90.1, 179.9, 180.0, 180.1 | ||
}; | ||
|
||
@RandomType | ||
private static double randomPosition(Random random) { | ||
return (random.nextDouble() * 179.8) - 89.9; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (!(o instanceof Correct correct)) { | ||
return false; | ||
} | ||
return first == correct.first && second == correct.second; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/test/java/examples/java/receiver/tripleequalswithasserts/Incorrect0.java
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,24 @@ | ||
package examples.java.receiver.tripleequalswithasserts; | ||
|
||
public class Incorrect0 { | ||
private final String string; | ||
private final double first; | ||
private final double second; | ||
|
||
public Incorrect0(String setString, double setFirst, double setSecond) { | ||
assert setString != null; | ||
assert setFirst >= -90.0 && setFirst <= 90.0; | ||
assert setSecond >= -180.0 && setSecond <= 180.0; | ||
string = setString; | ||
first = setFirst; | ||
second = setSecond; | ||
} | ||
|
||
@Override | ||
public boolean equals(Object o) { | ||
if (!(o instanceof Incorrect0 correct)) { | ||
return true; | ||
} | ||
return first == correct.first && second == correct.second; | ||
} | ||
} |