Version 0.6.1 adds a new testing language for language definition testing. You can use it by creating a Spoofax project, and then creating a .spt file. Then hit control-space to get a basic test file. As an example, you can write:


test Correct entity definition [[
module FooBar
entity Foo {
b : Bar
}

entity Bar {}
]]

as a test case for the entities language, testing that both the syntax and semantics of the tested fragment is correct.

Negative tests cases use conditions such as:


test Correct entity definition
module FooBar
entity Foo {
b : Baz
}
1 error

specifying that 1 semantic error is expected. Full documentation is forthcoming.

Submitted by Lennart Kats on 29 April 2011 at 17:04

On 29 April 2011 at 17:07 Lennart Kats tagged testing

On 29 April 2011 at 17:07 Lennart Kats tagged 1.0

On 29 April 2011 at 17:09 Lennart Kats closed this issue.

On 22 December 2011 at 16:59 Lennart Kats tagged @lennartkats

On 22 December 2011 at 16:59 Lennart Kats tagged @robvermaas

Log in to post comments