Sha256: a438ab941bec01331a6dc431a4bf9efcdfb416a38088fbd75401b072bc142566

Contents?: true

Size: 382 Bytes

Versions: 10

Compression:

Stored size: 382 Bytes

Contents

##
# Numeric(Ext) Test

assert('Integer#div') do
  assert_equal 52, 365.div(7)
end

assert('Float#div') do
  skip unless Object.const_defined?(:Float)
  assert_float 52, 365.2425.div(7)
end

assert('Integer#zero?') do
  assert_equal true, 0.zero?
  assert_equal false, 1.zero?
end

assert('Integer#nonzero?') do
  assert_equal nil, 0.nonzero?
  assert_equal 1000, 1000.nonzero?
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
script_core-0.3.2 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb
script_core-0.3.0 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb
script_core-0.2.7 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb
script_core-0.2.6 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb
script_core-0.2.5 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb
script_core-0.2.4 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb
script_core-0.2.3 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb
script_core-0.2.2 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb
script_core-0.2.1 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb
script_core-0.2.0 ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb