Sha256: cee704aad10c52ff1b99ef258c1110e878ac842c0991336877fde560d6cb8427

Contents?: true

Size: 387 Bytes

Versions: 3

Compression:

Stored size: 387 Bytes

Contents

require_relative "../spec_helper"

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

3 entries across 3 versions & 1 rubygems

Version Path
ruby-mpfi-0.0.10 spec/mpfi/marshal_spec.rb
ruby-mpfi-0.0.9 spec/mpfi/marshal_spec.rb
ruby-mpfi-0.0.8 spec/mpfi/marshal_spec.rb