test/trace/Makefile.am | 28 +++++++++++++++++++++
test/trace/definelocal-function-target-5.swf |binary
test/trace/definelocal-function-target-5.swf.trace | 5 +++
test/trace/definelocal-function-target-6.swf |binary
test/trace/definelocal-function-target-6.swf.trace | 5 +++
test/trace/definelocal-function-target-7.swf |binary
test/trace/definelocal-function-target-7.swf.trace | 5 +++
test/trace/definelocal-function-target.as | 18 +++++++++++++
test/trace/definelocal-target-5.swf |binary
test/trace/definelocal-target-5.swf.trace | 3 ++
test/trace/definelocal-target-6.swf |binary
test/trace/definelocal-target-6.swf.trace | 3 ++
test/trace/definelocal-target-7.swf |binary
test/trace/definelocal-target-7.swf.trace | 3 ++
test/trace/definelocal-target.as | 13 +++++++++
test/trace/setvariable-function-5.swf |binary
test/trace/setvariable-function-5.swf.trace | 5 +++
test/trace/setvariable-function-6.swf |binary
test/trace/setvariable-function-6.swf.trace | 5 +++
test/trace/setvariable-function-7.swf |binary
test/trace/setvariable-function-7.swf.trace | 5 +++
test/trace/setvariable-function-target-5.swf |binary
test/trace/setvariable-function-target-5.swf.trace | 5 +++
test/trace/setvariable-function-target-6.swf |binary
test/trace/setvariable-function-target-6.swf.trace | 5 +++
test/trace/setvariable-function-target-7.swf |binary
test/trace/setvariable-function-target-7.swf.trace | 5 +++
test/trace/setvariable-function-target.as | 17 ++++++++++++
test/trace/setvariable-function.as | 14 ++++++++++
29 files changed, 144 insertions(+)
New commits:
diff-tree 1b7c22f283b8f66984a4e3e04102640f76ab0246 (from parents)
Merge: 8a4c26ebb2df51ef682d7164975fa76b55df67ea
c75c861c4ba8279fcff900657fc16e967ac20e9a
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 27 17:46:40 2007 +0200
Merge branch 'as' of ssh://company at git.freedesktop.org/git/swfdec
into as
diff-tree 8a4c26ebb2df51ef682d7164975fa76b55df67ea (from
7404ff1f85d15384fdcefb97399a208b8eef888f)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 27 17:44:28 2007 +0200
add the same tests for DefineLocal
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index ec5a1b0..95e4f4d 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -112,6 +112,20 @@ EXTRA_DIST = \
countdown.swf.trace \
currentframe.swf \
currentframe.swf.trace \
+ definelocal-function-target.as \
+ definelocal-function-target-5.swf \
+ definelocal-function-target-5.swf.trace \
+ definelocal-function-target-6.swf \
+ definelocal-function-target-6.swf.trace \
+ definelocal-function-target-7.swf \
+ definelocal-function-target-7.swf.trace \
+ definelocal-target.as \
+ definelocal-target-5.swf \
+ definelocal-target-5.swf.trace \
+ definelocal-target-6.swf \
+ definelocal-target-6.swf.trace \
+ definelocal-target-7.swf \
+ definelocal-target-7.swf.trace \
delete-object.as \
delete-object-5.swf \
delete-object-5.swf.trace \
diff --git a/test/trace/definelocal-function-target-5.swf
b/test/trace/definelocal-function-target-5.swf
new file mode 100644
index 0000000..02008b5
Binary files /dev/null and b/test/trace/definelocal-function-target-5.swf differ
diff --git a/test/trace/definelocal-function-target-5.swf.trace
b/test/trace/definelocal-function-target-5.swf.trace
new file mode 100644
index 0000000..d3a3a2b
--- /dev/null
+++ b/test/trace/definelocal-function-target-5.swf.trace
@@ -0,0 +1,5 @@
+Check DefineLocal in functions sets variables in the function's scope
+undefined
+undefined
+undefined
+undefined
diff --git a/test/trace/definelocal-function-target-6.swf
b/test/trace/definelocal-function-target-6.swf
new file mode 100644
index 0000000..8eb3cf4
Binary files /dev/null and b/test/trace/definelocal-function-target-6.swf differ
diff --git a/test/trace/definelocal-function-target-6.swf.trace
b/test/trace/definelocal-function-target-6.swf.trace
new file mode 100644
index 0000000..d3a3a2b
--- /dev/null
+++ b/test/trace/definelocal-function-target-6.swf.trace
@@ -0,0 +1,5 @@
+Check DefineLocal in functions sets variables in the function's scope
+undefined
+undefined
+undefined
+undefined
diff --git a/test/trace/definelocal-function-target-7.swf
b/test/trace/definelocal-function-target-7.swf
new file mode 100644
index 0000000..5624ae6
Binary files /dev/null and b/test/trace/definelocal-function-target-7.swf differ
diff --git a/test/trace/definelocal-function-target-7.swf.trace
b/test/trace/definelocal-function-target-7.swf.trace
new file mode 100644
index 0000000..d3a3a2b
--- /dev/null
+++ b/test/trace/definelocal-function-target-7.swf.trace
@@ -0,0 +1,5 @@
+Check DefineLocal in functions sets variables in the function's scope
+undefined
+undefined
+undefined
+undefined
diff --git a/test/trace/definelocal-function-target.as
b/test/trace/definelocal-function-target.as
new file mode 100644
index 0000000..78baa5c
--- /dev/null
+++ b/test/trace/definelocal-function-target.as
@@ -0,0 +1,18 @@
+// makeswf -v 7 -s 200x150 -r 1 -o definelocal-function-target.swf
definelocal-function-target.as
+
+trace ("Check DefineLocal in functions sets variables in the
function's scope");
+
+createEmptyMovieClip ("movie", 0);
+
+function foo () {
+ setTarget ("movie");
+ var bla = 42;
+ setTarget ("");
+ trace (this.bla);
+ trace (movie.bla);
+}
+foo ();
+trace (bla);
+trace (movie.bla);
+
+loadMovie ("FSCommand:quit", "");
diff --git a/test/trace/definelocal-target-5.swf
b/test/trace/definelocal-target-5.swf
new file mode 100644
index 0000000..1dcc79e
Binary files /dev/null and b/test/trace/definelocal-target-5.swf differ
diff --git a/test/trace/definelocal-target-5.swf.trace
b/test/trace/definelocal-target-5.swf.trace
new file mode 100644
index 0000000..9470d58
--- /dev/null
+++ b/test/trace/definelocal-target-5.swf.trace
@@ -0,0 +1,3 @@
+Check DefineLocal sets variables on the target
+42
+undefined
diff --git a/test/trace/definelocal-target-6.swf
b/test/trace/definelocal-target-6.swf
new file mode 100644
index 0000000..517bf53
Binary files /dev/null and b/test/trace/definelocal-target-6.swf differ
diff --git a/test/trace/definelocal-target-6.swf.trace
b/test/trace/definelocal-target-6.swf.trace
new file mode 100644
index 0000000..5c818b6
--- /dev/null
+++ b/test/trace/definelocal-target-6.swf.trace
@@ -0,0 +1,3 @@
+Check DefineLocal sets variables on the target
+undefined
+42
diff --git a/test/trace/definelocal-target-7.swf
b/test/trace/definelocal-target-7.swf
new file mode 100644
index 0000000..3002d69
Binary files /dev/null and b/test/trace/definelocal-target-7.swf differ
diff --git a/test/trace/definelocal-target-7.swf.trace
b/test/trace/definelocal-target-7.swf.trace
new file mode 100644
index 0000000..5c818b6
--- /dev/null
+++ b/test/trace/definelocal-target-7.swf.trace
@@ -0,0 +1,3 @@
+Check DefineLocal sets variables on the target
+undefined
+42
diff --git a/test/trace/definelocal-target.as b/test/trace/definelocal-target.as
new file mode 100644
index 0000000..427dad0
--- /dev/null
+++ b/test/trace/definelocal-target.as
@@ -0,0 +1,13 @@
+// makeswf -v 7 -s 200x150 -r 1 -o definelocal-target.swf definelocal-target.as
+
+trace ("Check DefineLocal sets variables on the target");
+
+createEmptyMovieClip ("movie", 0);
+
+setTarget ("movie");
+var bla = 42;
+setTarget ("");
+trace (bla);
+trace (movie.bla);
+
+loadMovie ("FSCommand:quit", "");
diff-tree 7404ff1f85d15384fdcefb97399a208b8eef888f (from
437432dcaa6868f9d963c265e72ce94a33d90689)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 27 17:28:14 2007 +0200
add another test that actually sets the target
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 5e66bd5..ec5a1b0 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -603,6 +603,13 @@ EXTRA_DIST = \
setvariable-function-6.swf.trace \
setvariable-function-7.swf \
setvariable-function-7.swf.trace \
+ setvariable-function-target.as \
+ setvariable-function-target-5.swf \
+ setvariable-function-target-5.swf.trace \
+ setvariable-function-target-6.swf \
+ setvariable-function-target-6.swf.trace \
+ setvariable-function-target-7.swf \
+ setvariable-function-target-7.swf.trace \
shift.as \
shift-5.swf \
shift-5.swf.trace \
diff --git a/test/trace/setvariable-function-target-5.swf
b/test/trace/setvariable-function-target-5.swf
new file mode 100644
index 0000000..bda190e
Binary files /dev/null and b/test/trace/setvariable-function-target-5.swf differ
diff --git a/test/trace/setvariable-function-target-5.swf.trace
b/test/trace/setvariable-function-target-5.swf.trace
new file mode 100644
index 0000000..52107be
--- /dev/null
+++ b/test/trace/setvariable-function-target-5.swf.trace
@@ -0,0 +1,5 @@
+Check SetVariable inside functions sets variables on the target
+42
+undefined
+42
+undefined
diff --git a/test/trace/setvariable-function-target-6.swf
b/test/trace/setvariable-function-target-6.swf
new file mode 100644
index 0000000..e1c87a3
Binary files /dev/null and b/test/trace/setvariable-function-target-6.swf differ
diff --git a/test/trace/setvariable-function-target-6.swf.trace
b/test/trace/setvariable-function-target-6.swf.trace
new file mode 100644
index 0000000..760671a
--- /dev/null
+++ b/test/trace/setvariable-function-target-6.swf.trace
@@ -0,0 +1,5 @@
+Check SetVariable inside functions sets variables on the target
+undefined
+42
+undefined
+42
diff --git a/test/trace/setvariable-function-target-7.swf
b/test/trace/setvariable-function-target-7.swf
new file mode 100644
index 0000000..f44d81e
Binary files /dev/null and b/test/trace/setvariable-function-target-7.swf differ
diff --git a/test/trace/setvariable-function-target-7.swf.trace
b/test/trace/setvariable-function-target-7.swf.trace
new file mode 100644
index 0000000..760671a
--- /dev/null
+++ b/test/trace/setvariable-function-target-7.swf.trace
@@ -0,0 +1,5 @@
+Check SetVariable inside functions sets variables on the target
+undefined
+42
+undefined
+42
diff --git a/test/trace/setvariable-function-target.as
b/test/trace/setvariable-function-target.as
new file mode 100644
index 0000000..2ad6f4f
--- /dev/null
+++ b/test/trace/setvariable-function-target.as
@@ -0,0 +1,17 @@
+// makeswf -v 7 -s 200x150 -r 1 -o setvariable-function-target.swf
setvariable-function-target.as
+
+trace ("Check SetVariable inside functions sets variables on the
target");
+
+createEmptyMovieClip ("movie", 0);
+
+function foo () {
+ setTarget ("movie");
+ bla = 42;
+ trace (_root.bla);
+ trace (_root.movie.bla);
+};
+foo ();
+trace (bla);
+trace (movie.bla);
+
+loadMovie ("FSCommand:quit", "");
diff-tree 437432dcaa6868f9d963c265e72ce94a33d90689 (from
6926ffebd79fd8fb3ab853c39f071925fc8066bd)
Author: Benjamin Otte <otte at gnome.org>
Date: Wed Jun 27 17:05:28 2007 +0200
check SetVariable calls go to the target even inside functions
diff --git a/test/trace/Makefile.am b/test/trace/Makefile.am
index 24c3d4b..5e66bd5 100644
--- a/test/trace/Makefile.am
+++ b/test/trace/Makefile.am
@@ -596,6 +596,13 @@ EXTRA_DIST = \
setinterval-this-7.swf.trace \
setvariable.swf \
setvariable.swf.trace \
+ setvariable-function.as \
+ setvariable-function-5.swf \
+ setvariable-function-5.swf.trace \
+ setvariable-function-6.swf \
+ setvariable-function-6.swf.trace \
+ setvariable-function-7.swf \
+ setvariable-function-7.swf.trace \
shift.as \
shift-5.swf \
shift-5.swf.trace \
diff --git a/test/trace/setvariable-function-5.swf
b/test/trace/setvariable-function-5.swf
new file mode 100644
index 0000000..089c7a5
Binary files /dev/null and b/test/trace/setvariable-function-5.swf differ
diff --git a/test/trace/setvariable-function-5.swf.trace
b/test/trace/setvariable-function-5.swf.trace
new file mode 100644
index 0000000..6833976
--- /dev/null
+++ b/test/trace/setvariable-function-5.swf.trace
@@ -0,0 +1,5 @@
+Check SetVariable inside functions sets variables on the target
+42
+42
+42
+42
diff --git a/test/trace/setvariable-function-6.swf
b/test/trace/setvariable-function-6.swf
new file mode 100644
index 0000000..f9bc022
Binary files /dev/null and b/test/trace/setvariable-function-6.swf differ
diff --git a/test/trace/setvariable-function-6.swf.trace
b/test/trace/setvariable-function-6.swf.trace
new file mode 100644
index 0000000..6833976
--- /dev/null
+++ b/test/trace/setvariable-function-6.swf.trace
@@ -0,0 +1,5 @@
+Check SetVariable inside functions sets variables on the target
+42
+42
+42
+42
diff --git a/test/trace/setvariable-function-7.swf
b/test/trace/setvariable-function-7.swf
new file mode 100644
index 0000000..77476ca
Binary files /dev/null and b/test/trace/setvariable-function-7.swf differ
diff --git a/test/trace/setvariable-function-7.swf.trace
b/test/trace/setvariable-function-7.swf.trace
new file mode 100644
index 0000000..6833976
--- /dev/null
+++ b/test/trace/setvariable-function-7.swf.trace
@@ -0,0 +1,5 @@
+Check SetVariable inside functions sets variables on the target
+42
+42
+42
+42
diff --git a/test/trace/setvariable-function.as
b/test/trace/setvariable-function.as
new file mode 100644
index 0000000..43f844f
--- /dev/null
+++ b/test/trace/setvariable-function.as
@@ -0,0 +1,14 @@
+// makeswf -v 7 -s 200x150 -r 1 -o setvariable-function.swf
setvariable-function.as
+
+trace ("Check SetVariable inside functions sets variables on the
target");
+
+function foo () {
+ bla = 42;
+ trace (this.bla);
+ trace (_root.bla);
+};
+foo ();
+trace (bla);
+trace (this.bla);
+
+loadMovie ("FSCommand:quit", "");