Node Test Cases


Our language has several Non Typesystem Rules; to test them, I created several NodesTestCases (jetbrains.mps.lang.test language) where I've created two TestNodes for every validation I wanted to check:

  • positive test: a node with the error to check that the error is signaled
  • negative test: a node without the error, to check that the error is not signaled.

For the positive test, I used the check "has error" (NodeErrorCheckOperation) that ignores any other error that the tested node has (it only checks that the error we want is in the list).

For the negative test, I was using the check "for error messages" (CheckNodeForErrorMessagesOperation); however, that means that I have to create a totally correct node and, for some concepts, that's a lot of work (references to very complex nodes).

Is there a check "does not have the error" that only checks for the specified error ignoring any other one? Is there a way of ignoring all other errors?



Sérgio Ribeiro
Porto - Portugal


1 comment
Comment actions Permalink

Hello, Sergio!
I have created an issue for negative checks in Node Test Cases.


Please sign in to leave a comment.