summaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
Diffstat (limited to 'sample')
-rw-r--r--sample/test.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/sample/test.rb b/sample/test.rb
index e3ca832e0f..9f1a92a0eb 100644
--- a/sample/test.rb
+++ b/sample/test.rb
@@ -517,7 +517,12 @@ ok($good)
$good = true;
for i in 4000..4096
n1 = 1 << i;
- $good = false if ((n1**2-1) / (n1+1) != (n1-1))
+ if (n1**2-1) / (n1+1) != (n1-1)
+ p i
+ p (n1**2-1)/(n1+1)
+ p (n1-1)
+ $good = false
+ end
end
ok($good)
@@ -897,6 +902,13 @@ rescue
ok true
end
+check "marshal"
+$x = [1,2,3,[4,5,"foo"],{1=>"bar"},2.5,fact(30)]
+$y = Marshal.dump($x)
+p $x
+p Marshal.load($y)
+ok($x == Marshal.load($y))
+
check "pack"
$format = "c2x5CCxsdila6";