gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] /srv/bzr/gnash/trunk r10995: More migrating of test cases


From: Jon Crider
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r10995: More migrating of test cases moved some to internal.all but did not modify
Date: Wed, 03 Jun 2009 21:19:00 -0600
User-agent: Bazaar (1.13.1)

------------------------------------------------------------
revno: 10995
committer: Jon Crider <address@hidden>
branch nick: trunk
timestamp: Wed 2009-06-03 21:19:00 -0600
message:
  More migrating of test cases moved some to internal.all but did not modify
added:
  testsuite/as3/classes.all/Boolean_as.hx
  testsuite/as3/internal.all/ASnative.as
modified:
  testsuite/as3/classes.all/AsBroadcaster_as.hx
    ------------------------------------------------------------
    revno: 10980.1.1
    committer: Jon Crider <address@hidden>
    branch nick: testdev2
    timestamp: Wed 2009-06-03 14:41:18 -0600
    message:
      Migrated some test cases. Added case for Boolean class, moved but did not 
migrate ASnative.as
    added:
      testsuite/as3/classes.all/Boolean_as.hx
      testsuite/as3/internal.all/ASnative.as
    modified:
      testsuite/as3/classes.all/AsBroadcaster_as.hx
    ------------------------------------------------------------
    revno: 10980.1.2
    committer: Jon Crider <address@hidden>
    branch nick: testdev2
    timestamp: Wed 2009-06-03 21:14:25 -0600
    message:
      Made changes to one test case - migrated more test cases
    modified:
      testsuite/as3/classes.all/AsBroadcaster_as.hx
=== modified file 'testsuite/as3/classes.all/AsBroadcaster_as.hx'
--- a/testsuite/as3/classes.all/AsBroadcaster_as.hx     2009-06-01 20:39:59 
+0000
+++ b/testsuite/as3/classes.all/AsBroadcaster_as.hx     2009-06-04 03:14:25 
+0000
@@ -30,6 +30,7 @@
 import flash.display.MovieClip;
 #else
 import flash.MovieClip;
+import flash.TextField;
 #end
 import flash.Lib;
 import Type;
@@ -47,57 +48,127 @@
     //Look at the Actionscript 2 migration document from adobe to find the new 
methods
 
 #else
-       //NOTE
-       // Haxe does not provide support for flash version proir to flash 6
-       // However, AsBroadcaster works slightly differently in flash1-5.
-       // In those versions AsBroadcaster does not provide prototype or 
initialize
+       // NOTE: Haxe does not provide support for flash version proir to flash 
6
+       //     However, AsBroadcaster works slightly differently in flash1-5.
+       //     In those versions AsBroadcaster does not provide prototype or
+       //     initialize
        
        // The following tests should be valid for flash6, 7, 8
 
