From 35bd64b5d517faf8e4e0f40f214312e6bfbaede6 Mon Sep 17 00:00:00 2001 From: ocean Date: Fri, 17 Feb 2006 02:21:39 +0000 Subject: * util.c (ruby_strtod): Float("1e") should fail. [ruby-core:7330] * pack.c (EXTEND32): unpack("l") did not work where sizeof(long) != 4. [ruby-talk:180024] * pack.c (pack_unpack): fixed integer overflow on template "w". [ruby-talk:180126] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@9947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_float.rb | 1 + test/ruby/test_pack.rb | 3 +++ 2 files changed, 4 insertions(+) (limited to 'test/ruby') diff --git a/test/ruby/test_float.rb b/test/ruby/test_float.rb index fb180ff81..63979b5be 100644 --- a/test/ruby/test_float.rb +++ b/test/ruby/test_float.rb @@ -84,6 +84,7 @@ class TestFloat < Test::Unit::TestCase assert_raise(ArgumentError){Float("+.")} assert_raise(ArgumentError){Float("-")} assert_raise(ArgumentError){Float("-.")} + assert_raise(ArgumentError){Float("1e")} # add expected behaviour here. end end diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb index a9f15599e..e67465b33 100644 --- a/test/ruby/test_pack.rb +++ b/test/ruby/test_pack.rb @@ -15,6 +15,9 @@ class TestPack < Test::Unit::TestCase $x = [-1073741825] assert_equal($x, $x.pack("q").unpack("q")) + + $x = [-1] + assert_equal($x, $x.pack("l").unpack("l")) end def test_pack_N -- cgit