Sha256: dc98ef6e0a6dd6f155bcb1742ef64dc77b8efd472db3a1c5eb52e9305b3e2798
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/facets/more/infinity.rb # # Extracted Fri Feb 16 02:00:36 EST 2007 # Project.rb Test Extraction # require 'facets/more/infinity.rb' require 'test/unit' class GeneralTest < Test::Unit::TestCase def test_pos assert_equal((1.0/0), INFINITY.to_f) assert_equal(1, INFINITY<=>5) assert_equal(1, INFINITY<=>"a") assert_equal("PosInf", INFINITY.to_s) end def test_neg assert_equal((-1.0/0), -INFINITY.to_f) assert_equal(-1, -INFINITY<=>5) assert_equal(-1, -INFINITY<=>"a") assert_equal("NegInf", (-INFINITY).to_s) end def test_ord assert_equal((-1.0/0), -INFINITY.to_f) assert_equal(-1, 5<=>INFINITY) assert_equal(1, 5<=>-INFINITY) end def test_eq assert_equal(Inf, Inf) assert_equal(-Inf, -Inf) assert_equal(PosInf, PosInf) assert_equal(NegInf, NegInf) assert_not_equal(NaN, NaN) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-1.8.49 | test/lib/facets/more/test_infinity.rb |