javaclass

Changeset

125:61e69c94a1d5
2005-01-14 Paul Boddie raw files shortlog changelog graph Added tests of the StringBuffer class and of String object addition.
tests/StringBufferTest.java (file) tests/StringTest.java (file)
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tests/StringBufferTest.java	Fri Jan 14 00:49:31 2005 +0100
     1.3 @@ -0,0 +1,10 @@
     1.4 +public class StringBufferTest {
     1.5 +    StringBuffer sb1;
     1.6 +    StringBuffer sb2;
     1.7 +    String s;
     1.8 +    public StringBufferTest(String a, String b) {
     1.9 +        sb1 = new StringBuffer(a);
    1.10 +        sb2 = new StringBuffer(b);
    1.11 +        s = a + b;
    1.12 +    }
    1.13 +}
     2.1 --- a/tests/StringTest.java	Fri Jan 14 00:48:01 2005 +0100
     2.2 +++ b/tests/StringTest.java	Fri Jan 14 00:49:31 2005 +0100
     2.3 @@ -11,4 +11,8 @@
     2.4      public StringTest(String newString) {
     2.5          s = newString;
     2.6      }
     2.7 +
     2.8 +    public StringTest(String firstString, String secondString) {
     2.9 +        s = firstString + secondString;
    2.10 +    }
    2.11  }