Fix analyzer tests that used "switch" as function name

This commit is contained in:
Sasha Koshka 2024-04-02 02:59:49 -04:00
parent 6c41e71ade
commit 767e7bd33c
1 changed files with 4 additions and 4 deletions

View File

@ -103,7 +103,7 @@ U: (| Int F64 UInt)
func TestSwitch (test *testing.T) { func TestSwitch (test *testing.T) {
testString (test, testString (test,
` `
[switch x:Int]:Int = switch x [f x:Int]:Int = switch x
| 0 5 | 0 5
| 1 4 | 1 4
| 2 3 | 2 3
@ -134,7 +134,7 @@ func TestSwitchErrBadLiteral (test *testing.T) {
testStringErr (test, testStringErr (test,
"cannot use array literal as Int", 4, 4, "cannot use array literal as Int", 4, 4,
` `
[switch x:Int]:Int = switch x [f x:Int]:Int = switch x
| 0 5 | 0 5
| (1) 4 | (1) 4
| 2 3 | 2 3
@ -146,7 +146,7 @@ func TestSwitchErrNotConstant (test *testing.T) {
testStringErr (test, testStringErr (test,
"y cannot represent a constant integer", 7, 4, "y cannot represent a constant integer", 7, 4,
` `
[switch x:Int]:Int = { [f x:Int]:Int = {
y:Int = 1 y:Int = 1
switch x switch x
@ -162,7 +162,7 @@ func TestSwitchErrDuplicate (test *testing.T) {
testStringErr (test, testStringErr (test,
"65 already listed in match at stream0.fspl:6:2", 7, 4, "65 already listed in match at stream0.fspl:6:2", 7, 4,
` `
[switch x:I8]:Int = switch x [f x:I8]:Int = switch x
| 0 5 | 0 5
| 1 4 | 1 4
| 2 3 | 2 3