You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by yi...@apache.org on 2016/10/13 07:40:18 UTC
[17/27] git commit: [flex-asjs] [refs/heads/refactor-sprite] -
[Tests] Fixed test for SWF,
and added back the failing js release-mode test. This failing test should
remain until it is either a) no longer apparent or b) becomes 'expected' for
JS via docum
[Tests] Fixed test for SWF, and added back the failing js release-mode test.
This failing test should remain until it is either a) no longer apparent or b) becomes 'expected' for JS via documentation.
Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/4262fbe7
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/4262fbe7
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/4262fbe7
Branch: refs/heads/refactor-sprite
Commit: 4262fbe7e882825927c7ab4a39efe8cc283bb72e
Parents: 93797c2
Author: greg-dove <gr...@gmail.com>
Authored: Tue Oct 11 18:23:53 2016 +1300
Committer: greg-dove <gr...@gmail.com>
Committed: Tue Oct 11 18:23:53 2016 +1300
----------------------------------------------------------------------
.../observedbugs/ObservedBugTests.as | 23 ++++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/4262fbe7/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 4590c7b..46887ac 100644
--- a/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
+++ b/manualtests/GenericTests/src/flexUnitTests/observedbugs/ObservedBugTests.as
@@ -59,24 +59,39 @@ package flexUnitTests.observedbugs
}
- [TestVariance(variance="JS",description="Variance in test, this test fails in JS-Release mode only")]
[Test]
- public function testTryCatchJSReleaseModeFail():void
+ public function testTryCatchJSReleaseModeWorks_a():void
{
var js:int = 1;
try {
- js = getDefinitionByName("flash.system.Capabilities") == null ? 1 : 0;
+ js = getDefinitionByName("flash.system.Capabilities") != null ? 1 : 0;
} catch (e:Error) {
js = 2;
}
+ Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == 2) : (js == 1));
+
+ }
+
+
+ [TestVariance(variance="JS",description="Variance in test, this test fails in JS-Release mode only")]
+ [Test]
+ public function testTryCatchJSReleaseModeFails_b():void
+ {
+ var js:Boolean = false;
+ try {
+ var check:* = getDefinitionByName("flash.system.Capabilities");
+ } catch (e:Error) {
+ js = true;
+ }
+
//if this next reference to 'check' variable is not included, then the above try/catch code
// appears to be optimized away in js-release mode
//todo: this is inconsistent with swf
/* if (check == null) {
js = true;
}*/
- Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == 2) : (js == 1));
+ Assert.assertTrue("Unexpected value following try/catch",(isJS ? (js == true) : (js == false));
}