test/test_integer_range.rb in oj-3.13.21 vs test/test_integer_range.rb in oj-3.13.22

- old
+ new

@@ -21,27 +21,21 @@ def teardown Oj.default_options = @default_options end def test_range - skip 'TruffleRuby fails this spec with `ArgumentError: :integer_range must be a range of Fixnum.`' if RUBY_ENGINE == 'truffleruby' - test = {s: 0, s2: -1, s3: 1, u: -2, u2: 2, u3: 9007199254740993} exp = '{"s":0,"s2":-1,"s3":1,"u":"-2","u2":"2","u3":"9007199254740993"}' assert_equal(exp, Oj.dump(test, integer_range: (-1..1))) end def test_bignum - skip 'TruffleRuby fails this spec with `ArgumentError: :integer_range must be a range of Fixnum.`' if RUBY_ENGINE == 'truffleruby' - test = {u: -10000000000000000000, u2: 10000000000000000000} exp = '{"u":"-10000000000000000000","u2":"10000000000000000000"}' assert_equal(exp, Oj.dump(test, integer_range: (-1..1))) end def test_valid_modes - skip 'TruffleRuby fails this spec with `ArgumentError: :integer_range must be a range of Fixnum.`' if RUBY_ENGINE == 'truffleruby' - test = {safe: 0, unsafe: 9007199254740993} exp = '{"safe":0,"unsafe":"9007199254740993"}' [:strict, :null, :compat, :rails, :custom].each do |mode| assert_equal(exp, Oj.dump(test, mode: mode, integer_range: (-1..1)), "Invalid mode #{mode}")