Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » CompilationTestHelper does not validate
CompilationTestHelper does not validate [message #1545558] Sun, 04 January 2015 11:21 Go to next message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
Hi

I've just noted that CompilationTestHelper does not validate the parsed
program; or, at least, it seems to call the validator, but the code
generator is invoked even in the presence of validation errors, and
validation errors are not reported anyway...

IIRC this was not the case in previous versions of Xtext...

Is this the intended behavior?

This requires to have duplicate tests for the same test input: a
validator test (checking that the input contains no validation error)
and a compiler test.

cheers
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Re: CompilationTestHelper does not validate [message #1547199 is a reply to message #1545558] Mon, 05 January 2015 09:36 Go to previous messageGo to next message
Sebastian Zarnekow is currently offline Sebastian ZarnekowFriend
Messages: 3118
Registered: July 2009
Senior Member
Hi Lorenzo,

please use Result.getErrorsAndWarnings together with the
CompilationTestHelper to test the validation results.

Best,
Sebastian
--
Looking for professional support for Xtext, Xtend or Eclipse Modeling?
Go visit: http://xtext.itemis.com
Re: CompilationTestHelper does not validate [message #1547585 is a reply to message #1547199] Mon, 05 January 2015 14:16 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1812
Registered: July 2009
Location: Firenze, Italy
Senior Member
On 05/01/2015 10:36, Sebastian Zarnekow wrote:
> Hi Lorenzo,
>
> please use Result.getErrorsAndWarnings together with the
> CompilationTestHelper to test the validation results.
>

Ah OK! Thanks
Lorenzo

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
HOME: http://www.lorenzobettini.it
Xtext Book:
http://www.packtpub.com/implementing-domain-specific-languages-with-xtext-and-xtend/book


Previous Topic:Orion Xtext editor
Next Topic:Maven plugin and incremental generation
Goto Forum:
  


Current Time: Thu Apr 25 20:25:32 GMT 2024

Powered by FUDForum. Page generated in 0.03885 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top