PageRenderTime 50ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 0ms

/antlr-3.4/runtime/Ruby/test/unit/test-exceptions.rb

https://bitbucket.org/cyanogenmod/android_external_antlr
Ruby | 56 lines | 11 code | 7 blank | 38 comment | 0 complexity | 4cf2e02b6ba76973de07107449171814 MD5 | raw file
  1. #!/usr/bin/ruby
  2. # encoding: utf-8
  3. require 'antlr3'
  4. require 'test/unit'
  5. require 'spec'
  6. include ANTLR3::Error
  7. describe( ANTLR3::Error ) do
  8. example "raising an ANTLR bug exception" do
  9. proc {
  10. ANTLR3.bug!( 'whateva' )
  11. }.should raise_error( ANTLR3::Bug )
  12. end
  13. end
  14. #
  15. #class TestRecognitionError < Test::Unit::TestCase
  16. # def test_init_none
  17. # RecognitionError.new()
  18. # end
  19. #end
  20. #
  21. #class TestEarlyExit < Test::Unit::TestCase
  22. # def test_init_none
  23. # EarlyExit.new
  24. # end
  25. #end
  26. #
  27. #class TestMismatchedNotSet < Test::Unit::TestCase
  28. # def test_init_none
  29. # MismatchedNotSet.new
  30. # end
  31. #end
  32. #
  33. #class TestMismatchedRange < Test::Unit::TestCase
  34. # def test_init_none
  35. # MismatchedSet.new
  36. # end
  37. #end
  38. #
  39. #class TestMismatchedToken < Test::Unit::TestCase
  40. # def test_init_none
  41. # MismatchedToken.new
  42. # end
  43. #end
  44. #
  45. #class TestNoViableAlternative < Test::Unit::TestCase
  46. # def test_init_none
  47. # NoViableAlternative.new
  48. # end
  49. #end