FlexUnit 4 错误

发布于 2024-09-06 08:53:59 字数 1332 浏览 4 评论 0原文

我遇到一个奇怪的 FlexUnit 错误:

哇...被要求再发送一个 完成了,我已经做到了

当测试数量超过 27 时似乎会发生错误...? (测试从未完成)

测试示例:

[Test]
public function whenDoingThat_expectThatIsTrue():void{
      //blabla      
      assertTrue(...)
}

欢迎任何帮助!

这是一个例子:

core = new FlexUnitCore();
core.addListener(new TraceListener());
core.run(FooTest);


import org.flexunit.asserts.assertTrue;

public class FooTest {
    [Test]
    public function foo_test_1() : void {
        assertTrue(true);
    }
    [Test]
    public function foo_test_2() : void {
        assertTrue(true);
    }

    ...

    [Test]
    public function foo_test_28() : void {
        assertTrue(true);
    }
    //[Test]
    public function foo_test_29() : void {
        assertTrue(true);
    }
}

结果:

foo_test_9 .
foo_test_17 .
foo_test_3 .
foo_test_18 .
foo_test_4 .
foo_test_19 .
foo_test_5 .
foo_test_6 .
foo_test_20 .
foo_test_21 .
foo_test_7 .
foo_test_22 .
foo_test_8 .
foo_test_23 .
foo_test_2 .
foo_test_24 .
foo_test_10 .
foo_test_25 .
foo_test_11 .
foo_test_26 .
foo_test_12 .
foo_test_27 .
foo_test_13 .
foo_test_28 .
foo_test_14 .
foo_test_15 .
foo_test_1 .
foo_test_16 .
Whoa... been asked to send another complete and I already did that

I am facing a strange FlexUnit Error:

Whoa... been asked to send another
complete and I already did that

The error seem to occur when the number of test exceede 27...? (the tests never complete)

test exemple:

[Test]
public function whenDoingThat_expectThatIsTrue():void{
      //blabla      
      assertTrue(...)
}

Any help welcome !

Here is an exemple:

core = new FlexUnitCore();
core.addListener(new TraceListener());
core.run(FooTest);


import org.flexunit.asserts.assertTrue;

public class FooTest {
    [Test]
    public function foo_test_1() : void {
        assertTrue(true);
    }
    [Test]
    public function foo_test_2() : void {
        assertTrue(true);
    }

    ...

    [Test]
    public function foo_test_28() : void {
        assertTrue(true);
    }
    //[Test]
    public function foo_test_29() : void {
        assertTrue(true);
    }
}

result:

foo_test_9 .
foo_test_17 .
foo_test_3 .
foo_test_18 .
foo_test_4 .
foo_test_19 .
foo_test_5 .
foo_test_6 .
foo_test_20 .
foo_test_21 .
foo_test_7 .
foo_test_22 .
foo_test_8 .
foo_test_23 .
foo_test_2 .
foo_test_24 .
foo_test_10 .
foo_test_25 .
foo_test_11 .
foo_test_26 .
foo_test_12 .
foo_test_27 .
foo_test_13 .
foo_test_28 .
foo_test_14 .
foo_test_15 .
foo_test_1 .
foo_test_16 .
Whoa... been asked to send another complete and I already did that

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

空宴 2024-09-13 08:53:59

讽刺的是,考虑到实际问题实际上是 StackOverflow,所以将其发布在这里:

https://bugs .adobe.com/jira/browse/FXU-112

您可以使用错误中提到的解决方法,或者此行为已在 FlexUnit 4.1 beta 中修复,可以在 flexunit.org 下载页面上找到。

4.1 的发行版即将推出。

问题是你的机器足够快,可以在框架强制它等待下一帧之前进行额外的测试。当堆栈深度变深并且在不合适的位置被 try catch 捕获并随后追踪“Whoa”语句时,Flash Player 会引发堆栈溢出。

最初在 FlexUnit 4.x 中,我们为此使用了一个计数器和一个近似帧长度,在极少数情况下,与机器的联系多于测试,可能会导致这种情况发生。在 4.1 中,我们实际上监控帧的经过,这应该永久消除这个问题。

麦克风

Ironic this is posted here, considering the actual problem is really a StackOverflow:

https://bugs.adobe.com/jira/browse/FXU-112

You can use the workaround mentioned in the bug, or this behavior is fixed in FlexUnit 4.1 beta, which can be found on the flexunit.org download page.

A release version of 4.1 is coming very shortly.

The problem is your machine is fast enough to get one extra test in before the framework forces it to wait until the next frame. Flash Player throws a Stack Overflow when that stack depth gets to deep and it is being caught in a try catch in an inopportune place, and subsequently tracing out the 'Whoa' statement.

In FlexUnit 4.x originally, we used a counter and an approximate frame length for this, which, on very rare occasions linked more to the machine than the tests, could allow this to occur. In 4.1 we actually monitor the frames as they go by which should permanently eliminate this problem.

Mike

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文