Skip to content

Commit

Permalink
Rename ViolationsOf into ViolationsOfWindows
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienmaillard committed Oct 27, 2022
1 parent b47ffd0 commit 70e99b6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@
import java.util.Objects;
import java.util.Set;

public final class ViolationsOf implements Expression<List<Violation>> {
public final class ViolationsOfWindows implements Expression<List<Violation>> {
public final Expression<Windows> expression;

public ViolationsOf(Expression<Windows> expression) {
public ViolationsOfWindows(Expression<Windows> expression) {
this.expression = expression;
}

Expand All @@ -35,8 +35,8 @@ public String prettyPrint(final String prefix) {

@Override
public boolean equals(Object obj) {
if (!(obj instanceof ViolationsOf)) return false;
final var o = (ViolationsOf)obj;
if (!(obj instanceof ViolationsOfWindows)) return false;
final var o = (ViolationsOfWindows)obj;

return Objects.equals(this.expression, o.expression);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
import static gov.nasa.jpl.aerie.constraints.time.Interval.interval;
import static gov.nasa.jpl.aerie.merlin.protocol.types.Duration.MICROSECONDS;
import static gov.nasa.jpl.aerie.merlin.protocol.types.Duration.SECONDS;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertIterableEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.fail;
Expand Down Expand Up @@ -594,7 +593,7 @@ public void testNestedForEachActivity() {
new Supplier<>(spans)
)
).evaluate(simResults, new EvaluationEnvironment());

final var expected = new Spans(interval(4, 6, SECONDS), interval(4, 6, SECONDS));

assertEquivalent(expected, result);
Expand All @@ -614,7 +613,7 @@ public void testViolationsOf() {
.set(Interval.between(5, 6, SECONDS), false)
.set(Interval.between(7,20, SECONDS), true);

final var result = new ViolationsOf(new Supplier<>(windows)).evaluate(simResults, new EvaluationEnvironment());
final var result = new ViolationsOfWindows(new Supplier<>(windows)).evaluate(simResults, new EvaluationEnvironment());

final var expected = List.of(new Violation(windows.not().select(simResults.bounds)));

Expand Down

0 comments on commit 70e99b6

Please sign in to comment.