RandomizedTesting

码农软件 · 软件分类 · 单元测试工具 · 2019-11-18 21:42:25

软件介绍

RandomizedTesting 是一个 JUnit 测试的扩展,封装了内置重复随机的测试和超时控制、参数工厂、线程执行组等等。

示例代码:

@ThreadLeakScope(Scope.TEST)
@ThreadLeakAction({Action.WARN, Action.INTERRUPT})
@ThreadLeakLingering(linger =1000)
publicstaticclassTheGoodBadAndUglyextendsRandomizedTest {
  @Test
  publicvoidgood() {
    // I do nothing and I'm good.
  }
 
  @Test
  @Repeat(iterations =10)
  publicvoidbad() {
    // I fail randomly, about 20% of the time.
    assertFalse(randomIntBetween(1,100) <=20);
  }
 
  @Test
  publicvoidugly() {
    // I start and abandon a thread which falls
    // outside the test's scope. The test will fail.
    newThread() {
      publicvoidrun() {
        RandomizedTest.sleep(5000);
      }
    }.start();
  }
}

本文地址:https://codercto.com/soft/d/19291.html

DOOM启世录

DOOM启世录

[美] 大卫·卡什诺 / 孙振南 / 电子工业出版社 / 2004-4 / 29.00元

由David Kushner 撰写之著作 《Master of DOOM》在 Amazon 和 eBook上的销售喜人。本书的中文版权由我公司拿到,将在2004年4月出版。本书忠实详尽地讲述了两个玩家是如何走上游戏之路,如何制作出迄今为止影响力最大的游戏作品--DOOM和Quake,以及他们为何在最辉煌的时候分道扬镳。本书是国内第一部游戏领域的传记。与所有传记一样,不同的读者能从中得到不同的体验:......一起来看看 《DOOM启世录》 这本书的介绍吧!

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具