CVSROOT: /sources/gnash Module name: gnash Changes by: Zou Lunkai <zoulunkai> 07/12/14 08:00:06
Modified files: testsuite/misc-ming.all: opcode_guard_test.c Log message: add tests for setTarget('non-exist-target'). non-exist-target won't be evaluted to _root. The deduction we did was wrong. This one is a more carefull test with checking the final opcodes. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-ming.all/opcode_guard_test.c?cvsroot=gnash&r1=1.4&r2=1.5 Patches: Index: opcode_guard_test.c =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-ming.all/opcode_guard_test.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -b -r1.4 -r1.5 --- opcode_guard_test.c 1 Oct 2007 08:17:53 -0000 1.4 +++ opcode_guard_test.c 14 Dec 2007 08:00:06 -0000 1.5 @@ -133,9 +133,32 @@ SWFMovie_nextFrame(mo); // 7th frame SWFMovie_nextFrame(mo); // 8th frame - add_actions(mo, "xtotals(6); stop();"); + + add_actions(mo, + "setTarget('non-exist-target');" + "current_target = 0;" + "asm{ " + " push 'current_target' " + " push '' " + " push 11 " //_target + " getproperty " + " setvariable " + "}; " + // non-exist target does not evaluated to _root! + " _root.xcheck_equals(current_target, undefined);" + // No surprise, getVariable will ascend to _root! + " _root.check_equals(_target, '/');" + " _root.check_equals(_root._currentframe, 9);" + " gotoAndPlay(10);" + // the above gotoFrame has no effect as it was acting on an non-exist-target + " _root.xcheck_equals(_root._currentframe, 9);" + "setTarget('');"); SWFMovie_nextFrame(mo); // 9th frame + + add_actions(mo, "xtotals(10); stop();"); + SWFMovie_nextFrame(mo); // 10th frame + //Output movie puts("Saving " OUTPUT_FILENAME ); SWFMovie_save(mo, OUTPUT_FILENAME); _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit