diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-06-14 20:32:41 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-06-14 20:32:41 +0900 |
| commit | 7ba2f8554629b8b0cf088ff7c7a2f33d31873e93 (patch) | |
| tree | a39478a5fa2041d5b093e49bf5afae2b1a241e2e /test/t/comparable.rb | |
| parent | f3c10487562b2a85534ffaf050e739169491abe7 (diff) | |
| parent | 34cd70b1c5fabc3e3a4f6a705c2bcb3a78fd7ab9 (diff) | |
| download | mruby-7ba2f8554629b8b0cf088ff7c7a2f33d31873e93.tar.gz mruby-7ba2f8554629b8b0cf088ff7c7a2f33d31873e93.zip | |
Merge branch 'master' of github.com:mruby/mruby
Diffstat (limited to 'test/t/comparable.rb')
| -rw-r--r-- | test/t/comparable.rb | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/test/t/comparable.rb b/test/t/comparable.rb index ab81fa3ed..b5718d2d2 100644 --- a/test/t/comparable.rb +++ b/test/t/comparable.rb @@ -7,7 +7,7 @@ assert('Comparable#<', '15.3.3.2.1') do end end - (Foo.new < Foo.new) == false + assert_false(Foo.new < Foo.new) end assert('Comparable#<=', '15.3.3.2.2') do @@ -18,7 +18,7 @@ assert('Comparable#<=', '15.3.3.2.2') do end end - (Foo.new <= Foo.new) == true + assert_true(Foo.new <= Foo.new) end assert('Comparable#==', '15.3.3.2.3') do @@ -29,7 +29,7 @@ assert('Comparable#==', '15.3.3.2.3') do end end - (Foo.new == Foo.new) == true + assert_true(Foo.new == Foo.new) end assert('Comparable#>', '15.3.3.2.4') do @@ -40,7 +40,7 @@ assert('Comparable#>', '15.3.3.2.4') do end end - (Foo.new > Foo.new) == false + assert_false(Foo.new > Foo.new) end assert('Comparable#>=', '15.3.3.2.5') do @@ -51,7 +51,7 @@ assert('Comparable#>=', '15.3.3.2.5') do end end - (Foo.new >= Foo.new) == true + assert_true(Foo.new >= Foo.new) end assert('Comparable#between?', '15.3.3.2.6') do @@ -63,9 +63,10 @@ assert('Comparable#between?', '15.3.3.2.6') do end c = Foo.new - c.between?(-1, 1) == false && - c.between?(-1, -1) == false && - c.between?( 1, 1) == false && - c.between?( 1, -1) == true && - c.between?(0, 0) == true + + assert_false(c.between?(-1, 1)) + assert_false(c.between?(-1, -1)) + assert_false(c.between?( 1, 1)) + assert_true(c.between?( 1, -1)) + assert_true(c.between?(0, 0)) end |
