tests: Add another test for drawing on `MovieClip`

This commit is contained in:
David Wendt 2021-03-05 21:24:26 -05:00 committed by Mike Welsh
parent 1d57eee369
commit 4238d8bd2a
4 changed files with 55 additions and 0 deletions

View File

@ -539,6 +539,7 @@ swf_tests! {
#[ignore] (as3_edittext_html_roundtrip, "avm2/edittext_html_roundtrip", 1), #[ignore] (as3_edittext_html_roundtrip, "avm2/edittext_html_roundtrip", 1),
(as3_edittext_newline_stripping, "avm2/edittext_newline_stripping", 1), (as3_edittext_newline_stripping, "avm2/edittext_newline_stripping", 1),
(as3_shape_drawrect, "avm2/shape_drawrect", 1), (as3_shape_drawrect, "avm2/shape_drawrect", 1),
(as3_movieclip_drawrect, "avm2/movieclip_drawrect", 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.

View File

@ -0,0 +1,54 @@
//var s = new MovieClip();
//s.hitTestPoint(25,25);
false
//s.hitTestPoint(75,25);
false
//s.hitTestPoint(75,75);
false
//s.graphics.beginFill(0, 1.0);
//s.graphics.moveTo(50,50);
//s.graphics.lineTo(100,50);
//s.graphics.lineTo(100,100);
//s.graphics.lineTo(50,100);
//s.graphics.lineTo(50,50);
//s.graphics.endFill();
//s.hitTestPoint(25,25);
false
//s.hitTestPoint(75,25);
false
//s.hitTestPoint(75,75);
true
//s.x = -50;
//s.y = -50;
//s.hitTestPoint(25,25);
true
//s.hitTestPoint(75,25);
false
//s.hitTestPoint(75,75);
false
//s.graphics.clear();
//s.hitTestPoint(25,25);
false
//s.hitTestPoint(75,25);
false
//s.hitTestPoint(75,75);
false
//s.x = 0;
//s.y = 0;
//s.graphics.beginFill(0, 1.0);
//s.graphics.drawRect(50, 50, 50, 50);
//s.graphics.endFill();
//s.hitTestPoint(25,25);
false
//s.hitTestPoint(75,25);
false
//s.hitTestPoint(75,75);
true
//s.x = -50;
//s.y = -50;
//s.hitTestPoint(25,25);
true
//s.hitTestPoint(75,25);
false
//s.hitTestPoint(75,75);
false

Binary file not shown.

Binary file not shown.