Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 97EE5200B96 for ; Thu, 6 Oct 2016 11:33:40 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 96994160AEE; Thu, 6 Oct 2016 09:33:40 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id DFCA6160AE0 for ; Thu, 6 Oct 2016 11:33:39 +0200 (CEST) Received: (qmail 40796 invoked by uid 500); 6 Oct 2016 09:33:36 -0000 Mailing-List: contact commits-help@flex.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flex.apache.org Delivered-To: mailing list commits@flex.apache.org Received: (qmail 40480 invoked by uid 99); 6 Oct 2016 09:33:36 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Oct 2016 09:33:36 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 7B9C2E69A3; Thu, 6 Oct 2016 09:33:36 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: yishayw@apache.org To: commits@flex.apache.org Date: Thu, 06 Oct 2016 09:33:56 -0000 Message-Id: <94ecdd43a6bb4ceb9e3d8e4bd295568c@git.apache.org> In-Reply-To: <5c9ec34eb04f4ec49a4fc668cd7c9133@git.apache.org> References: <5c9ec34eb04f4ec49a4fc668cd7c9133@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [21/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] - rewrite code to prevent dead code removal archived-at: Thu, 06 Oct 2016 09:33:40 -0000 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 Authored: Mon Oct 3 22:53:01 2016 -0700 Committer: Alex Harui 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)); }