(t *testing.T)
| 284 | } |
| 285 | |
| 286 | func TestExportToWrappedMapCustom(t *testing.T) { |
| 287 | type CustomMap map[string]bool |
| 288 | vm := New() |
| 289 | m := CustomMap{} |
| 290 | var exported CustomMap |
| 291 | err := vm.ExportTo(vm.ToValue(m), &exported) |
| 292 | if err != nil { |
| 293 | t.Fatal(err) |
| 294 | } |
| 295 | exported["test"] = true |
| 296 | if v := m["test"]; v != true { |
| 297 | t.Fatalf("Unexpected m[\"test\"]: %v", v) |
| 298 | } |
| 299 | } |
| 300 | |
| 301 | func TestExportToSliceNonIterable(t *testing.T) { |
| 302 | vm := New() |