Added more tests

This commit is contained in:
Eduard Urbach 2024-07-06 17:01:52 +02:00
parent a9f305dec2
commit 230bb36709
Signed by: akyoto
GPG Key ID: C874F672B1AF20C0
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,3 @@
main() {
x := 1 + f(x)
}

View File

@ -0,0 +1,7 @@
main() {
x := 1 + f(x)
}
f(x) {
return x
}

View File

@ -35,6 +35,8 @@ var errs = []struct {
{"VariableAlreadyExists.q", &errors.VariableAlreadyExists{Name: "x"}}, {"VariableAlreadyExists.q", &errors.VariableAlreadyExists{Name: "x"}},
{"UnknownIdentifier.q", &errors.UnknownIdentifier{Name: "x"}}, {"UnknownIdentifier.q", &errors.UnknownIdentifier{Name: "x"}},
{"UnknownIdentifier2.q", &errors.UnknownIdentifier{Name: "x"}}, {"UnknownIdentifier2.q", &errors.UnknownIdentifier{Name: "x"}},
{"UnknownIdentifier3.q", &errors.UnknownIdentifier{Name: "f"}},
{"UnknownIdentifier4.q", &errors.UnknownIdentifier{Name: "x"}},
{"UnusedVariable.q", &errors.UnusedVariable{Name: "x"}}, {"UnusedVariable.q", &errors.UnusedVariable{Name: "x"}},
} }