Add test cases for formatting nil type as Void
This commit is contained in:
parent
3662bda3a8
commit
f77f341c3d
|
@ -162,3 +162,19 @@ testString (test,
|
|||
Bird: (~ [fly] [land])
|
||||
`)
|
||||
}
|
||||
|
||||
func TestTypeIntegerLiteralVoid (test *testing.T) {
|
||||
testStringErr (test,
|
||||
"cannot use integer literal as Void", 2, 10,
|
||||
`
|
||||
[main] = 5
|
||||
`)
|
||||
}
|
||||
|
||||
func TestTypeStringLiteralVoid (test *testing.T) {
|
||||
testStringErr (test,
|
||||
"cannot use string literal as Void", 2, 10,
|
||||
`
|
||||
[main] = 'hello'
|
||||
`)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue