CVSROOT: /sources/gnash Module name: gnash Changes by: Sandro Santilli <strk> 07/10/10 07:01:02
Modified files: . : ChangeLog testsuite/misc-swfmill.all: Makefile.am Added files: testsuite/misc-swfmill.all: dict_override.xml Log message: * testsuite/misc-swfmill.all/: Makefile.am, dict_override.xml: New test for constant pool override (gnash fails, will fix next). CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4583&r2=1.4584 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfmill.all/Makefile.am?cvsroot=gnash&r1=1.7&r2=1.8 http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-swfmill.all/dict_override.xml?cvsroot=gnash&rev=1.1 Patches: Index: ChangeLog =================================================================== RCS file: /sources/gnash/gnash/ChangeLog,v retrieving revision 1.4583 retrieving revision 1.4584 diff -u -b -r1.4583 -r1.4584 --- ChangeLog 10 Oct 2007 05:41:04 -0000 1.4583 +++ ChangeLog 10 Oct 2007 07:01:01 -0000 1.4584 @@ -1,11 +1,14 @@ -2007-10-00 Zou Lunkai <[EMAIL PROTECTED]> +2007-10-10 Sandro Santilli <[EMAIL PROTECTED]> + + * testsuite/misc-swfmill.all/: Makefile.am, dict_override.xml: + New test for constant pool override (gnash fails, will fix next). + +2007-10-10 Zou Lunkai <[EMAIL PROTECTED]> - * testsuite/misc-mtasc.all/Base1.as, - * testsuite/misc-mtasc.all/Derived1.as, - * testsuite/misc-mtasc.all/super_test1.as, Makefile.am: test for super, - detected an unexpected 'ActionLimit hit'. + * testsuite/misc-mtasc.all/: Base1.as, Derived1.as, super_test1.as, + Makefile.am: test for super, detected an unexpected 'ActionLimit hit' -2007-10-00 Zou Lunkai <[EMAIL PROTECTED]> +2007-10-10 Zou Lunkai <[EMAIL PROTECTED]> * testsuite/misc-mtasc.all/function.as, Makefile.am: rename function.as to function_test.as, fix a name conflict in a case insensitive file system. There Index: testsuite/misc-swfmill.all/Makefile.am =================================================================== RCS file: /sources/gnash/gnash/testsuite/misc-swfmill.all/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -b -r1.7 -r1.8 --- testsuite/misc-swfmill.all/Makefile.am 5 Oct 2007 11:26:01 -0000 1.7 +++ testsuite/misc-swfmill.all/Makefile.am 10 Oct 2007 07:01:01 -0000 1.8 @@ -26,6 +26,7 @@ SC_XMLTESTS = \ hello.xml \ jump_after_end.xml \ + dict_override.xml \ $(NULL) ## Path to Dejagnu.swf file @@ -41,12 +42,17 @@ check_SCRIPTS = \ jump_after_end-runner \ + dict_override-runner \ $(NULL) jump_after_end-runner: $(srcdir)/../generic-testrunner.sh jump_after_end.swf Makefile sh $< -r 50 -c "END OF TEST" $(top_builddir) jump_after_end.swf > $@ chmod 755 $@ +dict_override-runner: $(srcdir)/../generic-testrunner.sh dict_override.swf Makefile + sh $< -r 50 -c "END OF TEST" $(top_builddir) dict_override.swf > $@ + chmod 755 $@ + .xml.swf: $(SWFMILL) -v simple $(@:%.swf=$(srcdir)/%.xml) $@ Index: testsuite/misc-swfmill.all/dict_override.xml =================================================================== RCS file: testsuite/misc-swfmill.all/dict_override.xml diff -N testsuite/misc-swfmill.all/dict_override.xml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/misc-swfmill.all/dict_override.xml 10 Oct 2007 07:01:01 -0000 1.1 @@ -0,0 +1,148 @@ +<?xml version="1.0"?> +<swf version="6" compressed="1"> + +<!-- + + This file test that constants can be overridden by later ActionConstantPool + +--> + + <Header framerate="12" frames="1"> + <size> + <Rectangle left="0" right="12800" top="0" bottom="9600"/> + </size> + <tags> + <SetBackgroundColor> + <color> + <Color red="255" green="255" blue="255"/> + </color> + </SetBackgroundColor> + <DoAction> + <actions> + + // Declare dict 0:a 1:b + <Dictionary> + <strings> + <String value="a"/> + <String value="b"/> + </strings> + </Dictionary> + + // Push 'result' to stack, will be assigned + // concatenation of dict[0],dict[1],dict[0],dict[1] + <PushData> + <items> + <StackString value="result"/> + </items> + </PushData> + + // Set 'a' to 'A_value' + <PushData> + <items> + <StackString value="a"/> + <StackString value="A"/> + </items> + </PushData> + <SetVariable/> + + // Set 'b' to 'A_value' + <PushData> + <items> + <StackString value="b"/> + <StackString value="B"/> + </items> + </PushData> + <SetVariable/> + + // Get dict[0], expect A + <PushData> + <items> + <StackDictionaryLookup index="0"/> + </items> + </PushData> + <GetVariable/> // EXPECT A_value + + // Get dict[1] and add, expect AB + <PushData> + <items> + <StackDictionaryLookup index="1"/> + </items> + </PushData> + <GetVariable/> + <AddTyped/> // EXPECT AB + + // Declare dict 0:b 1:a (OVERRIDE!) + <Dictionary> + <strings> + <String value="b"/> + <String value="a"/> + </strings> + </Dictionary> + + // Get dict[0] and add + <PushData> + <items> + <StackDictionaryLookup index="0"/> + </items> + </PushData> + <GetVariable/> + <AddTyped/> // EXPECT ABB + + // Get dict[1] and add + <PushData> + <items> + <StackDictionaryLookup index="1"/> + </items> + </PushData> + <GetVariable/> + <AddTyped/> // EXPECT ABBA + + // Assign all to result + <SetVariable/> + + // Verify (here we should print FAILED/PASSED) + <PushData> + <items> + <StackString value="ABBA"/> + <StackString value="result"/> + </items> + </PushData> + <GetVariable/> + <EqualTyped/> + + // If true, jump to PASSED tracing + <BranchIfTrue byteOffset="49"/> + + // Else, trace FAILED + <PushData> + <items> + <StackString value="FAILED: overridden dictionary not used"/> + </items> + </PushData> + <Trace/> + <BranchAlways byteOffset="40"/> // get to end + + // PASSED tracing + <PushData> + <items> + <StackString value="PASSED: overridden dictionary used"/> + </items> + </PushData> + <Trace/> + + // END OF TEST tag + <PushData> + <items> + <StackString value="END OF TEST"/> + </items> + </PushData> + <Trace/> + + <EndAction/> + </actions> + </DoAction> + <ShowFrame/> + <End/> + </tags> + </Header> +</swf> _______________________________________________ Gnash-commit mailing list Gnash-commit@gnu.org http://lists.gnu.org/mailman/listinfo/gnash-commit