test_empty_enum.py (335B)
1 import WebIDL 2 3 4 def WebIDLTest(parser, harness): 5 try: 6 parser.parse( 7 """ 8 enum TestEmptyEnum { 9 }; 10 """ 11 ) 12 13 harness.ok(False, "Should have thrown!") 14 except WebIDL.WebIDLError: 15 harness.ok(True, "Parsing TestEmptyEnum enum should fail") 16 17 parser.finish()