Quantcast
Channel: Adobe Community : Popular Discussions - FlexUnit
Viewing all articles
Browse latest Browse all 25673

[Test(expects="Error")] not functioning as expected

$
0
0

When testing against implementation code which is expected to throw an exception the test fails even when the expected exception is thrown.

 

I broke this test down into a very simple example to help illustrate the issue:

 

public class ExpectsExampleTest
{
    [Test(expects="Error")]
    public function testExpects():void
    {
        throw new Error();
    }
}

 

The above code result in the following error:

6/11/2009 23:23:39.519 [WARN] FlexUnit4 There was 1 failure:
6/11/2009 23:23:39.522 [WARN] FlexUnit4 1 tests::ExpectsExampleTest.testExpects Error

 

Not sure if I am missing something or not, however the implementation appears to be correct.

 

Thanks,

Eric


Viewing all articles
Browse latest Browse all 25673

Trending Articles