[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r9532: Tests for instance constructi
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r9532: Tests for instance construction. |
Date: |
Thu, 24 Jul 2008 18:29:17 +0200 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9532
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Thu 2008-07-24 18:29:17 +0200
message:
Tests for instance construction.
added:
testsuite/actionscript.all/Instance.as
modified:
testsuite/actionscript.all/Makefile.am
------------------------------------------------------------
revno: 9531.1.1
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-07-24 18:06:11 +0200
message:
Add tests for instantiation.
added:
testsuite/actionscript.all/Instance.as
modified:
testsuite/actionscript.all/Makefile.am
------------------------------------------------------------
revno: 9531.1.2
committer: Benjamin Wolsey <address@hidden>
branch nick: work
timestamp: Thu 2008-07-24 18:28:45 +0200
message:
check -> xcheck
modified:
testsuite/actionscript.all/Instance.as
=== added file 'testsuite/actionscript.all/Instance.as'
--- a/testsuite/actionscript.all/Instance.as 1970-01-01 00:00:00 +0000
+++ b/testsuite/actionscript.all/Instance.as 2008-07-24 16:28:45 +0000
@@ -0,0 +1,105 @@
+//
+// 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 Instance construction
+// compile this test case with Ming makeswf, and then
+// execute it like this gnash -1 -r 0 -v out.swf
+
+
+rcsid="$Id: Boolean.as,v 1.21 2008/04/02 09:39:59 strk Exp $";
+#include "check.as"
+
+
+n = 3;
+o = new n;
+check_equals(o, undefined);
+
+// o = new 3;
+asm {
+ push "o"
+ push 0
+ push "3"
+ new
+ setvariable
+};
+check_equals(o, undefined);
+
+o = new Math.cos(9);
+check_equals(typeof(o), "object");
+xcheck_equals(typeof(o.__proto__), "undefined");
+ASSetPropFlags(o, null, 6, 1);
+#if OUTPUT_VERSION < 7
+check_equals(typeof(o.constructor), "function");
+#else
+xcheck_equals(typeof(o.constructor), "undefined");
+#endif
+#if OUTPUT_VERSION > 5
+check_equals(typeof(o.__constructor__), "function");
+#else
+check_equals(typeof(o.__constructor__), "undefined");
+#endif
+xcheck_equals(o.toString(), undefined);
+xcheck_equals(o.valueOf(), undefined);
+xcheck(!o instanceOf Object);
+xcheck(!o instanceOf Number);
+check(!o instanceOf String);
+
+o = new Math.cos();
+check_equals(typeof(o), "object");
+xcheck_equals(typeof(o.__proto__), "undefined");
+#if OUTPUT_VERSION < 7
+check_equals(typeof(o.constructor), "function");
+#else
+xcheck_equals(typeof(o.constructor), "undefined");
+#endif
+xcheck_equals(o.toString(), undefined);
+xcheck_equals(o.valueOf(), undefined);
+xcheck(!o instanceOf Object);
+xcheck(!o instanceOf Number);
+check(!o instanceOf String);
+
+o = new Mouse.hide();
+check_equals(typeof(o), "object");
+check_equals(typeof(o.__proto__), "undefined");
+#if OUTPUT_VERSION < 7
+ #if OUTPUT_VERSION == 6
+ // SWF6 passes
+ check_equals(typeof(o.constructor), "function");
+ #else
+ // SWF5 doesn't
+ xcheck_equals(typeof(o.constructor), "function");
+ #endif
+#else
+check_equals(typeof(o.constructor), "undefined");
+#endif
+check_equals(o.toString(), undefined);
+check_equals(o.valueOf(), undefined);
+check(!o instanceOf Object);
+check(!o instanceOf Number);
+check(!o instanceOf String);
+
+o = new Stage.align();
+check_equals(typeof(o), "undefined");
+
+o = new Date.UTC();
+xcheck_equals(typeof(o), "object");
+check_equals(o.toString(), undefined);
+check_equals(o.valueOf(), undefined);
+check(!o instanceOf Object);
+
+totals(32);
=== modified file 'testsuite/actionscript.all/Makefile.am'
--- a/testsuite/actionscript.all/Makefile.am 2008-07-22 21:24:49 +0000
+++ b/testsuite/actionscript.all/Makefile.am 2008-07-24 16:06:11 +0000
@@ -89,6 +89,7 @@
Function.as \
Global.as \
Inheritance.as \
+ Instance.as \
Key.as \
LoadVars.as \
Math.as \
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r9532: Tests for instance construction.,
Benjamin Wolsey <=