Sha256: df618bfaf7a7b58bd6e223c8cec8af408365b64a4f3405423aa5121c68e8d61a
Contents?: true
Size: 821 Bytes
Versions: 1
Compression:
Stored size: 821 Bytes
Contents
require File.expand_path(File.join(File.dirname(__FILE__), '..', 'test_helper.rb')) class FloatLiteralTest < Test::Unit::TestCase def setup @parser = Sexpistol.new end test "should parse sexp containing an implicitly positive float literal" do ast = @parser.parse_string("10.00") assert_equal [10.00], ast end test "should parse sexp containing an explicitly positive float literal" do ast = @parser.parse_string("+910.00") assert_equal [910.00], ast end test "should parse sexp containing an explicitly negative float literal" do ast = @parser.parse_string("-10.00") assert_equal [-10.00], ast end test "should parse sexp containing a large float literal" do ast = @parser.parse_string("1.0000127829") assert_equal [1.0000127829], ast end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sexpistol-0.0.1 | test/unit/float_literal_test.rb |