Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update json + tests to 2.1 and update excludes.
Browse files Browse the repository at this point in the history
headius committed May 15, 2018
1 parent 4eee05e commit 24a7d97
Showing 21 changed files with 23 additions and 1,834 deletions.
2 changes: 1 addition & 1 deletion pom.rb
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@
'polyglot.dump.readonly' => 'true',
'jruby.plugins.version' => '1.0.10',

'json.version' => '1.8.3',
'json.version' => '2.1.0',
'rspec.version' => '3.4.0',
'rspec-core.version' => '3.4.4',
'rspec-expectations.version' => '3.4.0',
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -125,7 +125,7 @@ DO NOT MODIFIY - GENERATED CODE
<rspec-mocks.version>3.4.1</rspec-mocks.version>
<jruby.plugins.version>1.0.10</jruby.plugins.version>
<invoker.skip>true</invoker.skip>
<json.version>1.8.3</json.version>
<json.version>2.1.0</json.version>
<jar-dependencies.version>0.3.12</jar-dependencies.version>
<power_assert.version>1.1.1</power_assert.version>
<version.jruby>${project.version}</version.jruby>
384 changes: 9 additions & 375 deletions test/mri.index
Original file line number Diff line number Diff line change
@@ -1,376 +1,10 @@
# MRI tests.rb

ruby/test_alias.rb
# Everything in here seems to fail or hang.rb
#ruby/test_argf.rb
ruby/test_array.rb
ruby/test_assignment.rb
ruby/test_autoload.rb
ruby/test_basicinstructions.rb
ruby/test_beginendblock.rb
ruby/test_bignum.rb
ruby/test_call.rb
ruby/test_case.rb
ruby/test_class.rb
ruby/test_clone.rb
ruby/test_comparable.rb
ruby/test_complex.rb
ruby/test_complex2.rb
ruby/test_complexrational.rb
ruby/test_condition.rb
ruby/test_const.rb
ruby/test_continuation.rb
ruby/test_defined.rb
ruby/test_dir.rb
ruby/test_dir_m17n.rb
ruby/test_econv.rb
ruby/test_encoding.rb
ruby/test_enum.rb
ruby/test_enumerator.rb
ruby/test_env.rb
ruby/test_eval.rb
ruby/test_exception.rb
# blows up thread count and crashes
#ruby/test_fiber.rb
ruby/test_file.rb
ruby/test_file_exhaustive.rb
ruby/test_fixnum.rb
ruby/test_flip.rb
ruby/test_float.rb
ruby/test_fnmatch.rb
ruby/test_gc.rb
ruby/test_hash.rb
ruby/test_ifunless.rb
ruby/test_integer.rb
ruby/test_integer_comb.rb
ruby/test_io.rb
ruby/test_io_m17n.rb
ruby/test_iterator.rb
ruby/test_lambda.rb
ruby/test_lazy_enumerator.rb
ruby/test_literal.rb
ruby/test_m17n.rb
ruby/test_m17n_comb.rb
ruby/test_marshal.rb
ruby/test_math.rb
ruby/test_metaclass.rb
ruby/test_method.rb
ruby/test_mixed_unicode_escapes.rb
ruby/test_module.rb
ruby/test_notimp.rb
ruby/test_numeric.rb
ruby/test_object.rb
ruby/test_objectspace.rb
ruby/test_optimization.rb
ruby/test_pack.rb
ruby/test_parse.rb
ruby/test_path.rb
ruby/test_pipe.rb
ruby/test_primitive.rb
ruby/test_proc.rb
# hangs when run with other tests
ruby/test_process.rb
ruby/test_rand.rb
ruby/test_range.rb
ruby/test_rational.rb
ruby/test_rational2.rb
ruby/test_readpartial.rb
ruby/test_regexp.rb
ruby/test_require.rb
ruby/test_refinement.rb
ruby/test_rubyoptions.rb
# Removed until we can implement the remaining features (#2143)
#ruby/test_settracefunc.rb
ruby/test_signal.rb
ruby/test_sleep.rb
ruby/test_sprintf.rb
# TODO defines many tests programmatically with unusual names.rb
#ruby/test_sprintf_comb.rb
ruby/test_string.rb
ruby/test_stringchar.rb
ruby/test_struct.rb
ruby/test_super.rb
ruby/test_symbol.rb
ruby/test_syntax.rb
ruby/test_system.rb
ruby/test_thread.rb
ruby/test_time.rb
ruby/test_time_tz.rb
ruby/test_trace.rb
ruby/test_transcode.rb
ruby/test_undef.rb
ruby/test_unicode_escape.rb
ruby/test_variable.rb
ruby/test_whileuntil.rb
ruby/test_yield.rb
ruby/test_not.rb

test_pp.rb
test_cmath.rb
test_delegate.rb
test_find.rb
test_ipaddr.rb
# sole test fails
#test_mathn.rb
# sole test fails
#test_mutex_m.rb
test_open3.rb
test_pp.rb
test_prettyprint.rb
test_prime.rb
test_pstore.rb
test_pty.rb
test_securerandom.rb
test_set.rb
test_shellwords.rb
test_singleton.rb
test_syslog.rb
test_tempfile.rb
test_time.rb
test_timeout.rb
# all tests fail
#test_tracer.rb
test_tsort.rb

base64/test_base64.rb

benchmark/test_benchmark.rb

bigdecimal/test_bigdecimal.rb
bigdecimal/test_bigdecimal_util.rb
bigdecimal/test_bigmath.rb

cgi/test_cgi_cookie.rb
cgi/test_cgi_core.rb
cgi/test_cgi_header.rb
cgi/test_cgi_modruby.rb
cgi/test_cgi_multipart.rb
cgi/test_cgi_session.rb
cgi/test_cgi_tag_helper.rb
cgi/test_cgi_util.rb

coverage/test_coverage.rb

csv/test_csv_parsing.rb
csv/test_csv_writing.rb
csv/test_data_converters.rb
csv/test_encodings.rb
csv/test_features.rb
csv/test_headers.rb
csv/test_interface.rb
csv/test_row.rb
csv/test_table.rb

date/test_date.rb
date/test_date_arith.rb
date/test_date_attr.rb
date/test_date_base.rb
date/test_date_compat.rb
date/test_date_conv.rb
date/test_date_marshal.rb
date/test_date_new.rb
date/test_date_parse.rb
date/test_date_strftime.rb
date/test_date_strptime.rb
date/test_date_parse.rb
date/test_switch_hitter.rb

digest/test_digest.rb
digest/test_digest_extend.rb

erb/test_erb.rb
erb/test_erb_m17n.rb

etc/test_etc.rb

fileutils/test_dryrun.rb
fileutils/test_fileutils.rb
fileutils/test_nowrite.rb
fileutils/test_verbose.rb

io/wait/test_io_wait.rb
io/nonblock/test_flush.rb
#io/console/test_io_console.rb

json/test_json.rb
json/test_json_addition.rb
json/test_json_encoding.rb
json/test_json_fixtures.rb
json/test_json_generate.rb
json/test_json_generic_object.rb
# Depends on some rails lib?.rb
#json/test_json_rails.rb
json/test_json_string_matching.rb
json/test_json_unicode.rb

logger/test_logger.rb

matrix/test_matrix.rb
matrix/test_vector.rb

monitor/test_monitor.rb

net/ftp/test_buffered_socket.rb
net/ftp/test_ftp.rb
net/ftp/test_mlsx_entry.rb
net/http/test_buffered_io.rb
net/http/test_http.rb
net/http/test_http_request.rb
net/http/test_httpheader.rb
net/http/test_httpresponse.rb
net/http/test_httpresponses.rb
# jruby/jruby-openssl#112
#net/http/test_https.rb
net/http/test_https_proxy.rb
net/imap/test_imap.rb
net/imap/test_imap_response_parser.rb
net/pop/test_pop.rb
net/protocol/test_protocol.rb
net/smtp/test_response.rb
net/smtp/test_smtp.rb
net/smtp/test_ssl_socket.rb

nkf/test_kconv.rb
nkf/test_nkf.rb

# Removed because jruby-openssl is its own project now
#openssl/test_asn1.rb
#openssl/test_bn.rb
#openssl/test_buffering.rb
#openssl/test_certificate.rb
#openssl/test_cipher.rb
#openssl/test_config.rb
#openssl/test_digest.rb
# OpenSSL::PKey::EC not defined
#openssl/test_ec.rb
# OpenSSL::Engine not defined
#openssl/test_engine.rb
#openssl/test_hmac.rb
#openssl/test_imaps.rb
#openssl/test_integration.rb
#openssl/test_ns_spki.rb
# OpenSSL::OCSP not defined
#openssl/test_ocsp.rb
#openssl/test_parse_certificate.rb
#openssl/test_pair.rb
#openssl/test_partial_record_read.rb
#openssl/test_pkcs12.rb
#openssl/test_pkcs7.rb
#openssl/test_pkey_dh.rb
#openssl/test_pkey_dsa.rb
# OpenSSL::PKey::EC not defined
#openssl/test_pkey_ec.rb
#openssl/test_pkey_rsa.rb
# Does not parse
#openssl/test_ssl.rb
# OpenSSL::SSL::Session not defined
#openssl/test_ssl_session.rb
#openssl/test_x509cert.rb
#openssl/test_x509crl.rb
#openssl/test_x509ext.rb
#openssl/test_x509name.rb
#openssl/test_x509req.rb
#openssl/test_x509store.rb

optparse/test_bash_completion.rb
optparse/test_getopts.rb
optparse/test_noarg.rb
optparse/test_optarg.rb
optparse/test_optparse.rb
optparse/test_placearg.rb
optparse/test_reqarg.rb
optparse/test_summary.rb
optparse/test_zsh_completion.rb

ostruct/test_ostruct.rb

pathname/test_pathname.rb

psych/test_alias_and_anchor.rb
psych/test_array.rb
psych/test_boolean.rb
psych/test_class.rb
psych/test_coder.rb
psych/test_date_time.rb
psych/test_deprecated.rb
psych/test_document.rb
psych/test_emitter.rb
psych/test_encoding.rb
psych/test_exception.rb
psych/test_hash.rb
psych/test_json_tree.rb
psych/test_merge_keys.rb
psych/test_nil.rb
psych/test_null.rb
psych/test_numeric.rb
psych/test_object.rb
psych/test_object_references.rb
psych/test_omap.rb
psych/test_parser.rb
psych/test_psych.rb
psych/test_scalar.rb
psych/test_scalar_scanner.rb
psych/test_serialize_subclasses.rb
psych/test_set.rb
psych/test_stream.rb
psych/test_string.rb
psych/test_struct.rb
psych/test_symbol.rb
psych/test_tainted.rb
psych/test_to_yaml_properties.rb
psych/test_tree_builder.rb
psych/test_yaml.rb
psych/test_yamlstore.rb
psych/json/test_stream.rb
psych/nodes/test_enumerable.rb
psych/visitors/test_depth_first.rb
psych/visitors/test_emitter.rb
psych/visitors/test_to_ruby.rb
psych/visitors/test_yaml_tree.rb

# Assumes MRI source layout to randomly rip .rb files
# ripper/test_files.rb
ripper/test_filter.rb
ripper/test_parser_events.rb
ripper/test_ripper.rb
ripper/test_scanner_events.rb
ripper/test_sexp.rb

scanf/test_scanf.rb
scanf/test_scanfblocks.rb

socket/test_addrinfo.rb
# No Socket::AncillaryData
#socket/test_ancdata.rb
socket/test_basicsocket.rb
socket/test_nonblock.rb
socket/test_socket.rb
socket/test_sockopt.rb
socket/test_tcp.rb
socket/test_udp.rb
socket/test_unix.rb

stringio/test_stringio.rb

strscan/test_stringscanner.rb

thread/test_queue.rb

zlib/test_zlib.rb

