flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aha...@apache.org
Subject git commit: [flex-falcon] [refs/heads/develop] - one more test
Date Tue, 09 Aug 2016 23:22:24 GMT
Repository: flex-falcon
Updated Branches:
  refs/heads/develop fff63d367 -> 23df02ae9


one more test


Project: http://git-wip-us.apache.org/repos/asf/flex-falcon/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-falcon/commit/23df02ae
Tree: http://git-wip-us.apache.org/repos/asf/flex-falcon/tree/23df02ae
Diff: http://git-wip-us.apache.org/repos/asf/flex-falcon/diff/23df02ae

Branch: refs/heads/develop
Commit: 23df02ae9fc6562e702ae48904e411bc88f767cb
Parents: fff63d3
Author: Alex Harui <aharui@apache.org>
Authored: Tue Aug 9 16:22:20 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Tue Aug 9 16:22:20 2016 -0700

----------------------------------------------------------------------
 .../codegen/js/flexjs/TestFlexJSExpressions.java      | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-falcon/blob/23df02ae/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
----------------------------------------------------------------------
diff --git a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
index 20c16f1..40ee688 100644
--- a/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
+++ b/compiler-jx/src/test/java/org/apache/flex/compiler/internal/codegen/js/flexjs/TestFlexJSExpressions.java
@@ -597,7 +597,7 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     public void testVisitBinaryOperatorNode_StringVarCompareWithObject()
     {
         IBinaryOperatorNode node = (IBinaryOperatorNode) getNode(
-                "public class B {public var b:String; public var c:Object; public function
c() { b == c; }}",
+                "public class B {public var b:String; public var c:Object; public function
d() { b == c; }}",
                 IBinaryOperatorNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitBinaryOperator(node);
         assertOut("this.b == this.c");
@@ -607,13 +607,23 @@ public class TestFlexJSExpressions extends TestGoogExpressions
     public void testVisitBinaryOperatorNode_StringVarInObject()
     {
         IBinaryOperatorNode node = (IBinaryOperatorNode) getNode(
-                "public class B {public var b:String; public var c:Object; public function
c() { if (b in c); }}",
+                "public class B {public var b:String; public var c:Object; public function
d() { if (b in c); }}",
                 IBinaryOperatorNode.class, WRAP_LEVEL_PACKAGE);
         asBlockWalker.visitBinaryOperator(node);
         assertOut("this.b in this.c");
     }
 
     @Test
+    public void testVisitBinaryOperatorNode_ObjectPlusNumberLiteral()
+    {
+        IBinaryOperatorNode node = (IBinaryOperatorNode) getNode(
+                "public class B {public function d(obj:Object, prop:String) { var foo:int
= obj[prop] + 1; }}",
+                IBinaryOperatorNode.class, WRAP_LEVEL_PACKAGE);
+        asBlockWalker.visitBinaryOperator(node);
+        assertOut("obj[prop] + 1");
+    }
+
+    @Test
     public void testNamedFunctionAsArgument()
     {
         IFunctionNode node = (IFunctionNode) getNode(


Mime
View raw message