module bla
language TemplateLang

test foo [[

]]
run bla to Foo(){Bar()}

^^ This test specification is ambiguous. If the annotation is removed, it works fine.

In effect, it is currently impossible to expect a result that contains an annotation, because without specifying the annotation, you’ll get an unexpected result error if the result contains an annotation.

The error messages on the run bla... line are:

  • Fragment is ambiguous: either amb or []
  • Not implemented: Stratego(ScopeDefault(Call(SVar(“Bar”),[])))
  • Not implemented: Stratego(AnnoCong(EmptyTupleCong,StrategyCurly(Call(SVar(“Bar”), []))))

The AST looks like this:


testsuite(
[Name(“bla”), Language(“TemplateLang”)]
, [ Test(
" "
, description(“foo “)
, Input(”", QuotePart("\n \n"), Done(), "”){CompilationUnit([])}
, [ amb(
[ amb(
[ [ Run(
“bla”
, None()
, ATerm(
annotated(
appl(unquoted(“Foo”), [])
, default([appl(unquoted(“Bar”), [])])
)
)
)
]
, [ Run(“bla”, None(), ATerm(appl(unquoted(“Foo”), [])))
, Stratego(ScopeDefault(Call(SVar(“Bar”), [])))
]
]
)
, [ Run(“bla”, None(), ATerm(fun(unquoted(“Foo”))))
, Stratego(AnnoCong(EmptyTupleCong(), StrategyCurly(Call(SVar(“Bar”), []))))
]
]
)
]
)
]
)

Spoofax version: 1.0.9.0-r24466

Submitted by Tobi Vollebregt on 2 March 2012 at 16:08

On 2 March 2012 at 17:08 Tobi Vollebregt tagged testing

Log in to post comments