gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] /srv/bzr/gnash/trunk r9727: - Fix make dist (SharedObject


From: Sandro Santilli
Subject: [Gnash-commit] /srv/bzr/gnash/trunk r9727: - Fix make dist (SharedObjectTest stuff)
Date: Fri, 12 Sep 2008 15:21:00 +0200
User-agent: Bazaar (1.5)

------------------------------------------------------------
revno: 9727
committer: Sandro Santilli <address@hidden>
branch nick: trunk
timestamp: Fri 2008-09-12 15:21:00 +0200
message:
  - Fix make dist (SharedObjectTest stuff)
  - Update expected results from swfdec testsuite
  - Improve SharedObjectTest.as (effects of prop flags over serialization)
  - Improve SharedObjectTestRunner (now tests both reading and writing)
  - Make object property visitor a virtual non templated method, so to
    allow scanning array properties in the short term (they should really
    be normal properties instead).
  - Improve AMF deserialization (readAMF0)
  - Improve AMF serialization (writeAMF0)
  - Fix enumeration of array properties and add tests for it
modified:
  libcore/PropertyList.h
  libcore/array.cpp
  libcore/array.h
  libcore/as_object.cpp
  libcore/as_object.h
  libcore/as_value.cpp
  libcore/asobj/SharedObject.cpp
  testsuite/actionscript.all/array.as
  testsuite/misc-ming.all/Makefile.am
  testsuite/misc-ming.all/NetStream-SquareTest.c
  testsuite/misc-ming.all/SharedObjectTest.as
  testsuite/misc-ming.all/SharedObjectTest.sol/sol1.sol
  testsuite/misc-ming.all/SharedObjectTestRunner.sh
  testsuite/swfdec/PASSING
    ------------------------------------------------------------
    revno: 9723.1.2
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 08:21:54 +0200
    message:
      readAMF: use elements count to set initial array length
    modified:
      libcore/as_value.cpp
    ------------------------------------------------------------
    revno: 9723.1.3
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 09:16:41 +0200
    message:
      Test setting an ECMA_ARRAY length to a larger value then actually
      existing indexed members
    modified:
      testsuite/misc-ming.all/SharedObjectTest.as
      testsuite/misc-ming.all/SharedObjectTest.sol/sol1.sol
    ------------------------------------------------------------
    revno: 9723.1.4
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 09:21:19 +0200
    message:
      Re-read just-written sol file to test the write side of AMF
    modified:
      testsuite/misc-ming.all/SharedObjectTest.as
      testsuite/misc-ming.all/SharedObjectTestRunner.sh
    ------------------------------------------------------------
    revno: 9723.1.5
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 09:35:46 +0200
    message:
      it seems I was wrong, adobe always uses ECMA_ARRAY for output of AS arrays
    modified:
      testsuite/misc-ming.all/SharedObjectTest.as
    ------------------------------------------------------------
    revno: 9723.1.6
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 09:36:50 +0200
    message:
      Update comment about why the write test fails with gnash
    modified:
      libcore/asobj/SharedObject.cpp
    ------------------------------------------------------------
    revno: 9723.1.7
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 10:01:31 +0200
    message:
      Fix expected results
    modified:
      testsuite/misc-ming.all/NetStream-SquareTest.c
      testsuite/swfdec/PASSING
    ------------------------------------------------------------
    revno: 9723.1.8
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 10:25:39 +0200
    message:
      Test that enumerated properties of an array should be strings
    modified:
      testsuite/actionscript.all/array.as
    ------------------------------------------------------------
    revno: 9723.1.9
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 12:37:09 +0200
    message:
      Make as_object::visitPropertyValues virtual to allow non-proper
      properties to be visted as well.
      Fix array enumeration to return strings (not numbers)
    modified:
      libcore/PropertyList.h
      libcore/array.cpp
      libcore/array.h
      libcore/as_object.cpp
      libcore/as_object.h
      libcore/as_value.cpp
      libcore/asobj/SharedObject.cpp
    ------------------------------------------------------------
    revno: 9723.1.10
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 12:45:20 +0200
    message:
      distribute SharedObjectTestRunner files
    modified:
      testsuite/misc-ming.all/Makefile.am
    ------------------------------------------------------------
    revno: 9723.1.11
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 13:43:16 +0200
    message:
      fix build with BUFFERED_AMF_SOL
    modified:
      libcore/asobj/SharedObject.cpp
    ------------------------------------------------------------
    revno: 9723.1.12
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 14:03:18 +0200
    message:
      Test that not-enumerable properties doesn't get written to the .sol file
    modified:
      testsuite/misc-ming.all/SharedObjectTest.as
    ------------------------------------------------------------
    revno: 9723.1.13
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 14:37:08 +0200
    message:
      Better equipment for a dejagnu-based test. 
    modified:
      testsuite/misc-ming.all/SharedObjectTest.as
    ------------------------------------------------------------
    revno: 9723.1.14
    committer: Sandro Santilli <address@hidden>
    branch nick: mybranch
    timestamp: Fri 2008-09-12 14:53:50 +0200
    message:
      writeAMF0: always encode arrays as ECMA_ARRAY types. 
      writeAMF0: don't serialize hidden properties.
      readAMF0: read OBJECT types into real objects (instanceof Object).
    modified:
      libcore/as_value.cpp
=== modified file 'libcore/PropertyList.h'
--- a/libcore/PropertyList.h    2008-09-09 09:59:05 +0000
+++ b/libcore/PropertyList.h    2008-09-12 10:37:09 +0000
@@ -21,6 +21,7 @@
 #include "dsodefs.h" // DSOEXPORT
 
 #include "Property.h" // for templated functions
+#include "as_prop_flags.h" // for templated functions
 #include "as_value.h" // for templated functions
 #include "string_table.h"
 
@@ -94,7 +95,7 @@
        /// Assignment operator
        PropertyList& operator=(const PropertyList&);
 
-       /// Visit the list of properties 
+       /// Visit properties 
        //
        /// The method will invoke the given visitor method
        /// passing it two arguments: name of the property and
@@ -115,9 +116,36 @@
                        itEnd = _props.end(); it != itEnd; ++it)
                {
                        as_value val = it->getValue(this_ptr);
-                       visitor(it->mName, val);
-               }
-       }
+                       visitor.accept(it->mName, val);
+               }
+       }
+
+       /// Visit non hidden properties 
+       //
+       /// The method will invoke the given visitor method
+       /// passing it two arguments: name of the property and
+       /// value of it.
+       ///
+       /// @param visitor
+       ///     The visitor function. Must take a string_table::key 
+       ///     reference as first argument and a const as_value reference
+       ///     as second argument.
+       ///
+       /// @param this_ptr
+       ///     The object reference used to extract values from properties.
+       ///
+       template <class V>
+       void visitNonHiddenValues(V& visitor, as_object& this_ptr) const
+       {
+               for (container::const_iterator it = _props.begin(),
+                       itEnd = _props.end(); it != itEnd; ++it)
+               {
+               if (it->getFlags().get_dont_enum()) continue;
+                       as_value val = it->getValue(this_ptr);
+                       visitor.accept(it->mName, val);
+               }
+       }
+
 
        /// Get the as_value value of a named property
        //

