ws-xmlrpc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject cvs commit: xml-rpc/src/test/org/apache/xmlrpc Base64Test.java
Date Fri, 27 Sep 2002 23:40:42 GMT
dlr         2002/09/27 16:40:42

  Modified:    src/test/org/apache/xmlrpc Base64Test.java
  Log:
  o Added more test data and prints.
  
  o Switched String.valueOf() back to new String(), as the former causes
  problems.
  
  Revision  Changes    Path
  1.6       +6 -3      xml-rpc/src/test/org/apache/xmlrpc/Base64Test.java
  
  Index: Base64Test.java
  ===================================================================
  RCS file: /home/cvs/xml-rpc/src/test/org/apache/xmlrpc/Base64Test.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -u -r1.5 -r1.6
  --- Base64Test.java	27 Sep 2002 23:18:19 -0000	1.5
  +++ Base64Test.java	27 Sep 2002 23:40:42 -0000	1.6
  @@ -69,8 +69,9 @@
   {
       private static final String[] TEST_DATA =
       {
  -        "foobar   \t\r",
  +        "foobar",
           "foo bar",
  +        "foobar   \t\r",
           "foo bar\nbaz"
       };
   
  @@ -97,12 +98,14 @@
           {
               for (int i = 0; i < TEST_DATA.length; i++)
               {
  -                System.out.println("Test data: " + TEST_DATA[i]);
  +                System.out.println("Input data: '" + TEST_DATA[i] + "'");
                   byte[] raw = TEST_DATA[i].getBytes();
                   byte[] encoded = Base64.encode(raw);
                   byte[] decoded = Base64.decode(encoded);
  +                System.out.println("Encoded data: '" + new String(encoded) +
  +                                   "'");
                   assertEquals(raw, decoded);
  -                assertEquals(TEST_DATA[i], String.valueOf(decoded));
  +                assertEquals(TEST_DATA[i], new String(decoded));
               }
           }
           catch (Exception e)
  
  
  

Mime
View raw message