Added placeholders for type casts
This commit is contained in:
@ -50,8 +50,8 @@ var errs = []struct {
|
||||
{"MissingParameter3.q", errors.MissingParameter},
|
||||
{"MissingType.q", errors.MissingType},
|
||||
{"ReturnCountMismatch.q", &errors.ReturnCountMismatch{Count: 1, ExpectedCount: 0}},
|
||||
{"TypeMismatch.q", &errors.TypeMismatch{Expected: "*any", Encountered: "int64", ParameterName: "p"}},
|
||||
{"TypeMismatch2.q", &errors.TypeMismatch{Expected: "[]any", Encountered: "int64", ParameterName: "array"}},
|
||||
{"TypeMismatch.q", &errors.TypeMismatch{Expected: "*any", Encountered: "int", ParameterName: "p"}},
|
||||
{"TypeMismatch2.q", &errors.TypeMismatch{Expected: "[]any", Encountered: "int", ParameterName: "array"}},
|
||||
{"UnknownFunction.q", &errors.UnknownFunction{Name: "unknown"}},
|
||||
{"UnknownFunction2.q", &errors.UnknownFunction{Name: "f"}},
|
||||
{"UnknownIdentifier.q", &errors.UnknownIdentifier{Name: "x"}},
|
||||
|
8
tests/programs/cast.q
Normal file
8
tests/programs/cast.q
Normal file
@ -0,0 +1,8 @@
|
||||
main() {
|
||||
x := byte(42)
|
||||
assert f(x) == 42
|
||||
}
|
||||
|
||||
f(x byte) -> byte {
|
||||
return x
|
||||
}
|
@ -67,6 +67,7 @@ var programs = []struct {
|
||||
{"index-dynamic", 0},
|
||||
{"struct", 0},
|
||||
{"len", 0},
|
||||
{"cast", 0},
|
||||
}
|
||||
|
||||
func TestPrograms(t *testing.T) {
|
||||
|
Reference in New Issue
Block a user