/[storm]/storm/org/nongnu/storm/BlockId.test
ViewVC logotype

Diff of /storm/org/nongnu/storm/BlockId.test

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11 by tuukkah, Fri Apr 25 12:46:34 2003 UTC revision 1.12 by tuukkah, Fri Apr 25 13:00:14 2003 UTC
# Line 90  def testMalformed(): Line 90  def testMalformed():
90  def testContentType():  def testContentType():
91      """Malformed content types must throw exceptions"""      """Malformed content types must throw exceptions"""
92    
93      BlockId(contenttest % 'text/html')      for ct in ['text/html',
94      BlockId(contenttest % 'a/a')                 'a/a',
95      BlockId(contenttest % 'x/x')                 'x/x']:
96            BlockId(contenttest % ct)
97      try: BlockId(contenttest % '/html')  
98      except java.lang.IllegalArgumentException: pass      for ct in ['/html',
99      else: assert 0                 'text/',
100                   '/',
101      try: BlockId(contenttest % 'text/')                 'text/html/myextension',
102      except java.lang.IllegalArgumentException: pass                 'mytype']:
103      else: assert 0          try: BlockId(contenttest % ct)
104            except java.lang.IllegalArgumentException: pass
105      try: BlockId(contenttest % '/')          else: assert 0
     except java.lang.IllegalArgumentException: pass  
     else: assert 0  
   
     try: BlockId(contenttest % 'text/html/myextension')  
     except java.lang.IllegalArgumentException: pass  
     else: assert 0  
   
     try: BlockId(contenttest % 'mytype')  
     except java.lang.IllegalArgumentException: pass  
     else: assert 0  
106    
107    
108  def testSpaces():  def testSpaces():

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26