(t *testing.T)
| 15 | } |
| 16 | |
| 17 | func TestArrayExportProps(t *testing.T) { |
| 18 | vm := New() |
| 19 | arr := vm.NewArray() |
| 20 | err := arr.DefineDataProperty("0", vm.ToValue(true), FLAG_TRUE, FLAG_FALSE, FLAG_TRUE) |
| 21 | if err != nil { |
| 22 | t.Fatal(err) |
| 23 | } |
| 24 | actual := arr.Export() |
| 25 | expected := []interface{}{true} |
| 26 | if !reflect.DeepEqual(actual, expected) { |
| 27 | t.Fatalf("Expected: %#v, actual: %#v", expected, actual) |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | func TestArrayCanonicalIndex(t *testing.T) { |
| 32 | const SCRIPT = ` |
nothing calls this directly
no test coverage detected
searching dependent graphs…