[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/misc-mtasc.all/Makefi...
From: |
Sandro Santilli |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/misc-mtasc.all/Makefi... |
Date: |
Thu, 12 Jul 2007 22:03:38 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Sandro Santilli <strk> 07/07/12 22:03:38
Modified files:
. : ChangeLog
testsuite/misc-mtasc.all: Makefile.am README TestClass.as
enum.as function.as hello.as
inheritance.as
Added files:
testsuite/misc-mtasc.all: Dejagnu.as check.as level5.as
level99.as levels.as
Log message:
Patch by davr <address@hidden>:
* testsuite/misc-mtasc.all/: Dejagnu.as, Makefile.am,
README, TestClass.as, check.as, enum.as, function.as,
hello.as,
inheritance.as, level5.as, level99.as, levels.as:
Reorganized MTASC framework to avoid hackish use of Ming, and
using
the new dynamic textfield support. Added test for _level
loading.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.3722&r2=1.3723
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/Makefile.am?cvsroot=gnash&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/README?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/TestClass.as?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/enum.as?cvsroot=gnash&r1=1.1&r2=1.2
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/function.as?cvsroot=gnash&r1=1.8&r2=1.9
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/hello.as?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/inheritance.as?cvsroot=gnash&r1=1.3&r2=1.4
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/Dejagnu.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/check.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/level5.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/level99.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/levels.as?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.3722
retrieving revision 1.3723
diff -u -b -r1.3722 -r1.3723
--- ChangeLog 12 Jul 2007 14:28:02 -0000 1.3722
+++ ChangeLog 12 Jul 2007 22:03:37 -0000 1.3723
@@ -1,3 +1,11 @@
+2007-07-12 davr <address@hidden>
+
+ * testsuite/misc-mtasc.all/: Dejagnu.as, Makefile.am,
+ README, TestClass.as, check.as, enum.as, function.as, hello.as,
+ inheritance.as, level5.as, level99.as, levels.as:
+ Reorganized MTASC framework to avoid hackish use of Ming, and using
+ the new dynamic textfield support. Added test for _level loading.
+
2007-07-12 Martin Guy <address@hidden>
* configure.ac,macros/docbook.m4,:
Index: testsuite/misc-mtasc.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/Makefile.am,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- testsuite/misc-mtasc.all/Makefile.am 1 Jul 2007 10:55:08 -0000
1.10
+++ testsuite/misc-mtasc.all/Makefile.am 12 Jul 2007 22:03:37 -0000
1.11
@@ -20,37 +20,42 @@
if ENABLE_MTASC
-# NOTE: 0.4.0.beta3 is required for prebuilt-clip to work (PREBUILT_CLIPS) !!
-if ENABLE_MING
-if MAKESWF_SUPPORTS_PREBUILT_CLIPS
-
-DEJAGNU_SO_PATH = ../Dejagnu.swf
-DEJAGNU_SO_FINI = $(srcdir)/../actionscript.all/dejagnu_so_fini.as
-MTASC_FLAGS= -cp $(MTASC_CLASSPATH) -cp $(srcdir) -v -header 800:600:20
+MTASC_FLAGS = -version 6 -cp $(MTASC_CLASSPATH) -cp $(srcdir) -v -header
800:600:20
+MTASC_CPP = $(CPP) -P -I$(srcdir)
+# These will get executed and parsed for test output
ASTESTS = \
hello.as \
inheritance.as \
function.as \
enum.as \
+ levels.as \
$(NULL)
-EXTRA_DIST = $(ASTESTS) TestClass.as
+# These will get compiled to SWFs just as above, but will not be executed as a
test
+# They are for secondary movies to be loaded by the above tests.
+AUXMOVIES = \
+ level5.as \
+ level99.as \
+ $(NULL)
+EXTRA_DIST = $(ASTESTS) $(AUXMOVIES) TestClass.as check.h Dejagnu.as
ASTESTS_OUT = $(ASTESTS:.as=.swf)
+AUXMOVIES_OUT = $(AUXMOVIES:.as=.swf)
+
TEST_DRIVERS = ../simple.exp
TEST_CASES = \
alltests-runner
-alltests-runner: $(srcdir)/../generic-testrunner.sh $(ASTESTS_OUT)
- sh $< $(top_builddir) $(ASTESTS_OUT) > $@
+alltests-runner: $(srcdir)/../generic-testrunner.sh $(ASTESTS_OUT)
$(AUXMOVIES_OUT)
+ sh $< -r 50 $(top_builddir) $(ASTESTS_OUT) > $@
chmod 755 $@
.as.swf:
- $(MTASC) $(MTASC_FLAGS) -swf mtasc-$@ -main $<
- $(MAKESWF) -o $@ $(DEJAGNU_SO_PATH) mtasc-$@ $(DEJAGNU_SO_FINI)
+ cat $< | $(MTASC_CPP) - > $(@:%.swf=pp_%.as)
+ $(MTASC) $(MTASC_FLAGS) -swf $@ -main $(@:%.swf=pp_%.as)
CLEANFILES = \
gnash-dbg.log \
@@ -59,6 +64,7 @@
testrun.* \
*.swf \
*.pp \
+ pp_*.as \
*_testrunner \
*_Runner
@@ -81,5 +87,3 @@
@echo "set testcases \"$(TEST_CASES)\"" >> site.exp
endif
-endif
-endif
Index: testsuite/misc-mtasc.all/README
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/README,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-mtasc.all/README 27 Apr 2007 17:31:56 -0000 1.1
+++ testsuite/misc-mtasc.all/README 12 Jul 2007 22:03:37 -0000 1.2
@@ -5,14 +5,14 @@
Requirements
------------
-In order to use the Dejagnu.swf facilities, which have been developed to
-get the same results with both the proprietary player and Gnash (one
-of the problems being embedding fonts) Ming's makeswf utility is used
-to embed the Dejagnu.swf file into the MTASC output.
-All of this is transparent to the user, except that the final SWF version
-might be different then the expected one (until we fix this).
-
-You'll need Ming version 0.4.0.beta3 or higher in order for this to work.
+There is a standalone Dejagnu.as class which provides all the Dejagnu.swf
+facilities. In addition, there is a check.as file which should be included
+in your main .as file, which lets you write
+ check_equals(a,b);
+instead of
+ Dejagnu.check_equals(a,b);
+In addition, it will automatically pass in the filename & line number, so
+that on failure this will get printed out.
How to add a new test
---------------------
@@ -22,10 +22,12 @@
to add any accessory file (additional classes) to the EXTRA_DIST variable,
so they are properly distributed.
-Once you've done so, 'make <yourtestname>.swf' should produce the swf for you,
-with the Dejagnu.swf file already embedded. You can play this movie with any
-player (including the proprietary one) to confirm it passes all checks
contained
-in it.
+If your test needs to compile additional SWFs, but they should not be run on
+their own, add the .as files for the additional swfs to AUXMOVIES.
+
+Once you've done so, 'make <yourtestname>.swf' should produce the swf for you
+You can play this movie with any player (including the proprietary one) to
+confirm it passes all checks contained in it.
Running 'make check' should run all tests, including your new one.
@@ -35,8 +37,8 @@
Take a look at the existing .as files to see how you can use the Dejagnu.swf
facilities.
Basically, you'd be calling the functions:
- _root.check( expression );
- _root.check_equals( expression, expected ); // uses equality operator ==
+ check( expression );
+ check_equals( expression, expected ); // uses equality operator ==
Or the corresponding versions expecting failures (xcheck, xcheck_equals).
For more info see the gnash manual in the Testing/Dejagnu.swf section.
Index: testsuite/misc-mtasc.all/TestClass.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/TestClass.as,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-mtasc.all/TestClass.as 6 Mar 2007 08:46:00 -0000
1.1
+++ testsuite/misc-mtasc.all/TestClass.as 12 Jul 2007 22:03:38 -0000
1.2
@@ -3,7 +3,7 @@
// constructor
function TestClass()
{
- _root.note("TestClass constructor called");
+ Dejagnu.note("TestClass constructor called");
this.testClassCtorCalled = "called";
}
Index: testsuite/misc-mtasc.all/enum.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/enum.as,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- testsuite/misc-mtasc.all/enum.as 29 Mar 2007 14:29:15 -0000 1.1
+++ testsuite/misc-mtasc.all/enum.as 12 Jul 2007 22:03:38 -0000 1.2
@@ -1,3 +1,5 @@
+#include "check.as"
+
// This movie tests ActionEnum2
class Test
@@ -6,7 +8,7 @@
// constructor
function Test()
{
- _root.note("Test constructor called");
+ note("Test constructor called");
}
function enumerate(obj, enum)
@@ -22,7 +24,7 @@
function dump(obj)
{
for (var i in obj) {
- _root.note("DUMP: obj["+i+"] = "+obj[i]);
+ note("DUMP: obj["+i+"] = "+obj[i]);
}
}
@@ -37,43 +39,45 @@
res = new Array;
len = enumerate(a, res);
- _root.check_equals(len, 1);
- _root.check_equals(res['m1'], 20);
+ check_equals(len, 1);
+ check_equals(res['m1'], 20);
res = new Array;
len = enumerate(null, res);
- _root.check_equals(len, 0);
- _root.check_equals(res.length, 0);
+ check_equals(len, 0);
+ check_equals(res.length, 0);
res = new Array;
len = enumerate(undefined, res);
- _root.check_equals(len, 0);
- _root.check_equals(res.length, 0);
+ check_equals(len, 0);
+ check_equals(res.length, 0);
res = new Array;
dump(""); // becomes a string, most likely
len = enumerate("", res);
- _root.check_equals(len, 0);
- _root.check_equals(res.length, 0);
+ check_equals(len, 0);
+ check_equals(res.length, 0);
String.prototype.addedMember = 3;
res = new Array;
len = enumerate(new String, res);
- _root.check_equals(len, 1);
- _root.check_equals(res.length, 0);
+ check_equals(len, 1);
+ check_equals(res.length, 0);
// enum2 doesn't convert the empty string to a String object!
res = new Array;
len = enumerate("", res);
- _root.check_equals(len, 0);
- _root.check_equals(res.length, 0);
+ check_equals(len, 0);
+ check_equals(res.length, 0);
}
static function main(mc)
{
var myTest = new Test;
myTest.test_all();
+
+ Dejagnu.done();
}
}
Index: testsuite/misc-mtasc.all/function.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/function.as,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- testsuite/misc-mtasc.all/function.as 15 Mar 2007 22:39:54 -0000
1.8
+++ testsuite/misc-mtasc.all/function.as 12 Jul 2007 22:03:38 -0000
1.9
@@ -1,3 +1,5 @@
+#include "check.as"
+
import TestClass;
class Test extends TestClass
@@ -6,25 +8,25 @@
function setX(nx)
{
- _root.check(!arguments.hasOwnProperty('toString'));
- _root.check_equals(arguments.toString(), '2');
- _root.check(arguments instanceof Object);
- _root.check_equals(typeof(arguments.__proto__), 'object');
- _root.check_equals(typeof(arguments.__proto__.constructor),
'function');
-
_root.check_equals(typeof(arguments.__proto__.constructor.__proto__), 'object');
-
_root.check_equals(typeof(arguments.__proto__.constructor.__proto__.constructor),
'function');
- _root.check_equals(arguments.__proto__,
arguments.__proto__.constructor.prototype);
- _root.check(arguments.__proto__.hasOwnProperty('toString'));
- _root.check(arguments.__proto__.toString !=
Object.prototype.toString);
- _root.check(arguments.__proto__ != Object.prototype);
- _root.check(arguments.__proto__.constructor.__proto__ !=
Object.prototype);
- _root.check(arguments.__proto__.constructor.__proto__ !=
Array.prototype);
+ check(!arguments.hasOwnProperty('toString'));
+ check_equals(arguments.toString(), '2');
+ check(arguments instanceof Object);
+ check_equals(typeof(arguments.__proto__), 'object');
+ check_equals(typeof(arguments.__proto__.constructor),
'function');
+ check_equals(typeof(arguments.__proto__.constructor.__proto__),
'object');
+
check_equals(typeof(arguments.__proto__.constructor.__proto__.constructor),
'function');
+ check_equals(arguments.__proto__,
arguments.__proto__.constructor.prototype);
+ check(arguments.__proto__.hasOwnProperty('toString'));
+ check(arguments.__proto__.toString !=
Object.prototype.toString);
+ check(arguments.__proto__ != Object.prototype);
+ check(arguments.__proto__.constructor.__proto__ !=
Object.prototype);
+ check(arguments.__proto__.constructor.__proto__ !=
Array.prototype);
this.x = nx;
}
function Test()
{
- _root.check_equals(typeof(super), 'object');
+ check_equals(typeof(super), 'object');
// This seems to trigger an ActionCallMethod(undefined, super).
// It is expected that the VM fetches super.constructor and
calls
@@ -42,15 +44,17 @@
var myTest = new Test;
// odd enough, if we output an SWF7 movie, this fails
// with the reference player too !
- _root.check_equals(myTest.TestClassCtorCalled, 'called');
+ check_equals(myTest.TestClassCtorCalled, 'called');
// This checks that the 'this' pointer is properly set
// (and shows it's NOT properly set with Gnash)
-
_root.check_equals(typeof(myTest.__proto__.TestClassCtorCalled), 'undefined');
+ check_equals(typeof(myTest.__proto__.TestClassCtorCalled),
'undefined');
// This checks that the 'this' pointer is properly set for
"normal"
// ActionCallMethod (see setX(2) in Test ctor)
- _root.check_equals(myTest.x, 2);
- _root.check_equals(typeof(myTest.__proto__.x), 'undefined');
+ check_equals(myTest.x, 2);
+ check_equals(typeof(myTest.__proto__.x), 'undefined');
+
+ Dejagnu.done();
}
}
Index: testsuite/misc-mtasc.all/hello.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/hello.as,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- testsuite/misc-mtasc.all/hello.as 27 Feb 2007 09:10:21 -0000 1.3
+++ testsuite/misc-mtasc.all/hello.as 12 Jul 2007 22:03:38 -0000 1.4
@@ -1,24 +1,32 @@
+#include "check.as"
+
class Test extends MovieClip
{
function test_all()
{
- _root.check_equals(typeof(this.loadMovie), 'function');
-
+ check_equals(typeof(this.loadMovie), 'function');
}
+ // Main entry point, provided by MTASC
+ // mc == the root MC this class is compiled into.
+ // If running standalone, mc == _root == _level0
+ // If loaded into another swf, it may vary.
static function main(mc)
{
- var myTest = new Test;
+ var myTest = new Test();
myTest.test_all();
var a = 1;
// This is how you call check_equals
- _root.check_equals(a, 1);
+ check_equals(a, 1);
// This is how you print notes (trace + visual trace)
- _root.note("Hello world");
+ note("Hello world");
+
+ // Call this after finishing all tests. It prints out the
totals.
+ Dejagnu.done();
}
}
Index: testsuite/misc-mtasc.all/inheritance.as
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/inheritance.as,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- testsuite/misc-mtasc.all/inheritance.as 2 Mar 2007 00:24:33 -0000
1.3
+++ testsuite/misc-mtasc.all/inheritance.as 12 Jul 2007 22:03:38 -0000
1.4
@@ -1,10 +1,12 @@
+#include "check.as"
+
class Test extends MovieClip
{
// constructor
function Test()
{
- _root.note("Test constructor called");
+ note("Test constructor called");
}
// Override MovieClip.lineTo
@@ -14,9 +16,9 @@
function test_proto_ext()
{
- _root.note("This is "+this);
+ note("This is "+this);
Function.prototype.make = function() { return true; };
- _root.check(arguments.callee.make());
+ check(arguments.callee.make());
}
function test_laszlo_core()
@@ -29,30 +31,30 @@
B.prototype = new A();
B.prototype.test = function () {
- _root.check(
this.constructor.prototype.constructor.prototype.test() );
+ check(
this.constructor.prototype.constructor.prototype.test() );
}
var binst = new B();
- _root.check_equals(typeof(binst), 'object');
- _root.check_equals(typeof(binst.test), 'function');
- _root.note("test_laszlo_core called");
+ check_equals(typeof(binst), 'object');
+ check_equals(typeof(binst.test), 'function');
+ note("test_laszlo_core called");
binst.test();
}
function test_all()
{
- _root.check_equals(typeof(this.loadMovie), 'function');
- _root.check_equals(this.loadMovie, super.loadMovie);
- _root.check(this.lineTo != super.lineTo); // overridden
- _root.check_equals(typeof(this.test_laszlo_core), 'function');
- _root.check_equals(typeof(this.test_proto_ext), 'function');
+ check_equals(typeof(this.loadMovie), 'function');
+ check_equals(this.loadMovie, super.loadMovie);
+ check(this.lineTo != super.lineTo); // overridden
+ check_equals(typeof(this.test_laszlo_core), 'function');
+ check_equals(typeof(this.test_proto_ext), 'function');
this.test_laszlo_core();
- _root.check_equals(typeof(this.test_laszlo_core), 'function');
- _root.check_equals(typeof(this.test_proto_ext), 'function');
+ check_equals(typeof(this.test_laszlo_core), 'function');
+ check_equals(typeof(this.test_proto_ext), 'function');
this.test_proto_ext();
- _root.check_equals(typeof(this.test_laszlo_core), 'function');
- _root.check_equals(typeof(this.test_proto_ext), 'function');
- _root.note("This is "+this);
+ check_equals(typeof(this.test_laszlo_core), 'function');
+ check_equals(typeof(this.test_proto_ext), 'function');
+ note("This is "+this);
}
@@ -60,6 +62,8 @@
{
var myTest = new Test;
myTest.test_all();
+
+ Dejagnu.done();
}
}
Index: testsuite/misc-mtasc.all/Dejagnu.as
===================================================================
RCS file: testsuite/misc-mtasc.all/Dejagnu.as
diff -N testsuite/misc-mtasc.all/Dejagnu.as
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/Dejagnu.as 12 Jul 2007 22:03:37 -0000 1.1
@@ -0,0 +1,108 @@
+class Dejagnu {
+ static var passed = 0;
+ static var failed = 0;
+ static var xpassed = 0;
+ static var xfailed = 0;
+ static var untest = 0;
+ static var unresolve = 0;
+
+ // This is a trick to force our 'init' function
+ // to be automatically called at the start of the movie.
+ static var inithack = init();
+
+ static function init() {
+ if(_level0.dejagnu_module_initialized == 1) return;
+
+ // create a textfield to output to
+ _level0.createTextField("textout", 99, 10, 10, 500, 500);
+ _level0.dejagnu_module_initialized = 1;
+ }
+
+ static function fail (why) {
+ failed++;
+ var msg = 'FAILED: '+why;
+ xtrace(msg);
+ }
+
+ static function xfail(why) {
+ xfailed++;
+ var msg = 'XFAILED: '+why;
+ xtrace(msg);
+ }
+
+ static function pass(why) {
+ passed++;
+ var msg = 'PASSED: '+why;
+ trace (msg);
+ }
+
+ static function xpass(why) {
+ xpassed++;
+ var msg = 'XPASSED: '+why;
+ trace (msg);
+ }
+
+ static function totals() {
+ xtrace('#passed: '+ passed);
+ xtrace('#failed: '+ failed);
+ if ( xpassed ) {
+ xtrace('#unexpected successes: '+ xpassed);
+ }
+ if ( xfailed ) {
+ xtrace('#expected failures: '+ xfailed);
+ }
+
+ }
+
+ static function check_equals(obt, exp, msg) {
+ if(msg == null) msg = "";
+ if ( obt == exp )
+ pass(obt+' == '+exp);
+ else
+ fail('expected: "'+exp+'" , obtained: "'+obt+'" '+msg);
+ }
+
+ static function xcheck_equals(obt, exp, msg) {
+ if(msg == null) msg = "";
+ if ( obt == exp )
+ xpass(obt+' == '+exp);
+ else
+ xfail('expected: '+exp+' , obtained: '+obt+" "+msg);
+ }
+
+ static function check(a, msg) {
+ if ( a )
+ pass(msg != undefined ? msg : a);
+ else
+ fail(msg != undefined ? msg : a);
+ }
+
+ static function xcheck(a, msg) {
+ if ( a )
+ xpass(msg != undefined ? msg : a);
+ else
+ xfail(msg != undefined ? msg : a);
+ }
+
+ static function note(msg) {
+ xtrace(msg);
+ }
+
+ static function xtrace(msg) {
+ _level0.textout.text += msg + "\n";
+ trace(msg);
+ }
+
+ static function untested(msg) {
+ trace("UNTESTED: "+msg);
+ }
+
+ static function unresolved(msg) {
+ trace("UNRESOLVED: "+msg);
+ }
+
+ static function done() {
+ totals();
+ }
+
+}
Index: testsuite/misc-mtasc.all/check.as
===================================================================
RCS file: testsuite/misc-mtasc.all/check.as
diff -N testsuite/misc-mtasc.all/check.as
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/check.as 12 Jul 2007 22:03:38 -0000 1.1
@@ -0,0 +1,26 @@
+#ifndef _CHECK_AS_
+#define _CHECK_AS_
+
+#define _INFO_ ' ['+__FILE__+':'+__LINE__+']'
+
+#define check_equals(a, b) Dejagnu.check_equals(a, b, _INFO_);
+//#define check_equals(a, b, msg) Dejagnu.check(a, b, msg + _INFO_);
+
+#define xcheck_equals(a, b) Dejagnu.xcheck_equals(a, b, _INFO_);
+//#define xcheck_equals(a, b, msg) Dejagnu.check(a, b, msg + _INFO_);
+
+#define check(a) Dejagnu.check(a, _INFO_);
+#define xcheck(a) Dejagnu.xcheck(a, _INFO_);
+
+#define pass(text) Dejagnu.pass(text + _INFO_)
+#define xpass(text) Dejagnu.xpass(text + _INFO_)
+#define fail(text) Dejagnu.fail(text + _INFO_)
+#define xfail(text) Dejagnu.xfail(text + _INFO_)
+#define pass(text) Dejagnu.pass(text + _INFO_)
+#define untested(text) Dejagnu.untested(text + _INFO_)
+#define unresolved(text) Dejagnu.unresolved(text + _INFO_)
+
+#define note(text) Dejagnu.note(text + _INFO_);
+
+
+#endif
Index: testsuite/misc-mtasc.all/level5.as
===================================================================
RCS file: testsuite/misc-mtasc.all/level5.as
diff -N testsuite/misc-mtasc.all/level5.as
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/level5.as 12 Jul 2007 22:03:38 -0000 1.1
@@ -0,0 +1,27 @@
+#include "check.as"
+
+class Level5
+{
+ static function main(mc)
+ {
+ // The ""+ is there to force conversion to a string
+ check_equals(""+mc, "_level5");
+
+ // check that we can acess back to _level0
+ check_equals(_level0.testvar, 1239);
+
+ // check that we can modify vars on our own level
+ check_equals(_level5.testvar, undefined);
+ _level5.testvar = 6789;
+ check_equals(_level5.testvar, 6789);
+
+ // check that we can modify vars on _level0
+ check_equals(_level0.testvar2, undefined);
+ _level0.testvar2 = true;
+ check_equals(_level0.testvar2, true);
+
+
+ // load yet another swf
+ getURL("level99.swf","_level"+99);
+ }
+}
Index: testsuite/misc-mtasc.all/level99.as
===================================================================
RCS file: testsuite/misc-mtasc.all/level99.as
diff -N testsuite/misc-mtasc.all/level99.as
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/level99.as 12 Jul 2007 22:03:38 -0000 1.1
@@ -0,0 +1,29 @@
+#include "check.as"
+
+class Level99
+{
+ static function main(mc)
+ {
+ // The ""+ is there to force conversion to a string
+ check_equals(""+mc, "_level99");
+
+ // check that we can acess back to _level0
+ check_equals(_level0.testvar, 1239);
+ check_equals(_level0.testvar2, true);
+
+ // check that we can acess back to _level5
+ check_equals(_level5.testvar, 6789);
+
+ // check that we can modify vars on our own level
+ check_equals(_level99.testvar, undefined);
+ _level99.testvar = "hello";
+ check_equals(_level99.testvar, "hello");
+
+ // check that we can modify vars on _level5
+ check_equals(_level5.testvar2, undefined);
+ _level5.testvar2 = "goodbye";
+ check_equals(_level5.testvar2, "goodbye");
+
+ Dejagnu.done();
+ }
+}
Index: testsuite/misc-mtasc.all/levels.as
===================================================================
RCS file: testsuite/misc-mtasc.all/levels.as
diff -N testsuite/misc-mtasc.all/levels.as
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/levels.as 12 Jul 2007 22:03:38 -0000 1.1
@@ -0,0 +1,21 @@
+#include "check.as"
+
+class LevelsMain
+{
+ static function main(mc)
+ {
+ // create a var that other swfs can test
+ _level0.testvar = 1239;
+
+ var test = new LevelsMain();
+ test.run();
+
+ // The ""+ is there to force conversion to a string
+ check_equals(""+mc, "_level0");
+ }
+
+ function run() {
+ trace("main class running");
+ getURL("level5.swf","_level"+5);
+ }
+}
- [Gnash-commit] gnash ChangeLog testsuite/misc-mtasc.all/Makefi...,
Sandro Santilli <=