(t *testing.T)
| 151 | } |
| 152 | |
| 153 | func TestGoMapReflectWithMethods(t *testing.T) { |
| 154 | const SCRIPT = ` |
| 155 | typeof m === "object" && !m.hasOwnProperty("t") && m.hasOwnProperty("Method") && m.Method(); |
| 156 | ` |
| 157 | |
| 158 | vm := New() |
| 159 | m := make(gomapReflect_withMethods) |
| 160 | m["t"] = 42 |
| 161 | vm.Set("m", m) |
| 162 | v, err := vm.RunString(SCRIPT) |
| 163 | if err != nil { |
| 164 | t.Fatal(err) |
| 165 | } |
| 166 | if !v.StrictEquals(valueTrue) { |
| 167 | t.Fatalf("Expected true, got %v", v) |
| 168 | } |
| 169 | |
| 170 | } |
| 171 | |
| 172 | func TestGoMapReflectWithProto(t *testing.T) { |
| 173 | vm := New() |
nothing calls this directly
no test coverage detected
searching dependent graphs…