Commit 21095561 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto

Merge pull request #307 from bovi/time-for-tests

Add execution time to tests
parents 8dcf0bc2 2ae84f7d
...@@ -2,6 +2,7 @@ $ok_test = 0 ...@@ -2,6 +2,7 @@ $ok_test = 0
$ko_test = 0 $ko_test = 0
$kill_test = 0 $kill_test = 0
$asserts = [] $asserts = []
$test_start = Time.now if Object.const_defined?(:Time)
## ##
# Print the assertion in a readable way # Print the assertion in a readable way
...@@ -68,6 +69,12 @@ def report() ...@@ -68,6 +69,12 @@ def report()
print('Crash: ') print('Crash: ')
print($kill_test) print($kill_test)
print("\n") print("\n")
if Object.const_defined?(:Time)
print(' Time: ')
print(Time.now - $test_start)
print(" seconds\n")
end
end end
## ##
...@@ -83,3 +90,4 @@ def check_float(a, b) ...@@ -83,3 +90,4 @@ def check_float(a, b)
true true
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment