diff options
author | 2020-04-28 20:43:04 +0200 | |
---|---|---|
committer | 2020-04-28 20:43:04 +0200 | |
commit | 8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe (patch) | |
tree | d525bef75519f364d637e0779f8e63d4199dee31 /Application/org.eclipse.viatra.solver.language.tests/src/org/eclipse/viatra/solver/language/tests | |
parent | check expressions are mapped to WF constraints (diff) | |
download | VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.gz VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.tar.zst VIATRA-Generator-8a7b9b436b31e6d2f5a0521a077c960ebdeb4cbe.zip |
initial commit
Diffstat (limited to 'Application/org.eclipse.viatra.solver.language.tests/src/org/eclipse/viatra/solver/language/tests')
-rw-r--r-- | Application/org.eclipse.viatra.solver.language.tests/src/org/eclipse/viatra/solver/language/tests/SolverLanguageParsingTest.xtend | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Application/org.eclipse.viatra.solver.language.tests/src/org/eclipse/viatra/solver/language/tests/SolverLanguageParsingTest.xtend b/Application/org.eclipse.viatra.solver.language.tests/src/org/eclipse/viatra/solver/language/tests/SolverLanguageParsingTest.xtend new file mode 100644 index 00000000..eb90bf67 --- /dev/null +++ b/Application/org.eclipse.viatra.solver.language.tests/src/org/eclipse/viatra/solver/language/tests/SolverLanguageParsingTest.xtend | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * generated by Xtext 2.18.0.M3 | ||
3 | */ | ||
4 | package org.eclipse.viatra.solver.language.tests | ||
5 | |||
6 | import com.google.inject.Inject | ||
7 | import org.eclipse.viatra.solver.language.solverLanguage.Problem | ||
8 | import org.eclipse.xtext.testing.InjectWith | ||
9 | import org.eclipse.xtext.testing.extensions.InjectionExtension | ||
10 | import org.eclipse.xtext.testing.util.ParseHelper | ||
11 | import org.junit.jupiter.api.Assertions | ||
12 | import org.junit.jupiter.api.Test | ||
13 | import org.junit.jupiter.api.^extension.ExtendWith | ||
14 | |||
15 | @ExtendWith(InjectionExtension) | ||
16 | @InjectWith(SolverLanguageInjectorProvider) | ||
17 | class SolverLanguageParsingTest { | ||
18 | @Inject | ||
19 | ParseHelper<Problem> parseHelper | ||
20 | |||
21 | @Test | ||
22 | def void loadModel() { | ||
23 | val result = parseHelper.parse(''' | ||
24 | Hello Xtext! | ||
25 | ''') | ||
26 | Assertions.assertNotNull(result) | ||
27 | val errors = result.eResource.errors | ||
28 | Assertions.assertTrue(errors.isEmpty, '''Unexpected errors: «errors.join(", ")»''') | ||
29 | } | ||
30 | } | ||