From 7520aa4474ea30985cf26631c6bbdebf38484a0d Mon Sep 17 00:00:00 2001 From: Marc Vertes Date: Fri, 9 Jan 2026 19:10:27 +0100 Subject: feat: initial support for maps --- interp/interpreter_test.go | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'interp/interpreter_test.go') diff --git a/interp/interpreter_test.go b/interp/interpreter_test.go index c7c3cbc..6c92102 100644 --- a/interp/interpreter_test.go +++ b/interp/interpreter_test.go @@ -217,6 +217,12 @@ func TestStruct(t *testing.T) { }) } +func TestMap(t *testing.T) { + run(t, []etest{ + {src: `type M map[string]bool; var m M; m`, res: `map[]`}, // #00 + }) +} + func TestType(t *testing.T) { src0 := `type ( I int @@ -271,5 +277,7 @@ func TestComposite(t *testing.T) { {src: `type T struct{N int; S string}; t := T{S: "foo"}; t`, res: `{0 foo}`}, // #05 {src: `a := []int{}`, res: `[]`}, // #06 {src: `a := []int{1, 2, 3}; a`, res: `[1 2 3]`}, // #07 + {src: `m := map[string]bool{}`, res: `map[]`}, // #08 + {src: `m := map[string]bool{"hello": true}; m`, res: `map[hello:true]`}, // #09 }) } -- cgit v1.2.3