diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-16 08:08:42 -0700 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2012-05-16 08:08:42 -0700 |
| commit | bc2314e625065b19a018f88485a5879fa26013ab (patch) | |
| tree | d9ebdce9f246607409efc65f414704c96fb677d3 /test/t/_assert.rb | |
| parent | f202658d80105755fd56a664c4d4013fa71b21d4 (diff) | |
| parent | 26c6031a53867011eb33b624ed245d5603b778cf (diff) | |
| download | mruby-bc2314e625065b19a018f88485a5879fa26013ab.tar.gz mruby-bc2314e625065b19a018f88485a5879fa26013ab.zip | |
Merge pull request #143 from bovi/master
Test Improvement
Diffstat (limited to 'test/t/_assert.rb')
| -rw-r--r-- | test/t/_assert.rb | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/test/t/_assert.rb b/test/t/_assert.rb deleted file mode 100644 index 91751f769..000000000 --- a/test/t/_assert.rb +++ /dev/null @@ -1,44 +0,0 @@ -$ok_test = 0 -$ko_test = 0 -$asserts = [] - -## -# Verify a code block. -# -# str : A remark which will be printed in case -# this assertion fails -# iso : The ISO reference code of the feature -# which will be tested by this -# assertion -def assert(str = 'Assertion failed', iso = '') - if(!yield) - $asserts.push([str, iso]) - $ko_test += 1 - print "F" - else - $ok_test += 1 - print "." - end -end - -## -# Report the test result and print all assertions -# which were reported broken. -def report() - print "\n" - $asserts.each do |str, iso| - print("Test Failed: #{str} [#{iso}]\n"); - end - - $total_test = $ok_test + $ko_test - print 'Total tests:' - print $total_test - print "\n" - - print ' OK: ' - print $ok_test - print "\n" - print ' KO: ' - print $ko_test - print "\n" -end |
