harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r386058 [21/49] - in /incubator/harmony/enhanced/classlib/trunk: make/ modules/archive/make/common/ modules/archive/src/test/java/tests/ modules/archive/src/test/java/tests/api/ modules/archive/src/test/java/tests/api/java/ modules/archive/...
Date Wed, 15 Mar 2006 11:47:39 GMT
Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/ShortTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/ShortTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/ShortTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/ShortTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,474 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.lang;
+
+public class ShortTest extends junit.framework.TestCase {
+
+	Short sp = new Short((short) 18000);
+
+	Short sp2 = new Short((short) 18000);
+
+	Short sn = new Short((short) -19000);
+
+	/**
+	 * @tests java.lang.Short#Short(java.lang.String)
+	 */
+	public void test_ConstructorLjava_lang_String() {
+		// Test for method java.lang.Short(java.lang.String)
+
+		Short s = new Short("-19000");
+		assertTrue("Incorrect Short created", s.shortValue() == (short) -19000);
+	}
+
+	/**
+	 * @tests java.lang.Short#Short(short)
+	 */
+	public void test_ConstructorS() {
+		// Test for method java.lang.Short(short)
+		Short s = new Short((short) 32746);
+
+		assertTrue("Incorrect Short created", s.shortValue() == (short) 32746);
+	}
+
+	/**
+	 * @tests java.lang.Short#byteValue()
+	 */
+	public void test_byteValue() {
+		// Test for method byte java.lang.Short.byteValue()
+		assertTrue("Returned incorrect byte value", new Short(Short.MIN_VALUE)
+				.byteValue() == 0);
+		assertTrue("Returned incorrect byte value", new Short(Short.MAX_VALUE)
+				.byteValue() == -1);
+	}
+
+	/**
+	 * @tests java.lang.Short#compareTo(java.lang.Object)
+	 */
+	public void test_compareToLjava_lang_Object() {
+		// Test for method int java.lang.Short.compareTo(java.lang.Object)
+		Short s = new Short((short) 1);
+		Object x = new Short((short) 3);
+		assertTrue(
+				"Should have returned negative value when compared to greater short",
+				s.compareTo(x) < 0);
+		x = new Short((short) -1);
+		assertTrue(
+				"Should have returned positive value when compared to lesser short",
+				s.compareTo(x) > 0);
+		x = new Short((short) 1);
+		assertTrue("Should have returned zero when compared to equal short", s
+				.compareTo(x) == 0);
+		x = "5";
+		try {
+			s.compareTo(x);
+		} catch (ClassCastException e) {
+			// correct
+			return;
+		}
+		fail(
+				"Should have thrown ClassCastException when compared to non-short");
+	}
+
+	/**
+	 * @tests java.lang.Short#compareTo(java.lang.Short)
+	 */
+	public void test_compareToLjava_lang_Short() {
+		// Test for method int java.lang.Short.compareTo(java.lang.Short)
+		Short s = new Short((short) 1);
+		Short x = new Short((short) 3);
+		assertTrue(
+				"Should have returned negative value when compared to greater short",
+				s.compareTo(x) < 0);
+		x = new Short((short) -1);
+		assertTrue(
+				"Should have returned positive value when compared to lesser short",
+				s.compareTo(x) > 0);
+		x = new Short((short) 1);
+		assertTrue("Should have returned zero when compared to equal short", s
+				.compareTo(x) == 0);
+	}
+
+	/**
+	 * @tests java.lang.Short#decode(java.lang.String)
+	 */
+	public void test_decodeLjava_lang_String() {
+		// Test for method java.lang.Short
+		// java.lang.Short.decode(java.lang.String)
+		assertTrue("Did not decode -1 correctly", Short.decode("-1")
+				.shortValue() == (short) -1);
+		assertTrue("Did not decode -100 correctly", Short.decode("-100")
+				.shortValue() == (short) -100);
+		assertTrue("Did not decode 23 correctly", Short.decode("23")
+				.shortValue() == (short) 23);
+		assertTrue("Did not decode 0x10 correctly", Short.decode("0x10")
+				.shortValue() == (short) 16);
+		assertTrue("Did not decode 32767 correctly", Short.decode("32767")
+				.shortValue() == (short) 32767);
+		assertTrue("Did not decode -32767 correctly", Short.decode("-32767")
+				.shortValue() == (short) -32767);
+		assertTrue("Did not decode -32768 correctly", Short.decode("-32768")
+				.shortValue() == (short) -32768);
+
+		boolean exception = false;
+		try {
+			Short.decode("123s");
+		} catch (NumberFormatException e) {
+			// correct
+			exception = true;
+		}
+		assertTrue("Did not throw NumberFormatException decoding 123s",
+				exception);
+
+		exception = false;
+		try {
+			Short.decode("32768");
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for MAX_VALUE + 1", exception);
+
+		exception = false;
+		try {
+			Short.decode("-32769");
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for MIN_VALUE - 1", exception);
+
+		exception = false;
+		try {
+			Short.decode("0x8000");
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for hex MAX_VALUE + 1", exception);
+
+		exception = false;
+		try {
+			Short.decode("-0x8001");
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for hex MIN_VALUE - 1", exception);
+	}
+
+	/**
+	 * @tests java.lang.Short#doubleValue()
+	 */
+	public void test_doubleValue() {
+		// Test for method double java.lang.Short.doubleValue()
+		assertTrue("Returned incorrect double value",
+				new Short(Short.MIN_VALUE).doubleValue() == -32768.0);
+		assertTrue("Returned incorrect double value",
+				new Short(Short.MAX_VALUE).doubleValue() == 32767.0);
+	}
+
+	/**
+	 * @tests java.lang.Short#equals(java.lang.Object)
+	 */
+	public void test_equalsLjava_lang_Object() {
+		// Test for method boolean java.lang.Short.equals(java.lang.Object)
+		;
+		assertTrue("Equality test failed", sp.equals(sp2)
+				&& !(sp.equals(new Object())));
+	}
+
+	/**
+	 * @tests java.lang.Short#floatValue()
+	 */
+	public void test_floatValue() {
+		// Test for method float java.lang.Short.floatValue()
+		assertTrue("Returned incorrect float value", new Short(Short.MIN_VALUE)
+				.floatValue() == -32768.0f);
+		assertTrue("Returned incorrect float value", new Short(Short.MAX_VALUE)
+				.floatValue() == 32767.0f);
+	}
+
+	/**
+	 * @tests java.lang.Short#hashCode()
+	 */
+	public void test_hashCode() {
+		// Test for method int java.lang.Short.hashCode()
+
+		int phash = new Short(Short.MAX_VALUE).hashCode();
+		int nhash = new Short(Short.MIN_VALUE).hashCode();
+		assertTrue("Incorrect hash obtained", Short.MAX_VALUE == phash
+				&& (Short.MIN_VALUE == nhash));
+	}
+
+	/**
+	 * @tests java.lang.Short#intValue()
+	 */
+	public void test_intValue() {
+		// Test for method int java.lang.Short.intValue()
+		assertTrue("Returned incorrect int value", new Short(Short.MIN_VALUE)
+				.intValue() == -32768);
+		assertTrue("Returned incorrect int value", new Short(Short.MAX_VALUE)
+				.intValue() == 32767);
+	}
+
+	/**
+	 * @tests java.lang.Short#longValue()
+	 */
+	public void test_longValue() {
+		// Test for method long java.lang.Short.longValue()
+		assertTrue("Returned incorrect long value", new Short(Short.MIN_VALUE)
+				.longValue() == -32768);
+		assertTrue("Returned incorrect long value", new Short(Short.MAX_VALUE)
+				.longValue() == 32767);
+	}
+
+	/**
+	 * @tests java.lang.Short#parseShort(java.lang.String)
+	 */
+	public void test_parseShortLjava_lang_String() {
+		// Test for method short java.lang.Short.parseShort(java.lang.String)
+		short sp = Short.parseShort("32746");
+		short sn = Short.parseShort("-32746");
+
+		assertTrue("Incorrect parse of short", sp == (short) 32746
+				&& (sn == (short) -32746));
+		assertTrue("Returned incorrect value for 0", Short.parseShort("0") == 0);
+		assertTrue("Returned incorrect value for most negative value", Short
+				.parseShort("-32768") == (short) 0x8000);
+		assertTrue("Returned incorrect value for most positive value", Short
+				.parseShort("32767") == 0x7fff);
+
+		boolean exception = false;
+		try {
+			Short.parseShort("32768");
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for MAX_VALUE + 1", exception);
+
+		exception = false;
+		try {
+			Short.parseShort("-32769");
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for MIN_VALUE - 1", exception);
+	}
+
+	/**
+	 * @tests java.lang.Short#parseShort(java.lang.String, int)
+	 */
+	public void test_parseShortLjava_lang_StringI() {
+		// Test for method short java.lang.Short.parseShort(java.lang.String,
+		// int)
+		boolean aThrow = true;
+		assertTrue("Incorrectly parsed hex string",
+				Short.parseShort("FF", 16) == 255);
+		assertTrue("Incorrectly parsed oct string",
+				Short.parseShort("20", 8) == 16);
+		assertTrue("Incorrectly parsed dec string",
+				Short.parseShort("20", 10) == 20);
+		assertTrue("Incorrectly parsed bin string",
+				Short.parseShort("100", 2) == 4);
+		assertTrue("Incorrectly parsed -hex string", Short
+				.parseShort("-FF", 16) == -255);
+		assertTrue("Incorrectly parsed -oct string",
+				Short.parseShort("-20", 8) == -16);
+		assertTrue("Incorrectly parsed -bin string", Short
+				.parseShort("-100", 2) == -4);
+		assertTrue("Returned incorrect value for 0 hex", Short.parseShort("0",
+				16) == 0);
+		assertTrue("Returned incorrect value for most negative value hex",
+				Short.parseShort("-8000", 16) == (short) 0x8000);
+		assertTrue("Returned incorrect value for most positive value hex",
+				Short.parseShort("7fff", 16) == 0x7fff);
+		assertTrue("Returned incorrect value for 0 decimal", Short.parseShort(
+				"0", 10) == 0);
+		assertTrue("Returned incorrect value for most negative value decimal",
+				Short.parseShort("-32768", 10) == (short) 0x8000);
+		assertTrue("Returned incorrect value for most positive value decimal",
+				Short.parseShort("32767", 10) == 0x7fff);
+
+		try {
+			Short.parseShort("FF", 2);
+		} catch (NumberFormatException e) {
+			// Correct
+			aThrow = false;
+		}
+		if (aThrow)
+			fail(
+					"Failed to throw exception when passed hex string and base 2 radix");
+
+		boolean exception = false;
+		try {
+			Short.parseShort("10000000000", 10);
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue(
+				"Failed to throw exception when passed string larger than 16 bits",
+				exception);
+
+		exception = false;
+		try {
+			Short.parseShort("32768", 10);
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for MAX_VALUE + 1", exception);
+
+		exception = false;
+		try {
+			Short.parseShort("-32769", 10);
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for MIN_VALUE - 1", exception);
+
+		exception = false;
+		try {
+			Short.parseShort("8000", 16);
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for hex MAX_VALUE + 1", exception);
+
+		exception = false;
+		try {
+			Short.parseShort("-8001", 16);
+		} catch (NumberFormatException e) {
+			// Correct
+			exception = true;
+		}
+		assertTrue("Failed to throw exception for hex MIN_VALUE + 1", exception);
+	}
+
+	/**
+	 * @tests java.lang.Short#shortValue()
+	 */
+	public void test_shortValue() {
+		// Test for method short java.lang.Short.shortValue()
+		assertTrue("Comparison to primitive type failed",
+				sp.shortValue() == (short) 18000
+						&& (sn.shortValue() == (short) -19000));
+	}
+
+	/**
+	 * @tests java.lang.Short#toString()
+	 */
+	public void test_toString() {
+		// Test for method java.lang.String java.lang.Short.toString()
+		assertTrue("Invalid string returned", sp.toString().equals("18000")
+				&& (sn.toString().equals("-19000")));
+		assertTrue("Returned incorrect string", new Short((short) 32767)
+				.toString().equals("32767"));
+		assertTrue("Returned incorrect string", new Short((short) -32767)
+				.toString().equals("-32767"));
+		assertTrue("Returned incorrect string", new Short((short) -32768)
+				.toString().equals("-32768"));
+	}
+
+	/**
+	 * @tests java.lang.Short#toString(short)
+	 */
+	public void test_toStringS() {
+		// Test for method java.lang.String java.lang.Short.toString(short)
+		assertTrue("Returned incorrect string", Short.toString((short) 32767)
+				.equals("32767"));
+		assertTrue("Returned incorrect string", Short.toString((short) -32767)
+				.equals("-32767"));
+		assertTrue("Returned incorrect string", Short.toString((short) -32768)
+				.equals("-32768"));
+	}
+
+	/**
+	 * @tests java.lang.Short#valueOf(java.lang.String)
+	 */
+	public void test_valueOfLjava_lang_String() {
+		// Test for method java.lang.Short
+		// java.lang.Short.valueOf(java.lang.String)
+		assertTrue("Returned incorrect short", Short.valueOf("-32768")
+				.shortValue() == -32768);
+		assertTrue("Returned incorrect short", Short.valueOf("32767")
+				.shortValue() == 32767);
+	}
+
+	/**
+	 * @tests java.lang.Short#valueOf(java.lang.String, int)
+	 */
+	public void test_valueOfLjava_lang_StringI() {
+		// Test for method java.lang.Short
+		// java.lang.Short.valueOf(java.lang.String, int)
+		boolean aThrow = true;
+		assertTrue("Incorrectly parsed hex string", Short.valueOf("FF", 16)
+				.shortValue() == 255);
+		assertTrue("Incorrectly parsed oct string", Short.valueOf("20", 8)
+				.shortValue() == 16);
+		assertTrue("Incorrectly parsed dec string", Short.valueOf("20", 10)
+				.shortValue() == 20);
+		assertTrue("Incorrectly parsed bin string", Short.valueOf("100", 2)
+				.shortValue() == 4);
+		assertTrue("Incorrectly parsed -hex string", Short.valueOf("-FF", 16)
+				.shortValue() == -255);
+		assertTrue("Incorrectly parsed -oct string", Short.valueOf("-20", 8)
+				.shortValue() == -16);
+		assertTrue("Incorrectly parsed -bin string", Short.valueOf("-100", 2)
+				.shortValue() == -4);
+		assertTrue("Did not decode 32767 correctly", Short.valueOf("32767", 10)
+				.shortValue() == (short) 32767);
+		assertTrue("Did not decode -32767 correctly", Short.valueOf("-32767",
+				10).shortValue() == (short) -32767);
+		assertTrue("Did not decode -32768 correctly", Short.valueOf("-32768",
+				10).shortValue() == (short) -32768);
+		try {
+			Short.valueOf("FF", 2);
+		} catch (NumberFormatException e) {
+			// Correct
+			aThrow = false;
+		}
+		if (aThrow)
+			fail(
+					"Failed to throw exception when passed hex string and base 2 radix");
+		try {
+			Short.valueOf("10000000000", 10);
+		} catch (NumberFormatException e) {
+			// Correct
+			return;
+		}
+		fail(
+				"Failed to throw exception when passed string larger than 16 bits");
+	}
+
+	/**
+	 * Sets up the fixture, for example, open a network connection. This method
+	 * is called before a test is executed.
+	 */
+	protected void setUp() {
+	}
+
+	/**
+	 * Tears down the fixture, for example, close a network connection. This
+	 * method is called after a test is executed.
+	 */
+	protected void tearDown() {
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StackOverflowErrorTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StackOverflowErrorTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StackOverflowErrorTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StackOverflowErrorTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,73 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.lang;
+
+public class StackOverflowErrorTest extends junit.framework.TestCase {
+
+	/**
+	 * @tests java.lang.StackOverflowError#StackOverflowError()
+	 */
+	public void test_Constructor() {
+		// Test for method java.lang.StackOverflowError()
+		new StackOverflowError();
+		try {
+			this.createOverflow();
+		} catch (StackOverflowError e) {
+			return;
+		}
+		fail("Failed to generate stack overflow");
+	}
+
+	/**
+	 * @tests java.lang.StackOverflowError#StackOverflowError(java.lang.String)
+	 */
+	public void test_ConstructorLjava_lang_String() {
+		// Test for method java.lang.StackOverflowError(java.lang.String)
+		new StackOverflowError();
+		try {
+			this.createOverflow();
+		} catch (StackOverflowError e) {
+			return;
+		}
+		fail("Failed to generate stack overflow");
+	}
+
+	/**
+	 * Sets up the fixture, for example, open a network connection. This method
+	 * is called before a test is executed.
+	 */
+	protected void setUp() {
+	}
+
+	/**
+	 * Tears down the fixture, for example, close a network connection. This
+	 * method is called after a test is executed.
+	 */
+	protected void tearDown() {
+	}
+
+	/**
+	 * 
+	 */
+	protected int createOverflow() {
+		this.createOverflow();
+		return dummy() + 1;
+	}
+
+	protected int dummy() {
+		return 0;
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StrictMathTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StrictMathTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StrictMathTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StrictMathTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,414 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.lang;
+
+public class StrictMathTest extends junit.framework.TestCase {
+
+	double HYP = StrictMath.sqrt(2.0);
+
+	double OPP = 1.0;
+
+	double ADJ = 1.0;
+
+	/* Required to make previous preprocessor flags work - do not remove */
+	int unused = 0;
+
+	/**
+	 * @tests java.lang.StrictMath#abs(double)
+	 */
+	public void test_absD() {
+		// Test for method double java.lang.StrictMath.abs(double)
+
+		assertTrue("Incorrect double abs value",
+				(StrictMath.abs(-1908.8976) == 1908.8976));
+		assertTrue("Incorrect double abs value",
+				(StrictMath.abs(1908.8976) == 1908.8976));
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#abs(float)
+	 */
+	public void test_absF() {
+		// Test for method float java.lang.StrictMath.abs(float)
+		assertTrue("Incorrect float abs value",
+				(StrictMath.abs(-1908.8976f) == 1908.8976f));
+		assertTrue("Incorrect float abs value",
+				(StrictMath.abs(1908.8976f) == 1908.8976f));
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#abs(int)
+	 */
+	public void test_absI() {
+		// Test for method int java.lang.StrictMath.abs(int)
+		assertTrue("Incorrect int abs value",
+				(StrictMath.abs(-1908897) == 1908897));
+		assertTrue("Incorrect int abs value",
+				(StrictMath.abs(1908897) == 1908897));
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#abs(long)
+	 */
+	public void test_absJ() {
+		// Test for method long java.lang.StrictMath.abs(long)
+		assertTrue("Incorrect long abs value", (StrictMath
+				.abs(-19088976000089L) == 19088976000089L));
+		assertTrue("Incorrect long abs value",
+				(StrictMath.abs(19088976000089L) == 19088976000089L));
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#acos(double)
+	 */
+	public void test_acosD() {
+		// Test for method double java.lang.StrictMath.acos(double)
+		assertTrue("Returned incorrect arc cosine", StrictMath.cos(StrictMath
+				.acos(ADJ / HYP)) == ADJ / HYP);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#asin(double)
+	 */
+	public void test_asinD() {
+		// Test for method double java.lang.StrictMath.asin(double)
+		assertTrue("Returned incorrect arc sine", StrictMath.sin(StrictMath
+				.asin(OPP / HYP)) == OPP / HYP);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#atan(double)
+	 */
+	public void test_atanD() {
+		// Test for method double java.lang.StrictMath.atan(double)
+		double answer = StrictMath.tan(StrictMath.atan(1.0));
+		assertTrue("Returned incorrect arc tangent: " + answer, answer <= 1.0
+				&& answer >= 9.9999999999999983E-1);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#atan2(double, double)
+	 */
+	public void test_atan2DD() {
+		// Test for method double java.lang.StrictMath.atan2(double, double)
+		double answer = StrictMath.atan(StrictMath.tan(1.0));
+		assertTrue("Returned incorrect arc tangent: " + answer, answer <= 1.0
+				&& answer >= 9.9999999999999983E-1);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#ceil(double)
+	 */
+	public void test_ceilD() {
+		// Test for method double java.lang.StrictMath.ceil(double)
+		assertTrue("Incorrect ceiling for double", StrictMath.ceil(78.89) == 79);
+		assertTrue("Incorrect ceiling for double",
+				StrictMath.ceil(-78.89) == -78);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#cos(double)
+	 */
+	public void test_cosD() {
+		// Test for method double java.lang.StrictMath.cos(double)
+
+		assertTrue("Returned incorrect cosine", StrictMath.cos(StrictMath
+				.acos(ADJ / HYP)) == ADJ / HYP);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#exp(double)
+	 */
+	public void test_expD() {
+		// Test for method double java.lang.StrictMath.exp(double)
+		assertTrue("Incorrect answer returned for simple power", StrictMath
+				.abs(StrictMath.exp(4D) - StrictMath.E * StrictMath.E
+						* StrictMath.E * StrictMath.E) < 0.1D);
+		assertTrue("Incorrect answer returned for larger power", StrictMath
+				.log(StrictMath.abs(StrictMath.exp(5.5D)) - 5.5D) < 10.0D);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#floor(double)
+	 */
+	public void test_floorD() {
+		// Test for method double java.lang.StrictMath.floor(double)
+		assertTrue("Incorrect floor for double", StrictMath.floor(78.89) == 78);
+		assertTrue("Incorrect floor for double",
+				StrictMath.floor(-78.89) == -79);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#IEEEremainder(double, double)
+	 */
+	public void test_IEEEremainderDD() {
+		// Test for method double java.lang.StrictMath.IEEEremainder(double,
+		// double)
+		assertTrue("Incorrect remainder returned", StrictMath.IEEEremainder(
+				1.0, 1.0) == 0.0);
+		assertTrue(
+				"Incorrect remainder returned",
+				StrictMath.IEEEremainder(1.32, 89.765) >= 1.4705063220631647E-2
+						|| StrictMath.IEEEremainder(1.32, 89.765) >= 1.4705063220631649E-2);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#log(double)
+	 */
+	public void test_logD() {
+		// Test for method double java.lang.StrictMath.log(double)
+		for (double d = 10; d >= -10; d -= 0.5) {
+			double answer = StrictMath.log(StrictMath.exp(d));
+			assertTrue("Answer does not equal expected answer for d = " + d
+					+ " answer = " + answer,
+					StrictMath.abs(answer - d) <= StrictMath
+							.abs(d * 0.00000001));
+		}
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#max(double, double)
+	 */
+	public void test_maxDD() {
+		// Test for method double java.lang.StrictMath.max(double, double)
+		assertTrue("Incorrect double max value", StrictMath.max(
+				-1908897.6000089, 1908897.6000089) == 1908897.6000089);
+		assertTrue("Incorrect double max value", StrictMath.max(2.0,
+				1908897.6000089) == 1908897.6000089);
+		assertTrue("Incorrect double max value", StrictMath.max(-2.0,
+				-1908897.6000089) == -2.0);
+
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#max(float, float)
+	 */
+	public void test_maxFF() {
+		// Test for method float java.lang.StrictMath.max(float, float)
+		assertTrue("Incorrect float max value", StrictMath.max(-1908897.600f,
+				1908897.600f) == 1908897.600f);
+		assertTrue("Incorrect float max value", StrictMath.max(2.0f,
+				1908897.600f) == 1908897.600f);
+		assertTrue("Incorrect float max value", StrictMath.max(-2.0f,
+				-1908897.600f) == -2.0f);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#max(int, int)
+	 */
+	public void test_maxII() {
+		// Test for method int java.lang.StrictMath.max(int, int)
+		assertTrue("Incorrect int max value", StrictMath.max(-19088976,
+				19088976) == 19088976);
+		assertTrue("Incorrect int max value",
+				StrictMath.max(20, 19088976) == 19088976);
+		assertTrue("Incorrect int max value",
+				StrictMath.max(-20, -19088976) == -20);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#max(long, long)
+	 */
+	public void test_maxJJ() {
+		// Test for method long java.lang.StrictMath.max(long, long)
+		assertTrue("Incorrect long max value", StrictMath.max(-19088976000089L,
+				19088976000089L) == 19088976000089L);
+		assertTrue("Incorrect long max value", StrictMath.max(20,
+				19088976000089L) == 19088976000089L);
+		assertTrue("Incorrect long max value", StrictMath.max(-20,
+				-19088976000089L) == -20);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#min(double, double)
+	 */
+	public void test_minDD() {
+		// Test for method double java.lang.StrictMath.min(double, double)
+		assertTrue("Incorrect double min value", StrictMath.min(
+				-1908897.6000089, 1908897.6000089) == -1908897.6000089);
+		assertTrue("Incorrect double min value", StrictMath.min(2.0,
+				1908897.6000089) == 2.0);
+		assertTrue("Incorrect double min value", StrictMath.min(-2.0,
+				-1908897.6000089) == -1908897.6000089);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#min(float, float)
+	 */
+	public void test_minFF() {
+		// Test for method float java.lang.StrictMath.min(float, float)
+		assertTrue("Incorrect float min value", StrictMath.min(-1908897.600f,
+				1908897.600f) == -1908897.600f);
+		assertTrue("Incorrect float min value", StrictMath.min(2.0f,
+				1908897.600f) == 2.0f);
+		assertTrue("Incorrect float min value", StrictMath.min(-2.0f,
+				-1908897.600f) == -1908897.600f);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#min(int, int)
+	 */
+	public void test_minII() {
+		// Test for method int java.lang.StrictMath.min(int, int)
+		assertTrue("Incorrect int min value", StrictMath.min(-19088976,
+				19088976) == -19088976);
+		assertTrue("Incorrect int min value",
+				StrictMath.min(20, 19088976) == 20);
+		assertTrue("Incorrect int min value",
+				StrictMath.min(-20, -19088976) == -19088976);
+
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#min(long, long)
+	 */
+	public void test_minJJ() {
+		// Test for method long java.lang.StrictMath.min(long, long)
+		assertTrue("Incorrect long min value", StrictMath.min(-19088976000089L,
+				19088976000089L) == -19088976000089L);
+		assertTrue("Incorrect long min value", StrictMath.min(20,
+				19088976000089L) == 20);
+		assertTrue("Incorrect long min value", StrictMath.min(-20,
+				-19088976000089L) == -19088976000089L);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#pow(double, double)
+	 */
+	public void test_powDD() {
+		// Test for method double java.lang.StrictMath.pow(double, double)
+		assertTrue("pow returned incorrect value",
+				(long) StrictMath.pow(2, 8) == 256l);
+		assertTrue("pow returned incorrect value",
+				StrictMath.pow(2, -8) == 0.00390625d);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#rint(double)
+	 */
+	public void test_rintD() {
+		// Test for method double java.lang.StrictMath.rint(double)
+		assertTrue("Failed to round properly - up to odd",
+				StrictMath.rint(2.9) == 3.0);
+		assertTrue("Failed to round properly - NaN", Double.isNaN(StrictMath
+				.rint(Double.NaN)));
+		assertTrue("Failed to round properly down  to even", StrictMath
+				.rint(2.1) == 2.0);
+		assertTrue("Failed to round properly " + 2.5 + " to even", StrictMath
+				.rint(2.5) == 2.0);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#round(double)
+	 */
+	public void test_roundD() {
+		// Test for method long java.lang.StrictMath.round(double)
+		assertTrue("Incorrect rounding of a float",
+				StrictMath.round(-90.89d) == -91);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#round(float)
+	 */
+	public void test_roundF() {
+		// Test for method int java.lang.StrictMath.round(float)
+		assertTrue("Incorrect rounding of a float",
+				StrictMath.round(-90.89f) == -91);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#sin(double)
+	 */
+	public void test_sinD() {
+		// Test for method double java.lang.StrictMath.sin(double)
+		assertTrue("Returned incorrect sine", StrictMath.sin(StrictMath
+				.asin(OPP / HYP)) == OPP / HYP);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#sqrt(double)
+	 */
+	public void test_sqrtD() {
+		// Test for method double java.lang.StrictMath.sqrt(double)
+		assertTrue("Incorrect root returned1", StrictMath.sqrt(StrictMath.pow(
+				StrictMath.sqrt(2), 4)) == 2);
+		assertTrue("Incorrect root returned2", StrictMath.sqrt(49) == 7);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#tan(double)
+	 */
+	public void test_tanD() {
+		// Test for method double java.lang.StrictMath.tan(double)
+		assertTrue(
+				"Returned incorrect tangent: ",
+				StrictMath.tan(StrictMath.atan(1.0)) <= 1.0
+						|| StrictMath.tan(StrictMath.atan(1.0)) >= 9.9999999999999983E-1);
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#random()
+	 */
+	public void test_random() {
+		// There isn't a place for these tests so just stick them here
+		assertTrue("Wrong value E",
+				Double.doubleToLongBits(StrictMath.E) == 4613303445314885481L);
+		assertTrue("Wrong value PI",
+				Double.doubleToLongBits(StrictMath.PI) == 4614256656552045848L);
+
+		for (int i = 500; i >= 0; i--) {
+			double d = StrictMath.random();
+			assertTrue("Generated number is out of range: " + d, d >= 0.0
+					&& d < 1.0);
+		}
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#toRadians(double)
+	 */
+	public void test_toRadiansD() {
+		for (double d = 500; d >= 0; d -= 1.0) {
+			double converted = StrictMath.toDegrees(StrictMath.toRadians(d));
+			assertTrue("Converted number not equal to original. d = " + d,
+					converted >= d * 0.99999999 && converted <= d * 1.00000001);
+		}
+	}
+
+	/**
+	 * @tests java.lang.StrictMath#toDegrees(double)
+	 */
+	public void test_toDegreesD() {
+		for (double d = 500; d >= 0; d -= 1.0) {
+			double converted = StrictMath.toRadians(StrictMath.toDegrees(d));
+			assertTrue("Converted number not equal to original. d = " + d,
+					converted >= d * 0.99999999 && converted <= d * 1.00000001);
+		}
+	}
+
+	/**
+	 * Sets up the fixture, for example, open a network connection. This method
+	 * is called before a test is executed.
+	 */
+	protected void setUp() {
+	}
+
+	/**
+	 * Tears down the fixture, for example, close a network connection. This
+	 * method is called after a test is executed.
+	 */
+	protected void tearDown() {
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringBufferTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringBufferTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringBufferTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringBufferTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,617 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.lang;
+
+public class StringBufferTest extends junit.framework.TestCase {
+
+	StringBuffer testBuffer;
+
+	/**
+	 * @tests java.lang.StringBuffer#StringBuffer()
+	 */
+	public void test_Constructor() {
+		// Test for method java.lang.StringBuffer()
+		new StringBuffer();
+		assertTrue("Invalid buffer created", true);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#StringBuffer(int)
+	 */
+	public void test_ConstructorI() {
+		// Test for method java.lang.StringBuffer(int)
+		StringBuffer sb = new StringBuffer(8);
+		assertTrue("Newly constructed buffer is of incorrect length", sb
+				.length() == 0);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#StringBuffer(java.lang.String)
+	 */
+	public void test_ConstructorLjava_lang_String() {
+		// Test for method java.lang.StringBuffer(java.lang.String)
+
+		StringBuffer sb = new StringBuffer("HelloWorld");
+
+		assertTrue("Invalid buffer created", sb.length() == 10
+				&& (sb.toString().equals("HelloWorld")));
+
+		boolean pass = false;
+		try {
+			new StringBuffer(null);
+		} catch (NullPointerException e) {
+			pass = true;
+		}
+		assertTrue("Should throw NullPointerException", pass);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(char[])
+	 */
+	public void test_append$C() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(char [])
+		char buf[] = new char[4];
+		"char".getChars(0, 4, buf, 0);
+		testBuffer.append(buf);
+		assertTrue("Append of char[] failed", testBuffer.toString().equals(
+				"This is a test bufferchar"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(char[], int, int)
+	 */
+	public void test_append$CII() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(char [], int, int)
+		StringBuffer sb = new StringBuffer();
+		char[] buf1 = { 'H', 'e', 'l', 'l', 'o' };
+		char[] buf2 = { 'W', 'o', 'r', 'l', 'd' };
+		sb.append(buf1, 0, buf1.length);
+		assertTrue("Buffer is invalid length after append", sb.length() == 5);
+		sb.append(buf2, 0, buf2.length);
+		assertTrue("Buffer is invalid length after append", sb.length() == 10);
+		assertTrue("Buffer contains invalid chars", (sb.toString()
+				.equals("HelloWorld")));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(char)
+	 */
+	public void test_appendC() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(char)
+		StringBuffer sb = new StringBuffer();
+		char buf1 = 'H';
+		char buf2 = 'W';
+		sb.append(buf1);
+		assertTrue("Buffer is invalid length after append", sb.length() == 1);
+		sb.append(buf2);
+		assertTrue("Buffer is invalid length after append", sb.length() == 2);
+		assertTrue("Buffer contains invalid chars",
+				(sb.toString().equals("HW")));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(double)
+	 */
+	public void test_appendD() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(double)
+		StringBuffer sb = new StringBuffer();
+		sb.append(Double.MAX_VALUE);
+		assertTrue("Buffer is invalid length after append", sb.length() == 22);
+		assertTrue("Buffer contains invalid characters", sb.toString().equals(
+				"1.7976931348623157E308"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(float)
+	 */
+	public void test_appendF() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(float)
+		StringBuffer sb = new StringBuffer();
+		final float floatNum = 900.87654F;
+		sb.append(floatNum);
+		assertTrue("Buffer is invalid length after append: " + sb.length(), sb
+				.length() == String.valueOf(floatNum).length());
+		assertTrue("Buffer contains invalid characters", sb.toString().equals(
+				String.valueOf(floatNum)));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(int)
+	 */
+	public void test_appendI() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(int)
+		StringBuffer sb = new StringBuffer();
+		sb.append(9000);
+		assertTrue("Buffer is invalid length after append", sb.length() == 4);
+		sb.append(1000);
+		assertTrue("Buffer is invalid length after append", sb.length() == 8);
+		assertTrue("Buffer contains invalid characters", sb.toString().equals(
+				"90001000"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(long)
+	 */
+	public void test_appendJ() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(long)
+
+		StringBuffer sb = new StringBuffer();
+		long t = 927654321098L;
+		sb.append(t);
+		assertTrue("Buffer is of invlaid length", sb.length() == 12);
+		assertTrue("Buffer contains invalid characters", sb.toString().equals(
+				"927654321098"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(java.lang.Object)
+	 */
+	public void test_appendLjava_lang_Object() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(java.lang.Object)
+		StringBuffer sb = new StringBuffer();
+		Object obj1 = new Object();
+		Object obj2 = new Object();
+		sb.append(obj1);
+		sb.append(obj2);
+		assertTrue("Buffer contains invalid characters", sb.toString().equals(
+				obj1.toString() + obj2.toString()));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(java.lang.String)
+	 */
+	public void test_appendLjava_lang_String() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(java.lang.String)
+		StringBuffer sb = new StringBuffer();
+		String buf1 = "Hello";
+		String buf2 = "World";
+		sb.append(buf1);
+		assertTrue("Buffer is invalid length after append", sb.length() == 5);
+		sb.append(buf2);
+		assertTrue("Buffer is invalid length after append", sb.length() == 10);
+		assertTrue("Buffer contains invalid chars", (sb.toString()
+				.equals("HelloWorld")));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#append(boolean)
+	 */
+	public void test_appendZ() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.append(boolean)
+		StringBuffer sb = new StringBuffer();
+		sb.append(false);
+		assertTrue("Buffer is invalid length after append", sb.length() == 5);
+		sb.append(true);
+		assertTrue("Buffer is invalid length after append", sb.length() == 9);
+		assertTrue("Buffer is invalid length after append", (sb.toString()
+				.equals("falsetrue")));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#capacity()
+	 */
+	public void test_capacity() {
+		// Test for method int java.lang.StringBuffer.capacity()
+		StringBuffer sb = new StringBuffer(10);
+		assertTrue("Returned incorrect capacity", sb.capacity() == 10);
+		sb.ensureCapacity(100);
+		assertTrue("Returned incorrect capacity", sb.capacity() >= 100);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#charAt(int)
+	 */
+	public void test_charAtI() {
+		// Test for method char java.lang.StringBuffer.charAt(int)
+		assertTrue("Returned incorrect char", testBuffer.charAt(3) == 's');
+
+		// Test for StringIndexOutOfBoundsException
+		boolean exception = false;
+		try {
+			testBuffer.charAt(-1);
+		} catch (StringIndexOutOfBoundsException e) {
+			exception = true;
+		} catch (ArrayIndexOutOfBoundsException e) {
+		}
+		assertTrue("Should throw StringIndexOutOfBoundsException", exception);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#delete(int, int)
+	 */
+	public void test_deleteII() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.delete(int, int)
+		testBuffer.delete(7, 7);
+		assertTrue("Deleted chars when start == end", testBuffer.toString()
+				.equals("This is a test buffer"));
+		testBuffer.delete(4, 14);
+		assertTrue("Deleted incorrect chars", testBuffer.toString().equals(
+				"This buffer"));
+
+		testBuffer = new StringBuffer("This is a test buffer");
+		String sharedStr = testBuffer.toString();
+		testBuffer.delete(0, testBuffer.length());
+		assertTrue("Didn't clone shared buffer", sharedStr
+				.equals("This is a test buffer"));
+		assertTrue("Deleted incorrect chars", testBuffer.toString().equals(""));
+		testBuffer.append("more stuff");
+		assertTrue("Didn't clone shared buffer 2", sharedStr
+				.equals("This is a test buffer"));
+		assertTrue("Wrong contents", testBuffer.toString().equals("more stuff"));
+		try {
+			testBuffer.delete(-5, 2);
+		} catch (IndexOutOfBoundsException e) {
+		}
+		assertTrue("Wrong contents 2", testBuffer.toString().equals(
+				"more stuff"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#deleteCharAt(int)
+	 */
+	public void test_deleteCharAtI() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.deleteCharAt(int)
+		testBuffer.deleteCharAt(3);
+		assertTrue("Deleted incorrect char", testBuffer.toString().equals(
+				"Thi is a test buffer"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#ensureCapacity(int)
+	 */
+	public void test_ensureCapacityI() {
+		// Test for method void java.lang.StringBuffer.ensureCapacity(int)
+		StringBuffer sb = new StringBuffer(10);
+
+		sb.ensureCapacity(100);
+		assertTrue("Failed to increase capacity", sb.capacity() >= 100);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#getChars(int, int, char[], int)
+	 */
+	public void test_getCharsII$CI() {
+		// Test for method void java.lang.StringBuffer.getChars(int, int, char
+		// [], int)
+
+		char[] buf = new char[10];
+		testBuffer.getChars(4, 8, buf, 2);
+		assertTrue("Returned incorrect chars", new String(buf, 2, 4)
+				.equals(testBuffer.toString().substring(4, 8)));
+
+		boolean exception = false;
+		try {
+			StringBuffer buf2 = new StringBuffer("");
+			buf2.getChars(0, 0, new char[5], 2);
+		} catch (IndexOutOfBoundsException e) {
+			exception = true;
+		}
+		assertTrue("did not expect IndexOutOfBoundsException", !exception);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, char[])
+	 */
+	public void test_insertI$C() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, char [])
+		char buf[] = new char[4];
+		"char".getChars(0, 4, buf, 0);
+		testBuffer.insert(15, buf);
+		assertTrue("Insert test failed", testBuffer.toString().equals(
+				"This is a test charbuffer"));
+
+		boolean exception = false;
+		StringBuffer buf1 = new StringBuffer("abcd");
+		try {
+			buf1.insert(-1, (char[]) null);
+		} catch (StringIndexOutOfBoundsException e) {
+			exception = true;
+		} catch (NullPointerException e) {
+		}
+		assertTrue("Should throw StringIndexOutOfBoundsException", exception);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, char[], int, int)
+	 */
+	public void test_insertI$CII() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, char [], int, int)
+		char[] c = new char[] { 'n', 'o', 't', ' ' };
+		testBuffer.insert(8, c, 0, 4);
+		assertTrue("Insert failed: " + testBuffer.toString(), testBuffer
+				.toString().equals("This is not a test buffer"));
+
+		boolean exception = false;
+		StringBuffer buf1 = new StringBuffer("abcd");
+		try {
+			buf1.insert(-1, (char[]) null, 0, 0);
+		} catch (StringIndexOutOfBoundsException e) {
+			exception = true;
+		} catch (NullPointerException e) {
+		}
+		assertTrue("Should throw StringIndexOutOfBoundsException", exception);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, char)
+	 */
+	public void test_insertIC() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, char)
+		testBuffer.insert(15, 'T');
+		assertTrue("Insert test failed", testBuffer.toString().equals(
+				"This is a test Tbuffer"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, double)
+	 */
+	public void test_insertID() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, double)
+		testBuffer.insert(15, Double.MAX_VALUE);
+		assertTrue("Insert test failed", testBuffer.toString().equals(
+				"This is a test " + Double.MAX_VALUE + "buffer"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, float)
+	 */
+	public void test_insertIF() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, float)
+		testBuffer.insert(15, Float.MAX_VALUE);
+		String testBufferString = testBuffer.toString();
+		String expectedResult = "This is a test "
+				+ String.valueOf(Float.MAX_VALUE) + "buffer";
+		assertTrue("Insert test failed, got: " + "\'" + testBufferString + "\'"
+				+ " but wanted: " + "\'" + expectedResult + "\'",
+				testBufferString.equals(expectedResult));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, int)
+	 */
+	public void test_insertII() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, int)
+		testBuffer.insert(15, 100);
+		assertTrue("Insert test failed", testBuffer.toString().equals(
+				"This is a test 100buffer"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, long)
+	 */
+	public void test_insertIJ() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, long)
+		testBuffer.insert(15, 88888888888888888L);
+		assertTrue("Insert test failed", testBuffer.toString().equals(
+				"This is a test 88888888888888888buffer"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, java.lang.Object)
+	 */
+	public void test_insertILjava_lang_Object() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, java.lang.Object)
+		Object obj1 = new Object();
+		testBuffer.insert(15, obj1);
+		assertTrue("Insert test failed", testBuffer.toString().equals(
+				"This is a test " + obj1.toString() + "buffer"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, java.lang.String)
+	 */
+	public void test_insertILjava_lang_String() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, java.lang.String)
+
+		testBuffer.insert(15, "STRING ");
+		assertTrue("Insert test failed", testBuffer.toString().equals(
+				"This is a test STRING buffer"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#insert(int, boolean)
+	 */
+	public void test_insertIZ() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.insert(int, boolean)
+		testBuffer.insert(15, true);
+		assertTrue("Insert test failed", testBuffer.toString().equals(
+				"This is a test truebuffer"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#length()
+	 */
+	public void test_length() {
+		// Test for method int java.lang.StringBuffer.length()
+		assertTrue("Incorrect length returned", testBuffer.length() == 21);
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#replace(int, int, java.lang.String)
+	 */
+	public void test_replaceIILjava_lang_String() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.replace(int, int, java.lang.String)
+		testBuffer.replace(5, 9, "is a replaced");
+		assertTrue("Replace failed, wanted: " + "\'"
+				+ "This is a replaced test buffer" + "\'" + " but got: " + "\'"
+				+ testBuffer.toString() + "\'", testBuffer.toString().equals(
+				"This is a replaced test buffer"));
+		assertTrue("insert1", new StringBuffer().replace(0, 0, "text")
+				.toString().equals("text"));
+		assertTrue("insert2", new StringBuffer("123").replace(3, 3, "text")
+				.toString().equals("123text"));
+		assertTrue("insert2", new StringBuffer("123").replace(1, 1, "text")
+				.toString().equals("1text23"));
+	}
+
+	private String writeString(String in) {
+		StringBuffer result = new StringBuffer();
+		result.append("\"");
+		for (int i = 0; i < in.length(); i++) {
+			result.append(" 0x" + Integer.toHexString(in.charAt(i)));
+		}
+		result.append("\"");
+		return result.toString();
+	}
+
+	private void reverseTest(String id, String org, String rev, String back) {
+		// create non-shared StringBuffer
+		StringBuffer sb = new StringBuffer(org);
+		sb.reverse();
+		String reversed = sb.toString();
+		assertTrue("reversed surrogate " + id + ": " + writeString(reversed),
+				reversed.equals(rev));
+		// create non-shared StringBuffer
+		sb = new StringBuffer(reversed);
+		sb.reverse();
+		reversed = sb.toString();
+		assertTrue("reversed surrogate " + id + "a: " + writeString(reversed),
+				reversed.equals(back));
+
+		// test algorithm when StringBuffer is shared
+		sb = new StringBuffer(org);
+		String copy = sb.toString();
+		assertEquals(org, copy);
+		sb.reverse();
+		reversed = sb.toString();
+		assertTrue("reversed surrogate " + id + ": " + writeString(reversed),
+				reversed.equals(rev));
+		sb = new StringBuffer(reversed);
+		copy = sb.toString();
+		assertEquals(rev, copy);
+		sb.reverse();
+		reversed = sb.toString();
+		assertTrue("reversed surrogate " + id + "a: " + writeString(reversed),
+				reversed.equals(back));
+
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#reverse()
+	 */
+	public void test_reverse() {
+		// Test for method java.lang.StringBuffer
+		// java.lang.StringBuffer.reverse()
+		String org;
+		org = "a";
+		reverseTest("0", org, org, org);
+
+		org = "ab";
+		reverseTest("1", org, "ba", org);
+
+		org = "abcdef";
+		reverseTest("2", org, "fedcba", org);
+
+		org = "abcdefg";
+		reverseTest("3", org, "gfedcba", org);
+
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#setCharAt(int, char)
+	 */
+	public void test_setCharAtIC() {
+		// Test for method void java.lang.StringBuffer.setCharAt(int, char)
+		StringBuffer s = new StringBuffer("HelloWorld");
+		s.setCharAt(4, 'Z');
+		assertTrue("Returned incorrect char", s.charAt(4) == 'Z');
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#setLength(int)
+	 */
+	public void test_setLengthI() {
+		// Test for method void java.lang.StringBuffer.setLength(int)
+		testBuffer.setLength(1000);
+		assertTrue("Failed to increase length", testBuffer.length() == 1000);
+		assertTrue("Increase in length trashed buffer", testBuffer.toString()
+				.startsWith("This is a test buffer"));
+		testBuffer.setLength(2);
+		assertTrue("Failed to decrease length", testBuffer.length() == 2);
+		assertTrue("Decrease in length failed", testBuffer.toString().equals(
+				"Th"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#substring(int)
+	 */
+	public void test_substringI() {
+		// Test for method java.lang.String
+		// java.lang.StringBuffer.substring(int)
+		assertTrue("Returned incorrect substring", testBuffer.substring(5)
+				.equals("is a test buffer"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#substring(int, int)
+	 */
+	public void test_substringII() {
+		// Test for method java.lang.String
+		// java.lang.StringBuffer.substring(int, int)
+		assertTrue("Returned incorrect substring", testBuffer.substring(5, 7)
+				.equals("is"));
+	}
+
+	/**
+	 * @tests java.lang.StringBuffer#toString()
+	 */
+	public void test_toString() {
+		// Test for method java.lang.String java.lang.StringBuffer.toString()
+		assertTrue("Incorrect string value returned", testBuffer.toString()
+				.equals("This is a test buffer"));
+	}
+
+	/**
+	 * Sets up the fixture, for example, open a network connection. This method
+	 * is called before a test is executed.
+	 */
+	protected void setUp() {
+		testBuffer = new StringBuffer("This is a test buffer");
+	}
+
+	/**
+	 * Tears down the fixture, for example, close a network connection. This
+	 * method is called after a test is executed.
+	 */
+	protected void tearDown() {
+	}
+
+	protected void doneSuite() {
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringIndexOutOfBoundsExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringIndexOutOfBoundsExceptionTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringIndexOutOfBoundsExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringIndexOutOfBoundsExceptionTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,62 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.lang;
+
+public class StringIndexOutOfBoundsExceptionTest extends
+		junit.framework.TestCase {
+
+	/**
+	 * @tests java.lang.StringIndexOutOfBoundsException#StringIndexOutOfBoundsException()
+	 */
+	public void test_Constructor() {
+		// Test for method java.lang.StringIndexOutOfBoundsException()
+
+		try {
+			"X".charAt(99);
+		} catch (StringIndexOutOfBoundsException e) {
+			return;
+		}
+		fail("Failed to generate exception");
+	}
+
+	/**
+	 * @tests java.lang.StringIndexOutOfBoundsException#StringIndexOutOfBoundsException(java.lang.String)
+	 */
+	public void test_ConstructorLjava_lang_String() {
+		// Test for method
+		// java.lang.StringIndexOutOfBoundsException(java.lang.String)
+		try {
+			"X".charAt(99);
+		} catch (StringIndexOutOfBoundsException e) {
+			return;
+		}
+		fail("Failed to generate exception");
+	}
+
+	/**
+	 * Sets up the fixture, for example, open a network connection. This method
+	 * is called before a test is executed.
+	 */
+	protected void setUp() {
+	}
+
+	/**
+	 * Tears down the fixture, for example, close a network connection. This
+	 * method is called after a test is executed.
+	 */
+	protected void tearDown() {
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/lang/StringTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,917 @@
+/* Copyright 1998, 2005 The Apache Software Foundation or its licensors, as applicable
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package tests.api.java.lang;
+
+import java.io.UnsupportedEncodingException;
+import java.util.Locale;
+
+public class StringTest extends junit.framework.TestCase {
+
+	String hw1 = "HelloWorld";
+
+	String hw2 = "HelloWorld";
+
+	String hwlc = "helloworld";
+
+	String hwuc = "HELLOWORLD";
+
+	String hello1 = "Hello";
+
+	String world1 = "World";
+
+	String comp11 = "Test String";
+
+	Object obj = new Object();
+
+	char[] buf = { 'W', 'o', 'r', 'l', 'd' };
+
+	char[] rbuf = new char[5];
+
+	/**
+	 * @tests java.lang.String#String()
+	 */
+	public void test_Constructor() {
+		// Test for method java.lang.String()
+		assertTrue("Created incorrect string", new String().equals(""));
+	}
+
+	/**
+	 * @tests java.lang.String#String(byte[])
+	 */
+	public void test_Constructor$B() {
+		// Test for method java.lang.String(byte [])
+		assertTrue("Failed to create string", new String(hw1.getBytes())
+				.equals(hw1));
+	}
+
+	/**
+	 * @tests java.lang.String#String(byte[], int)
+	 */
+	public void test_Constructor$BI() {
+		// Test for method java.lang.String(byte [], int)
+		String s = new String(new byte[] { 65, 66, 67, 68, 69 }, 0);
+		assertTrue("Incorrect string returned: " + s, s.equals("ABCDE"));
+		s = new String(new byte[] { 65, 66, 67, 68, 69 }, 1);
+		assertTrue("Did not use nonzero hibyte", !s.equals("ABCDE"));
+	}
+
+	/**
+	 * @tests java.lang.String#String(byte[], int, int)
+	 */
+	public void test_Constructor$BII() {
+		// Test for method java.lang.String(byte [], int, int)
+		assertTrue("Failed to create string", new String(hw1.getBytes(), 0, hw1
+				.getBytes().length).equals(hw1));
+
+		boolean exception = false;
+		try {
+			new String(new byte[0], 0, Integer.MAX_VALUE);
+		} catch (IndexOutOfBoundsException e) {
+			exception = true;
+		}
+		assertTrue("Did not throw exception", exception);
+	}
+
+	/**
+	 * @tests java.lang.String#String(byte[], int, int, int)
+	 */
+	public void test_Constructor$BIII() {
+		// Test for method java.lang.String(byte [], int, int, int)
+		String s = new String(new byte[] { 65, 66, 67, 68, 69 }, 0, 1, 3);
+		assertTrue("Incorrect string returned: " + s, s.equals("BCD"));
+		s = new String(new byte[] { 65, 66, 67, 68, 69 }, 1, 0, 5);
+		assertTrue("Did not use nonzero hibyte", !s.equals("ABCDE"));
+	}
+
+	/**
+	 * @tests java.lang.String#String(byte[], int, int, java.lang.String)
+	 */
+	public void test_Constructor$BIILjava_lang_String() {
+		// Test for method java.lang.String(byte [], int, int, java.lang.String)
+		String s = null;
+		try {
+			s = new String(new byte[] { 65, 66, 67, 68, 69 }, 0, 5, "8859_1");
+		} catch (Exception e) {
+			fail("Threw exception : " + e.getMessage());
+		}
+		assertTrue("Incorrect string returned: " + s, s.equals("ABCDE"));
+	}
+
+	/**
+	 * @tests java.lang.String#String(byte[], java.lang.String)
+	 */
+	public void test_Constructor$BLjava_lang_String() {
+		// Test for method java.lang.String(byte [], java.lang.String)
+		String s = null;
+		try {
+			s = new String(new byte[] { 65, 66, 67, 68, 69 }, "8859_1");
+		} catch (Exception e) {
+			fail("Threw exception : " + e.getMessage());
+		}
+		assertTrue("Incorrect string returned: " + s, s.equals("ABCDE"));
+	}
+
+	/**
+	 * @tests java.lang.String#String(char[])
+	 */
+	public void test_Constructor$C() {
+		// Test for method java.lang.String(char [])
+		assertTrue("Failed Constructor test", new String(buf).equals("World"));
+	}
+
+	/**
+	 * @tests java.lang.String#String(char[], int, int)
+	 */
+	public void test_Constructor$CII() {
+		// Test for method java.lang.String(char [], int, int)
+		char[] buf = { 'H', 'e', 'l', 'l', 'o', 'W', 'o', 'r', 'l', 'd' };
+		String s = new String(buf, 0, buf.length);
+		assertTrue("Incorrect string created", hw1.equals(s));
+
+		boolean exception = false;
+		try {
+			new String(new char[0], 0, Integer.MAX_VALUE);
+		} catch (IndexOutOfBoundsException e) {
+			exception = true;
+		}
+		assertTrue("Did not throw exception", exception);
+	}
+
+	/**
+	 * @tests java.lang.String#String(java.lang.String)
+	 */
+	public void test_ConstructorLjava_lang_String() {
+		// Test for method java.lang.String(java.lang.String)
+		String s = new String("Hello World");
+		assertTrue("Failed to construct correct string", s
+				.equals("Hello World"));
+	}
+
+	/**
+	 * @tests java.lang.String#String(java.lang.StringBuffer)
+	 */
+	public void test_ConstructorLjava_lang_StringBuffer() {
+		// Test for method java.lang.String(java.lang.StringBuffer)
+		StringBuffer sb = new StringBuffer();
+		sb.append("HelloWorld");
+		assertTrue("Created incorrect string", new String(sb)
+				.equals("HelloWorld"));
+	}
+
+	/**
+	 * @tests java.lang.String#charAt(int)
+	 */
+	public void test_charAtI() {
+		// Test for method char java.lang.String.charAt(int)
+		assertTrue("Incorrect character returned", hw1.charAt(5) == 'W'
+				&& (hw1.charAt(1) != 'Z'));
+	}
+
+	/**
+	 * @tests java.lang.String#compareTo(java.lang.Object)
+	 */
+	public void test_compareToLjava_lang_Object() {
+		// Test for method int java.lang.String.compareTo(java.lang.Object)
+		String s = "VV";
+		assertTrue("Comparison failed for same strings", s
+				.compareTo((Object) s) == 0);
+		try {
+			s.compareTo(new Object());
+		} catch (ClassCastException e) {
+			// Correct
+			return;
+		}
+		fail("Failed to throw exception when compared to non String");
+	}
+
+	/**
+	 * @tests java.lang.String#compareTo(java.lang.String)
+	 */
+	public void test_compareToLjava_lang_String() {
+		// Test for method int java.lang.String.compareTo(java.lang.String)
+		assertTrue("Returned incorrect value for first < second", "aaaaab"
+				.compareTo("aaaaac") < 0);
+		assertTrue("Returned incorrect value for first = second", "aaaaac"
+				.compareTo("aaaaac") == 0);
+		assertTrue("Returned incorrect value for first > second", "aaaaac"
+				.compareTo("aaaaab") > 0);
+		assertTrue("Considered case to not be of importance", !("A"
+				.compareTo("a") == 0));
+	}
+
+	/**
+	 * @tests java.lang.String#compareToIgnoreCase(java.lang.String)
+	 */
+	public void test_compareToIgnoreCaseLjava_lang_String() {
+		// Test for method int
+		// java.lang.String.compareToIgnoreCase(java.lang.String)
+		assertTrue("Returned incorrect value for first < second", "aaaaab"
+				.compareToIgnoreCase("aaaaac") < 0);
+		assertTrue("Returned incorrect value for first = second", "aaaaac"
+				.compareToIgnoreCase("aaaaac") == 0);
+		assertTrue("Returned incorrect value for first > second", "aaaaac"
+				.compareToIgnoreCase("aaaaab") > 0);
+		assertTrue("Considered case to not be of importance", "A"
+				.compareToIgnoreCase("a") == 0);
+
+		assertTrue("0xbf should not compare = to 'ss'", "\u00df"
+				.compareToIgnoreCase("ss") != 0);
+		assertTrue("0x130 should compare = to 'i'", "\u0130"
+				.compareToIgnoreCase("i") == 0);
+		assertTrue("0x131 should compare = to 'i'", "\u0131"
+				.compareToIgnoreCase("i") == 0);
+
+		Locale defLocale = Locale.getDefault();
+		try {
+			Locale.setDefault(new Locale("tr", ""));
+			assertTrue("Locale tr: 0x130 should compare = to 'i'", "\u0130"
+					.compareToIgnoreCase("i") == 0);
+			assertTrue("Locale tr: 0x131 should compare = to 'i'", "\u0131"
+					.compareToIgnoreCase("i") == 0);
+		} finally {
+			Locale.setDefault(defLocale);
+		}
+	}
+
+	/**
+	 * @tests java.lang.String#concat(java.lang.String)
+	 */
+	public void test_concatLjava_lang_String() {
+		// Test for method java.lang.String
+		// java.lang.String.concat(java.lang.String)
+		assertTrue("Concatenation failed to produce correct string", hello1
+				.concat(world1).equals(hw1));
+		boolean exception = false;
+		try {
+			String a = new String("test");
+			String b = null;
+			a.concat(b);
+		} catch (NullPointerException e) {
+			exception = true;
+		}
+		assertTrue("Concatenation failed to throw NP exception (1)", exception);
+		exception = false;
+		try {
+			String a = new String("");
+			String b = null;
+			a.concat(b);
+		} catch (NullPointerException e) {
+			exception = true;
+		}
+		assertTrue("Concatenation failed to throw NP exception (2)", exception);
+
+		String s1 = "";
+		String s2 = "s2";
+		String s3 = s1.concat(s2);
+		assertTrue("should not be identical", s2 != s3);
+	}
+
+	/**
+	 * @tests java.lang.String#copyValueOf(char[])
+	 */
+	public void test_copyValueOf$C() {
+		// Test for method java.lang.String java.lang.String.copyValueOf(char
+		// [])
+		char[] t = { 'H', 'e', 'l', 'l', 'o', 'W', 'o', 'r', 'l', 'd' };
+		assertTrue("copyValueOf returned incorrect String", String.copyValueOf(
+				t).equals("HelloWorld"));
+	}
+
+	/**
+	 * @tests java.lang.String#copyValueOf(char[], int, int)
+	 */
+	public void test_copyValueOf$CII() {
+		// Test for method java.lang.String java.lang.String.copyValueOf(char
+		// [], int, int)
+		char[] t = { 'H', 'e', 'l', 'l', 'o', 'W', 'o', 'r', 'l', 'd' };
+		assertTrue("copyValueOf returned incorrect String", String.copyValueOf(
+				t, 5, 5).equals("World"));
+	}
+
+	/**
+	 * @tests java.lang.String#endsWith(java.lang.String)
+	 */
+	public void test_endsWithLjava_lang_String() {
+		// Test for method boolean java.lang.String.endsWith(java.lang.String)
+		assertTrue("Failed to fine ending string", hw1.endsWith("ld"));
+	}
+
+	/**
+	 * @tests java.lang.String#equals(java.lang.Object)
+	 */
+	public void test_equalsLjava_lang_Object() {
+		// Test for method boolean java.lang.String.equals(java.lang.Object)
+		assertTrue("String not equal", hw1.equals(hw2) && !(hw1.equals(comp11)));
+	}
+
+	/**
+	 * @tests java.lang.String#equalsIgnoreCase(java.lang.String)
+	 */
+	public void test_equalsIgnoreCaseLjava_lang_String() {
+		// Test for method boolean
+		// java.lang.String.equalsIgnoreCase(java.lang.String)
+		assertTrue("lc version returned unequal to uc", hwlc
+				.equalsIgnoreCase(hwuc));
+	}
+
+	/**
+	 * @tests java.lang.String#getBytes()
+	 */
+	public void test_getBytes() {
+		// Test for method byte [] java.lang.String.getBytes()
+		byte[] sbytes = hw1.getBytes();
+		for (int i = 0; i < hw1.length(); i++)
+			assertTrue("Returned incorrect bytes", sbytes[i] == (byte) hw1
+					.charAt(i));
+
+		char[] chars = new char[1];
+		for (int i = 0; i < 65536; i++) {
+			// skip surrogates
+			if (i == 0xd800)
+				i = 0xe000;
+			byte[] result = null;
+			chars[0] = (char) i;
+			String string = new String(chars);
+			try {
+				result = string.getBytes("8859_1");
+				assertTrue("Wrong byte conversion 8859_1: " + i,
+						(i < 256 && result[0] == (byte) i)
+								|| (i > 255 && result[0] == '?'));
+			} catch (java.io.UnsupportedEncodingException e) {
+			}
+			try {
+				result = string.getBytes("UTF8");
+				int length = i < 0x80 ? 1 : (i < 0x800 ? 2 : 3);
+				assertTrue("Wrong length UTF8: " + Integer.toHexString(i),
+						result.length == length);
+				assertTrue(
+						"Wrong bytes UTF8: " + Integer.toHexString(i),
+						(i < 0x80 && result[0] == i)
+								|| (i >= 0x80
+										&& i < 0x800
+										&& result[0] == (byte) (0xc0 | ((i & 0x7c0) >> 6)) && result[1] == (byte) (0x80 | (i & 0x3f)))
+								|| (i >= 0x800
+										&& result[0] == (byte) (0xe0 | (i >> 12))
+										&& result[1] == (byte) (0x80 | ((i & 0xfc0) >> 6)) && result[2] == (byte) (0x80 | (i & 0x3f))));
+			} catch (java.io.UnsupportedEncodingException e) {
+			}
+
+			String bytes = null;
+			try {
+				bytes = new String(result, "UTF8");
+				if (bytes.length() != 1) {
+					for (int j = 0; j < result.length; j++) {
+						System.out.print(Integer.toHexString(result[j]) + " ");
+					}
+					System.out.println();
+				}
+				assertTrue("Wrong UTF8 byte length: " + bytes.length() + "("
+						+ i + ")", bytes.length() == 1);
+				assertTrue(
+						"Wrong char UTF8: "
+								+ Integer.toHexString(bytes.charAt(0)) + " ("
+								+ i + ")", bytes.charAt(0) == i);
+			} catch (java.io.UnsupportedEncodingException e) {
+			}
+		}
+
+		byte[] bytes = new byte[1];
+		for (int i = 0; i < 256; i++) {
+			bytes[0] = (byte) i;
+			String result = null;
+			try {
+				result = new String(bytes, "8859_1");
+				assertTrue("Wrong char length", result.length() == 1);
+				assertTrue("Wrong char value", result.charAt(0) == (char) i);
+			} catch (java.io.UnsupportedEncodingException e) {
+			}
+		}
+
+		String utf8 = null;
+		try {
+			utf8 = new String(new byte[] { 0x14, (byte) 0x80, 0x24, 0x64 },
+					"UTF8");
+			assertTrue("Wrong UTF8 conversion 1", utf8.length() == 1
+					&& utf8.charAt(0) == 0x14);
+		} catch (java.io.UnsupportedEncodingException e) {
+		}
+		try {
+			utf8 = new String(new byte[] { 0x15, (byte) 0xe0, 0x24, 0x64 },
+					"UTF8");
+			assertTrue("Wrong UTF8 conversion 2", utf8.length() == 1
+					&& utf8.charAt(0) == 0x15);
+		} catch (java.io.UnsupportedEncodingException e) {
+		}
+		try {
+			utf8 = new String(new byte[] { 0x16, (byte) 0xe0, (byte) 0x80,
+					0x24, 0x64 }, "UTF8");
+			assertTrue("Wrong UTF8 conversion 3", utf8.length() == 1
+					&& utf8.charAt(0) == 0x16);
+		} catch (java.io.UnsupportedEncodingException e) {
+		}
+	}
+
+	/**
+	 * @tests java.lang.String#getBytes(int, int, byte[], int)
+	 */
+	public void test_getBytesII$BI() {
+		// Test for method void java.lang.String.getBytes(int, int, byte [],
+		// int)
+		byte[] buf = new byte[5];
+		"Hello World".getBytes(6, 11, buf, 0);
+		assertTrue("Returned incorrect bytes", new String(buf).equals("World"));
+
+		Exception exception = null;
+		try {
+			"Hello World".getBytes(-1, 1, null, 0);
+			fail("Expected StringIndexOutOfBoundsException");
+		} catch (StringIndexOutOfBoundsException e) {
+		} catch (NullPointerException e) {
+			fail("Threw wrong exception");
+		}
+	}
+
+	/**
+	 * @tests java.lang.String#getBytes(java.lang.String)
+	 */
+	public void test_getBytesLjava_lang_String() {
+		// Test for method byte [] java.lang.String.getBytes(java.lang.String)
+		byte[] buf = "Hello World".getBytes();
+		assertTrue("Returned incorrect bytes", new String(buf)
+				.equals("Hello World"));
+
+		boolean exception = false;
+		try {
+			"string".getBytes("8849_1");
+		} catch (java.io.UnsupportedEncodingException e) {
+			exception = true;
+		}
+		assertTrue("Did not throw exception", exception);
+
+		try {
+			byte[] bytes = "\u3048".getBytes("ISO2022JP");
+			String converted = new String(bytes, "ISO8859_1");
+			assertTrue("invalid conversion: " + converted, converted
+					.equals("\u001b$B$(\u001b(B"));
+		} catch (UnsupportedEncodingException e) {
+			// Can't test missing converter
+			System.out.println(e);
+		}
+	}
+
+	/**
+	 * @tests java.lang.String#getChars(int, int, char[], int)
+	 */
+	public void test_getCharsII$CI() {
+		// Test for method void java.lang.String.getChars(int, int, char [],
+		// int)
+		hw1.getChars(5, hw1.length(), rbuf, 0);
+
+		for (int i = 0; i < rbuf.length; i++)
+			assertTrue("getChars returned incorrect char(s)", rbuf[i] == buf[i]);
+	}
+
+	/**
+	 * @tests java.lang.String#hashCode()
+	 */
+	public void test_hashCode() {
+		// Test for method int java.lang.String.hashCode()
+		int hwHashCode = 0;
+		final int hwLength = hw1.length();
+		int powerOfThirtyOne = 1;
+		for (int counter = hwLength - 1; counter >= 0; counter--) {
+			hwHashCode += ((int) hw1.charAt(counter)) * powerOfThirtyOne;
+			powerOfThirtyOne *= 31;
+		}
+		assertTrue("String did not hash to correct value--got: "
+				+ String.valueOf(hw1.hashCode()) + " but wanted: "
+				+ String.valueOf(hwHashCode), hw1.hashCode() == hwHashCode);
+		assertTrue("The empty string \"\" did not hash to zero", 0 == ""
+				.hashCode());
+	}
+
+	/**
+	 * @tests java.lang.String#indexOf(int)
+	 */
+	public void test_indexOfI() {
+		// Test for method int java.lang.String.indexOf(int)
+		assertTrue("Invalid index returned", 1 == hw1.indexOf('e'));
+
+	}
+
+	/**
+	 * @tests java.lang.String#indexOf(int, int)
+	 */
+	public void test_indexOfII() {
+		// Test for method int java.lang.String.indexOf(int, int)
+		assertTrue("Invalid character index returned", 5 == hw1.indexOf('W', 2));
+
+	}
+
+	/**
+	 * @tests java.lang.String#indexOf(java.lang.String)
+	 */
+	public void test_indexOfLjava_lang_String() {
+		// Test for method int java.lang.String.indexOf(java.lang.String)
+		assertTrue("Failed to find string", hw1.indexOf("World") > 0);
+		assertTrue("Failed to find string", !(hw1.indexOf("ZZ") > 0));
+	}
+
+	/**
+	 * @tests java.lang.String#indexOf(java.lang.String, int)
+	 */
+	public void test_indexOfLjava_lang_StringI() {
+		// Test for method int java.lang.String.indexOf(java.lang.String, int)
+		assertTrue("Failed to find string", hw1.indexOf("World", 0) > 0);
+		assertTrue("Found string outside index", !(hw1.indexOf("Hello", 6) > 0));
+		assertTrue("Did not accept valid negative starting position", hello1
+				.indexOf("", -5) == 0);
+		assertTrue("Reported wrong error code", hello1.indexOf("", 5) == 5);
+		assertTrue("Wrong for empty in empty", "".indexOf("", 0) == 0);
+	}
+
+	/**
+	 * @tests java.lang.String#intern()
+	 */
+	public void test_intern() {
+		// Test for method java.lang.String java.lang.String.intern()
+		assertTrue("Intern returned incorrect result", hw1.intern() == hw2
+				.intern());
+	}
+
+	/**
+	 * @tests java.lang.String#lastIndexOf(int)
+	 */
+	public void test_lastIndexOfI() {
+		// Test for method int java.lang.String.lastIndexOf(int)
+		assertTrue("Failed to return correct index", hw1.lastIndexOf('W') == 5);
+		assertTrue("Returned index for non-existent char",
+				hw1.lastIndexOf('Z') == -1);
+
+	}
+
+	/**
+	 * @tests java.lang.String#lastIndexOf(int, int)
+	 */
+	public void test_lastIndexOfII() {
+		// Test for method int java.lang.String.lastIndexOf(int, int)
+		assertTrue("Failed to return correct index",
+				hw1.lastIndexOf('W', 6) == 5);
+		assertTrue("Returned index for char out of specified range", hw1
+				.lastIndexOf('W', 4) == -1);
+		assertTrue("Returned index for non-existent char", hw1.lastIndexOf('Z',
+				9) == -1);
+
+	}
+
+	/**
+	 * @tests java.lang.String#lastIndexOf(java.lang.String)
+	 */
+	public void test_lastIndexOfLjava_lang_String() {
+		// Test for method int java.lang.String.lastIndexOf(java.lang.String)
+		assertTrue("Returned incorrect index", hw1.lastIndexOf("World") == 5);
+		assertTrue("Found String outside of index", hw1
+				.lastIndexOf("HeKKKKKKKK") == -1);
+	}
+
+	/**
+	 * @tests java.lang.String#lastIndexOf(java.lang.String, int)
+	 */
+	public void test_lastIndexOfLjava_lang_StringI() {
+		// Test for method int java.lang.String.lastIndexOf(java.lang.String,
+		// int)
+		assertTrue("Returned incorrect index", hw1.lastIndexOf("World", 9) == 5);
+		int result = hw1.lastIndexOf("Hello", 2);
+		assertTrue("Found String outside of index: " + result, result == 0);
+		assertTrue("Reported wrong error code",
+				hello1.lastIndexOf("", -5) == -1);
+		assertTrue("Did not accept valid large starting position", hello1
+				.lastIndexOf("", 5) == 5);
+	}
+
+	/**
+	 * @tests java.lang.String#length()
+	 */
+	public void test_length() {
+		// Test for method int java.lang.String.length()
+		assertTrue("Invalid length returned", comp11.length() == 11);
+	}
+
+	/**
+	 * @tests java.lang.String#regionMatches(int, java.lang.String, int, int)
+	 */
+	public void test_regionMatchesILjava_lang_StringII() {
+		// Test for method boolean java.lang.String.regionMatches(int,
+		// java.lang.String, int, int)
+		String bogusString = "xxcedkedkleiorem lvvwr e''' 3r3r 23r";
+
+		assertTrue("identical regions failed comparison", hw1.regionMatches(2,
+				hw2, 2, 5));
+		assertTrue("Different regions returned true", !hw1.regionMatches(2,
+				bogusString, 2, 5));
+	}
+
+	/**
+	 * @tests java.lang.String#regionMatches(boolean, int, java.lang.String,
+	 *        int, int)
+	 */
+	public void test_regionMatchesZILjava_lang_StringII() {
+		// Test for method boolean java.lang.String.regionMatches(boolean, int,
+		// java.lang.String, int, int)
+
+		String bogusString = "xxcedkedkleiorem lvvwr e''' 3r3r 23r";
+
+		assertTrue("identical regions failed comparison", hw1.regionMatches(
+				false, 2, hw2, 2, 5));
+		assertTrue("identical regions failed comparison with different cases",
+				hw1.regionMatches(true, 2, hw2, 2, 5));
+		assertTrue("Different regions returned true", !hw1.regionMatches(true,
+				2, bogusString, 2, 5));
+		assertTrue("identical regions failed comparison with different cases",
+				hw1.regionMatches(false, 2, hw2, 2, 5));
+	}
+
+	/**
+	 * @tests java.lang.String#replace(char, char)
+	 */
+	public void test_replaceCC() {
+		// Test for method java.lang.String java.lang.String.replace(char, char)
+		assertTrue("Failed replace", hw1.replace('l', 'z').equals("HezzoWorzd"));
+	}
+
+	/**
+	 * @tests java.lang.String#startsWith(java.lang.String)
+	 */
+	public void test_startsWithLjava_lang_String() {
+		// Test for method boolean java.lang.String.startsWith(java.lang.String)
+		assertTrue("Failed to find string", hw1.startsWith("Hello"));
+		assertTrue("Found incorrect string", !hw1.startsWith("T"));
+	}
+
+	/**
+	 * @tests java.lang.String#startsWith(java.lang.String, int)
+	 */
+	public void test_startsWithLjava_lang_StringI() {
+		// Test for method boolean java.lang.String.startsWith(java.lang.String,
+		// int)
+		assertTrue("Failed to find string", hw1.startsWith("World", 5));
+		assertTrue("Found incorrect string", !hw1.startsWith("Hello", 5));
+	}
+
+	/**
+	 * @tests java.lang.String#substring(int)
+	 */
+	public void test_substringI() {
+		// Test for method java.lang.String java.lang.String.substring(int)
+		assertTrue("Incorrect substring returned", hw1.substring(5).equals(
+				"World"));
+		assertTrue("not identical", hw1.substring(0) == hw1);
+	}
+
+	/**
+	 * @tests java.lang.String#substring(int, int)
+	 */
+	public void test_substringII() {
+		// Test for method java.lang.String java.lang.String.substring(int, int)
+		assertTrue("Incorrect substring returned", hw1.substring(0, 5).equals(
+				"Hello")
+				&& (hw1.substring(5, 10).equals("World")));
+		assertTrue("not identical", hw1.substring(0, hw1.length()) == hw1);
+	}
+
+	/**
+	 * @tests java.lang.String#toCharArray()
+	 */
+	public void test_toCharArray() {
+		// Test for method char [] java.lang.String.toCharArray()
+
+		String s = new String(buf, 0, buf.length);
+		char[] schars = s.toCharArray();
+		for (int i = 0; i < s.length(); i++)
+			assertTrue("Returned incorrect char aray", buf[i] == schars[i]);
+	}
+
+	/**
+	 * @tests java.lang.String#toLowerCase()
+	 */
+	public void test_toLowerCase() {
+		// Test for method java.lang.String java.lang.String.toLowerCase()
+		assertTrue("toLowerCase case conversion did not succeed", hwuc
+				.toLowerCase().equals(hwlc));
+
+		assertTrue(
+				"a) Sigma has same lower case value at end of word with Unicode 3.0",
+				"\u03a3\u03a3".toLowerCase().equals("\u03c3\u03c3"));
+		assertTrue(
+				"b) Sigma has same lower case value at end of word with Unicode 3.0",
+				"a\u03a3".toLowerCase().equals("a\u03c3"));
+	}
+
+	/**
+	 * @tests java.lang.String#toLowerCase(java.util.Locale)
+	 */
+	public void test_toLowerCaseLjava_util_Locale() {
+		// Test for method java.lang.String
+		// java.lang.String.toLowerCase(java.util.Locale)
+		assertTrue("toLowerCase case conversion did not succeed", hwuc
+				.toLowerCase(java.util.Locale.getDefault()).equals(hwlc));
+		assertTrue("Invalid \\u0049 for English", "\u0049".toLowerCase(
+				Locale.ENGLISH).equals("\u0069"));
+		assertTrue("Invalid \\u0049 for Turkish", "\u0049".toLowerCase(
+				new Locale("tr", "")).equals("\u0131"));
+	}
+
+	private static String writeString(String in) {
+		StringBuffer result = new StringBuffer();
+		result.append("\"");
+		for (int i = 0; i < in.length(); i++) {
+			result.append(" 0x" + Integer.toHexString(in.charAt(i)));
+		}
+		result.append("\"");
+		return result.toString();
+	}
+
+	/**
+	 * @tests java.lang.String#toLowerCase(java.util.Locale)
+	 */
+	public void test_toLowerCaseLjava_util_Locale_subtest0() {
+		// Test for method java.lang.String
+		// java.lang.String.toLowerCase(java.util.Locale)
+	}
+
+	/**
+	 * @tests java.lang.String#toString()
+	 */
+	public void test_toString() {
+		// Test for method java.lang.String java.lang.String.toString()
+		assertTrue("Incorrect string returned", hw1.toString().equals(hw1));
+	}
+
+	/**
+	 * @tests java.lang.String#toUpperCase()
+	 */
+	public void test_toUpperCase() {
+		// Test for method java.lang.String java.lang.String.toUpperCase()
+		assertTrue("Returned string is not UpperCase", hwlc.toUpperCase()
+				.equals(hwuc));
+
+		assertTrue("Wrong conversion", "\u00df".toUpperCase().equals("SS"));
+
+		String s = "a\u00df\u1f56";
+		assertTrue("Invalid conversion", !s.toUpperCase().equals(s));
+
+	}
+
+	/**
+	 * @tests java.lang.String#toUpperCase(java.util.Locale)
+	 */
+	public void test_toUpperCaseLjava_util_Locale() {
+		// Test for method java.lang.String
+		// java.lang.String.toUpperCase(java.util.Locale)
+		assertTrue("Returned string is not UpperCase", hwlc.toUpperCase()
+				.equals(hwuc));
+		assertTrue("Invalid \\u0069 for English", "\u0069".toUpperCase(
+				Locale.ENGLISH).equals("\u0049"));
+		assertTrue("Invalid \\u0069 for Turkish", "\u0069".toUpperCase(
+				new Locale("tr", "")).equals("\u0130"));
+	}
+
+	/**
+	 * @tests java.lang.String#toUpperCase(java.util.Locale)
+	 */
+	public void test_toUpperCaseLjava_util_Locale_subtest0() {
+		// Test for method java.lang.String
+		// java.lang.String.toUpperCase(java.util.Locale)
+	}
+
+	/**
+	 * @tests java.lang.String#trim()
+	 */
+	public void test_trim() {
+		// Test for method java.lang.String java.lang.String.trim()
+		assertTrue("Incorrect string returned", " HelloWorld ".trim().equals(
+				hw1));
+	}
+
+	/**
+	 * @tests java.lang.String#valueOf(char[])
+	 */
+	public void test_valueOf$C() {
+		// Test for method java.lang.String java.lang.String.valueOf(char [])
+		assertTrue("Returned incorrect String", String.valueOf(buf).equals(
+				"World"));
+	}
+
+	/**
+	 * @tests java.lang.String#valueOf(char[], int, int)
+	 */
+	public void test_valueOf$CII() {
+		// Test for method java.lang.String java.lang.String.valueOf(char [],
+		// int, int)
+		char[] t = { 'H', 'e', 'l', 'l', 'o', 'W', 'o', 'r', 'l', 'd' };
+		assertTrue("copyValueOf returned incorrect String", String.valueOf(t,
+				5, 5).equals("World"));
+	}
+
+	/**
+	 * @tests java.lang.String#valueOf(char)
+	 */
+	public void test_valueOfC() {
+		// Test for method java.lang.String java.lang.String.valueOf(char)
+		for (int i = 0; i < 65536; i++)
+			assertTrue("Incorrect valueOf(char) returned: " + i, String
+					.valueOf((char) i).charAt(0) == (char) i);
+	}
+
+	/**
+	 * @tests java.lang.String#valueOf(double)
+	 */
+	public void test_valueOfD() {
+		// Test for method java.lang.String java.lang.String.valueOf(double)
+		assertTrue("Incorrect double string returned", String.valueOf(
+				Double.MAX_VALUE).equals("1.7976931348623157E308"));
+	}
+
+	/**
+	 * @tests java.lang.String#valueOf(float)
+	 */
+	public void test_valueOfF() {
+		// Test for method java.lang.String java.lang.String.valueOf(float)
+		assertTrue("incorrect float string returned--got: "
+				+ String.valueOf(1.0F) + " wanted: 1.0", String.valueOf(1.0F)
+				.equals("1.0"));
+		assertTrue("incorrect float string returned--got: "
+				+ String.valueOf(0.9F) + " wanted: 0.9", String.valueOf(0.9F)
+				.equals("0.9"));
+		assertTrue("incorrect float string returned--got: "
+				+ String.valueOf(109.567F) + " wanted: 109.567", String
+				.valueOf(109.567F).equals("109.567"));
+	}
+
+	/**
+	 * @tests java.lang.String#valueOf(int)
+	 */
+	public void test_valueOfI() {
+		// Test for method java.lang.String java.lang.String.valueOf(int)
+		assertTrue("returned invalid int string", String.valueOf(1).equals("1"));
+	}
+
+	/**
+	 * @tests java.lang.String#valueOf(long)
+	 */
+	public void test_valueOfJ() {
+		// Test for method java.lang.String java.lang.String.valueOf(long)
+		assertTrue("returned incorrect long string", String.valueOf(
+				927654321098L).equals("927654321098"));
+	}
+
+	/**
+	 * @tests java.lang.String#valueOf(java.lang.Object)
+	 */
+	public void test_valueOfLjava_lang_Object() {
+		// Test for method java.lang.String
+		// java.lang.String.valueOf(java.lang.Object)
+		assertTrue("Incorrect Object string returned", obj.toString().equals(
+				String.valueOf(obj)));
+	}
+
+	/**
+	 * @tests java.lang.String#valueOf(boolean)
+	 */
+	public void test_valueOfZ() {
+		// Test for method java.lang.String java.lang.String.valueOf(boolean)
+		assertTrue("Incorrect boolean string returned", String.valueOf(false)
+				.equals("false")
+				&& (String.valueOf(true).equals("true")));
+	}
+
+	/**
+	 * Sets up the fixture, for example, open a network connection. This method
+	 * is called before a test is executed.
+	 */
+	protected void setUp() {
+	}
+
+	/**
+	 * Tears down the fixture, for example, close a network connection. This
+	 * method is called after a test is executed.
+	 */
+	protected void tearDown() {
+	}
+
+	protected void doneSuite() {
+	}
+}



Mime
View raw message