commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject cvs commit: jakarta-commons/lang/src/test/org/apache/commons/lang EntitiesTest.java
Date Sun, 29 Jun 2003 03:04:33 GMT
alex        2003/06/28 20:04:33

  Modified:    lang/src/test/org/apache/commons/lang EntitiesTest.java
  Log:
  testHtml40Nbsp
  
  Revision  Changes    Path
  1.6       +26 -10    jakarta-commons/lang/src/test/org/apache/commons/lang/EntitiesTest.java
  
  Index: EntitiesTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/test/org/apache/commons/lang/EntitiesTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EntitiesTest.java	24 May 2003 19:24:15 -0000	1.5
  +++ EntitiesTest.java	29 Jun 2003 03:04:33 -0000	1.6
  @@ -133,29 +133,35 @@
   
       public void testArrayIntMap() throws Exception
       {
  -        Entities.ArrayIntMap map = new Entities.ArrayIntMap(2);
  -        checkSomeIntMap(map);
  +        Entities.ArrayEntityMap map = new Entities.ArrayEntityMap(2);
  +        checkSomeEntityMap(map);
       }
   
       public void testTreeIntMap() throws Exception
       {
  -        Entities.IntMap map = new Entities.TreeIntMap();
  -        checkSomeIntMap(map);
  +        Entities.EntityMap map = new Entities.TreeEntityMap();
  +        checkSomeEntityMap(map);
       }
   
       public void testHashIntMap() throws Exception
       {
  -        Entities.IntMap map = new Entities.HashIntMap();
  -        checkSomeIntMap(map);
  +        Entities.EntityMap map = new Entities.HashEntityMap();
  +        checkSomeEntityMap(map);
       }
   
       public void testBinaryIntMap() throws Exception
       {
  -        Entities.BinaryIntMap map = new Entities.BinaryIntMap(2);
  -        checkSomeIntMap(map);
  +        Entities.BinaryEntityMap map = new Entities.BinaryEntityMap(2);
  +        checkSomeEntityMap(map);
       }
   
  -    private void checkSomeIntMap(Entities.IntMap map) {
  +    public void testPrimitiveIntMap() throws Exception
  +    {
  +        Entities.PrimitiveEntityMap map = new Entities.PrimitiveEntityMap();
  +        checkSomeEntityMap(map);
  +    }
  +
  +    private void checkSomeEntityMap(Entities.EntityMap map) {
           map.add("foo", 1);
           assertEquals(1, map.value("foo"));
           assertEquals("foo", map.name(1));
  @@ -164,5 +170,15 @@
           assertEquals(3, map.value("baz"));
           assertEquals("baz", map.name(3));
       }
  +
  +    public void testHtml40Nbsp() throws Exception
  +    {
  +        assertEquals(" ", Entities.HTML40.escape("\u00A0"));
  +        Entities e = new Entities();
  +        e.map = new Entities.PrimitiveEntityMap();
  +        Entities.fillWithHtml40Entities(e);
  +        assertEquals(" ", e.escape("\u00A0"));
  +    }
  +
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message