From 8085817cb5737ca0c2a4afb5e3d013a395e12eb4 Mon Sep 17 00:00:00 2001 From: Yukihiro Matsumoto Date: Mon, 14 May 2012 23:04:13 +0900 Subject: make test restructuring --- test/_assert.rb | 44 -------------------------------------------- 1 file changed, 44 deletions(-) delete mode 100644 test/_assert.rb (limited to 'test/_assert.rb') diff --git a/test/_assert.rb b/test/_assert.rb deleted file mode 100644 index 91751f769..000000000 --- a/test/_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 -- cgit v1.2.3