You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by gr...@apache.org on 2020/04/17 22:49:51 UTC

[royale-asjs] branch develop updated (58d4d7b -> de4ceb8)

This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git.


    from 58d4d7b  a new example showing markdown with highlight code, this could be the seed for a future royale website
     new 0dd8dea  minor: Consistency with flash for amf deserialization: the local resolved className should be reported here, not the alias that was received.
     new f240dda  Added initial tests for mx Collections. ArrayCollection iteration tests, passing after a recent compiler change.
     new de4ceb8  Merge branch 'develop' of https://github.com/apache/royale-asjs into develop

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../test/royale/flexUnitTests/MXRoyaleTester.as    |   6 +-
 .../flexUnitTests/mxroyale/CollectionsTest.as      | 112 +++++++++++++++++++++
 .../flexUnitTests/mxroyale/support/ACTestOne.as    |  25 +++--
 .../flexUnitTests/mxroyale/support/ACTestTwo.as    |  17 ++--
 .../royale/net/remoting/amf/AMFBinaryData.as       |   2 +-
 5 files changed, 144 insertions(+), 18 deletions(-)
 create mode 100644 frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/CollectionsTest.as
 copy manualtests/UnitTests/src/main/royale/flexUnitTests/network/support/TestClass2.as => frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/support/ACTestOne.as (78%)
 copy manualtests/UnitTests/src/main/royale/flexUnitTests/network/support/TestClass2.as => frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/support/ACTestTwo.as (83%)


[royale-asjs] 02/03: Added initial tests for mx Collections. ArrayCollection iteration tests, passing after a recent compiler change.

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit f240ddad74bd43b6536f7a3fe4b7dabe24adfa76
Author: greg-dove <gr...@gmail.com>
AuthorDate: Sat Apr 18 10:48:15 2020 +1200

    Added initial tests for mx Collections.
    ArrayCollection iteration tests, passing after a recent compiler change.
---
 .../test/royale/flexUnitTests/MXRoyaleTester.as    |   6 +-
 .../flexUnitTests/mxroyale/CollectionsTest.as      | 112 +++++++++++++++++++++
 .../support/ACTestOne.as}                          |  33 +++---
 .../support/ACTestTwo.as}                          |  25 ++---
 4 files changed, 147 insertions(+), 29 deletions(-)

diff --git a/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as b/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as
index 510a492..e7920c6 100644
--- a/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as
+++ b/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as
@@ -29,9 +29,9 @@ package flexUnitTests
     {
         public function MXRoyaleTester()
         {
-           }
-        
-        
+        }
+
+        public var acTest:CollectionsTest;
         public var objectUtilTest:ObjectUtilTest;
         public var flexSDK_ObjectUtilTests:FlexSDK_ObjectUtil_Tests;
         public var flexSDK_ObjectUtil_FLEX_34852_Tests:FlexSDK_ObjectUtil_FLEX_34852_Tests;
