flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yish...@apache.org
Subject [21/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - rewrite code to prevent dead code removal
Date Thu, 06 Oct 2016 09:33:56 GMT
rewrite code to prevent dead code removal


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

Branch: refs/heads/refactor-sprite
Commit: bb4a79957be275416af0ee456b5c904576fe445d
Parents: d50b2ea
Author: Alex Harui <aharui@apache.org>
Authored: Mon Oct 3 22:53:01 2016 -0700
Committer: Alex Harui <aharui@apache.org>
Committed: Mon Oct 3 22:53:01 2016 -0700

----------------------------------------------------------------------
 .../src/flexUnitTests/observedbugs/ObservedBugTests.as       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/bb4a7995/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
----------------------------------------------------------------------
diff --git a/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as b/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
index 0a805cc..4590c7b 100644
--- a/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
+++ b/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
@@ -63,11 +63,11 @@ package flexUnitTests.observedbugs
         [Test]
         public function testTryCatchJSReleaseModeFail():void
         {
-            var js:Boolean = false;
+            var js:int = 1;
             try {
-                var check:* = getDefinitionByName("flash.system.Capabilities");
+                js = getDefinitionByName("flash.system.Capabilities") == null ? 1 : 0;
             } catch (e:Error) {
-                js = true;
+                js = 2;
             }
 			
 			//if this next reference to 'check' variable is not included, then the above try/catch
code
@@ -76,7 +76,7 @@ package flexUnitTests.observedbugs
             /* if (check == null) {
                 js = true;
             }*/
-            Assert.assertTrue("Unexpected value following try/catch",(js==isJS));
+            Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == 2) :
(js == 1));
 
 
         }


Mime
View raw message