-       if (Type.typeof(AsBroadcaster) == ValueType.TFunction) {
+       if (Type.typeof(untyped AsBroadcaster) == ValueType.TFunction) {
            DejaGnu.pass("AsBroadcaster class exists");
        } else {
            DejaGnu.fail("AsBroadcaster class does not exist");
        }
 
-       DejaGnu.note("typeof (prototype) "   + 
Type.typeof(AsBroadcaster.prototype));
-       DejaGnu.note("typeof (initialize) "   + 
Type.typeof(AsBroadcaster.initialize));
-
-       if (Type.typeof(AsBroadcaster.prototype) == ValueType.TObject) {
-               DejaGnu.pass("AsBroadcaster::prototype exists");
-       } else {
-               DejaGnu.fail("AsBroadcaster::prototype is does not exist");
-       }
-
-       if (Type.typeof(AsBroadcaster.initialize) == ValueType.TFunction) {
-               DejaGnu.pass("AsBroadcaster::initialize exists");
-       } else {
-               DejaGnu.fail("AsBroadcaster::initialize does not exist");
-       }
+       //Testing for prototype
+       if (Type.typeof(untyped AsBroadcaster.prototype) == ValueType.TObject) {
+               DejaGnu.pass("The AsBroadcaster prototype property exists");
+       } else {
+               DejaGnu.fail("The AsBroadcaster prototype property does not 
exist");
+       }
+       if (Type.typeof(untyped AsBroadcaster.__proto__) == ValueType.TObject) {
+               DejaGnu.pass("The AsBroadcaster __proto__ property exists");
+       } else {
+               DejaGnu.fail("The AsBroadcaster __proto__ property does not 
exist");
+       }
+       
+       
+       var obj = { f : function() { trace("Hi There!");} };
+       var target = { x1 : "testing" };
+       var event:String = "f";
+       
+       
+       //Testing for initialize()
+       if (untyped AsBroadcaster.hasOwnProperty('initialize')) {
+               DejaGnu.pass("AsBroadcaster.initialize property exists");
+       } else {
+               DejaGnu.fail("AsBroadcaster.initialize property does not 
exist");
+       }
+       if (Type.typeof(untyped AsBroadcaster.initialize) == 
ValueType.TFunction) {
+               DejaGnu.pass("AsBroadcaster.initialize is a function");
+       } else {
+               DejaGnu.fail("AsBroadcaster.initialize is not a function");
+       }
+       if (! untyped AsBroadcaster.prototype.hasOwnProperty('initialize')) {
+               DejaGnu.pass("AsBroadcaster.initialize was not inherited from 
the superclass");
+       } else {
+               DejaGnu.fail("AsBroadcaster.initialize was inherited from the 
superclass");
+       }
+       if (Type.typeof(untyped AsBroadcaster.initialize(target)) == 
ValueType.TNull) {
+               DejaGnu.pass("AsBroadcaster.initialize() is a void function");
+       } else {
+               DejaGnu.fail("AsBroadcaster.initialize() is not a void 
function");
+       }
+       
+       //Testing for addListener()
+       if (untyped AsBroadcaster.hasOwnProperty('addListener')) {
+               DejaGnu.pass("AsBroadcaster.addListener property exists");
+       } else {
+               DejaGnu.fail("AsBroadcaster.addListener property does not 
exist");
+       }
+       if (Type.typeof(untyped AsBroadcaster.addListener) == 
ValueType.TFunction) {
+               DejaGnu.pass("AsBroadcaster.addListener is a function");
+       } else {
+               DejaGnu.fail("AsBroadcaster.addListener is not a function");
+       }
+       if (Type.typeof(untyped AsBroadcaster.addListener(obj)) == 
ValueType.TBool) {
+               DejaGnu.pass("AsBroadcaster.addListener() returns Boolean");
+       } else {
+               DejaGnu.fail("AsBroadcaster.addListener() does not return 
Boolean");
+       }
+       
+       //Testing for broadcastMessage()
+       if (untyped AsBroadcaster.hasOwnProperty('broadcastMessage')) {
+               DejaGnu.pass("AsBroadcaster.broadcastMessage property exists");
+       } else {
+               DejaGnu.fail("AsBroadcaster.broadcastMessage property does not 
exist");
+       }
+       if (Type.typeof(untyped AsBroadcaster.broadcastMessage) == 
ValueType.TFunction) {
+               DejaGnu.pass("AsBroadcaster.broadcastMessage is a function");
+       } else {
+               DejaGnu.fail("AsBroadcaster.broadcastMessage is not a 
function");
+       }
+       if (Type.typeof(untyped AsBroadcaster.broadcastMessage(event)) == 
ValueType.TNull) {
+               DejaGnu.pass("AsBroadcaster.broadcastMessage is a void 
function");
+       } else {
+               DejaGnu.fail("AsBroadcaster.broadcastMessage is not a void 
function");
+       }
+       
+       //Testing for removeListener
+       if (untyped AsBroadcaster.hasOwnProperty('removeListener')) {
+               DejaGnu.pass("AsBroadcaster.broadcastMessage property exists");
+       } else {
+               DejaGnu.fail("AsBroadcaster.broadcastMessage property does not 
exist");
+       }
+       if (Type.typeof(untyped AsBroadcaster.removeListener) == 
ValueType.TFunction) {
+               DejaGnu.pass("AsBroadcaster.removeListener is a function");
+       } else {
+               DejaGnu.fail("AsBroadcaster.removeListener is not a function");
+       }
+       if (Type.typeof(untyped AsBroadcaster.removeListener(obj)) == 
ValueType.TBool) {
+               DejaGnu.pass("AsBroadcaster.removeListener() returns Boolean");
+       } else {
+               DejaGnu.fail("AsBroadcaster.removeListener() does not return 
Boolean");
+       }
+       
+       
+
+       DejaGnu.note("typeof (initialize) "   + Type.typeof(untyped 
AsBroadcaster.initialize));
+       DejaGnu.note("Note 1: "   + Type.typeof(untyped 
AsBroadcaster.addListener(obj)));
+       DejaGnu.note("Note 2: "   + Type.typeof(untyped 
AsBroadcaster.__proto__));
+       
+       
+       //Testing to make sure new object is empty
+       var myObj = { };
+       DejaGnu.note("Note 3: " + Type.typeof(untyped myObj._listeners));
+       DejaGnu.note("Note 4: " + Type.typeof(untyped myObj.addListener));
+       DejaGnu.note("Note 5: " + Type.typeof(untyped myObj.removeLitener));
+       
 
 /*
-       if (Type.typeof(AsBroadcaster) == ValueType.TFunction) {
-               DejaGnu.pass("AsBroadcaster class exists");
-       } else {
-               DejaGnu.fail("AsBroadcaster class does not exist");
-       }
-check_equals(typeof(AsBroadcaster.prototype), 'object'); 
-check_equals(AsBroadcaster.__proto__, Function.prototype); 
-check_equals(typeof(AsBroadcaster.initialize), 'function');
-check(AsBroadcaster.hasOwnProperty('initialize'));
-check(!AsBroadcaster.prototype.hasOwnProperty('initialize'));
-
-// These functions are available as AsBroadcaster "statics"
-// and a lookup should be issued by 'initalize' so that overridden
-// functions are attached to the initialized object rather then
-// the original one (from swfdec/test/trace/asbroadcaster-override.as)
-check_equals(typeof(AsBroadcaster.addListener), 'function');
-check(AsBroadcaster.hasOwnProperty('addListener'));
-check_equals(typeof(AsBroadcaster.removeListener), 'function');
-check(AsBroadcaster.hasOwnProperty('removeListener'));
-check_equals(typeof(AsBroadcaster.broadcastMessage), 'function');
-check(AsBroadcaster.hasOwnProperty('broadcastMessage'));
-
+// not sure if this can be tested because AsBroadcaster does not exist in haxe
+// There is no way to access the constructor
 bc = new AsBroadcaster;
 check_equals(typeof(bc), 'object');
 check(bc instanceof AsBroadcaster);

=== added file 'testsuite/as3/classes.all/Boolean_as.hx'
--- a/testsuite/as3/classes.all/Boolean_as.hx   1970-01-01 00:00:00 +0000
+++ b/testsuite/as3/classes.all/Boolean_as.hx   2009-06-03 20:41:18 +0000
@@ -0,0 +1,152 @@
+// Boolean_as.hx: ActionScript 3 "Boolean" class, for Gnash.
+// 
+//   Copyright (C) 2005, 2006, 2007, 2009 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
+// Migrated to haXe by Jonathan Crider
+
+#if flash9
+import flash.display.MovieClip;
+#else
+import flash.MovieClip;
+#end
+
+import flash.Lib;
+import Type;
+import Reflect;
+import Std;
+
+// importing our testing api
+import DejaGnu;
+
+class Boolean_as {
+       static function main() {
+       
+       DejaGnu.note("N1: "+ Type.typeof(untyped Boolean));
+       if ( Type.typeof(untyped Boolean) == ValueType.TFunction) {
+                       DejaGnu.pass("Boolean class exists");
+               } else {
+                       DejaGnu.fail("Boolean class does not exist");
+               }
+       
+       DejaGnu.note("N2: " + Type.typeof(untyped Boolean()));
+       if (Type.typeof(untyped Boolean()) == ValueType.TNull) {
+               DejaGnu.pass("Call to Boolean() returns null");
+       } else {
+               DejaGnu.fail("Call to Boolean() does not return null");
+       }
+       
+       DejaGnu.note("N3: " + Type.typeof(untyped Boolean(true)));
+       if (Type.typeof(untyped Boolean(true)) == ValueType.TBool) {
+               DejaGnu.pass("");
+       } else {
+               DejaGnu.fail("");
+       }
+       
+       //NOTE: may need to retain Ming tests at the end of the file somehow
+               
+       DejaGnu.done();
+       }
+}
+
+//NOTE: Haxe does not give acces to the Boolean class directly.
+//      In haXe Bool is an Enum value and does all the processing in the
+//      background. Thus there is no way to test the constructor and
+//      subsequently the other methods.
+//      These ming test cases may need to be retained unless we can get the 
haxe
+//      folks to add a Boolean class
+
+/*
+var boolObj = new Boolean;
+
+// test the Boolean constuctor
+check (boolObj);
+
+check (boolObj.toString);
+check (boolObj.valueOf);
+
+#if OUTPUT_VERSION > 6
+// SWF7 and up is case-sensitive
+check_equals (boolObj.tostring, undefined);
+check_equals (boolObj.valueof, undefined);
+#else
+check (boolObj.tostring)
+check (boolObj.valueof)
+#endif
+
+var defaultBool = new Boolean();
+check_equals(defaultBool.toString(), "false");
+check_equals(defaultBool.valueOf(), false);
+
+var trueBool = new Boolean(true);
+check_equals(trueBool.toString(), "true");
+check_equals(trueBool.valueOf(), true);
+
+var falseBool = new Boolean(false);
+check_equals(falseBool.toString(), "false");
+check_equals(falseBool.valueOf(), false);
+
+
+//---------------------------------------------------
+// Test convertion to boolean
+//---------------------------------------------------
+
+// boolean
+check( true );
+check( ! false );
+ 
+// number
+check( 1 );
+check( !0 );
+
+// movieclip
+check( _root );
+
+// string
+check( "1" );
+#if OUTPUT_VERSION < 7
+ check( ! "0" );
+ check( ! "true" );
+ check( ! "false" );
+#else
+ check( "0" );
+ check( "true" );
+ check( "false" );
+#endif
+
+// Null 
+check_equals(typeOf(null), "null" );
+check( ! null );
+
+// Undefined
+check( ! undefined );
+
+// Function
+check( play );
+
+// Object - conversion might depend on object type
+emptyArray = new Array();
+check( emptyArray );
+falseBoolean = new Boolean(false);
+check( falseBoolean );
+trueBoolean = new Boolean(true);
+check( trueBoolean );
+
+
+check_totals(31);
+*/

=== added file 'testsuite/as3/internal.all/ASnative.as'
--- a/testsuite/as3/internal.all/ASnative.as    1970-01-01 00:00:00 +0000
+++ b/testsuite/as3/internal.all/ASnative.as    2009-06-03 20:41:18 +0000
@@ -0,0 +1,285 @@
+// 
+//   Copyright (C) 2008, 2009 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
+
+// This counts calls to toString() and valueOf() regularly to check that native
+// methods are correctly applied. So it saves much effort if new tests are 
added
+// after the end of the present ones.
+
+// All this needs to be migrated to haXe if possible
+//   it is not clear if we will be able to do these tests in haXe
+
+rcsid="$Id: ASnative.as,v 1.8 2008/04/29 10:23:50 bwy Exp $";
+#include "check.as"
+
+/// Global
+
+// Old ASnew
+a = ASnative(2, 0);
+
+var result = "";
+function func() {
+    if (a()) { result = "true"; }
+    else { result =  "false"; }
+};
+
+func();
+check_equals (result, "false");
+discard = new func();
+xcheck_equals (result, "true");
+
+a = ASnative (100, 0); // escape
+check_equals(a(" "), "%20");
+a = ASnative (100, 1); // unescape
+check_equals(a("%20"), " ");
+a = ASnative (100, 2); // parseInt
+check_equals(a("  566765s"), "566765");
+a = ASnative (100, 3); // parseFloat
+check_equals(a("8.4e6"), 8.4e6);
+
+// Do this first to make sure ASnative is
+// registered before Date class itself is loaded (Gnash loads
+// on demand).
+a = ASnative(103, 257);
+check_equals (a(65, 1, 1, 1, 1, 1, 1), Date.UTC(65, 1, 1, 1, 1, 1, 1));
+
+e = ASnative(103, 256); // _global.Date
+xcheck_equals(e().valueOf(), Date().valueOf());
+g = e;
+xcheck_equals(typeOf(g().valueOf()), 'string');
+
+xcheck_equals(e(100000).valueOf(), Date().valueOf());
+
+g = e();
+check_equals(typeOf(g.getMilliseconds), 'undefined');
+
+f = new e(100000000); // not instantiatable
+xcheck_equals(typeof(f), 'object');
+check_equals(typeof(f.getMilliseconds()), 'undefined');
+check_equals(typeof(f().getMilliseconds()), 'undefined');
+
+d = new Date (123456789);
+
+d.a = ASnative(103, 0);
+check_equals (d.a(), d.getFullYear());
+d.a = ASnative(103, 1);
+check_equals (d.a(), d.getYear());
+d.a = ASnative(103, 2);
+check_equals (d.a(), d.getMonth());
+d.a = ASnative(103, 3);
+check_equals (d.a(), d.getDate());
+d.a = ASnative(103, 4);
+check_equals (d.a(), d.getDay());
+d.a = ASnative(103, 5);
+check_equals (d.a(), d.getHours());
+d.a = ASnative(103, 6);
+check_equals (d.a(), d.getMinutes());
+d.a = ASnative(103, 7);
+check_equals (d.a(), d.getSeconds());
+d.a = ASnative(103, 8);
+check_equals (d.a(), d.getMilliseconds());
+d.a = ASnative(103, 16);
+check_equals (d.a(), d.getTime());
+d.a = ASnative(103, 18);
+check_equals (d.a(), d.getTimezoneOffset());
+d.a = ASnative(103, 19);
+check_equals (d.a(), d.toString());
+d.a = ASnative(103, 128);
+check_equals (d.a(), d.getUTCFullYear());
+d.a = ASnative(103, 129);
+check_equals (d.a(), d.getUTCYear());
+d.a = ASnative(103, 130);
+check_equals (d.a(), d.getUTCMonth());
+d.a = ASnative(103, 131);
+check_equals (d.a(), d.getUTCDate());
+d.a = ASnative(103, 132);
+check_equals (d.a(), d.getUTCDay());
+d.a = ASnative(103, 133);
+check_equals (d.a(), d.getUTCHours());
+d.a = ASnative(103, 134);
+check_equals (d.a(), d.getUTCMinutes());
+d.a = ASnative(103, 135);
+check_equals (d.a(), d.getUTCSeconds());
+d.a = ASnative(103, 136);
+check_equals (d.a(), d.getUTCMilliseconds());
+d.a = ASnative(103, 1);
+check_equals (d.a(), d.getYear());
+
+countVO = 0;
+countTS = 0;
+
+// ASNative Math (call valueOf)
+
+func = {};
+func.valueOf = function () {
+    //trace ("valueOf()");
+    countVO++;
+    return 0.3;
+};
+
+func.toString = function () {
+    //trace ("toString()");
+    countTS++;
+    return "gNaSh mUsT woRK! öÜäÄ€€";
+};
+
+a = ASnative(200, 0);
+check_equals(a(func), 0.3); // abs
+check_equals(a(0.3), 0.3); // abs
+
+a = ASnative(200, 1);
+check_equals(a(func, func + 1), 0.3); // min
+check_equals(a(0.3, 1.3), 0.3); // min
+
+a = ASnative(200, 2);
+check_equals(a(func, func + 1), 1.3); // max
+check_equals(a(0.3, 1.3), 1.3); // max
+
+a = ASnative(200, 3);
+check_equals(a(func).toString(), "0.29552020666134"); // sin
+check_equals(a(0.3).toString(), "0.29552020666134"); // sin
+
+a = ASnative(200, 4);
+check_equals(a(func).toString(), "0.955336489125606"); // cos
+check_equals(a(0.3).toString(), "0.955336489125606"); // cos
+
+a = ASnative(200, 5);
+check_equals(a(func, func + 1).toString(), "0.226798848053886"); // atan2
+check_equals(a(0.3, 1.3).toString(), "0.226798848053886"); // atan2
+
+a = ASnative(200, 6);
+check_equals(a(func).toString(), "0.309336249609623"); // tan
+a = ASnative(200, 7);
+check_equals(a(func).toString(), "1.349858807576"); // exp
+a = ASnative(200, 8);
+check_equals(a(func).toString(), "-1.20397280432594"); // log
+a = ASnative(200, 9);
+check_equals(a(func).toString(), "0.547722557505166"); // sqrt
+a = ASnative(200, 10);
+check_equals(a(func), 0); // round
+a = ASnative(200, 11);
+check(a(func) >= 0 && a(func < 1)); // random
+a = ASnative(200, 12);
+check_equals(a(func), 0); // floor
+a = ASnative(200, 13);
+check_equals(a(func), 1); // ceil
+a = ASnative(200, 14);
+check_equals(a(func).toString(), "0.291456794477867"); // atan
+a = ASnative(200, 15);
+check_equals(a(func).toString(), "0.304692654015398"); // asin
+a = ASnative(200, 16);
+check_equals(a(func).toString(), "1.2661036727795"); // acos
+a = ASnative(200, 17);
+check_equals(a(func, func + 1).toString(), "0.209053590580785"); // pow
+a = ASnative(200, 18);
+check_equals(a(func), false); // isNan
+a = ASnative(200, 19);
+check_equals(a(func), true); // isFinite
+
+check_equals (countVO, 25); // calls to valueOf.
+check_equals (countTS, 0); // calls to toString.
+
+// String functions (call toString)
+
+a = ASnative(251, 3); // String.toUpperCase
+check_equals(a("Hello World"), "_LEVEL0");
+a = ASnative(102, 0); // SWF5 to upper
+check_equals(a("Hello World"), "_LEVEL0");
+
+
+// SWF5 has problems with UTF-8, tested in String.as.
+// No need to test here as well.
+
+check_equals (countTS, 0); // calls to toString.
+
+#if OUTPUT_VERSION > 5
+func.a = ASnative(251, 3); // String.toUpperCase
+check_equals(func.a(), "GNASH MUST WORK! ÖÜÄÄ€€");
+
+func.a = ASnative(251, 4); // String.toLowerCase
+check_equals(func.a(), "gnash must work! öüä䀀");
+
+// Check calls to toString.
+check_equals (countTS, 2);
+#endif
+
+func.a = ASnative(102, 0); // SWF5 to upper
+check_equals(func.a(), "GNASH MUST WORK! öÜäÄ€€");
+
+func.a = ASnative(102, 1); // SWF5 to lower
+check_equals(func.a(), "gnash must work! öÜäÄ€€");
+
+// Check calls to toString.
+#if OUTPUT_VERSION > 5
+check_equals (countTS, 4);
+#else
+check_equals (countTS, 2);
+#endif
+
+// Stage
+st = ASnative(666, 2);
+st("exactFit");
+st = ASnative(666, 1);
+check_equals (st(), "exactFit");
+
+st = ASnative(666, 4);
+st("BRL");
+
+st = ASnative(666, 3);
+check_equals (st(), "LRB");
+
+//Stage.width - read only!
+st = ASnative(666, 6);
+st(402);
+st = ASnative(666, 5);
+check_equals (st(), 640);
+
+// Stage.height - read only!
+st = ASnative(666, 8);
+st(402);
+st = ASnative(666, 7);
+check_equals (st(), 480);
+
+// Stage.showMenu
+st = ASnative(666, 10);
+st = ASnative(666, 9);
+
+#if OUTPUT_VERSION > 5
+check_equals (countTS, 4);
+#else
+check_equals (countTS, 2);
+#endif
+
+check_equals (countVO, 25);
+
+/// SharedObject undocumented functions.
+
+a = ASnative(2106, 202);
+f = a("level1/level2/settings", "/", undefined); 
+xcheck_equals(typeof(f), "null");
+
+a = ASnative(2106, 204);
+f = new SharedObject;
+check_equals (typeof(f.data), "undefined");
+ret = a(f, "level1/level2/settings", "/", undefined); 
+xcheck_equals(ret, true);
+xcheck_equals (typeof(f.data), "object");
+
+#if OUTPUT_VERSION > 5
+check_totals(83);
+#else
+check_totals(80);
+#endif


reply via email to

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