ruby/enc/test_big5.rb
ruby/enc/test_cp949.rb
ruby/enc/test_emoji.rb
ruby/enc/test_euc_jp.rb
ruby/enc/test_euc_kr.rb
ruby/enc/test_euc_tw.rb
ruby/enc/test_gb18030.rb
ruby/enc/test_gbk.rb
ruby/enc/test_iso_8859.rb
ruby/enc/test_koi8.rb
ruby/enc/test_shift_jis.rb
ruby/enc/test_utf16.rb
ruby/enc/test_utf32.rb
ruby/enc/test_windows_1251.rb
ruby/enc/test_case_mapping.rb
ruby/enc/test_case_options.rb
json/json_addition_test.rb
json/json_common_interface_test.rb
json/json_encoding_test.rb
json/json_ext_parser_test.rb
json/json_fixtures_test.rb
json/json_generator_test.rb
json/json_generic_object_test.rb
json/json_parser_test.rb
json/json_string_matching_test.rb
1 change: 1 addition & 0 deletions test/mri/excludes/JSONGeneratorTest.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exclude :test_gc, "needs investigation, probably related to flori/json#336"
1 change: 1 addition & 0 deletions test/mri/excludes/JSONParserTest.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
exclude :test_parse_big_integers, "needs work in json lib to gracefully handle Bignum (flori/json#336)"
8 changes: 0 additions & 8 deletions test/mri/excludes/TestJSON.rb

This file was deleted.

1 change: 0 additions & 1 deletion test/mri/excludes/TestJSONEncoding.rb

This file was deleted.

5 changes: 0 additions & 5 deletions test/mri/excludes/TestJSONGenerate.rb

This file was deleted.

1 change: 0 additions & 1 deletion test/mri/json/fixtures/fail1.json

This file was deleted.

10 changes: 10 additions & 0 deletions test/mri/json/json_addition_test.rb
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@
require 'json/add/rational'
require 'json/add/bigdecimal'
require 'json/add/ostruct'
require 'json/add/set'
require 'date'

class JSONAdditionTest < Test::Unit::TestCase
@@ -190,4 +191,13 @@ def test_ostruct
o.foo = { 'bar' => true }
assert_equal o, parse(JSON(o), :create_additions => true)
end

def test_set
s = Set.new([:a, :b, :c, :a])
assert_equal s, JSON.parse(JSON(s), :create_additions => true)
ss = SortedSet.new([:d, :b, :a, :c])
ss_again = JSON.parse(JSON(ss), :create_additions => true)
assert_kind_of ss.class, ss_again
assert_equal ss, ss_again
end
end
Empty file modified test/mri/json/json_generator_test.rb
100755 → 100644
Empty file.
12 changes: 0 additions & 12 deletions test/mri/json/setup_variant.rb

This file was deleted.

4 changes: 0 additions & 4 deletions test/mri/json/test_helper.rb
Original file line number Diff line number Diff line change
@@ -15,7 +15,3 @@
require 'byebug'
rescue LoadError
end
if ENV['START_SIMPLECOV'].to_i == 1
require 'simplecov'
SimpleCov.start
end
577 changes: 0 additions & 577 deletions test/mri/json/test_json.rb

This file was deleted.

197 changes: 0 additions & 197 deletions test/mri/json/test_json_addition.rb

This file was deleted.

66 changes: 0 additions & 66 deletions test/mri/json/test_json_encoding.rb

This file was deleted.

36 changes: 0 additions & 36 deletions test/mri/json/test_json_fixtures.rb

This file was deleted.

361 changes: 0 additions & 361 deletions test/mri/json/test_json_generate.rb

This file was deleted.

76 changes: 0 additions & 76 deletions test/mri/json/test_json_generic_object.rb

This file was deleted.

40 changes: 0 additions & 40 deletions test/mri/json/test_json_string_matching.rb

This file was deleted.

73 changes: 0 additions & 73 deletions test/mri/json/test_json_unicode.rb

This file was deleted.

0 comments on commit 24a7d97

Please sign in to comment.