|
Re: Validating x,y coordinates [message #1787090 is a reply to message #1787047] |
Fri, 18 May 2018 16:30 |
|
first of all you should write a unit test for your validator
the classes parsehelper and validationtesthelper will help
@RunWith(XtextRunner)
@InjectWith(MyDslInjectorProvider)
class MyDslParsingTest {
@Inject
ParseHelper<Game> parseHelper
@Inject
extension ValidationTestHelper
@Test
def void loadModel() {
val result = parseHelper.parse('''
Game HelloWorld Grid size (1,11)
''')
Assert.assertNotNull(result)
val errors = result.eResource.errors
Assert.assertTrue('''Unexpected errors: «errors.join(", ")»''', errors.isEmpty)
result.assertNoErrors // Triggers validation
}
}
this will give you an actual stack trace (you would find it in the eclipse runtime error log too)
the stacktrace should hint you to your problem
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03009 seconds