=== modified file 'libcore/array.cpp'
--- a/libcore/array.cpp 2008-08-29 14:29:54 +0000
+++ b/libcore/array.cpp 2008-09-12 10:37:09 +0000
@@ -1567,13 +1567,14 @@
 void
 as_array_object::enumerateNonProperties(as_environment& env) const
 {
-    // TODO: only actually defined elements should be pushed on the env
-    //       but we currently have no way to distinguish between defined
-    //       and non-defined elements
+    std::stringstream ss; 
     for (ArrayConstIterator it = elements.begin(),
         itEnd = elements.end(); it != itEnd; ++it)
     {
-            env.push(as_value(it.index()));
+        int idx = it.index();
+        // enumerated values need to be strings, not numbers
+        ss.str(""); ss << idx;
+        env.push(as_value(ss.str()));
     }
 }
 
@@ -1668,6 +1669,41 @@
 }
 #endif // GNASH_USE_GC
 
+void
+as_array_object::visitPropertyValues(AbstractPropertyVisitor& visitor) const
+{
+    std::stringstream ss; 
+    string_table& st = getVM().getStringTable();
+    for (ArrayConstIterator i=elements.begin(), ie=elements.end(); i!=ie; ++i)
+    {
+        int idx = i.index();
+        ss.str(""); ss << idx;
+        string_table::key k = st.find(ss.str());
+        visitor.accept(k, *i);
+    }
+
+    // visit proper properties
+    as_object::visitPropertyValues(visitor);
+}
+
+void
+as_array_object::visitNonHiddenPropertyValues(AbstractPropertyVisitor& 
visitor) const
+{
+    std::stringstream ss; 
+    string_table& st = getVM().getStringTable();
+    for (ArrayConstIterator i=elements.begin(), ie=elements.end(); i!=ie; ++i)
+    {
+        // TODO: skip hidden ones
+        int idx = i.index();
+        ss.str(""); ss << idx;
+        string_table::key k = st.find(ss.str());
+        visitor.accept(k, *i);
+    }
+
+    // visit proper properties
+    as_object::visitNonHiddenPropertyValues(visitor);
+}
+
 } // end of gnash namespace
 
 