diff --git a/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/CollectionsTest.as b/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/CollectionsTest.as
new file mode 100644
index 0000000..c2fd747
--- /dev/null
+++ b/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/CollectionsTest.as
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package flexUnitTests.mxroyale
+{
+    
+    
+
+    import org.apache.royale.test.asserts.*;
+    import flexUnitTests.mxroyale.support.*;
+
+
+    import mx.collections.ArrayCollection;
+
+
+
+/**
+     * @royalesuppresspublicvarwarning
+     */
+    public class CollectionsTest
+    {
+    
+        
+        public static var isJS:Boolean = COMPILE::JS;
+    
+
+        [Before]
+        public function setUp():void
+        {
+        
+        }
+        
+        [After]
+        public function tearDown():void
+        {
+
+        }
+        
+        [BeforeClass]
+        public static function setUpBeforeClass():void
+        {
+        }
+        
+        [AfterClass]
+        public static function tearDownAfterClass():void
+        {
+        }
+
+        
+        private var testAC2:ACTestTwo = new ACTestTwo();
+    
+        [Test]
+        public function testForEachViaMemberAccess():void{
+            var testOut:Array = [];
+
+            for each(var item:Object in testAC2.nestedOne.ac) {
+                testOut.push(item)
+            }
+
+            var expected:Array = testAC2.nestedOne.getOriginalContents();
+            assertEquals(testOut.toString(), expected.toString(), 'unexpected results from for-each iteration');
+
+        }
+
+
+        private var localMemberAC:ArrayCollection = new ArrayCollection(['localMember1', 'localMember2']);
+
+        [Test]
+        public function testForEachViaLocalMember():void{
+            var testOut:Array = [];
+
+            for each(var item:Object in localMemberAC) {
+                testOut.push(item)
+            }
+
+            var expected:Array = ['localMember1', 'localMember2'];
+            assertEquals(testOut.toString(), expected.toString(), 'unexpected results from for-each iteration');
+
+        }
+
+
+        [Test]
+        public function testForEachViaLocalVar():void{
+            var testOut:Array = [];
+            var localVarAC:ArrayCollection = new ArrayCollection(['localVar1', 'localVar2']);
+
+            for each(var item:Object in localVarAC) {
+                testOut.push(item)
+            }
+
+            var expected:Array = ['localVar1', 'localVar2'];
+            assertEquals(testOut.toString(), expected.toString(), 'unexpected results from for-each iteration');
+
+        }
+        
+    }
+}
diff --git a/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as b/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/support/ACTestOne.as
similarity index 67%
copy from frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as
copy to frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/support/ACTestOne.as
index 510a492..7f7eb40 100644
--- a/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as
+++ b/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/support/ACTestOne.as
@@ -16,26 +16,31 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests
+package flexUnitTests.mxroyale.support
 {
-    import flexUnitTests.mxroyale.*
-    
-    [Suite]
-    [RunWith("org.apache.royale.test.runners.SuiteRunner")]
+
+    import mx.collections.ArrayCollection;
+
     /**
      * @royalesuppresspublicvarwarning
      */
-    public class MXRoyaleTester
+    public class ACTestOne
     {
-        public function MXRoyaleTester()
-        {
-           }
+        //Note: do not change this test class unless you change the related tests to
+        //support any changes that might appear when testing reflection into it
+
         
-        
-        public var objectUtilTest:ObjectUtilTest;
-        public var flexSDK_ObjectUtilTests:FlexSDK_ObjectUtil_Tests;
-        public var flexSDK_ObjectUtil_FLEX_34852_Tests:FlexSDK_ObjectUtil_FLEX_34852_Tests;
-        public var flexSDK_ObjectUtil_Compare_Tests:FlexSDK_ObjectUtil_Compare_Tests;
+        public function ACTestOne()
+        {
+         ac = new ArrayCollection(getOriginalContents());
+        }
+
+        public function getOriginalContents():Array{
+            return ['one', 'two'];
+        }
+
+        public var ac:ArrayCollection;
+
         
     }
     
diff --git a/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as b/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/support/ACTestTwo.as
similarity index 68%
copy from frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as
copy to frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/support/ACTestTwo.as
index 510a492..088b6b4 100644
--- a/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/MXRoyaleTester.as
+++ b/frameworks/projects/MXRoyale/src/test/royale/flexUnitTests/mxroyale/support/ACTestTwo.as
@@ -16,26 +16,27 @@
 //  limitations under the License.
 //
 ////////////////////////////////////////////////////////////////////////////////
-package flexUnitTests
+package flexUnitTests.mxroyale.support
 {
-    import flexUnitTests.mxroyale.*
     
-    [Suite]
-    [RunWith("org.apache.royale.test.runners.SuiteRunner")]
+    import flexUnitTests.mxroyale.support.testnamespace;
+    
     /**
      * @royalesuppresspublicvarwarning
      */
-    public class MXRoyaleTester
+    public class ACTestTwo
     {
-        public function MXRoyaleTester()
-        {
-           }
+        //Note: do not change this test class unless you change the related tests to
+        //support any changes that might appear when testing reflection into it
         
+        public function ACTestTwo()
+        {
+            nestedOne = new ACTestOne();
+        }
         
-        public var objectUtilTest:ObjectUtilTest;
-        public var flexSDK_ObjectUtilTests:FlexSDK_ObjectUtil_Tests;
-        public var flexSDK_ObjectUtil_FLEX_34852_Tests:FlexSDK_ObjectUtil_FLEX_34852_Tests;
-        public var flexSDK_ObjectUtil_Compare_Tests:FlexSDK_ObjectUtil_Compare_Tests;
+
+        public var nestedOne:ACTestOne;
+
         
     }
     


[royale-asjs] 01/03: minor: Consistency with flash for amf deserialization: the local resolved className should be reported here, not the alias that was received.

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit 0dd8dea02fa57027ae8a3de24cd63e932c06e8ad
Author: greg-dove <gr...@gmail.com>
AuthorDate: Sat Apr 18 10:41:15 2020 +1200

    minor: Consistency with flash for amf deserialization: the local resolved className should be reported here, not the alias that was received.
---
 .../src/main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as
index d9fe43c..3eb6955 100644
--- a/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as
+++ b/frameworks/projects/Network/src/main/royale/org/apache/royale/net/remoting/amf/AMFBinaryData.as
@@ -1111,7 +1111,7 @@ class SerializationContext extends BinaryData  implements IDataInput, IDataOutpu
 						} else {
 							//@todo add debug-only logging for error checks (e.g. ReferenceError: Error #1074: Illegal write to read-only property)
 							if (goog.DEBUG) {
-								trace('ReferenceError: Error #1056: Cannot create property ' + prop + ' on ' + decodedTraits.alias);
+								trace('ReferenceError: Error #1056: Cannot create property ' + prop + ' on ' + localTraits.qName);
 							}
 						}
 					}


[royale-asjs] 03/03: Merge branch 'develop' of https://github.com/apache/royale-asjs into develop

Posted by gr...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

gregdove pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git

commit de4ceb854389aa47d2d02563b7bfbeca6ca29eab
Merge: f240dda 58d4d7b
Author: greg-dove <gr...@gmail.com>
AuthorDate: Sat Apr 18 10:49:09 2020 +1200

    Merge branch 'develop' of https://github.com/apache/royale-asjs into develop

 examples/jewel/royale-website/README.txt           |  23 ++++
 examples/jewel/royale-website/asconfig.json        |  19 +++
 examples/jewel/royale-website/build.xml            |  64 ++++++++++
 examples/jewel/royale-website/pom.xml              | 141 +++++++++++++++++++++
 .../src/main/config/compile-app-config.xml         |  34 +++++
 .../main/resources/assets/apache-royale-logo.svg   |  20 +++
 .../src/main/resources/assets/royale_spheres.png   | Bin 0 -> 64660 bytes
 .../resources/jewel-example-index-template.html    |  30 +++++
 .../src/main/resources/jewel-example-styles.css    |  70 ++++++++++
 .../jewel/royale-website/src/main/royale/App.mxml  |  47 +++++++
 .../src/main/royale/MainContent.mxml               |  77 +++++++++++
 .../jewel/royale-website/src/main/royale/hljs.as   |  61 +++++++++
 .../royale-website/src/main/royale/markdownit.as   |  47 +++++++
 13 files changed, 633 insertions(+)