/[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.7 by benja, Tue Apr 15 09:33:41 2003 UTC revision 1.8 by benja, Mon Apr 21 21:07:41 2003 UTC
# Line 59  def testConstructor(): Line 59  def testConstructor():
59      assert id != id3      assert id != id3
60      assert id.hashCode() != id3.hashCode()      assert id.hashCode() != id3.hashCode()
61    
62    def testSpaces():
63        """Spaces in content types must throw exceptions"""
64        str = ("urn:x-storm:1.0:%s,"
65               "u7uu5zpmkoeykkwhxd4unlqycc36gvl7."
66               "jtlcbiy2r6gfsznbgj42yzqbqk4ti373bqs5qyy")
67    
68        BlockId(str % 'text/plain;charset=UTF-8')
69    
70        try: BlockId(str % 'text/plain; charset=UTF-8')
71        except java.lang.IllegalArgumentException: pass
72        else: assert 0
73    
74        sha1 = com.bitzi.util.Base32.decode(
75            "u7uu5zpmkoeykkwhxd4unlqycc36gvl7")
76        tiger = com.bitzi.util.Base32.decode(
77            "jtlcbiy2r6gfsznbgj42yzqbqk4ti373bqs5qyy")
78        BlockId("text/plain;charset=UTF-8", sha1, tiger)
79    
80        try: BlockId("text/plain; charset=UTF-8", sha1, tiger)
81        except java.lang.IllegalArgumentException: pass
82        else: assert 0
83    
84    
85  def testXType():  def testXType():
86      """X- content types must throw exceptions"""      """X- content types must throw exceptions"""
87    

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8

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