tests: Add test for virtual properties on prototype
This commit is contained in:
parent
fec8cf5e52
commit
804385347f
|
@ -217,6 +217,7 @@ swf_tests! {
|
||||||
(error, "avm1/error", 1),
|
(error, "avm1/error", 1),
|
||||||
(color_transform, "avm1/color_transform", 1),
|
(color_transform, "avm1/color_transform", 1),
|
||||||
(with, "avm1/with", 1),
|
(with, "avm1/with", 1),
|
||||||
|
(prototype_properties, "avm1/prototype_properties", 1),
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: These tests have some inaccuracies currently, so we use approx_eq to test that numeric values are close enough.
|
// TODO: These tests have some inaccuracies currently, so we use approx_eq to test that numeric values are close enough.
|
||||||
|
|
|
@ -0,0 +1,17 @@
|
||||||
|
// Foo.prototype.hasOwnProperty('prop')
|
||||||
|
true
|
||||||
|
// Foo.prototype.hasOwnProperty('readOnlyProp')
|
||||||
|
true
|
||||||
|
|
||||||
|
// foo = new Foo()
|
||||||
|
// foo.prop = 10
|
||||||
|
// foo.prop
|
||||||
|
10
|
||||||
|
// foo.hasOwnProperty('prop')
|
||||||
|
false
|
||||||
|
|
||||||
|
// foo.readOnlyProp = 10
|
||||||
|
// foo.readOnlyProp
|
||||||
|
5
|
||||||
|
// foo.hasOwnProperty('readOnlyProp')
|
||||||
|
false
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue