Home | History | Annotate | Download | only in unit
      1 #!/usr/bin/ruby
      2 # encoding: utf-8
      3 
      4 require 'antlr3'
      5 require 'test/unit'
      6 require 'spec'
      7 
      8 include ANTLR3::Error
      9 
     10 describe( ANTLR3::Error ) do
     11   
     12   example "raising an ANTLR bug exception" do
     13     proc {
     14       ANTLR3.bug!( 'whateva' )
     15     }.should raise_error( ANTLR3::Bug )
     16   end
     17   
     18   
     19 end
     20 
     21 #
     22 #class TestRecognitionError < Test::Unit::TestCase
     23 #  def test_init_none
     24 #    RecognitionError.new()
     25 #  end
     26 #end
     27 #
     28 #class TestEarlyExit < Test::Unit::TestCase
     29 #  def test_init_none
     30 #    EarlyExit.new
     31 #  end
     32 #end
     33 #
     34 #class TestMismatchedNotSet  < Test::Unit::TestCase
     35 #  def test_init_none
     36 #    MismatchedNotSet.new
     37 #  end
     38 #end
     39 #
     40 #class TestMismatchedRange < Test::Unit::TestCase
     41 #  def test_init_none
     42 #    MismatchedSet.new
     43 #  end
     44 #end
     45 #
     46 #class TestMismatchedToken < Test::Unit::TestCase
     47 #  def test_init_none
     48 #    MismatchedToken.new
     49 #  end
     50 #end
     51 #
     52 #class TestNoViableAlternative < Test::Unit::TestCase
     53 #  def test_init_none
     54 #    NoViableAlternative.new
     55 #  end
     56 #end
     57