summaryrefslogtreecommitdiff
path: root/test/ruby/test_pack.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-05 15:15:43 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-09-05 15:15:43 +0000
commit44785befeabd09d5d34f33b33783c0ec54f06a1f (patch)
tree56830470411bdaf525d1f4c489b120125efb9097 /test/ruby/test_pack.rb
parent01e3a55648559ba3d54cdf72d5c55f71a41e69e9 (diff)
* lib/optparse.rb (OptionParser#order, #permute, #parse): allow an
array as argument. * test/ruby/test_*.rb: moved invariants to left side in assert_equal, and use assert_nil, assert_raises and so on. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4516 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/ruby/test_pack.rb')
-rw-r--r--test/ruby/test_pack.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb
index 4bb17993f5..4132c89a61 100644
--- a/test/ruby/test_pack.rb
+++ b/test/ruby/test_pack.rb
@@ -10,12 +10,12 @@ class TestPack < Test::Unit::TestCase
ary = [1,-100,127,128,32767,987.654321098 / 100.0,12345,123456,-32767,-123456,"abcdef"]
$x = ary.pack($format)
ary2 = $x.unpack($format)
-
+
assert_equal(ary.length, ary2.length)
assert_equal(ary.join(':'), ary2.join(':'))
assert($x =~ /def/)
-
+
$x = [-1073741825]
- assert_equal($x.pack("q").unpack("q"), $x)
+ assert_equal($x, $x.pack("q").unpack("q"))
end
end