Unit Tests for Generators
Hi,
is there a way to write unit tests for generators?
For example I would like to do something like this:
Cheers
Yann
is there a way to write unit tests for generators?
For example I would like to do something like this:
- Define a test model
- Use it as input for the generator test case
- Make assertions on the generated output
Cheers
Yann
Please sign in to leave a comment.
Now you can:
By using it you can:
By doing that you can ensure same code (checked on first step) will be generated for this model by using current state of the generator.
I suppose you mean I should create a build script solution for my language (using MPS 2.0) and execute the steps mentioned by you (generate from model and execute tests) there, right?
What I have done is:
So now I have two Problems:
However, the corresponding jar file (ant-junit.jar) is in the "/Applications/MPS 2.app/lib/ant/lib" directory...
How to proceed?
Thare are no counterparts of mps.generate task in MPS currently, so you have to use text build files to use it.
As for the second problem, this is a probably bug, since, as you mentioned, the required jar exists. The bugreport is here MPS-13524 Could you include the command line ant was started from MPS console?
--
Regards,
Julia
I can confirm, that you really should document how to set up the model for a build script. It's a waste of time if every one has to figure it out by itself just to follow the user guide's example.