inherited (ParseTreeTestCase)

    # File test/pt_testcase.rb, line 2333
      def self.inherited(c)
        output_name = c.name.to_s.sub(/^Test/, '')
        raise "Unknown class #{c} in @@testcase_order" unless
          @@testcase_order.include? output_name

        input_name = self.previous(output_name)

        @@testcases.each do |node, data|
          next if [:skip, :unsupported].include? data[input_name]
          next if data[output_name] == :skip

          c.send(:define_method, "test_#{node}".intern) do
            flunk "Processor is nil" if processor.nil?
            assert data.has_key?(input_name), "Unknown input data"
            unless data.has_key?(output_name) then
              $stderr.puts "add_test(#{node.inspect}, :same)"
            end
            assert data.has_key?(output_name), "Missing test data: #{self.class} #{node}"
            input = data[input_name].deep_clone

            expected = if data[output_name] == :same then
                         input
                       else
                         data[output_name]
                       end.deep_clone

            case expected
            when :unsupported then
              assert_raises(UnsupportedNodeError) do
                processor.process(input)
              end
            else
              extra_expected = []
              extra_input = []

              _, expected, extra_expected = *expected if Array === expected and expected.first == :defx
              _, input, extra_input = *input if Array === input and input.first == :defx

              debug = input.deep_clone
              $-w = nil if node == "match"
              assert_equal expected, processor.process(input), "failed on input: #{debug.inspect}"
              $-w = true if node == "match"
              extra_input.each do |input| processor.process(input) end
              extra = processor.extra_methods rescue []
              assert_equal extra_expected, extra
            end
          end
        end
      end