【文件属性】:
文件名称:rgot:Ruby + GOlang测试= Rgot
文件大小:19KB
文件格式:ZIP
更新时间:2021-05-10 22:06:30
ruby testing Ruby
got
Ruby + Golang测试= Rgot
Rgot是从golang测试转换而来的测试包。
用法
测试/sample.rb
class Sample
def sum ( i , j )
i + j
end
end
测试/ pass_test.rb
module SampleTest
class TypeSum < Struct . new ( :left , :right , :expect )
end
DATA = [
TypeSum . new ( 2 , 3 , 5 ) ,
TypeSum . new ( 12 , 9 , 21 ) ,
TypeSum . new ( 85 , 42 , 127 ) ,
]
def test_pass ( t )
s = Sample . new
DATA
【文件预览】:
rgot-master
----.travis.yml(81B)
----bin()
--------rgot(3KB)
----rgot.gemspec(868B)
----Rakefile(173B)
----test()
--------sample.rb(49B)
--------rgot_test.rb(7KB)
--------skip_test.rb(130B)
--------timeout_test.rb(92B)
--------benchmark_test.rb(453B)
--------main_test.rb(175B)
--------example_fail_test.rb(307B)
--------rgot_common_test.rb(3KB)
--------fatal_test.rb(274B)
--------foo()
--------bar()
--------pass_test.rb(504B)
--------example_pass_test.rb(403B)
--------fail_test.rb(270B)
----Gemfile(39B)
----.gitignore(21B)
----lib()
--------rgot()
--------rgot.rb(752B)
----README.md(8KB)
----LICENSE.txt(1KB)