Skip to content

Commit

Permalink
Fix/tests 2 (#8)
Browse files Browse the repository at this point in the history
* Improve tests

* Remove junit timeouts

* Fix wrong requirements tests for criterion 25

* Change lambda param names

---------

Co-authored-by: zentox <[email protected]>
  • Loading branch information
zentox and zentox authored Jan 9, 2024
1 parent 743e7b3 commit 5c8618a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ plugins {

version = file("version").readLines().first()

configurations.all {
resolutionStrategy {
force("org.junit-pioneer:junit-pioneer:1.7.1")
}
}

jagr {
assignmentId.set("h06")
submissions {
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ annotations = "org.jetbrains:annotations:23.0.0"
algoutils-student = { module = "org.tudalgo:algoutils-student", version.ref = "algoutils" }
algoutils-tutor = { module = "org.tudalgo:algoutils-tutor", version.ref = "algoutils" }
junit-core = { module = "org.junit.jupiter:junit-jupiter", version = "5.9.1" }
junit-pioneer = { module = "org.junit-pioneer:junit-pioneer", version = "1.7.1" }
junit-pioneer = { module = "org.junit-pioneer:junit-pioneer", version = "2.2.0" }
fopbot = { module = "org.tudalgo:fopbot", version = "0.7.0" }

[bundles]
Expand Down
1 change: 1 addition & 0 deletions src/graderPrivate/java/h06/H3_MazeSolverRecursiveTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ public void testRequirements() {
&& !method.getCtElement().filterChildren(it -> it instanceof CtConditional<?>).list().isEmpty();
boolean condAndAssign = expression instanceof CtAssignment<?, ?> assignment
&& assignment.getAssignment() instanceof CtConditional<?>;

assertTrue(condRet || condAndVarRead || condAndAssign, context.build(),
result -> "MazeSolverRecursive#nextStep(World, Point, DirectionVector) should contain exactly one "
+ "conditional statement, but found %s"
Expand Down
1 change: 1 addition & 0 deletions src/graderPrivate/java/h06/H4_MazeSolverIterativeTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import java.awt.Point;
import java.util.Arrays;
import java.util.List;
import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;

import static h06.TutorUtils.assertIterative;
Expand Down

0 comments on commit 5c8618a

Please sign in to comment.