在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
似乎没有ruby的格式化, 用Lua凑合一下吧。 sample code:
require 'rUnit'
include RUnit testSuite :SampleTestSuite do setup do end tearDown do end testCase :TestEqualPass do assertEqual 1.0, 4.0-3.0 end testCase :TestEqualFail do assertEqual 1, 2 end testCase :TestFail do assert 1>3 end testCase :TestException do raise 'Exception raised' end end Output:
SampleTestSuite
Passed:TestEqualPass Failed:TestEqualFail (Expected <1> but <2>.) Failed:TestFail (Expected <true> but <false>) Failed:TestException (Exception raised) Lib Source: |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论