Language-Tests

Hi,

currently i'm working on a rather complex model which i wanted to create test-first. In the Context-menu of any model (also in the ones within a language) i have the option to do a "New->Test Model". From the point of Project-view it always looks good: test-module/folder with a new test-model created. But what i always get instantly (just create a new BTestCase-node and save) is :

[3364884]  ERROR - tbrains.mps.ide.ui.MPSTreeNode - java.lang.NullPointerException
java.lang.NullPointerException
    at java.io.File.<init>(File.java:222)
    at jetbrains.mps.generator.ModelGenerationStatusManager.calculateGeneratedHash(ModelGenerationStatusManager.java:191)
    at jetbrains.mps.generator.ModelGenerationStatusManager.getGenerationHash(ModelGenerationStatusManager.java:159)
    at jetbrains.mps.generator.ModelGenerationStatusManager.generationRequired(ModelGenerationStatusManager.java:126)
    at jetbrains.mps.ide.ui.smodel.SModelTreeNode.getGenerationStatus(SModelTreeNode.java:369)
    at jetbrains.mps.ide.ui.smodel.SModelTreeNode.doUpdatePresentation(SModelTreeNode.java:141)

By starting MPS from source in debug-mode i realized that the method public String getTestsGeneratorOutputPath() within jetbrains.mps.smodel.Language always returns null (and that in turn does not satisfy java.io.File - understandably :-)) Even for the tests created within my Solution-Module, the type of the variable module used in jetbrains.mps.generator.ModelGenerationStatusManager#191 is a jetbrains.mps.smodel.Language (BTW: jetbrains.mps.project.Solution actually defines something != null in its getTestsGeneratorOutputPath() and i don't know why it is not used here) and therefor ends up with a NullEx too.

Is "New->Test Model" a not-yet-supported feature or am i doing something wrong?

used version: 1.5.1

Thanks,

Mirko

2 comments
Comment actions Permalink

Hi,

BTW: after doing a "Generate Language" in the case described above (just do New->"Test Model", create empty BTextCase and do a (re)generate), the language can't be used anymore (displayed as node that can't be expanded anymore within the project-navigator and named (the project-name was "deleteme" before) with some kind of uuid - the language-id?)

damaged_project.png

and one must delete the test-model by hand from the filesystem and then reopen/regenerate the project.

Mirko



Attachment(s):
damaged_project.png
0
Comment actions Permalink

Hi!

Can you please file bugreport - this is definitely a bug in MPS. ;-)

0

Please sign in to leave a comment.