1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add tests of JSON 1.1.9.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24729 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
naruse 2009-09-01 17:34:50 +00:00
parent 596b68cc6b
commit d99ac4f829
6 changed files with 153 additions and 70 deletions

View file

@ -1,7 +1,12 @@
#!/usr/bin/env ruby
# -*- coding: utf-8 -*-
require 'test/unit'
require 'json'
case ENV['JSON']
when 'pure' then require 'json/pure'
when 'ext' then require 'json/ext'
else require 'json'
end
class TC_JSONFixtures < Test::Unit::TestCase
def setup
@ -20,7 +25,7 @@ class TC_JSONFixtures < Test::Unit::TestCase
def test_failing
for name, source in @failed
assert_raise(JSON::ParserError, JSON::NestingError,
assert_raises(JSON::ParserError, JSON::NestingError,
"Did not fail for fixture '#{name}'") do
JSON.parse(source)
end