summaryrefslogtreecommitdiff
path: root/tests/test_json.rb
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_json.rb')
-rwxr-xr-xtests/test_json.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_json.rb b/tests/test_json.rb
index eafd758..5492b8e 100755
--- a/tests/test_json.rb
+++ b/tests/test_json.rb
@@ -107,6 +107,8 @@ class TC_JSON < Test::Unit::TestCase
def test_parse_json_primitive_values
assert_raise(JSON::ParserError) { JSON.parse('') }
assert_raise(JSON::ParserError) { JSON.parse('', :quirks_mode => true) }
+ assert_raise(TypeError) { JSON.parse(nil) }
+ assert_raise(TypeError) { JSON.parse(nil, :quirks_mode => true) }
assert_raise(JSON::ParserError) { JSON.parse(' /* foo */ ') }
assert_raise(JSON::ParserError) { JSON.parse(' /* foo */ ', :quirks_mode => true) }
parser = JSON::Parser.new('null')