Added return count mismatch error
This commit is contained in:
3
tests/errors/ReturnCountMismatch.q
Normal file
3
tests/errors/ReturnCountMismatch.q
Normal file
@ -0,0 +1,3 @@
|
||||
main() {
|
||||
return 42
|
||||
}
|
@ -37,7 +37,7 @@ var errs = []struct {
|
||||
{"MissingMainFunction.q", errors.MissingMainFunction},
|
||||
{"MissingOperand.q", errors.MissingOperand},
|
||||
{"MissingOperand2.q", errors.MissingOperand},
|
||||
{"VariableAlreadyExists.q", &errors.VariableAlreadyExists{Name: "x"}},
|
||||
{"ReturnCountMismatch.q", &errors.ReturnCountMismatch{Count: 1, ExpectedCount: 0}},
|
||||
{"TypeMismatch.q", &errors.TypeMismatch{Expected: "Pointer", Encountered: "Int64", ParameterName: "p"}},
|
||||
{"UnknownFunction.q", &errors.UnknownFunction{Name: "unknown"}},
|
||||
{"UnknownFunction2.q", &errors.UnknownFunction{Name: "f"}},
|
||||
@ -47,6 +47,7 @@ var errs = []struct {
|
||||
{"UnknownPackage.q", &errors.UnknownPackage{Name: "sys"}},
|
||||
{"UnusedImport.q", &errors.UnusedImport{Package: "sys"}},
|
||||
{"UnusedVariable.q", &errors.UnusedVariable{Name: "x"}},
|
||||
{"VariableAlreadyExists.q", &errors.VariableAlreadyExists{Name: "x"}},
|
||||
}
|
||||
|
||||
func TestErrors(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user