CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/10/25 16:48:07
Modified files: . : ChangeLog testsuite/actionscript.all: getvariable.as Log message: * testsuite/actionscript.all/getvariable.as: more tests for getvariable/setvariable. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4711&r2=1.4712 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/getvariable.as?cvsroot=gnash&r1=1.15&r2=1.16 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4711 retrieving revision 1.4712 diff -u -b -r1.4711 -r1.4712 --- ChangeLog 25 Oct 2007 15:48:17 -0000 1.4711 +++ ChangeLog 25 Oct 2007 16:48:06 -0000 1.4712 @@ -1,3 +1,8 @@ +2007-10-25 Sandro Santilli <[EMAIL PROTECTED]> + + * testsuite/actionscript.all/getvariable.as: more tests for + getvariable/setvariable. + 2007-10-25 Udo Giacomozzi <[EMAIL PROTECTED]> * server/asobj/Date.cpp: date_valueof() returns human readable date Index: testsuite/actionscript.all/getvariable.as =================================================================== RCS file: /sources/gnash/gnash/testsuite/actionscript.all/getvariable.as,v retrieving revision 1.15 retrieving revision 1.16 diff -u -b -r1.15 -r1.16 --- testsuite/actionscript.all/getvariable.as 29 Sep 2007 16:22:59 -0000 1.15 +++ testsuite/actionscript.all/getvariable.as 25 Oct 2007 16:48:07 -0000 1.16 @@ -19,7 +19,7 @@ // compile this test case with Ming makeswf, and then // execute it like this gnash -1 -r 0 -v out.swf -rcsid="$Id: getvariable.as,v 1.15 2007/09/29 16:22:59 strk Exp $"; +rcsid="$Id: getvariable.as,v 1.16 2007/10/25 16:48:07 strk Exp $"; #include "check.as" @@ -29,6 +29,11 @@ _global.globalvar = "gv1"; _global.globalobj = { m1: 1 }; +mc1 = createEmptyMovieClip('mc', 1); +mc1.mem = 'mc1'; +mc2 = mc1.createEmptyMovieClip('mc', 1); +mc2.mem = 'mc2'; + //--------------------------------------------------------------------- // Check access to root variable (simplest case) //--------------------------------------------------------------------- @@ -128,6 +133,33 @@ check_equals(checkpoint, undefined); //--------------------------------------------------------------------- +// Check '...:variable_in_root' access +//--------------------------------------------------------------------- + +checkpoint = 1; +var variable_in_root = 6; +asm { + push 'checkpoint' + push '...:variable_in_root' + getvariable + setvariable +}; +check_equals(typeof(checkpoint), 'undefined'); + +//--------------------------------------------------------------------- +// Check '...:mc1' access +//--------------------------------------------------------------------- + +checkpoint = 1; +asm { + push 'checkpoint' + push '...:mc1' + getvariable + setvariable +}; +check_equals(typeof(checkpoint), 'undefined'); + +//--------------------------------------------------------------------- // Check 'obj:variable_in_object' access //--------------------------------------------------------------------- @@ -148,6 +180,74 @@ check_equals(obj.variable_in_object, 'yes2'); //--------------------------------------------------------------------- +// Check 'obj::::variable_in_object' access +//--------------------------------------------------------------------- + +var obj = { variable_in_object: 'yes' }; +check_equals(obj.variable_in_object, 'yes'); +asm { + push 'checkpoint' + push 'obj::::variable_in_object' + getvariable + setvariable +}; +check_equals(checkpoint, undefined); +asm { + push 'obj::::variable_in_object' + push 'yes2' + setvariable +}; +check_equals(obj.variable_in_object, 'yes'); +check_equals(typeof(_root['obj::::variable_in_object']), 'undefined'); + +//--------------------------------------------------------------------- +// Check 'mc1:variable_in_object' access +//--------------------------------------------------------------------- + +#if OUTPUT_VERSION > 5 + +mc1.variable_in_object = 'yes'; +asm { + push 'checkpoint' + push 'mc1:variable_in_object' + getvariable + setvariable +}; +check_equals(checkpoint, 'yes'); +asm { + push 'mc1:variable_in_object' + push 'yes2' + setvariable +}; +check_equals(mc1.variable_in_object, 'yes2'); + +#endif // OUTPUT_VERSION > 5 + +//--------------------------------------------------------------------- +// Check 'mc1::::variable_in_object' access +//--------------------------------------------------------------------- + +#if OUTPUT_VERSION > 5 + +mc1.variable_in_object = 'yes'; +asm { + push 'checkpoint' + push 'mc1::::variable_in_object' + getvariable + setvariable +}; +check_equals(checkpoint, undefined); +asm { + push 'mc1::::variable_in_object' + push 'yes2' + setvariable +}; +check_equals(mc1.variable_in_object, 'yes'); +check_equals(typeof(_root['mc1::::variable_in_object']), 'undefined'); + +#endif // OUTPUT_VERSION > 5 + +//--------------------------------------------------------------------- // Check '../invalidname' access // (expected to fail) //--------------------------------------------------------------------- _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit