代码之家  ›  专栏  ›  技术社区  ›  OXMO456

FlexUnit 4错误

  •  0
  • OXMO456  · 技术社区  · 14 年前

    我面临一个奇怪的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
    
    1 回复  |  直到 14 年前
        1
  •  1
  •   Labriola    14 年前

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

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

    4.1的发布版本即将发布。

    在FlexUnit 4.x中,我们最初使用了一个计数器和一个近似的帧长度,在非常罕见的情况下,这种计数器和机器的链接比测试的多,可能会允许这种情况发生。在4.1中,我们实际上是在帧经过时监视帧,这样就可以永久地消除这个问题。

    推荐文章