gnash-commit
[Top][All Lists]
Advanced

[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: Tue, 27 Nov 2007 15:17:05 +0000

CVSROOT:        /sources/gnash
Module name:    gnash
Changes by:     Sandro Santilli <strk>  07/11/27 15:17:05

Modified files:
        .              : ChangeLog 
        testsuite/misc-mtasc.all: Makefile.am 
Added files:
        testsuite/misc-mtasc.all: implementsOpTest.as 
        testsuite/misc-mtasc.all/implementsOp: 
                                               BExtendingImplementation.as 
                                               ImplementationA.as 
                                               ImplementationB.as 
                                               SimpleInterface.as 
                                               SimpleInterfaceTest.as 

Log message:
        Test for ActionScript 'implements'. See patch #6287. Thanks to api and 
topeira.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.4982&r2=1.4983
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/Makefile.am?cvsroot=gnash&r1=1.20&r2=1.21
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/implementsOpTest.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/implementsOp/BExtendingImplementation.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/implementsOp/ImplementationA.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/implementsOp/ImplementationB.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/implementsOp/SimpleInterface.as?cvsroot=gnash&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/misc-mtasc.all/implementsOp/SimpleInterfaceTest.as?cvsroot=gnash&rev=1.1

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.4982
retrieving revision 1.4983
diff -u -b -r1.4982 -r1.4983
--- ChangeLog   27 Nov 2007 11:28:50 -0000      1.4982
+++ ChangeLog   27 Nov 2007 15:17:04 -0000      1.4983
@@ -1,5 +1,10 @@
 2007-11-27 Sandro Santilli <address@hidden>
 
+       * testsuite/misc-mtasc.all/: Makefile.am, implementsOp*:
+         Test for implementsOp (adapted patch #6287).
+
+2007-11-27 Sandro Santilli <address@hidden>
+
        * server/dlist.cpp (unload): don't destroy childs when unloading
          parent. 
        * testsuite/actionscript.all/MovieClip.as: success in tests

Index: testsuite/misc-mtasc.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/misc-mtasc.all/Makefile.am,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -b -r1.20 -r1.21
--- testsuite/misc-mtasc.all/Makefile.am        20 Oct 2007 16:59:11 -0000      
1.20
+++ testsuite/misc-mtasc.all/Makefile.am        27 Nov 2007 15:17:04 -0000      
1.21
@@ -27,6 +27,7 @@
        exception.as \
        levels.as \
        super_test1.as \
+       implementsOpTest.as \
        $(NULL)
 
 
@@ -37,7 +38,7 @@
            level99.as \
            $(NULL)
 
-EXTRA_DIST = $(ASTESTS) $(AUXMOVIES) TestClass.as ../check.h Dejagnu.as 
check.as Derived1.as Base1.as
+EXTRA_DIST = $(ASTESTS) $(AUXMOVIES) TestClass.as ../check.h Dejagnu.as 
check.as Derived1.as Base1.as  implementsOp/BExtendingImplementation.as  
implementsOp/ImplementationA.as  implementsOp/ImplementationB.as 
implementsOp/SimpleInterface.as
 
 if ENABLE_MTASC
 

Index: testsuite/misc-mtasc.all/implementsOpTest.as
===================================================================
RCS file: testsuite/misc-mtasc.all/implementsOpTest.as
diff -N testsuite/misc-mtasc.all/implementsOpTest.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/implementsOpTest.as        27 Nov 2007 15:17:04 
-0000      1.1
@@ -0,0 +1,64 @@
+// implementsOpTest.as - Entry point for the implementsOp test
+//
+//   Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+#include "check.as"
+
+import implementsOp.SimpleInterface;
+import implementsOp.ImplementationA;
+import implementsOp.ImplementationB;
+import implementsOp.BExtendingImplementation;
+
+class implementsOpTest {
+       
+       var objectA:SimpleInterface;
+       var objectB:SimpleInterface;
+       var objectC:SimpleInterface;
+       
+       function implementsOpTest(testMethod:String) {
+       super(testMethod);
+       }
+       
+       function test_all():Void {
+               objectA = new ImplementationA();
+               objectB = new ImplementationB();
+               objectC = new BExtendingImplementation();
+       
+               check_equals(100, objectA.doStuff(1, "foo"));
+               check_equals(100, objectA.doStuff(1, "foo"));
+       
+               check_equals("param1 was foo", objectA.doMoreStuff("foo", 1));
+       
+               check_equals(200, objectB.doStuff(1, "foo"));
+       
+               check_equals("param2 was 1", objectB.doMoreStuff("foo", 1));
+       
+               check_equals(objectB.doStuff(1, "foo"), objectC.doStuff(1, 
"foo"));
+       
+               check_equals("overriding implementation", 
objectC.doMoreStuff("foo", 1));
+       }
+
+       static function main(mc)
+       {
+               var myTest = new implementsOpTest;
+               myTest.test_all();
+
+               Dejagnu.done();
+       }
+}
+

Index: testsuite/misc-mtasc.all/implementsOp/BExtendingImplementation.as
===================================================================
RCS file: testsuite/misc-mtasc.all/implementsOp/BExtendingImplementation.as
diff -N testsuite/misc-mtasc.all/implementsOp/BExtendingImplementation.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/implementsOp/BExtendingImplementation.as   27 Nov 
2007 15:17:04 -0000      1.1
@@ -0,0 +1,28 @@
+// BExtendingImplementation.as - ??
+//
+//   Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+import ImplementationB;
+
+class implementsOp.BExtendingImplementation extends 
implementsOp.ImplementationB {
+
+       function doMoreStuff(param1:String, param2:Number):String {
+               return "overriding implementation";
+       }
+       
+}

Index: testsuite/misc-mtasc.all/implementsOp/ImplementationA.as
===================================================================
RCS file: testsuite/misc-mtasc.all/implementsOp/ImplementationA.as
diff -N testsuite/misc-mtasc.all/implementsOp/ImplementationA.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/implementsOp/ImplementationA.as    27 Nov 2007 
15:17:04 -0000      1.1
@@ -0,0 +1,32 @@
+// ImplementationA.as - ??
+//
+//   Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+import SimpleInterface;
+
+class implementsOp.ImplementationA implements implementsOp.SimpleInterface {
+       
+       function doStuff(param1:Number, param2:String):Number {
+               return 100;
+       }
+
+       function doMoreStuff(param1:String, param2:Number):String {
+               return "param1 was " + param1;
+       }
+
+}

Index: testsuite/misc-mtasc.all/implementsOp/ImplementationB.as
===================================================================
RCS file: testsuite/misc-mtasc.all/implementsOp/ImplementationB.as
diff -N testsuite/misc-mtasc.all/implementsOp/ImplementationB.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/implementsOp/ImplementationB.as    27 Nov 2007 
15:17:04 -0000      1.1
@@ -0,0 +1,32 @@
+// ImplementationB.as - ??
+//
+//   Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+import SimpleInterface;
+
+class implementsOp.ImplementationB implements implementsOp.SimpleInterface {
+       
+       function doStuff(param1:Number, param2:String):Number {
+               return 200;
+       }
+
+       function doMoreStuff(param1:String, param2:Number):String {
+               return "param2 was " + param2;
+       }
+
+}

Index: testsuite/misc-mtasc.all/implementsOp/SimpleInterface.as
===================================================================
RCS file: testsuite/misc-mtasc.all/implementsOp/SimpleInterface.as
diff -N testsuite/misc-mtasc.all/implementsOp/SimpleInterface.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/implementsOp/SimpleInterface.as    27 Nov 2007 
15:17:05 -0000      1.1
@@ -0,0 +1,26 @@
+// SimpleInterface.as - ??
+//
+//   Copyright (C) 2007 Free Software Foundation, Inc.
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+//
+
+interface implementsOp.SimpleInterface {
+
+       function doStuff(param1:Number, param2:String):Number;
+
+       function doMoreStuff(param1:String, param2:Number):String;
+       
+}

Index: testsuite/misc-mtasc.all/implementsOp/SimpleInterfaceTest.as
===================================================================
RCS file: testsuite/misc-mtasc.all/implementsOp/SimpleInterfaceTest.as
diff -N testsuite/misc-mtasc.all/implementsOp/SimpleInterfaceTest.as
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ testsuite/misc-mtasc.all/implementsOp/SimpleInterfaceTest.as        27 Nov 
2007 15:17:05 -0000      1.1
@@ -0,0 +1,45 @@
+#include "check.as"
+
+import SimpleInterface;
+import ImplementationA;
+import ImplementationB;
+import BExtendingImplementation;
+
+class SimpleInterfaceTest {
+       
+       var objectA:SimpleInterface;
+       var objectB:SimpleInterface;
+       var objectC:SimpleInterface;
+       
+       function SimpleInterfaceTest(testMethod:String) {
+       super(testMethod);
+       }
+       
+       function test_all():Void {
+               objectA = new ImplementationA();
+               objectB = new ImplementationB();
+               objectC = new BExtendingImplementation();
+       
+               check_equals(100, objectA.doStuff(1, "foo"));
+               check_equals(100, objectA.doStuff(1, "foo"));
+       
+               check_equals("param1 was foo", objectA.doMoreStuff("foo", 1));
+       
+               check_equals(200, objectB.doStuff(1, "foo"));
+       
+               check_equals("param2 was 1", objectB.doMoreStuff("foo", 1));
+       
+               check_equals(objectB.doStuff(1, "foo"), objectC.doStuff(1, 
"foo"));
+       
+               check_equals("overriding implementation", 
objectC.doMoreStuff("foo", 1));
+       }
+
+       static function main(mc)
+       {
+               var myTest = new SimpleInterfaceTest;
+               myTest.test_all();
+
+               Dejagnu.done();
+       }
+}
+




reply via email to

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