spec/mpfr/allocate_spec.rb in ruby-mpfr-0.0.4 vs spec/mpfr/allocate_spec.rb in ruby-mpfr-0.0.5

- old
+ new

@@ -8,9 +8,22 @@ num *= 10 MPFR.new(num).should == num end end + it "should equal bignum" do + MPFR.set_default_prec(120) + GenerateNumber.float(100) do |f| + MPFR.new(f).should == MPFR(f) + end + + GenerateNumber.float(100) do |f| + str = f.to_s + MPFR.new(str).should == MPFR(str) + end + + end + it "should allocate from string" do MPFR.set_default_prec(53) for i in 0..1000 MPFR.new(i.to_s).should == i end