Changeset 331 for EcnlProtoTool/trunk/mruby-1.3.0/test/assert.rb
- Timestamp:
- Jan 21, 2018, 12:10:09 AM (6 years ago)
- Location:
- EcnlProtoTool/trunk/mruby-1.3.0
- Files:
-
- 1 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
EcnlProtoTool/trunk/mruby-1.3.0/test/assert.rb
r321 r331 11 11 while i < len 12 12 str = args[i].to_s 13 begin 14 __printstr__ str 15 rescue NoMethodError 16 __t_printstr__ str rescue print str 17 end 13 __t_printstr__ str rescue print str 18 14 i += 1 19 15 end … … 49 45 $mrbtest_assert = [] 50 46 $mrbtest_assert_idx = 0 51 if(!yield || $mrbtest_assert.size > 0) 47 yield 48 if($mrbtest_assert.size > 0) 52 49 $asserts.push(assertion_string('Fail: ', str, iso, nil)) 53 50 $ko_test += 1 … … 218 215 219 216 $asserts.each do |msg| 220 puts msg217 t_print "#{msg}\n" 221 218 end 222 219 … … 237 234 # Performs fuzzy check for equality on methods returning floats 238 235 def check_float(a, b) 239 tolerance = 1e-12236 tolerance = Mrbtest::FLOAT_TOLERANCE 240 237 a = a.to_f 241 238 b = b.to_f
Note:
See TracChangeset
for help on using the changeset viewer.