gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-441-gc67f4af
Date: Thu, 07 Jul 2011 12:36:40 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  c67f4af02a42a79724536ea4f5020060dea970b6 (commit)
      from  e1189a7ebf1df6a8ab044cd340ac4a43b57797b7 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=c67f4af02a42a79724536ea4f5020060dea970b6


commit c67f4af02a42a79724536ea4f5020060dea970b6
Author: Sandro Santilli <address@hidden>
Date:   Thu Jul 7 14:36:12 2011 +0200

    Add test for bug #33521 (constant pool used by functions). Fails.

diff --git a/testsuite/misc-swfmill.all/Makefile.am 
b/testsuite/misc-swfmill.all/Makefile.am
index 57c4c62..131241b 100644
--- a/testsuite/misc-swfmill.all/Makefile.am
+++ b/testsuite/misc-swfmill.all/Makefile.am
@@ -45,6 +45,7 @@ SC_AS2_XMLTESTS = \
        jump_after_end.xml \
        jump_to_prev_block.xml \
        dict_override.xml \
+       func_dict.xml \
        initaction_in_definesprite.xml \
        zeroframe_definesprite.xml \
        background.xml \
@@ -92,6 +93,7 @@ check_SCRIPTS = \
        jump_after_end-runner \
        jump_to_prev_block-runner \
        dict_override-runner \
+       func_dict-runner \
        initaction_in_definesprite-runner \
        zeroframe_definesprite-runner \
        registers-runner \
@@ -124,6 +126,10 @@ dict_override-runner: $(srcdir)/../generic-testrunner.sh 
dict_override.swf Makef
        sh $(srcdir)/../generic-testrunner.sh -r 50 -c "END OF TEST" 
$(top_builddir) dict_override.swf > $@
        chmod 755 $@
 
+func_dict-runner: $(srcdir)/../generic-testrunner.sh dict_override.swf Makefile
+       sh $(srcdir)/../generic-testrunner.sh -r 50 -c "END OF TEST" 
$(top_builddir) dict_override.swf > $@
+       chmod 755 $@
+
 initaction_in_definesprite-runner: $(srcdir)/../generic-testrunner.sh 
initaction_in_definesprite.swf Makefile
        sh $(srcdir)/../generic-testrunner.sh -r 50 -c "END OF TEST" 
$(top_builddir) initaction_in_definesprite.swf > $@
        chmod 755 $@
diff --git a/testsuite/misc-swfmill.all/func_dict.xml 
b/testsuite/misc-swfmill.all/func_dict.xml
new file mode 100644
index 0000000..ecb23c5
--- /dev/null
+++ b/testsuite/misc-swfmill.all/func_dict.xml
@@ -0,0 +1,130 @@
+<?xml version="1.0"?>
+<swf version="6" compressed="0">
+
+<!--
+
+ Test file for https://savannah.gnu.org/bugs/?33521
+
+ Shows that functions keep a reference on the constant
+ pool in place at time of their definition, even if
+ the pool in the action buffer is overridden at time
+ of function call.
+
+-->
+
+  <Header framerate="12" frames="1">
+    <size>
+      <Rectangle left="0" right="12800" top="0" bottom="9600"/>
+    </size>
+    <tags>
+      <DoAction>
+        <actions>
+
+       <!-- Dictionary at time of function definition -->
+          <Dictionary>
+            <strings>
+              <String value="a"/>
+            </strings>
+          </Dictionary>
+
+       <!-- Function code -->
+          <DeclareFunction name="f" argc="0" length="15">
+            <args/>
+          </DeclareFunction>
+          <PushData>
+            <items>
+              <StackString value="r"/>
+            </items>
+          </PushData>
+          <Duplicate/>
+          <GetVariable/>
+          <PushData>
+            <items>
+              <StackDictionaryLookup index="0"/>
+            </items>
+          </PushData>
+          <AddTyped/>
+          <SetVariable/>
+
+       <!-- Dictionary after function definition -->
+          <Dictionary>
+            <strings>
+              <String value="b"/>
+            </strings>
+          </Dictionary>
+
+
+       <!-- Main code -->
+
+         // Append dict[0] to `r'
+          <PushData>
+            <items>
+              <StackString value="r"/>
+            </items>
+          </PushData>
+          <Duplicate/>
+          <GetVariable/>
+          <PushData>
+            <items>
+              <StackDictionaryLookup index="0"/>
+            </items>
+          </PushData>
+          <AddTyped/>
+          <SetVariable/>
+
+         // Call the function appending dict[0] to `r'
+          <PushData>
+            <items>
+              <StackInteger value="0"/>
+              <StackString value="f"/>
+            </items>
+          </PushData>
+          <CallFunction/>
+          <Pop/>
+
+         // Verify `r' equals 'ba'
+          <PushData>
+            <items>
+              <StackString value="ba"/>
+              <StackString value="r"/>
+            </items>
+          </PushData>
+          <GetVariable/>
+         <EqualTyped/>
+
+         // If true, jump to PASSED tracing
+         <BranchIfTrue byteOffset="51"/>
+
+         // Else, trace XFAILED
+          <PushData>
+            <items>
+              <StackString value="XFAILED: func used overridden dictionary"/>
+            </items>
+          </PushData>
+          <Trace/>
+          <BranchAlways byteOffset="43"/> // get to end 
+
+         // PASSED tracing
+          <PushData>
+            <items>
+              <StackString value="PASSED: func used original dictionary"/>
+            </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>

-----------------------------------------------------------------------

Summary of changes:
 testsuite/misc-swfmill.all/Makefile.am             |    6 +
 .../{dict_override.xml => func_dict.xml}           |  104 ++++++++------------
 2 files changed, 49 insertions(+), 61 deletions(-)
 copy testsuite/misc-swfmill.all/{dict_override.xml => func_dict.xml} (50%)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]