[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Make...
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] gnash ChangeLog testsuite/actionscript.all/Make... |
Date: |
Wed, 11 Jun 2008 12:09:34 +0000 |
CVSROOT: /sources/gnash
Module name: gnash
Changes by: Benjamin Wolsey <bwy> 08/06/11 12:09:33
Modified files:
. : ChangeLog
testsuite/actionscript.all: Makefile.am
Added files:
testsuite/actionscript.all: Try.as
Log message:
* testsuite/actionscript.all/Try.as: inital tests for try /
catch /
finally.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/gnash/ChangeLog?cvsroot=gnash&r1=1.6896&r2=1.6897
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Makefile.am?cvsroot=gnash&r1=1.95&r2=1.96
http://cvs.savannah.gnu.org/viewcvs/gnash/testsuite/actionscript.all/Try.as?cvsroot=gnash&rev=1.1
Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/gnash/gnash/ChangeLog,v
retrieving revision 1.6896
retrieving revision 1.6897
diff -u -b -r1.6896 -r1.6897
--- ChangeLog 11 Jun 2008 03:31:43 -0000 1.6896
+++ ChangeLog 11 Jun 2008 12:09:33 -0000 1.6897
@@ -1,3 +1,8 @@
+2008-06-11 Benjamin Wolsey <address@hidden>
+
+ * testsuite/actionscript.all/Try.as: initial tests for try / catch
+ / finally.
+
2008-06-11 Zou Lunkai <address@hidden>
* server/matrix.h: drop helpless templates, docs, cleanups.
Index: testsuite/actionscript.all/Makefile.am
===================================================================
RCS file: /sources/gnash/gnash/testsuite/actionscript.all/Makefile.am,v
retrieving revision 1.95
retrieving revision 1.96
diff -u -b -r1.95 -r1.96
--- testsuite/actionscript.all/Makefile.am 9 Jun 2008 20:53:52 -0000
1.95
+++ testsuite/actionscript.all/Makefile.am 11 Jun 2008 12:09:33 -0000
1.96
@@ -85,7 +85,9 @@
CustomActions.as \
Date.as \
Error.as \
+ Function.as \
Global.as \
+ Inheritance.as \
Key.as \
LoadVars.as \
Math.as \
@@ -93,6 +95,7 @@
Mouse.as \
MovieClip.as \
MovieClipLoader.as \
+ NetConnection.as \
NetStream.as \
Number.as \
Random.as \
@@ -104,11 +107,11 @@
TextField.as \
TextFormat.as \
TextSnapshot.as \
+ Try.as \
Video.as \
+ Matrix.as \
Object.as \
- Inheritance.as \
- NetConnection.as \
- Function.as \
+ Point.as \
with.as \
XML.as \
XMLSocket.as \
@@ -120,8 +123,6 @@
ops.as \
toString_valueOf.as \
Rectangle.as \
- Point.as \
- Matrix.as \
$(NULL)
ASTESTS_OUT = $(ASTESTS:.as=.swf)
Index: testsuite/actionscript.all/Try.as
===================================================================
RCS file: testsuite/actionscript.all/Try.as
diff -N testsuite/actionscript.all/Try.as
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testsuite/actionscript.all/Try.as 11 Jun 2008 12:09:33 -0000 1.1
@@ -0,0 +1,116 @@
+//
+// Copyright (C) 2005, 2006, 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
+//
+
+// Test case for Boolean ActionScript class
+// compile this test case with Ming makeswf, and then
+// execute it like this gnash -1 -r 0 -v out.swf
+
+
+rcsid="$Id: Try.as,v 1.1 2008/06/11 12:09:33 bwy Exp $";
+#include "check.as"
+
+// Some of the test variants.
+// Try catch finally (no throw)
+// Try (throw) catch finally
+// Try finally
+// Try (throw) finally
+// Try catch
+// Try (throw) catch
+
+throwfunc = function()
+{
+ throw "try";
+};
+
+throwfunc2 = function()
+{
+ try {
+ throw "try";
+ }
+ catch (e) {};
+};
+
+r = "1: ";
+try { r +="try "; r +="body "; }
+catch (a) { r +="catch "; r += a + " "; }
+finally { r +="finally "; };
+r += ".";
+
+#if OUTPUT_VERSION < 7
+xcheck_equals(r, "1: try body catch finally .");
+#else
+check_equals(r, "1: try body catch undefined finally .");
+#endif
+
+r = "2: ";
+try { r += "try "; throw ("thrown"); r += "body "; }
+catch (b) { r += "catch "; r += b + " "; }
+finally { r += "finally "; };
+r += ".";
+check_equals(r, "2: try catch thrown finally .");
+
+r = "3: ";
+try { r += "try "; r += "body "; }
+finally { r += "finally "; };
+r += ".";
+check_equals(r, "3: try body finally .");
+
+// This will interrupt execution without the enclosing try/catch.
+try {
+ r = "4: ";
+ try { r += "try "; throw ("thrown"); r += "body "; }
+ finally { r += "finally "; };
+}
+catch (c) { r += c + " "; };
+r += ".";
+xcheck_equals(r, "4: try finally thrown .");
+
+// Also check that the exception is not
+// undefined if nothing is thrown
+d = "pre-existing variable d";
+r = "5: ";
+try { r += "try "; r += "body "; }
+catch (d) { r += "catch "; r+= d + " "; };
+r += ".";
+xcheck_equals(r, "5: try body catch pre-existing variable d .");
+
+r = "6: ";
+try { r += "try "; throw ("thrown"); r += "body "; }
+catch (e) { r += "catch "; r += e + " "; };
+r += ".";
+check_equals(r, "6: try catch thrown .");
+
+try {
+ try {
+ r = "7: ";
+ try { r += "try "; throw ("thrown"); r += "body "; }
+ finally { r += "finally "; };
+ }
+ finally { r += "finally2 "; };
+}
+catch (f) { r += f + " "; };
+r += ".";
+xcheck_equals(r, "7: try finally finally2 thrown .");
+
+
+//try { throwfunc(); }
+//catch (g) { trace ("catch"); trace (g); };
+
+//try { throw "thrown"; }
+//finally { };
+//trace ("Don't reach this point");