init_sparse_array(sparse_object_array);
init_sparse_array(sparse_js_array);
+ assertEquals(1, load(object_array, 1));
+ assertEquals(1, load(js_array, 1));
+ assertEquals(1, load(sparse_object_array, 1));
+ assertEquals(1, load(sparse_js_array, 1));
+
return load;
}
init_sparse_array(sparse_object_array);
init_sparse_array(sparse_js_array);
- // load() should now use polymorphic element loads.
- load = make_polymorphic_load_function();
- assertEquals(1, load(object_array, 1));
- load = make_polymorphic_load_function();
- assertEquals(1, load(js_array, 1));
- load = make_polymorphic_load_function();
- assertEquals(1, load(sparse_object_array, 1));
- load = make_polymorphic_load_function();
- assertEquals(1, load(sparse_js_array, 1));
-
load = make_polymorphic_load_function();
assertEquals(undefined, load(js_array, new Object()));
load = make_polymorphic_load_function();