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/master
Commit: 23df02ae9fc6562e702ae48904e411bc88f767cb
Parents: fff63d3
Author: Alex Harui <[email protected]>
Authored: Tue Aug 9 16:22:20 2016 -0700
Committer: Alex Harui <[email protected]>
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(

Reply via email to