ruby/test/test_mathn.rb
yugui 319f97adb9 merges r25067 from trunk into ruby_1_9_1 and added a test for it.
--
* lib/mathn.rb (Bignum#**): Fixed bignum**fixnum that was broken when requiring lib/mathn
  [ruby-core:25740]
--
* test/test_mathn.rb (TestMathn): new test case.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_1@25949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-11-27 02:55:16 +00:00

10 lines
364 B
Ruby

require 'test/unit'
require_relative 'ruby/envutil'
# mathn redefines too much. It must be isolated to child processes.
class TestMathn < Test::Unit::TestCase
def test_power
assert_in_out_err ['-r', 'mathn', '-e', '1**2'], [], [], [], '[ruby-core:25740]'
assert_in_out_err ['-r', 'mathn', '-e', '(1<<126)**2'], [], [], [], '[ruby-core:25740]'
end
end