Sha256: 6502f586a989035ff57959bd08beb0f8109b3bde7ec8d4ace29b1ecb4922b05d

Contents?: true

Size: 422 Bytes

Versions: 1

Compression:

Stored size: 422 Bytes

Contents

require File.expand_path(File.dirname(__FILE__)) + '/spec_helper.rb'

describe MPFI do
  context "when marshaling" do
    before(:all) do
      MPFR.set_default_prec(256)
    end

    it "should restore regular numbers" do
      GenerateNumber.string(1000).each do |s|
        n = MPFI(s, 128)
        n2 = Marshal.load(Marshal.dump(n))
        n2.should == n
        n2.get_prec.should == 128
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ruby-mpfi-0.0.7 spec/mpfi/marshal_spec.rb