From fcbf63e62c627deae76c1b8cb8c0876c536ed811 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 16 Mar 2020 18:49:26 +0900 Subject: Fresh start --- jni/ruby/test/psych/test_class.rb | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 jni/ruby/test/psych/test_class.rb (limited to 'jni/ruby/test/psych/test_class.rb') diff --git a/jni/ruby/test/psych/test_class.rb b/jni/ruby/test/psych/test_class.rb new file mode 100644 index 0000000..c7f964c --- /dev/null +++ b/jni/ruby/test/psych/test_class.rb @@ -0,0 +1,36 @@ +require_relative 'helper' + +module Psych + class TestClass < TestCase + module Foo + end + + def test_cycle_anonymous_class + assert_raises(::TypeError) do + assert_cycle(Class.new) + end + end + + def test_cycle_anonymous_module + assert_raises(::TypeError) do + assert_cycle(Module.new) + end + end + + def test_cycle + assert_cycle(TestClass) + end + + def test_dump + Psych.dump TestClass + end + + def test_cycle_module + assert_cycle(Foo) + end + + def test_dump_module + Psych.dump Foo + end + end +end -- cgit v1.2.3