mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-25 08:55:11 +01:00
Check "var z u64[:123]".
This commit is contained in:
1 parent
c3d9ea2aa6
commit
c1ce1b08de
5 files changed
+99
-38
No files matched your search
@@ -19,6 +19,7 @@ func TestCheck(t *testing.T) {
|
||||
func bar()() {
|
||||
var x u8
|
||||
var y i32 = 2
|
||||
var z u64[:123]
|
||||
}
|
||||
`
|
||||
|
||||
@@ -57,7 +58,7 @@ func TestCheck(t *testing.T) {
|
||||
for id, typ := range bar.LocalVars {
|
||||
got = append(got, [2]string{
|
||||
idMap.ByID(id),
|
||||
TypeString(idMap, typ),
|
||||
TypeExprString(idMap, typ),
|
||||
})
|
||||
}
|
||||
sort.Slice(got, func(i, j int) bool {
|
||||
@@ -67,6 +68,7 @@ func TestCheck(t *testing.T) {
|
||||
want := [][2]string{
|
||||
{"x", "u8"},
|
||||
{"y", "i32"},
|
||||
{"z", "u64[:123]"},
|
||||
}
|
||||
if !reflect.DeepEqual(got, want) {
|
||||
t.Fatalf("\ngot %v\nwant %v", got, want)
|
||||
|
||||
Reference in new issue
Block a user