From c537374a7516cd6a6813f7f413d73624f158afde Mon Sep 17 00:00:00 2001 From: Laurent Sansonetti Date: Sun, 20 Apr 2014 20:43:31 +0200 Subject: [PATCH] add core/float/{<, <=, >, >=} specs --- test/test-android/app/core/float/gt_spec.rb | 7 +++++++ test/test-android/app/core/float/gte_spec.rb | 7 +++++++ test/test-android/app/core/float/lt_spec.rb | 7 +++++++ test/test-android/app/core/float/lte_spec.rb | 8 ++++++++ 4 files changed, 29 insertions(+) create mode 100644 test/test-android/app/core/float/gt_spec.rb create mode 100644 test/test-android/app/core/float/gte_spec.rb create mode 100644 test/test-android/app/core/float/lt_spec.rb create mode 100644 test/test-android/app/core/float/lte_spec.rb diff --git a/test/test-android/app/core/float/gt_spec.rb b/test/test-android/app/core/float/gt_spec.rb new file mode 100644 index 00000000..7e3f7b3a --- /dev/null +++ b/test/test-android/app/core/float/gt_spec.rb @@ -0,0 +1,7 @@ +describe "Float#>" do + it "returns true if self is greater than other" do + (1.5 > 1).should == true + (2.5 > 3).should == false + (45.91 > bignum_value).should == false + end +end diff --git a/test/test-android/app/core/float/gte_spec.rb b/test/test-android/app/core/float/gte_spec.rb new file mode 100644 index 00000000..0ce60295 --- /dev/null +++ b/test/test-android/app/core/float/gte_spec.rb @@ -0,0 +1,7 @@ +describe "Float#>=" do + it "returns true if self is greater than or equal to other" do + (5.2 >= 5.2).should == true + (9.71 >= 1).should == true + (5.55382 >= 0xfabdafbafcab).should == false + end +end diff --git a/test/test-android/app/core/float/lt_spec.rb b/test/test-android/app/core/float/lt_spec.rb new file mode 100644 index 00000000..37255c83 --- /dev/null +++ b/test/test-android/app/core/float/lt_spec.rb @@ -0,0 +1,7 @@ +describe "Float#<" do + it "returns true if self is less than other" do + (71.3 < 91.8).should == true + (192.6 < -500).should == false + (-0.12 < 0x4fffffff).should == true + end +end diff --git a/test/test-android/app/core/float/lte_spec.rb b/test/test-android/app/core/float/lte_spec.rb new file mode 100644 index 00000000..65b81da5 --- /dev/null +++ b/test/test-android/app/core/float/lte_spec.rb @@ -0,0 +1,8 @@ +describe "Float#<=" do + it "returns true if self is less than or equal to other" do + (2.0 <= 3.14159).should == true + (-2.7183 <= -24).should == false + (0.0 <= 0.0).should == true + (9_235.9 <= bignum_value).should == true + end +end