=== modified file 'libcore/array.h'
--- a/libcore/array.h   2008-07-21 15:54:10 +0000
+++ b/libcore/array.h   2008-09-12 10:37:09 +0000
@@ -87,6 +87,12 @@
                        v.visit(*i);
        }
 
+    // see dox in as_object.h
+       virtual void visitPropertyValues(AbstractPropertyVisitor& visitor) 
const;
+
+    // see dox in as_object.h
+       virtual void visitNonHiddenPropertyValues(AbstractPropertyVisitor& 
visitor) const;
+
        /// Sort flags
        enum SortFlags {
 

=== modified file 'libcore/as_object.cpp'
--- a/libcore/as_object.cpp     2008-09-01 18:11:06 +0000
+++ b/libcore/as_object.cpp     2008-09-12 10:37:09 +0000
@@ -215,8 +215,8 @@
 }
 
 
-// A PropertyList visitor copying properties to an object
-class PropsCopier {
+/// A PropertyList visitor copying properties to an object
+class PropsCopier : public AbstractPropertyVisitor {
 
        as_object& _tgt;
 
@@ -235,7 +235,7 @@
        /// Use the set_member function to properly set *inherited* properties
        /// of the given target object
        ///
-       void operator() (string_table::key name, const as_value& val)
+       void accept(string_table::key name, const as_value& val)
        {
                if (name == NSV::PROP_uuPROTOuu) return;
                //log_debug(_("Setting member '%s' to value '%s'"), name, val);
@@ -1544,6 +1544,22 @@
        }
 }
 
+void
+as_object::visitPropertyValues(AbstractPropertyVisitor& visitor) const
+{
+    _members.visitValues(visitor, 
+        // Need const_cast due to getValue getting non-const ...
+        const_cast<as_object&>(*this));
+}
+
+void
+as_object::visitNonHiddenPropertyValues(AbstractPropertyVisitor& visitor) const
+{
+    _members.visitNonHiddenValues(visitor, 
+        // Need const_cast due to getValue getting non-const ...
+        const_cast<as_object&>(*this));
+}
+
 
 
 } // end of gnash namespace

=== modified file 'libcore/as_object.h'
--- a/libcore/as_object.h       2008-09-03 21:46:17 +0000
+++ b/libcore/as_object.h       2008-09-12 10:37:09 +0000
@@ -54,6 +54,13 @@
 class asClass;
 class asName;
 
