From f81b41cc7143f25fd728cf98fce0dcb4f12c67fc Mon Sep 17 00:00:00 2001 From: Romain Franceschini Date: Sat, 25 Apr 2020 19:16:52 +0200 Subject: [PATCH] Update duration_spec.cr --- spec/duration_spec.cr | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/duration_spec.cr b/spec/duration_spec.cr index 0759f40..b83173d 100644 --- a/spec/duration_spec.cr +++ b/spec/duration_spec.cr @@ -12,6 +12,7 @@ describe "Duration" do it "can be constructed from a float between 0 and 1" do Duration.from(0.00000).should eq(Duration.new(0, Scale::BASE)) + Duration.from(1.0 / 3.0).should eq(Duration.new(333, Scale::MILLI)) Duration.from(0.001).should eq(Duration.new(1, Scale::MILLI)) Duration.from(0.00001).should eq(Duration.new(10, Scale::MICRO)) Duration.from(0.000000752).should eq(Duration.new(752, Scale::NANO))