diff options
Diffstat (limited to 'language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemTestUtil.xtend')
-rw-r--r-- | language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemTestUtil.xtend | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemTestUtil.xtend b/language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemTestUtil.xtend index 98b53675..b16de2b5 100644 --- a/language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemTestUtil.xtend +++ b/language/src/test/java/org/eclipse/viatra/solver/language/tests/ProblemTestUtil.xtend | |||
@@ -1,6 +1,5 @@ | |||
1 | package org.eclipse.viatra.solver.language.tests | 1 | package org.eclipse.viatra.solver.language.tests |
2 | 2 | ||
3 | import org.eclipse.emf.ecore.util.EcoreUtil | ||
4 | import org.eclipse.viatra.solver.language.ProblemUtil | 3 | import org.eclipse.viatra.solver.language.ProblemUtil |
5 | import org.eclipse.viatra.solver.language.model.problem.Argument | 4 | import org.eclipse.viatra.solver.language.model.problem.Argument |
6 | import org.eclipse.viatra.solver.language.model.problem.Assertion | 5 | import org.eclipse.viatra.solver.language.model.problem.Assertion |
@@ -17,19 +16,14 @@ import org.eclipse.viatra.solver.language.model.problem.PredicateDefinition | |||
17 | import org.eclipse.viatra.solver.language.model.problem.Problem | 16 | import org.eclipse.viatra.solver.language.model.problem.Problem |
18 | import org.eclipse.viatra.solver.language.model.problem.Variable | 17 | import org.eclipse.viatra.solver.language.model.problem.Variable |
19 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNodeArgument | 18 | import org.eclipse.viatra.solver.language.model.problem.VariableOrNodeArgument |
20 | import org.junit.jupiter.api.Assertions | ||
21 | 19 | ||
22 | class ProblemTestUtil { | 20 | class ProblemTestUtil { |
23 | def builtin(Problem it) { | 21 | def builtin(Problem it) { |
24 | ProblemUtil.getBuiltInLibrary(it).get | 22 | ProblemUtil.getBuiltInLibrary(it).get |
25 | } | 23 | } |
26 | 24 | ||
27 | def assertNoErrors(Problem it) { | 25 | def errors(Problem it) { |
28 | Assertions.assertNotNull(it) | 26 | eResource.errors |
29 | EcoreUtil.resolveAll(it) | ||
30 | val errors = eResource.errors | ||
31 | Assertions.assertTrue(errors.isEmpty, '''Unexpected errors: «errors.join(", ")»''') | ||
32 | it | ||
33 | } | 27 | } |
34 | 28 | ||
35 | def nodeNames(Problem it) { | 29 | def nodeNames(Problem it) { |