mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 09:31:20 +08:00
update float spec which related to Float#round
This commit is contained in:
@@ -32,6 +32,12 @@ describe "Float" do
|
||||
1356890400.step(1356908032.0, 7200.0).to_a.should == [1356890400.0, 1356897600.0, 1356904800.0]
|
||||
end
|
||||
|
||||
it "round" do
|
||||
# issue 506
|
||||
flt = 0.678547.round(2)
|
||||
flt.to_s.should == "0.68"
|
||||
end
|
||||
|
||||
it "NSDecimalNumber.decimalNumberWithMantissa" do
|
||||
# issue 427
|
||||
number = NSDecimalNumber.decimalNumberWithMantissa(3000000000, exponent: 0,isNegative: false)
|
||||
@@ -64,4 +70,4 @@ describe "Float" do
|
||||
f.__fixfloat__?.should == true
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user