@Test
public void bogusModelAnnotationsTopLevelMethod(){
compile("bogusTopLevelMethodNoMethod_.java", "bogusTopLevelMethodMissingType_.java", "bogusTopLevelMethodInvalidType_.java", "bogusTopLevelMethodNotStatic_.java");
assertErrors("bogusTopLevelMethodUser",
new CompilerError(1, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n"
+" Error while resolving toplevel method com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodNoMethod: static method missing"),
new CompilerError(1, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n"
+" Error while resolving toplevel method com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodNotStatic: method is not static"),
new CompilerError(1, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n"
+" Error while resolving type of toplevel method for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodMissingType:\n"
+" Could not find type 'com.redhat.ceylon.compiler.java.test.model.MissingType'"),
new CompilerError(1, "Error while loading the com.redhat.ceylon.compiler.java.test.model/1 module:\n"
+" Error while parsing type of toplevel method for com.redhat.ceylon.compiler.java.test.model::bogusTopLevelMethodInvalidType:\n"
+" Expecting word but got AND"),
// FIXME: this is not great
new CompilerError(3, "function has no parameter list: 'bogusTopLevelMethodNoMethod'"),
new CompilerError(3, "could not determine type of function or value reference: 'bogusTopLevelMethodNoMethod'"),
// FIXME: this is not great
new CompilerError(4, "function has no parameter list: 'bogusTopLevelMethodNotStatic'"),
new CompilerError(4, "could not determine type of function or value reference: 'bogusTopLevelMethodNotStatic'"),
new CompilerError(5, "could not determine type of function or value reference: 'bogusTopLevelMethodMissingType'"),
new CompilerError(6, "could not determine type of function or value reference: 'bogusTopLevelMethodInvalidType'")
);
}