+/// An abstract property visitor
+class AbstractPropertyVisitor {
+public:
+    virtual void accept(string_table::key key, const as_value& val)=0;
+    virtual ~AbstractPropertyVisitor() {}
+};
+
 /// A trigger that can be associated with a property name
 class Trigger
 {
@@ -966,14 +973,21 @@
        ///     reference as first argument and a const as_value reference
        ///     as second argument.
        ///
-       template <class V>
-       void visitPropertyValues(V& visitor) const
-       {
-               _members.visitValues(visitor, 
-                       // Need const_cast due to getValue getting non-const ...
-                       const_cast<as_object&>(*this));
-       }
+       virtual void visitPropertyValues(AbstractPropertyVisitor& visitor) 
const;
 
+       /// Visit non-hidden properties of this object by key/as_value pairs
+       //
+       /// The method will invoke the given visitor method
+       /// passing it two arguments: key of the property and
+       /// value of it.
+       ///
+       /// @param visitor
+       ///     The visitor function. Will be invoked for each property
+       ///     of this object with a string_table::key
+       ///     reference as first argument and a const as_value reference
+       ///     as second argument.
+       ///
+       virtual void visitNonHiddenPropertyValues(AbstractPropertyVisitor& 
visitor) const;
 
        /// \brief
        /// Add a getter/setter property, if no member already has

=== modified file 'libcore/as_value.cpp'
--- a/libcore/as_value.cpp      2008-09-11 11:18:29 +0000
+++ b/libcore/as_value.cpp      2008-09-12 12:53:50 +0000
@@ -102,7 +102,7 @@
 
 // This class is used to iterate through all the properties of an AS object,
 // so we can change them to children of an AMF0 element.
-class PropsSerializer {
+class PropsSerializer : public AbstractPropertyVisitor {
     amf::Element& _obj;
     string_table& _st;
 public:
@@ -111,7 +111,7 @@
          _st(vm.getStringTable())
        {};
     
-    void operator() (string_table::key key, const as_value& val) const
+    void accept(string_table::key key, const as_value& val) 
         {
             //GNASH_REPORT_FUNCTION;
             amf::AMF amf;
@@ -154,7 +154,7 @@
 } // anonimous namespace
 
 /// Class used to serialize properties of an object to a buffer
-class PropsBufSerializer {
+class PropsBufSerializer : public AbstractPropertyVisitor {
     SimpleBuffer& _buf;
     VM& _vm;
     string_table& _st;
@@ -172,7 +172,7 @@
     
     bool success() const { return !_error; }
 
-    void operator() (string_table::key key, const as_value& val) const
+    void accept(string_table::key key, const as_value& val) 
     {
         if ( _error ) return;
 
@@ -2137,6 +2137,9 @@
                 objRefs.push_back(obj);
 
                                li = readNetworkLong(b); b += 4;
+                // the count specifies array size, so to have that even if 
none of the members are indexed
+                // if short, will be incremented everytime an indexed member 
is found
+                obj->resize(li);
 
                 // TODO: do boundary checking (if b >= end...)
 
@@ -2179,14 +2182,6 @@
                                        obj->set_member(st.find(name), 
objectElement);
                                }
 
-                // consisteny checking
-                if ( obj->size() != li ) {
-                    log_error("MALFORMED SOL: ECMA_ARRAY advertised %d 
elements but had just %d", obj->size());
-                }
-
-                               // ends with a null string and an object 
terminator (0x09)
-                               //b += 3;
-
                                ret.set_as_object(obj);
                                return true;
                        }
@@ -2194,8 +2189,7 @@
                        {
                 string_table& st = vm.getStringTable();
 
-                               // TODO: need this? 
boost::intrusive_ptr<as_object> obj(new as_object(getObjectInterface()));
-                               boost::intrusive_ptr<as_object> obj(new 
as_object());
+                               boost::intrusive_ptr<as_object> obj(new 
as_object(getObjectInterface()));
 #ifdef GNASH_DEBUG_AMF_DESERIALIZE
                                log_debug("amf0 starting read of object");
 #endif
@@ -2307,20 +2301,10 @@
                 {
                     size_t len = ary->size();
 #ifdef GNASH_DEBUG_AMF_SERIALIZE
-                    log_debug(_("writeAMF0: serializing array of %d elements 
as index %d"), len, idx);
+                    log_debug(_("writeAMF0: serializing array of %d elements 
as ECMA_ARRAY (index %d)"), len, idx);
 #endif
-                    buf.appendByte(amf::Element::STRICT_ARRAY_AMF0);
+                    buf.appendByte(amf::Element::ECMA_ARRAY_AMF0);
                     buf.appendNetworkLong(len);
-                                   for(size_t i = 0; i < len; ++i)
-                    {
-                        as_value element = ary->at(i);
-                        if ( ! element.writeAMF0(buf, offsetTable, vm) )
-                        {
-                            log_error("Error serializing array element %d 
(%s)", i, element);
-                            return false;
-                        }
-                    }
-                    return true;
                 }
                 else
                 {
@@ -2328,17 +2312,18 @@
                     log_debug(_("writeAMF0: serializing object (or function) 
with index %d"), idx);
 #endif
                     buf.appendByte(amf::Element::OBJECT_AMF0);
-                    PropsBufSerializer props(buf, vm, offsetTable);
-                    obj->visitPropertyValues(props);
-                    if ( ! props.success() ) 
-                    {
-                        log_error("Could not serialize object");
-                        return false;
-                    }
-                    buf.appendNetworkShort(0);
-                    buf.appendByte(amf::Element::OBJECT_END_AMF0);
-                    return true;
-                }
+                }
+
+                PropsBufSerializer props(buf, vm, offsetTable);
+                obj->visitNonHiddenPropertyValues(props);
+                if ( ! props.success() ) 
+                {
+                    log_error("Could not serialize object");
+                    return false;
+                }
+                buf.appendNetworkShort(0);
+                buf.appendByte(amf::Element::OBJECT_END_AMF0);
+                return true;
             }
             else // object already seen
             {

=== modified file 'libcore/asobj/SharedObject.cpp'
--- a/libcore/asobj/SharedObject.cpp    2008-09-11 12:01:00 +0000
+++ b/libcore/asobj/SharedObject.cpp    2008-09-12 11:43:16 +0000
@@ -53,7 +53,7 @@
 // both behavioural and for memory errors.
 // The only failing case in that test is comparison of input
 // and output .sol file. This is because ::writeAMF0 encodes
-// arrays as ECMA_ARRAY rather then STRIC_ARRAY. Should be
+// arrays as STRICT_ARRAY rather then ECMA_ARRAY. Should be
 // checked if this is a common need or only SOL-specific.
 //
 //#define BUFFERED_AMF_SOL
@@ -81,7 +81,7 @@
 
 namespace { 
 
-class PropsSerializer {
+class PropsSerializer : public AbstractPropertyVisitor {
     SOL& _sol;
     string_table& _st;
 public:
@@ -91,7 +91,7 @@
         _st(vm.getStringTable())
     {};
 
-    void operator() (string_table::key key, const as_value& val) const
+    void accept(string_table::key key, const as_value& val) 
         {
             //GNASH_REPORT_FUNCTION;
             AMF amf;
@@ -132,12 +132,12 @@
 };
 
 /// Class used to serialize properties of an object to a buffer in SOL format
-class SOLPropsBufSerializer {
+class SOLPropsBufSerializer : public AbstractPropertyVisitor {
     SimpleBuffer& _buf;
     VM& _vm;
     string_table& _st;
     std::map<as_object*, size_t>& _offsetTable;
-    mutable bool _error;
+    bool _error;
 public:
     SOLPropsBufSerializer(SimpleBuffer& buf, VM& vm, std::map<as_object*, 
size_t>& offsetTable)
         :
@@ -150,7 +150,7 @@
     
     bool success() const { return !_error; }
 
-    void operator() (string_table::key key, const as_value& val) const
+    virtual void accept(string_table::key key, const as_value& val) 
     {
         if ( _error ) return;
 

=== modified file 'testsuite/actionscript.all/array.as'
--- a/testsuite/actionscript.all/array.as       2008-07-28 15:18:52 +0000
+++ b/testsuite/actionscript.all/array.as       2008-09-12 08:25:39 +0000
@@ -1279,7 +1279,13 @@
 //------------------------------------------------------
 
 b = ["a","b","c"];
-out = {len:0}; for (var i in b) { out[i] = 1; out['len']++; }
+out = {len:0};
+for (var i in b)
+{
+        check_equals(typeof(i), 'string');
+        out[i] = 1;
+        out['len']++;
+}
 check_equals(out['len'], 3);
 check_equals(out[0], 1);
 check_equals(out[1], 1);
@@ -1459,11 +1465,11 @@
 
 
 #if OUTPUT_VERSION < 6
- check_totals(493);
+ check_totals(496);
 #else
 # if OUTPUT_VERSION < 7
-  check_totals(554);
+  check_totals(557);
 # else
-  check_totals(564);
+  check_totals(567);
 # endif
 #endif

=== modified file 'testsuite/misc-ming.all/Makefile.am'
--- a/testsuite/misc-ming.all/Makefile.am       2008-09-10 09:38:27 +0000
+++ b/testsuite/misc-ming.all/Makefile.am       2008-09-12 10:45:20 +0000
@@ -40,6 +40,8 @@
        intervalTest.as \
        FlashVarsTest.html \
        StageConfigTest.as \
+       SharedObjectTest.as \
+       SharedObjectTestRunner.sh \
        SharedObjectTest.sol/sol1.sol \
        SharedObjectTest.sol/README 
 

=== modified file 'testsuite/misc-ming.all/NetStream-SquareTest.c'
--- a/testsuite/misc-ming.all/NetStream-SquareTest.c    2008-09-11 17:32:33 
+0000
+++ b/testsuite/misc-ming.all/NetStream-SquareTest.c    2008-09-12 08:01:31 
+0000
@@ -509,7 +509,7 @@
                " check(_root.startNotified, 'onMetaData should be notified 
after Play.Start');"
                " check_equals(arguments.length, 1, 'single argument');"
                " check(info instanceof Array, 'onMetaData argument sent from 
square.flv should be instanceof Array');"
-               " xcheck_equals(info.length, 11);" // it's an array so we can 
check length. gnash fails by discarding the count element of ECMA_ARRAY AMF type
+               " check_equals(info.length, 11);" // it's an array so we can 
check length. gnash fails by discarding the count element of ECMA_ARRAY AMF type
 
                // Test enumeration
                " var enu = new Array;"

=== modified file 'testsuite/misc-ming.all/SharedObjectTest.as'
--- a/testsuite/misc-ming.all/SharedObjectTest.as       2008-09-11 12:01:02 
+0000
+++ b/testsuite/misc-ming.all/SharedObjectTest.as       2008-09-12 12:37:08 
+0000
@@ -16,6 +16,20 @@
 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
+#define pass_check(x) _root.pass(x)
+#define xpass_check(x) _root.xpass(x)
+#define fail_check(x) _root.fail(x)
+#define xfail_check(x) _root.xfail(x)
+
+#define USE_DEJAGNU_MODULE
+#include "../actionscript.all/check.as"
+
+note();
+note("NOTE: for this test to work you should have copied");
+note("      testsuite/misc-ming.all/SharedObjectTest.sol/*.sol");
+note("      to this flash player's appropriate SharedObject dir");
+note();
+
 so1 = SharedObject.getLocal("sol1");
 
 check_equals(so1.data.num, 2);
@@ -25,7 +39,7 @@
 check_equals(typeof(so1.data.fbool), 'boolean');
 check_equals(so1.data.fbool, false);
 
-// Test reading STRICT_ARRAY, NULL and UNDEFINED
+// Test reading mixed types in ECMA_ARRAY 
 xcheck_equals(typeof(so1.data.ary), 'object');
 xcheck_equals(so1.data.ary.toString(), '1,true,string,null,');
 xcheck_equals(typeof(so1.data.ary[0]), 'number');
@@ -34,16 +48,27 @@
 xcheck_equals(typeof(so1.data.ary[3]), 'null');
 check_equals(typeof(so1.data.ary[4]), 'undefined');
 xcheck_equals(so1.data.ary.length, 5);
+// test composition
+a=[]; for (i in so1.data.ary) a.push(i);
+a.sort();
+check_equals(a.toString(), '0,1,2,3,4'); // note: no 'length'
 
 // Test reading ECMA_ARRAY
-xcheck_equals(typeof(so1.data.aryns), 'object', 'aryns was not read from 
.sol');
-xcheck_equals(so1.data.aryns.toString(), '4,5,6');
-xcheck_equals(so1.data.aryns.length, 3);
+xcheck_equals(typeof(so1.data.aryns), 'object');
+xcheck_equals(so1.data.aryns.toString(), '4,5,6,,,,,');
+xcheck_equals(so1.data.aryns.length, 8);
 xcheck_equals(so1.data.aryns.custom, 7);
+// test composition
+a=[]; for (i in so1.data.aryns) a.push(i);
+a.sort();
+check_equals(a.toString(), '0,1,2,custom'); // note: no 'length'
 
 // Test reading OBJECT
+check(so1.data.obj instanceOf Object);
 xcheck_equals(typeof(so1.data.obj), 'object');
 xcheck_equals(typeof(so1.data.obj.a), 'number');
+check(so1.data.obj.hasOwnProperty('a'));
+check(!so1.data.obj.hasOwnProperty('hidden'));
 
 // Test reading NUMBER
 xcheck_equals(so1.data.obj.a, 10);
@@ -67,9 +92,20 @@
 so1.data.str = 'a string'; 
 so1.data.tbool = true;
 so1.data.fbool = false;
-so1.data.ary = [1,true,'string',null, undefined]; // strict array 
(STRICT_ARRAY)
-so1.data.aryns = [4,5,6]; so1.data.aryns.custom = 7; // non-strict array 
(ECMA_ARRAY)
+
+so1.data.ary = [1,true,'string',null, undefined];  // ECMA_ARRAY
+so1.data.ary.hidden = 6;
+AsSetPropFlags(so1.data.ary, 'hidden', 1); // hide from enumeration, should 
not end into the sol file
+
+
+so1.data.aryns = [4,5,6];
+so1.data.aryns.custom = 7;
+so1.data.aryns.length = 8; // non-strict array (ECMA_ARRAY)
+
 so1.data.obj = {a:10,b:'20',c:true};
+so1.data.obj.hidden = 7;
+AsSetPropFlags(so1.data.obj, 'hidden', 1); // hide from enumeration, should 
not end into the sol file
+
 so1.data.ref = so1.data.obj;
 
 so1.flush();
@@ -78,8 +114,11 @@
 {
        loadMovie('fscommand:quit', '');
 };
-note(" Will quit in 5 seconds");
+
+note(" -  Will quit in 5 seconds, feel free to explicitly quit otherwise -");
+note();
+
 setInterval(quit, 5000);
 stop();
 
-totals();
+check_totals(32);

=== modified file 'testsuite/misc-ming.all/SharedObjectTest.sol/sol1.sol'
Binary files a/testsuite/misc-ming.all/SharedObjectTest.sol/sol1.sol    
2008-09-11 10:54:53 +0000 and 
b/testsuite/misc-ming.all/SharedObjectTest.sol/sol1.sol   2008-09-12 07:16:41 
+0000 differ
=== modified file 'testsuite/misc-ming.all/SharedObjectTestRunner.sh'
--- a/testsuite/misc-ming.all/SharedObjectTestRunner.sh 2008-09-11 10:54:53 
+0000
+++ b/testsuite/misc-ming.all/SharedObjectTestRunner.sh 2008-09-12 07:21:19 
+0000
@@ -101,4 +101,4 @@
 #####################################################
 
 # ( temporarly disabled )
-#${PLAYER} ${SWFTEST}
+${PLAYER} ${SWFTEST}

=== modified file 'testsuite/swfdec/PASSING'
--- a/testsuite/swfdec/PASSING  2008-08-25 06:51:40 +0000
+++ b/testsuite/swfdec/PASSING  2008-09-12 08:01:31 +0000
@@ -44,6 +44,10 @@
 array-sort-on-6.swf:158e931ebd968351b6a4d3d8ca30b516
 array-sort-on-7.swf:d2ad844a1b5ebe6c65aae075a8273370
 array-sort-on-8.swf:1bed1adba459d3808c64115664767ed3
+array-splice-5.swf:b97cbb0e3bc00703ebaec5c379cb86e7
+array-splice-6.swf:8dfba74ba51ae2249fe201959e6c820e
+array-splice-7.swf:c00aeda368c996f939f3409bfc5eeef3
+array-splice-8.swf:b99e7abbd16f9755f56a5c736768b4e1
 array.swf:805c6ee758493ac4c677f44caffa6623
 asbroadcaster-broadcastMessage-retval-5.swf:b492c5b704d58a2ba553f68a1c2f5a37
 asbroadcaster-broadcastMessage-retval-6.swf:fc7e7fb99c1fc91272f5600e61bcaafb
@@ -238,6 +242,14 @@
 crash-0.7.1-uncompressed-half-samples-7.swf:bd828f2702ae2d96c31f0ec74e8eb2d9
 crash-0.7.1-uncompressed-half-samples-8.swf:8043058b7c22459d2f8ef3f69884cf04
 crash-0.7.2-TextField-replace-infloop-6.swf:a75b13bb89ab3f2fc673ba2af3fa856f
+crash-0.7.5-draw-on-disposed-bitmap-5.swf:073596b26cce990e4a32088da6c19f4c
+crash-0.7.5-draw-on-disposed-bitmap-6.swf:63105692441eb2330261237f05b02d32
+crash-0.7.5-draw-on-disposed-bitmap-7.swf:b1b51478084d0c203e9c1b19ea1c8552
+crash-0.7.5-draw-on-disposed-bitmap-8.swf:5e8959ddaa60c464548ae35f86b629ee
+crash-0.7.5-duplicate-5.swf:9f5686125627308ea6c4cddfa1897bd5
+crash-0.7.5-duplicate-6.swf:559cd7f51f4c2bb03ad3fb8050aac403
+crash-0.7.5-duplicate-7.swf:87c22c444cf6d4a71bafbd1e357028be
+crash-0.7.5-duplicate-8.swf:90c1a16d3f22dc579abca718da6822dd
 createTextField-returnvalue-6.swf:876f64cb4349313be58d1b9de5ca2ff4
 createTextField-returnvalue-7.swf:397473c78af05cbb9e7e394ec4ce1a07
 createTextField-returnvalue-8.swf:398e15cdabb4c9f9bdb56ee5b07e5126
@@ -619,6 +631,7 @@
 onresize-8.swf:92a9647b69fc3c7bebe7f7d0f69446e0
 onUnload-prototype-5.swf:63014a643d2cdec7a93fb115678833f1
 order.swf:cd3c59922bdbe22ce8d32900b82247e2
+oversized-image-5.swf:3e8e9f8ae3ff631721a63613799435e2
 parent-root.swf:29a3c9ce2ca959a1842849024a29639e
 parse-float-5.swf:e97643aebcd473b5bcff9ac978be779a
 parse-float-6.swf:f964f2977ba260d4e82f03eaa7c772a7
@@ -1058,6 +1071,9 @@
 transform-color-transform-5.swf:1b03afaa179024037f5d167556b3f7a9
 transform-color-transform-6.swf:8cfd79068cc9d51db8796bb27186bbda
 transform-color-transform-7.swf:bd48f8529157f81c30caca47ce6bb871
+Transform-matrix-5.swf:ae65136f5adbcd6dfec68760f7d1d7b4
+Transform-matrix-6.swf:45c037253c5fbac0a80753a5d194f60c
+Transform-matrix-7.swf:c4110453b8151dd87efff882e5b312ca
 transform-properties-5.swf:9332e41f53db6ec456387efffd9e12a7
 transform-properties-5.swf:b0386824584340e1d0a80f986ce779b9
 transform.swf:5c8533f9168ca3e92d000ce1693ed5ef


reply via email to

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