assertError (ParserTestCase)

    # File test/src/parser_test.rb, line 13
      def assertError(code, expected, parser, index=0, line=1, col=1+index)
        begin
          parser.parse(code)
          assert_fail("error should have happened")
          rescue ParserException => e
            assert_equal(index, e.index)
            msg = expected
            msg = add_encountered(msg, current(code,index)) << " at line #{line}, col #{col}." unless expected.include? 'at line'
            assert_equal(msg, e.message)
        end
      end