2
dir = File.dirname(File.expand_path(__FILE__))
6
require 'marshaltestlib'
11
class TestMarshal < Test::Unit::TestCase
12
include MarshalTestLib
32
StrClone=String.clone;
35
$x = [1,2,3,[4,5,"foo"],{1=>"bar"},2.5,fact(30)]
37
assert_equal($x, Marshal.load($y))
39
assert_instance_of(StrClone, Marshal.load(Marshal.dump(StrClone.new("abc"))))
41
[[1,2,3,4], [81, 2, 118, 3146]].each { |w,x,y,z|
42
a = (x.to_f + y.to_f / z.to_f) * Math.exp(w.to_f / (x.to_f + y.to_f / z.to_f))