Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » End-to-end DSL unit testing?(Example: "When the code generated from 'x should not be null' is executed with a null input, it should emit 'x is null but shouldn't be'")
End-to-end DSL unit testing? [message #1095827] Tue, 27 August 2013 15:34
Ed Staub is currently offline Ed StaubFriend
Messages: 12
Registered: July 2009
Junior Member
I'm looking for thoughts on unit tests which, given some input text in my DSL and some runtime inputs, will determine whether the correct output is emitted.

Example: Quote:
When the code generated from
x should not be null
(in some constraint/validation DSL) is executed with a null input, it should emit
x is null but shouldn't be


Is this a good testing practice? If not, why?

Has anyone done this kind of testing, and/or have any advice on how to implement it? A unit test which generates,compiles, and then executes the compiled code is new to me.

I'm generating Xtend code, if it matters.

[Updated on: Wed, 28 August 2013 19:40]

Report message to a moderator

Previous Topic:Generator: Force the encoding
Next Topic:Obtain a Resource of a model source file (to compile imports in code generation)
Goto Forum:
  


Current Time: Tue Apr 16 18:38:30 GMT 2024

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

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

Back to the top