You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/03/15 12:47:39 UTC

svn commit: r386058 [46/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/...

Added: incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/NumberFormatTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/NumberFormatTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/NumberFormatTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/NumberFormatTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,232 @@
+/* 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.text;
+
+import java.text.ChoiceFormat;
+import java.text.DecimalFormat;
+import java.text.FieldPosition;
+import java.text.NumberFormat;
+import java.text.ParseException;
+import java.util.Currency;
+import java.util.Locale;
+
+public class NumberFormatTest extends junit.framework.TestCase {
+
+	/**
+	 * @tests java.text.NumberFormat#format(java.lang.Object,
+	 *        java.lang.StringBuffer, java.text.FieldPosition)
+	 */
+	public void test_formatLjava_lang_ObjectLjava_lang_StringBufferLjava_text_FieldPosition() {
+		FieldPosition pos;
+		StringBuffer out;
+		DecimalFormat format = (DecimalFormat) NumberFormat
+				.getInstance(Locale.US);
+
+		pos = new FieldPosition(0);
+		out = format.format(new Long(Long.MAX_VALUE), new StringBuffer(), pos);
+		assertTrue("Wrong result L1: " + out, out.toString().equals(
+				"9,223,372,036,854,775,807"));
+
+		pos = new FieldPosition(0);
+		out = format.format(new Long(Long.MIN_VALUE), new StringBuffer(), pos);
+		assertTrue("Wrong result L2: " + out, out.toString().equals(
+				"-9,223,372,036,854,775,808"));
+
+		pos = new FieldPosition(0);
+		out = format.format(new java.math.BigInteger(String
+				.valueOf(Long.MAX_VALUE)), new StringBuffer(), pos);
+		assertTrue("Wrong result BI1: " + out, out.toString().equals(
+				"9,223,372,036,854,775,807"));
+
+		pos = new FieldPosition(0);
+		out = format.format(new java.math.BigInteger(String
+				.valueOf(Long.MIN_VALUE)), new StringBuffer(), pos);
+		assertTrue("Wrong result BI2: " + out, out.toString().equals(
+				"-9,223,372,036,854,775,808"));
+
+		java.math.BigInteger big;
+		pos = new FieldPosition(0);
+		big = new java.math.BigInteger(String.valueOf(Long.MAX_VALUE))
+				.add(new java.math.BigInteger("1"));
+		out = format.format(big, new StringBuffer(), pos);
+		assertTrue("Wrong result BI3: " + out, out.toString().equals(
+				"9,223,372,036,854,776,000"));
+
+		pos = new FieldPosition(0);
+		big = new java.math.BigInteger(String.valueOf(Long.MIN_VALUE))
+				.add(new java.math.BigInteger("-1"));
+		out = format.format(big, new StringBuffer(), pos);
+		assertTrue("Wrong result BI4: " + out, out.toString().equals(
+				"-9,223,372,036,854,776,000"));
+
+		pos = new FieldPosition(0);
+		out = format.format(new java.math.BigDecimal("51.348"),
+				new StringBuffer(), pos);
+		assertTrue("Wrong result BD1: " + out, out.toString().equals("51.348"));
+
+		pos = new FieldPosition(0);
+		out = format.format(new java.math.BigDecimal("51"), new StringBuffer(),
+				pos);
+		assertTrue("Wrong result BD2: " + out, out.toString().equals("51"));
+
+	}
+
+	/**
+	 * @tests java.text.NumberFormat#getIntegerInstance()
+	 */
+	public void test_getIntegerInstance() {
+		// Test for method java.text.NumberFormat getIntegerInstance()
+		Locale origLocale = Locale.getDefault();
+		Locale.setDefault(Locale.US);
+
+		DecimalFormat format = (DecimalFormat) NumberFormat
+				.getIntegerInstance();
+
+		assertEquals(
+				"Test1: NumberFormat.getIntegerInstance().toPattern() returned wrong pattern",
+				"#,##0", format.toPattern());
+		assertEquals(
+				"Test2: NumberFormat.getIntegerInstance().format(35.76) returned wrong value",
+				"36", format.format(35.76));
+		try {
+			assertEquals(
+					"Test3: NumberFormat.getIntegerInstance().parse(\"35.76\") returned wrong number",
+					new Long(35), format.parse("35.76"));
+			assertEquals(
+					"Test4: NumberFormat.getIntegerInstance().parseObject(\"35.76\") returned wrong number",
+					new Long(35), format.parseObject("35.76"));
+		} catch (ParseException e) {
+			fail("Unexpected exception" + e);
+		}
+		Locale.setDefault(origLocale);
+	}
+
+	/**
+	 * @tests java.text.NumberFormat#getIntegerInstance(java.util.Locale)
+	 */
+	public void test_getIntegerInstanceLjava_util_Locale() {
+		// Test for method java.text.NumberFormat
+		// getIntegerInstance(java.util.Locale)
+		Locale usLocale = Locale.US;
+		Locale arLocale = new Locale("ar", "AE");
+
+		DecimalFormat format = (DecimalFormat) NumberFormat
+				.getIntegerInstance(usLocale);
+		assertEquals(
+				"Test1: NumberFormat.getIntegerInstance().toPattern() returned wrong pattern",
+				"#,##0", format.toPattern());
+		assertEquals(
+				"Test2: NumberFormat.getIntegerInstance().format(-35.76) returned wrong value",
+				"-36", format.format(-35.76));
+		try {
+			assertEquals(
+					"Test3: NumberFormat.getIntegerInstance().parse(\"-36\") returned wrong number",
+					new Long(-36), format.parse("-36"));
+			assertEquals(
+					"Test4: NumberFormat.getIntegerInstance().parseObject(\"-36\") returned wrong number",
+					new Long(-36), format.parseObject("-36"));
+		} catch (ParseException e) {
+			fail("Unexpected exception" + e);
+		}
+		assertEquals(
+				"Test5: NumberFormat.getIntegerInstance().getMaximumFractionDigits() returned wrong value",
+				0, format.getMaximumFractionDigits());
+		assertEquals(
+				"Test6: NumberFormat.getIntegerInstance().isParseIntegerOnly() returned wrong value",
+				true, format.isParseIntegerOnly());
+
+		// try with a locale that has a different integer pattern
+		format = (DecimalFormat) NumberFormat.getIntegerInstance(arLocale);
+		assertEquals(
+				"Test7: NumberFormat.getIntegerInstance(new Locale(\"ar\", \"AE\")).toPattern() returned wrong pattern",
+				"#,##0;#,##0-", format.toPattern());
+		assertEquals(
+				"Test8: NumberFormat.getIntegerInstance(new Locale(\"ar\", \"AE\")).format(-35.76) returned wrong value",
+				"36-", format.format(-35.76));
+		try {
+			assertEquals(
+					"Test9: NumberFormat.getIntegerInstance(new Locale(\"ar\", \"AE\")).parse(\"-36-\") returned wrong number",
+					new Long(-36), format.parse("36-"));
+			assertEquals(
+					"Test10: NumberFormat.getIntegerInstance(new Locale(\"ar\", \"AE\")).parseObject(\"36-\") returned wrong number",
+					new Long(-36), format.parseObject("36-"));
+		} catch (ParseException e) {
+			fail("Unexpected exception" + e);
+		}
+		assertEquals(
+				"Test11: NumberFormat.getIntegerInstance(new Locale(\"ar\", \"AE\")).getMaximumFractionDigits() returned wrong value",
+				0, format.getMaximumFractionDigits());
+		assertEquals(
+				"Test12: NumberFormat.getIntegerInstance(new Locale(\"ar\", \"AE\")).isParseIntegerOnly() returned wrong value",
+				true, format.isParseIntegerOnly());
+	}
+
+	/**
+	 * @tests java.text.NumberFormat#getCurrency()
+	 */
+	public void test_getCurrency() {
+		// Test for method java.util.Currency getCurrency()
+
+		// a subclass that supports currency formatting
+		Currency currH = Currency.getInstance("HUF");
+		NumberFormat format = NumberFormat.getInstance(new Locale("hu", "HU"));
+		assertTrue("Returned incorrect currency", format.getCurrency() == currH);
+
+		// a subclass that doesn't support currency formatting
+		ChoiceFormat cformat = new ChoiceFormat(
+				"0#Less than one|1#one|1<Between one and two|2<Greater than two");
+		try {
+			((NumberFormat) cformat).getCurrency();
+			fail("Expected UnsupportedOperationException");
+		} catch (UnsupportedOperationException e) {
+		}
+	}
+
+	/**
+	 * @tests java.text.NumberFormat#getMaximumIntegerDigits()
+	 */
+	public void test_getMaximumIntegerDigits() {
+		NumberFormat format = NumberFormat.getInstance();
+		format.setMaximumIntegerDigits(2);
+		assertTrue("Wrong result", format.format(123).equals("23"));
+	}
+
+	/**
+	 * @tests java.text.NumberFormat#setCurrency(java.util.Currency)
+	 */
+	public void test_setCurrencyLjava_util_Currency() {
+		// Test for method void setCurrency(java.util.Currency)
+		// a subclass that supports currency formatting
+		Currency currA = Currency.getInstance("ARS");
+		NumberFormat format = NumberFormat.getInstance(new Locale("hu", "HU"));
+		format.setCurrency(currA);
+		assertTrue("Returned incorrect currency", format.getCurrency() == currA);
+
+		// a subclass that doesn't support currency formatting
+		ChoiceFormat cformat = new ChoiceFormat(
+				"0#Less than one|1#one|1<Between one and two|2<Greater than two");
+		try {
+			((NumberFormat) cformat).setCurrency(currA);
+			fail("Expected UnsupportedOperationException");
+		} catch (UnsupportedOperationException e) {
+		}
+	}
+
+	protected void setUp() {
+	}
+
+	protected void tearDown() {
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/ParseExceptionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/ParseExceptionTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/ParseExceptionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/ParseExceptionTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,64 @@
+/* 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.text;
+
+import java.text.DateFormat;
+import java.text.ParseException;
+
+public class ParseExceptionTest extends junit.framework.TestCase {
+
+	/**
+	 * @tests java.text.ParseException#ParseException(java.lang.String, int)
+	 */
+	public void test_ConstructorLjava_lang_StringI() {
+		// Test for method java.text.ParseException(java.lang.String, int)
+		// SM
+		try {
+			DateFormat df = DateFormat.getInstance();
+			df.parse("HelloWorld");
+		} catch (ParseException e) {
+			return;
+		}
+		fail("ParseException not created/thrown.");
+	}
+
+	/**
+	 * @tests java.text.ParseException#getErrorOffset()
+	 */
+	public void test_getErrorOffset() {
+		// Test for method int java.text.ParseException.getErrorOffset()
+		// SM
+		try {
+			DateFormat df = DateFormat.getInstance();
+			df.parse("1999HelloWorld");
+		} catch (ParseException e) {
+			assertTrue("getErrorOffsetFailed.", e.getErrorOffset() == 4);
+		}
+	}
+
+	/**
+	 * 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/text/src/test/java/tests/api/java/text/ParsePositionTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/ParsePositionTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/ParsePositionTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/ParsePositionTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,121 @@
+/* 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.text;
+
+import java.text.ParsePosition;
+
+public class ParsePositionTest extends junit.framework.TestCase {
+
+	ParsePosition pp;
+
+	/**
+	 * @tests java.text.ParsePosition#ParsePosition(int)
+	 */
+	public void test_ConstructorI() {
+		// Test for method java.text.ParsePosition(int)
+		try {
+			ParsePosition pp1 = new ParsePosition(Integer.MIN_VALUE);
+			assertTrue("Initialization failed.",
+					pp1.getIndex() == Integer.MIN_VALUE);
+			assertTrue("Initialization failed.", pp1.getErrorIndex() == -1);
+		} catch (Exception e) {
+			fail("Constructor failed.");
+		}
+
+	}
+
+	/**
+	 * @tests java.text.ParsePosition#equals(java.lang.Object)
+	 */
+	public void test_equalsLjava_lang_Object() {
+		// Test for method boolean
+		// java.text.ParsePosition.equals(java.lang.Object)
+		ParsePosition pp2 = new ParsePosition(43);
+		pp2.setErrorIndex(56);
+		assertTrue("equals failed.", !pp.equals(pp2));
+		pp.setErrorIndex(56);
+		pp.setIndex(43);
+		assertTrue("equals failed.", pp.equals(pp2));
+	}
+
+	/**
+	 * @tests java.text.ParsePosition#getErrorIndex()
+	 */
+	public void test_getErrorIndex() {
+		// Test for method int java.text.ParsePosition.getErrorIndex()
+		pp.setErrorIndex(56);
+		assertTrue("getErrorIndex failed.", pp.getErrorIndex() == 56);
+	}
+
+	/**
+	 * @tests java.text.ParsePosition#getIndex()
+	 */
+	public void test_getIndex() {
+		// Test for method int java.text.ParsePosition.getIndex()
+		assertTrue("getIndex failed.", pp.getIndex() == Integer.MAX_VALUE);
+	}
+
+	/**
+	 * @tests java.text.ParsePosition#hashCode()
+	 */
+	public void test_hashCode() {
+		// Test for method int java.text.ParsePosition.hashCode()
+		assertTrue("Wrong hashCode returned", (pp.hashCode() == pp.getIndex()
+				+ pp.getErrorIndex()));
+	}
+
+	/**
+	 * @tests java.text.ParsePosition#setErrorIndex(int)
+	 */
+	public void test_setErrorIndexI() {
+		// Test for method void java.text.ParsePosition.setErrorIndex(int)
+		pp.setErrorIndex(4564);
+		assertTrue("setErrorIndex failed.", pp.getErrorIndex() == 4564);
+	}
+
+	/**
+	 * @tests java.text.ParsePosition#setIndex(int)
+	 */
+	public void test_setIndexI() {
+		// Test for method void java.text.ParsePosition.setIndex(int)
+		pp.setIndex(4564);
+		assertTrue("setErrorIndex failed.", pp.getIndex() == 4564);
+	}
+
+	/**
+	 * @tests java.text.ParsePosition#toString()
+	 */
+	public void test_toString() {
+		// Test for method java.lang.String java.text.ParsePosition.toString()
+		assertTrue("toString failed.", pp.toString().equals(
+				"java.text.ParsePosition[index=2147483647, errorIndex=-1]"));
+	}
+
+	/**
+	 * Sets up the fixture, for example, open a network connection. This method
+	 * is called before a test is executed.
+	 */
+	protected void setUp() {
+
+		pp = new ParsePosition(Integer.MAX_VALUE);
+	}
+
+	/**
+	 * 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/text/src/test/java/tests/api/java/text/RuleBasedCollatorTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/RuleBasedCollatorTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/RuleBasedCollatorTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/RuleBasedCollatorTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,250 @@
+/* Copyright 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.text;
+
+import java.text.CollationElementIterator;
+import java.text.CollationKey;
+import java.text.Collator;
+import java.text.ParseException;
+import java.text.RuleBasedCollator;
+import java.text.StringCharacterIterator;
+import java.util.Locale;
+
+import junit.framework.TestCase;
+
+/**
+ * Test RuleBasedCollator
+ * 
+ * Only test normal condition.
+ * 
+ */
+public class RuleBasedCollatorTest extends TestCase {
+
+	public void testHashCode() throws ParseException {
+		{
+			String rule = "< a < b < c < d";
+			RuleBasedCollator coll = new RuleBasedCollator(rule);
+			assertEquals(rule.hashCode(), coll.hashCode());
+		}
+
+		{
+			String rule = "< a < b < c < d < e";
+			RuleBasedCollator coll = new RuleBasedCollator(rule);
+			assertEquals(rule.hashCode(), coll.hashCode());
+		}
+
+	}
+
+	public void testClone() throws ParseException {
+		RuleBasedCollator coll = (RuleBasedCollator) Collator
+				.getInstance(Locale.US);
+		RuleBasedCollator clone = (RuleBasedCollator) coll.clone();
+		assertNotSame(coll, clone);
+		assertEquals(coll.getRules(), clone.getRules());
+		assertEquals(coll.getDecomposition(), clone.getDecomposition());
+		assertEquals(coll.getStrength(), clone.getStrength());
+	}
+
+	/*
+	 * Class under test for boolean equals(java.lang.Object)
+	 */
+	public void testEqualsObject() throws ParseException {
+		String rule = "< a < b < c < d < e";
+		RuleBasedCollator coll = new RuleBasedCollator(rule);
+
+		assertEquals(Collator.TERTIARY, coll.getStrength());
+		assertEquals(Collator.NO_DECOMPOSITION, coll.getDecomposition());
+		RuleBasedCollator other = new RuleBasedCollator(rule);
+		assertTrue(coll.equals(other));
+
+		coll.setStrength(Collator.PRIMARY);
+		assertFalse(coll.equals(other));
+
+		coll.setStrength(Collator.TERTIARY);
+		coll.setDecomposition(Collator.CANONICAL_DECOMPOSITION);
+		assertFalse(coll.equals(other));
+	}
+
+	/*
+	 * Class under test for int compare(java.lang.String, java.lang.String)
+	 */
+	public void testCompareStringString() throws ParseException {
+		String rule = "< c < b < a";
+		RuleBasedCollator coll = new RuleBasedCollator(rule);
+		assertEquals(-1, coll.compare("c", "a"));
+	}
+
+	public void testGetCollationKey() {
+		RuleBasedCollator coll = (RuleBasedCollator) Collator
+				.getInstance(Locale.GERMAN);
+		String source = "abc";
+		CollationKey key1 = coll.getCollationKey(source);
+		assertEquals(source, key1.getSourceString());
+		String source2 = "abb";
+		CollationKey key2 = coll.getCollationKey(source2);
+		assertEquals(source2, key2.getSourceString());
+		assertTrue(key1.compareTo(key2) > 0);
+		assertTrue(coll.compare(source, source2) > 0);
+
+	}
+
+	public void testGetRules() throws ParseException {
+		String rule = "< a = b < c";
+		RuleBasedCollator coll = new RuleBasedCollator(rule);
+		assertEquals(rule, coll.getRules());
+	}
+
+	/*
+	 * Class under test for java.text.CollationElementIterator
+	 * getCollationElementIterator(java.lang.String)
+	 */
+	public void testGetCollationElementIteratorString() {
+		{
+			Locale locale = new Locale("es", "", "TRADITIONAL");
+			RuleBasedCollator coll = (RuleBasedCollator) Collator
+					.getInstance(locale);
+			System.out.println("Rules: " + coll.getRules());
+			String source = "cha";
+			CollationElementIterator iterator = coll
+					.getCollationElementIterator(source);
+			int[] e_offset = { 0, 2, 3 };
+			int offset = iterator.getOffset();
+			int i = 0;
+			assertEquals(e_offset[i++], offset);
+			while (offset != source.length()) {
+				iterator.next();
+				offset = iterator.getOffset();
+				assertEquals(e_offset[i++], offset);
+			}
+		}
+
+		{
+			Locale locale = new Locale("de", "DE");
+			RuleBasedCollator coll = (RuleBasedCollator) Collator
+					.getInstance(locale);
+			String source = "\u00E6b";
+			CollationElementIterator iterator = coll
+					.getCollationElementIterator(source);
+			int[] e_offset = { 0, 1, 1, 2 };
+			int offset = iterator.getOffset();
+			int i = 0;
+			assertEquals(e_offset[i++], offset);
+			while (offset != source.length()) {
+				iterator.next();
+				offset = iterator.getOffset();
+				assertEquals(e_offset[i++], offset);
+			}
+		}
+	}
+
+	/*
+	 * Class under test for java.text.CollationElementIterator
+	 * getCollationElementIterator(java.text.CharacterIterator)
+	 */
+	public void testGetCollationElementIteratorCharacterIterator() {
+		{
+			Locale locale = new Locale("es", "", "TRADITIONAL");
+			RuleBasedCollator coll = (RuleBasedCollator) Collator
+					.getInstance(locale);
+			String text = "cha";
+			StringCharacterIterator source = new StringCharacterIterator(text);
+			CollationElementIterator iterator = coll
+					.getCollationElementIterator(source);
+			int[] e_offset = { 0, 2, 3 };
+			int offset = iterator.getOffset();
+			int i = 0;
+			assertEquals(e_offset[i++], offset);
+			while (offset != text.length()) {
+				iterator.next();
+				offset = iterator.getOffset();
+				// System.out.println(offset);
+				assertEquals(e_offset[i++], offset);
+			}
+		}
+
+		{
+			Locale locale = new Locale("de", "DE");
+			RuleBasedCollator coll = (RuleBasedCollator) Collator
+					.getInstance(locale);
+			String text = "\u00E6b";
+			StringCharacterIterator source = new StringCharacterIterator(text);
+			CollationElementIterator iterator = coll
+					.getCollationElementIterator(source);
+			int[] e_offset = { 0, 1, 1, 2 };
+			int offset = iterator.getOffset();
+			int i = 0;
+			assertEquals(e_offset[i++], offset);
+			while (offset != text.length()) {
+				iterator.next();
+				offset = iterator.getOffset();
+				assertEquals(e_offset[i++], offset);
+			}
+		}
+	}
+
+	public void testStrength() {
+		RuleBasedCollator coll = (RuleBasedCollator) Collator
+				.getInstance(Locale.US);
+		for (int i = 0; i < 4; i++) {
+			coll.setStrength(i);
+			assertEquals(i, coll.getStrength());
+		}
+
+	}
+
+	public void testDecomposition() {
+		RuleBasedCollator coll = (RuleBasedCollator) Collator
+				.getInstance(Locale.US);
+		for (int i = 0; i < 2; i++) {
+			coll.setDecomposition(i);
+			assertEquals(i, coll.getDecomposition());
+		}
+	}
+
+	public void testCollator_GetInstance() {
+		Collator coll = Collator.getInstance();
+		Object obj1 = "a";
+		Object obj2 = "b";
+		assertEquals(-1, coll.compare(obj1, obj2));
+
+		Collator coll2 = Collator.getInstance();
+		assertFalse(coll.equals("A", "\uFF21"));
+	}
+
+	public void testGetAvaiableLocales() {
+		// Locale[] locales = Collator.getAvailableLocales();
+		// for (int i = 0; i < locales.length; i++) {
+		// Locale locale = locales[i];
+		// }
+	}
+
+	// Test CollationKey
+	public void testCollationKey() {
+		Collator coll = Collator.getInstance(Locale.US);
+		String text = "abc";
+		CollationKey key = coll.getCollationKey(text);
+		int hashCode = key.hashCode();
+
+		CollationKey key2 = coll.getCollationKey("abc");
+
+		assertEquals(0, key.compareTo(key2));
+		Object key3 = key2;
+		assertEquals(0, key.compareTo(key3));
+		assertTrue(key.equals(key2));
+
+		byte[] bytes = key.toByteArray();
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/SimpleDateFormatTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/SimpleDateFormatTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/SimpleDateFormatTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/SimpleDateFormatTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,848 @@
+/* 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.text;
+
+import java.text.DateFormat;
+import java.text.DateFormatSymbols;
+import java.text.FieldPosition;
+import java.text.ParseException;
+import java.text.ParsePosition;
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+import java.util.Date;
+import java.util.GregorianCalendar;
+import java.util.Locale;
+import java.util.SimpleTimeZone;
+import java.util.TimeZone;
+
+import tests.support.Support_SimpleDateFormat;
+
+public class SimpleDateFormatTest extends junit.framework.TestCase {
+
+	static SimpleDateFormat format = new SimpleDateFormat("", Locale.ENGLISH);
+
+	static SimpleDateFormat pFormat = new SimpleDateFormat("", Locale.ENGLISH);
+
+	static class TestFormat extends junit.framework.TestCase {
+		boolean testsFailed = false;
+
+		public TestFormat(String name) {
+			super(name);
+		}
+
+		public void test(String pattern, Calendar cal, String expected,
+				int field) {
+			StringBuffer buffer = new StringBuffer();
+			FieldPosition position = new FieldPosition(field);
+			format.applyPattern(pattern);
+			format.format(cal.getTime(), buffer, position);
+			String result = buffer.toString();
+			if (!System.getProperty("java.vendor", "None").substring(0, 3)
+					.equals("Sun")) {
+				assertTrue("Wrong format: \"" + pattern + "\" expected: "
+						+ expected + " result: " + result, result
+						.equals(expected));
+				assertTrue("Wrong begin position: " + pattern + " expected: "
+						+ expected + " field: " + field, position
+						.getBeginIndex() == 1);
+				assertTrue("Wrong end position: " + pattern + " expected: "
+						+ expected + " field: " + field,
+						position.getEndIndex() == result.length());
+			} else {
+				// Print the failure but don't use assert as this
+				// will stop subsequent tests from running
+				if (!result.equals(expected)) {
+					System.out
+							.println("Wrong format: \"" + pattern
+									+ "\" expected: " + expected + " result: "
+									+ result);
+					testsFailed = true;
+				}
+			}
+		}
+
+		public boolean testsFailed() {
+			return testsFailed;
+		}
+
+		public void parse(String pattern, String input, Date expected,
+				int start, int end) {
+			pFormat.applyPattern(pattern);
+			ParsePosition position = new ParsePosition(start);
+			Date result = pFormat.parse(input, position);
+			assertTrue("Wrong result: " + pattern + " input: " + input
+					+ " expected: " + expected + " result: " + result, expected
+					.equals(result));
+			assertTrue("Wrong end position: " + pattern + " input: " + input,
+					position.getIndex() == end);
+		}
+
+		public void verifyFormatTimezone(String timeZoneId, String expected1,
+				String expected2, Date date) {
+			format.setTimeZone(SimpleTimeZone.getTimeZone(timeZoneId));
+			format.applyPattern("z, zzzz");
+			assertEquals("Test z for TimeZone : " + timeZoneId, expected1,
+					format.format(date));
+
+			format.applyPattern("Z, ZZZZ");
+			assertEquals("Test Z for TimeZone : " + timeZoneId, expected2,
+					format.format(date));
+		}
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#SimpleDateFormat()
+	 */
+	public void test_Constructor() {
+		// Test for method java.text.SimpleDateFormat()
+		SimpleDateFormat f2 = new SimpleDateFormat();
+		assertTrue("Wrong class", f2.getClass() == SimpleDateFormat.class);
+		assertTrue("Wrong default", f2.equals(DateFormat.getDateTimeInstance(
+				DateFormat.SHORT, DateFormat.SHORT, Locale.getDefault())));
+		assertTrue("Wrong symbols", f2.getDateFormatSymbols().equals(
+				new DateFormatSymbols()));
+		assertTrue("Doesn't work",
+				f2.format(new Date()).getClass() == String.class);
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#SimpleDateFormat(java.lang.String)
+	 */
+	public void test_ConstructorLjava_lang_String() {
+		// Test for method java.text.SimpleDateFormat(java.lang.String)
+		SimpleDateFormat f2 = new SimpleDateFormat("yyyy");
+		assertTrue("Wrong class", f2.getClass() == SimpleDateFormat.class);
+		assertTrue("Wrong pattern", f2.toPattern().equals("yyyy"));
+		assertTrue("Wrong locale", f2.equals(new SimpleDateFormat("yyyy",
+				Locale.getDefault())));
+		assertTrue("Wrong symbols", f2.getDateFormatSymbols().equals(
+				new DateFormatSymbols()));
+		assertTrue("Doesn't work",
+				f2.format(new Date()).getClass() == String.class);
+
+		// Invalid constructor value.
+		SimpleDateFormat dateFormat = null;
+		try {
+			dateFormat = new SimpleDateFormat(
+					"this is an invalid simple date format");
+			fail("Expected test_ConstructorLjava_lang_String to throw IAE.");
+		} catch (IllegalArgumentException ex) {
+			// expected
+		} catch (Throwable ex) {
+			fail("Expected test_ConstructorLjava_lang_String to throw IAE, not "
+					+ ex.getClass().getName());
+		}
+
+		// Null string value
+		try {
+			new SimpleDateFormat(null);
+			fail("Expected test_ConstructorLjava_lang_String to throw NPE.");
+		} catch (NullPointerException ex) {
+			// expected
+		} catch (Throwable ex) {
+			fail("Expected test_ConstructorLjava_lang_String to throw NPE, not "
+					+ ex.getClass().getName());
+		}
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#SimpleDateFormat(java.lang.String,
+	 *        java.text.DateFormatSymbols)
+	 */
+	public void test_ConstructorLjava_lang_StringLjava_text_DateFormatSymbols() {
+		// Test for method java.text.SimpleDateFormat(java.lang.String,
+		// java.text.DateFormatSymbols)
+		DateFormatSymbols symbols = new DateFormatSymbols(Locale.ENGLISH);
+		symbols.setEras(new String[] { "Before", "After" });
+		SimpleDateFormat f2 = new SimpleDateFormat("y'y'yy", symbols);
+		assertTrue("Wrong class", f2.getClass() == SimpleDateFormat.class);
+		assertTrue("Wrong pattern", f2.toPattern().equals("y'y'yy"));
+		assertTrue("Wrong symbols", f2.getDateFormatSymbols().equals(symbols));
+		assertTrue("Doesn't work",
+				f2.format(new Date()).getClass() == String.class);
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#SimpleDateFormat(java.lang.String,
+	 *        java.util.Locale)
+	 */
+	public void test_ConstructorLjava_lang_StringLjava_util_Locale() {
+		// Test for method java.text.SimpleDateFormat(java.lang.String,
+		// java.util.Locale)
+		SimpleDateFormat f2 = new SimpleDateFormat("'yyyy' MM yy",
+				Locale.GERMAN);
+		assertTrue("Wrong class", f2.getClass() == SimpleDateFormat.class);
+		assertTrue("Wrong pattern", f2.toPattern().equals("'yyyy' MM yy"));
+		assertTrue("Wrong symbols", f2.getDateFormatSymbols().equals(
+				new DateFormatSymbols(Locale.GERMAN)));
+		assertTrue("Doesn't work",
+				f2.format(new Date()).getClass() == String.class);
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#applyLocalizedPattern(java.lang.String)
+	 */
+	public void test_applyLocalizedPatternLjava_lang_String() {
+		// Test for method void
+		// java.text.SimpleDateFormat.applyLocalizedPattern(java.lang.String)
+		SimpleDateFormat f2 = new SimpleDateFormat("y", new Locale("de", "CH"));
+		f2.applyLocalizedPattern("GuMtkHmsSEDFwWahKz");
+		String pattern = f2.toPattern();
+		assertTrue("Wrong pattern: " + pattern, pattern
+				.equals("GyMdkHmsSEDFwWahKz"));
+
+		// test the new "Z" pattern char
+		f2 = new SimpleDateFormat("y", new Locale("de", "CH"));
+		f2.applyLocalizedPattern("G u M t Z");
+		pattern = f2.toPattern();
+		assertTrue("Wrong pattern: " + pattern, pattern.equals("G y M d Z"));
+
+		// test invalid patterns
+		try {
+			f2.applyLocalizedPattern("b");
+			fail("Expected IllegalArgumentException for pattern with invalid pattern letter: b");
+		} catch (IllegalArgumentException e) {
+		}
+
+		try {
+			f2.applyLocalizedPattern("y");
+			fail("Expected IllegalArgumentException for pattern with invalid pattern letter: y");
+		} catch (IllegalArgumentException e) {
+		}
+
+		try {
+			f2.applyLocalizedPattern("a '");
+			fail("Expected IllegalArgumentException for pattern with unterminated quote: a '");
+		} catch (IllegalArgumentException e) {
+		}
+
+		try {
+			f2.applyLocalizedPattern(null);
+			fail("Expected NullPointerException for null pattern");
+		} catch (NullPointerException e) {
+		}
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#applyPattern(java.lang.String)
+	 */
+	public void test_applyPatternLjava_lang_String() {
+		// Test for method void
+		// java.text.SimpleDateFormat.applyPattern(java.lang.String)
+		SimpleDateFormat f2 = new SimpleDateFormat("y", new Locale("de", "CH"));
+		f2.applyPattern("GyMdkHmsSEDFwWahKz");
+		assertTrue("Wrong pattern", f2.toPattern().equals("GyMdkHmsSEDFwWahKz"));
+
+		// test invalid patterns
+		try {
+			f2.applyPattern("b");
+			fail("Expected IllegalArgumentException for pattern with invalid patter letter: b");
+		} catch (IllegalArgumentException e) {
+		}
+
+		try {
+			f2.applyPattern("u");
+			fail("Expected IllegalArgumentException for pattern with invalid patter letter: u");
+		} catch (IllegalArgumentException e) {
+		}
+
+		try {
+			f2.applyPattern("a '");
+			fail("Expected IllegalArgumentException for pattern with unterminated quote: a '");
+		} catch (IllegalArgumentException e) {
+		}
+
+		try {
+			f2.applyPattern(null);
+			fail("Expected NullPointerException for null pattern");
+		} catch (NullPointerException e) {
+		}
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#clone()
+	 */
+	public void test_clone() {
+		// Test for method java.lang.Object java.text.SimpleDateFormat.clone()
+		SimpleDateFormat f2 = new SimpleDateFormat();
+		SimpleDateFormat clone = (SimpleDateFormat) f2.clone();
+		assertTrue("Invalid clone", f2.equals(clone));
+		clone.applyPattern("y");
+		assertTrue("Format modified", !f2.equals(clone));
+		clone = (SimpleDateFormat) f2.clone();
+		// Date date = clone.get2DigitYearStart();
+		// date.setTime(0);
+		// assertTrue("Equal after date change: " +
+		// f2.get2DigitYearStart().getTime() + " " +
+		// clone.get2DigitYearStart().getTime(), !f2.equals(clone));
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#equals(java.lang.Object)
+	 */
+	public void test_equalsLjava_lang_Object() {
+		// Test for method boolean
+		// java.text.SimpleDateFormat.equals(java.lang.Object)
+		SimpleDateFormat format = (SimpleDateFormat) DateFormat.getInstance();
+		SimpleDateFormat clone = (SimpleDateFormat) format.clone();
+		assertTrue("clone not equal", format.equals(clone));
+		format.format(new Date());
+		assertTrue("not equal after format", format.equals(clone));
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#formatToCharacterIterator(java.lang.Object)
+	 */
+	public void test_formatToCharacterIteratorLjava_lang_Object() {
+		// Test for method formatToCharacterIterator(java.lang.Object)
+		new Support_SimpleDateFormat(
+				"test_formatToCharacterIteratorLjava_lang_Object")
+				.t_formatToCharacterIterator();
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#format(java.util.Date,
+	 *        java.lang.StringBuffer, java.text.FieldPosition)
+	 */
+	public void test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition() {
+		// Test for method java.lang.StringBuffer
+		// java.text.SimpleDateFormat.format(java.util.Date,
+		// java.lang.StringBuffer, java.text.FieldPosition)
+
+		new Support_SimpleDateFormat(
+				"test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition")
+				.t_format_with_FieldPosition();
+
+		TestFormat test = new TestFormat(
+				"test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition");
+
+		Calendar cal = new GregorianCalendar(1999, Calendar.JUNE, 2, 15, 3, 6);
+		test.test(" G", cal, " AD", DateFormat.ERA_FIELD);
+		test.test(" GG", cal, " AD", DateFormat.ERA_FIELD);
+		test.test(" GGG", cal, " AD", DateFormat.ERA_FIELD);
+		test.test(" G", new GregorianCalendar(-1999, Calendar.JUNE, 2), " BC",
+				DateFormat.ERA_FIELD);
+
+		test.test(" y", cal, " 99", DateFormat.YEAR_FIELD);
+		test.test(" yy", cal, " 99", DateFormat.YEAR_FIELD);
+		test.test(" yy", new GregorianCalendar(2001, Calendar.JUNE, 2), " 01",
+				DateFormat.YEAR_FIELD);
+		test.test(" yy", new GregorianCalendar(2000, Calendar.JUNE, 2), " 00",
+				DateFormat.YEAR_FIELD);
+		test.test(" yyy", new GregorianCalendar(2000, Calendar.JUNE, 2), " 00",
+				DateFormat.YEAR_FIELD);
+		test.test(" yyy", cal, " 99", DateFormat.YEAR_FIELD);
+		test.test(" yyyy", cal, " 1999", DateFormat.YEAR_FIELD);
+		test.test(" yyyyy", cal, " 1999", DateFormat.YEAR_FIELD);
+
+		test.test(" M", cal, " 6", DateFormat.MONTH_FIELD);
+		test.test(" M", new GregorianCalendar(1999, Calendar.NOVEMBER, 2),
+				" 11", DateFormat.MONTH_FIELD);
+		test.test(" MM", cal, " 06", DateFormat.MONTH_FIELD);
+		test.test(" MMM", cal, " Jun", DateFormat.MONTH_FIELD);
+		test.test(" MMMM", cal, " June", DateFormat.MONTH_FIELD);
+		test.test(" MMMMM", cal, " June", DateFormat.MONTH_FIELD);
+
+		test.test(" d", cal, " 2", DateFormat.DATE_FIELD);
+		test.test(" d", new GregorianCalendar(1999, Calendar.NOVEMBER, 12),
+				" 12", DateFormat.DATE_FIELD);
+		test.test(" dd", cal, " 02", DateFormat.DATE_FIELD);
+		test.test(" dddd", cal, " 0002", DateFormat.DATE_FIELD);
+
+		test.test(" h", cal, " 3", DateFormat.HOUR1_FIELD);
+		test.test(" h", new GregorianCalendar(1999, Calendar.NOVEMBER, 12),
+				" 12", DateFormat.HOUR1_FIELD);
+		test.test(" hh", cal, " 03", DateFormat.HOUR1_FIELD);
+		test.test(" hhhh", cal, " 0003", DateFormat.HOUR1_FIELD);
+
+		test.test(" H", cal, " 15", DateFormat.HOUR_OF_DAY0_FIELD);
+		test.test(" H",
+				new GregorianCalendar(1999, Calendar.NOVEMBER, 12, 4, 0), " 4",
+				DateFormat.HOUR_OF_DAY0_FIELD);
+		test.test(" H", new GregorianCalendar(1999, Calendar.NOVEMBER, 12, 12,
+				0), " 12", DateFormat.HOUR_OF_DAY0_FIELD);
+		test.test(" H", new GregorianCalendar(1999, Calendar.NOVEMBER, 12),
+				" 0", DateFormat.HOUR_OF_DAY0_FIELD);
+		test.test(" HH", cal, " 15", DateFormat.HOUR_OF_DAY0_FIELD);
+		test.test(" HHHH", cal, " 0015", DateFormat.HOUR_OF_DAY0_FIELD);
+
+		test.test(" m", cal, " 3", DateFormat.MINUTE_FIELD);
+		test.test(" m", new GregorianCalendar(1999, Calendar.NOVEMBER, 12, 4,
+				47), " 47", DateFormat.MINUTE_FIELD);
+		test.test(" mm", cal, " 03", DateFormat.MINUTE_FIELD);
+		test.test(" mmmm", cal, " 0003", DateFormat.MINUTE_FIELD);
+
+		test.test(" s", cal, " 6", DateFormat.SECOND_FIELD);
+		test.test(" s", new GregorianCalendar(1999, Calendar.NOVEMBER, 12, 4,
+				47, 13), " 13", DateFormat.SECOND_FIELD);
+		test.test(" ss", cal, " 06", DateFormat.SECOND_FIELD);
+		test.test(" ssss", cal, " 0006", DateFormat.SECOND_FIELD);
+
+		test.test(" S", cal, " 0", DateFormat.MILLISECOND_FIELD);
+		Calendar temp = new GregorianCalendar();
+		temp.set(Calendar.MILLISECOND, 961);
+
+		test.test(" SS", temp, " 961", DateFormat.MILLISECOND_FIELD);
+		test.test(" SSSS", cal, " 0000", DateFormat.MILLISECOND_FIELD);
+
+		test.test(" SS", cal, " 00", DateFormat.MILLISECOND_FIELD);
+
+		test.test(" E", cal, " Wed", DateFormat.DAY_OF_WEEK_FIELD);
+		test.test(" EE", cal, " Wed", DateFormat.DAY_OF_WEEK_FIELD);
+		test.test(" EEE", cal, " Wed", DateFormat.DAY_OF_WEEK_FIELD);
+		test.test(" EEEE", cal, " Wednesday", DateFormat.DAY_OF_WEEK_FIELD);
+		test.test(" EEEEE", cal, " Wednesday", DateFormat.DAY_OF_WEEK_FIELD);
+
+		test.test(" D", cal, " 153", DateFormat.DAY_OF_YEAR_FIELD);
+		test.test(" DD", cal, " 153", DateFormat.DAY_OF_YEAR_FIELD);
+		test.test(" DDDD", cal, " 0153", DateFormat.DAY_OF_YEAR_FIELD);
+
+		test.test(" F", cal, " 1", DateFormat.DAY_OF_WEEK_IN_MONTH_FIELD);
+		test.test(" F", new GregorianCalendar(1999, Calendar.NOVEMBER, 14),
+				" 2", DateFormat.DAY_OF_WEEK_IN_MONTH_FIELD);
+		test.test(" FF", cal, " 01", DateFormat.DAY_OF_WEEK_IN_MONTH_FIELD);
+		test.test(" FFFF", cal, " 0001", DateFormat.DAY_OF_WEEK_IN_MONTH_FIELD);
+
+		test.test(" w", cal, " 23", DateFormat.WEEK_OF_YEAR_FIELD);
+		test.test(" ww", cal, " 23", DateFormat.WEEK_OF_YEAR_FIELD);
+		test.test(" wwww", cal, " 0023", DateFormat.WEEK_OF_YEAR_FIELD);
+
+		test.test(" W", cal, " 1", DateFormat.WEEK_OF_MONTH_FIELD);
+		test.test(" W", new GregorianCalendar(1999, Calendar.NOVEMBER, 14),
+				" 3", DateFormat.WEEK_OF_MONTH_FIELD);
+		test.test(" WW", cal, " 01", DateFormat.WEEK_OF_MONTH_FIELD);
+		test.test(" WWWW", cal, " 0001", DateFormat.WEEK_OF_MONTH_FIELD);
+
+		test.test(" a", cal, " PM", DateFormat.AM_PM_FIELD);
+		test.test(" a", new GregorianCalendar(1999, Calendar.NOVEMBER, 14),
+				" AM", DateFormat.AM_PM_FIELD);
+		test.test(" a", new GregorianCalendar(1999, Calendar.NOVEMBER, 14, 12,
+				0), " PM", DateFormat.AM_PM_FIELD);
+		test.test(" aa", cal, " PM", DateFormat.AM_PM_FIELD);
+		test.test(" aaa", cal, " PM", DateFormat.AM_PM_FIELD);
+		test.test(" aaaa", cal, " PM", DateFormat.AM_PM_FIELD);
+		test.test(" aaaaa", cal, " PM", DateFormat.AM_PM_FIELD);
+
+		test.test(" k", cal, " 15", DateFormat.HOUR_OF_DAY1_FIELD);
+		test.test(" k",
+				new GregorianCalendar(1999, Calendar.NOVEMBER, 12, 4, 0), " 4",
+				DateFormat.HOUR_OF_DAY1_FIELD);
+		test.test(" k", new GregorianCalendar(1999, Calendar.NOVEMBER, 12, 12,
+				0), " 12", DateFormat.HOUR_OF_DAY1_FIELD);
+		test.test(" k", new GregorianCalendar(1999, Calendar.NOVEMBER, 12),
+				" 24", DateFormat.HOUR_OF_DAY1_FIELD);
+		test.test(" kk", cal, " 15", DateFormat.HOUR_OF_DAY1_FIELD);
+		test.test(" kkkk", cal, " 0015", DateFormat.HOUR_OF_DAY1_FIELD);
+
+		test.test(" K", cal, " 3", DateFormat.HOUR0_FIELD);
+		test.test(" K", new GregorianCalendar(1999, Calendar.NOVEMBER, 12),
+				" 0", DateFormat.HOUR0_FIELD);
+		test.test(" KK", cal, " 03", DateFormat.HOUR0_FIELD);
+		test.test(" KKKK", cal, " 0003", DateFormat.HOUR0_FIELD);
+
+		format.setTimeZone(TimeZone.getTimeZone("EST"));
+		test.test(" z", cal, " EDT", DateFormat.TIMEZONE_FIELD);
+		Calendar temp2 = new GregorianCalendar(1999, Calendar.JANUARY, 12);
+		test.test(" z", temp2, " EST", DateFormat.TIMEZONE_FIELD);
+		test.test(" zz", cal, " EDT", DateFormat.TIMEZONE_FIELD);
+		test.test(" zzz", cal, " EDT", DateFormat.TIMEZONE_FIELD);
+		test.test(" zzzz", cal, " Eastern Daylight Time",
+				DateFormat.TIMEZONE_FIELD);
+		test.test(" zzzz", temp2, " Eastern Standard Time",
+				DateFormat.TIMEZONE_FIELD);
+		test.test(" zzzzz", cal, " Eastern Daylight Time",
+				DateFormat.TIMEZONE_FIELD);
+
+		format.setTimeZone(new SimpleTimeZone(60000, "ONE MINUTE"));
+		test.test(" z", cal, " GMT+00:01", DateFormat.TIMEZONE_FIELD);
+		test.test(" zzzz", cal, " GMT+00:01", DateFormat.TIMEZONE_FIELD);
+		format.setTimeZone(new SimpleTimeZone(5400000, "ONE HOUR, THIRTY"));
+		test.test(" z", cal, " GMT+01:30", DateFormat.TIMEZONE_FIELD);
+		format
+				.setTimeZone(new SimpleTimeZone(-5400000,
+						"NEG ONE HOUR, THIRTY"));
+		test.test(" z", cal, " GMT-01:30", DateFormat.TIMEZONE_FIELD);
+
+		format.applyPattern("'Mkz''':.@5");
+		assertTrue("Wrong output", format.format(new Date()).equals("Mkz':.@5"));
+
+		assertTrue("Tests failed", !test.testsFailed());
+
+		// Test invalid args to format.
+		SimpleDateFormat dateFormat = new SimpleDateFormat();
+		try {
+			dateFormat.format(null, new StringBuffer(), new FieldPosition(1));
+			fail("Expected test to throw NPE.");
+		} catch (NullPointerException ex) {
+			// expected
+		} catch (Throwable ex) {
+			fail("Expected test to throw NPE, not "
+					+ ex.getClass().getName());
+		}
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#format(java.util.Date)
+	 */
+	public void test_timeZoneFormatting() {
+		// tests specific to formatting of timezones
+		Date summerDate = new GregorianCalendar(1999, Calendar.JUNE, 2, 15, 3,
+				6).getTime();
+		Date winterDate = new GregorianCalendar(1999, Calendar.JANUARY, 12)
+				.getTime();
+
+		TestFormat test = new TestFormat(
+				"test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition");
+
+		test.verifyFormatTimezone("PST", "PDT, Pacific Daylight Time",
+				"-0700, -0700", summerDate);
+		test.verifyFormatTimezone("PST", "PST, Pacific Standard Time",
+				"-0800, -0800", winterDate);
+
+		test.verifyFormatTimezone("GMT-7", "GMT-07:00, GMT-07:00",
+				"-0700, -0700", summerDate);
+		test.verifyFormatTimezone("GMT-7", "GMT-07:00, GMT-07:00",
+				"-0700, -0700", winterDate);
+
+		// Pacific/Kiritimati is one of the timezones supported only in mJava
+		test.verifyFormatTimezone("Pacific/Kiritimati", "LINT, Line Is. Time",
+				"+1400, +1400", summerDate);
+		test.verifyFormatTimezone("Pacific/Kiritimati", "LINT, Line Is. Time",
+				"+1400, +1400", winterDate);
+
+		test.verifyFormatTimezone("EST", "EDT, Eastern Daylight Time",
+				"-0400, -0400", summerDate);
+		test.verifyFormatTimezone("EST", "EST, Eastern Standard Time",
+				"-0500, -0500", winterDate);
+
+		test.verifyFormatTimezone("GMT+14", "GMT+14:00, GMT+14:00",
+				"+1400, +1400", summerDate);
+		test.verifyFormatTimezone("GMT+14", "GMT+14:00, GMT+14:00",
+				"+1400, +1400", winterDate);
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#get2DigitYearStart()
+	 */
+	public void test_get2DigitYearStart() {
+		// Test for method java.util.Date
+		// java.text.SimpleDateFormat.get2DigitYearStart()
+		SimpleDateFormat f1 = new SimpleDateFormat("y");
+		Date date = f1.get2DigitYearStart();
+		Calendar cal = new GregorianCalendar();
+		int year = cal.get(Calendar.YEAR);
+		cal.setTime(date);
+		assertTrue("Wrong default year start",
+				cal.get(Calendar.YEAR) == (year - 80));
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#getDateFormatSymbols()
+	 */
+	public void test_getDateFormatSymbols() {
+		// Test for method java.text.DateFormatSymbols
+		// java.text.SimpleDateFormat.getDateFormatSymbols()
+		SimpleDateFormat df = (SimpleDateFormat) DateFormat.getInstance();
+		DateFormatSymbols dfs = df.getDateFormatSymbols();
+		assertTrue("Symbols identical", dfs != df.getDateFormatSymbols());
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#parse(java.lang.String,
+	 *        java.text.ParsePosition)
+	 */
+	public void test_parseLjava_lang_StringLjava_text_ParsePosition() {
+		// Test for method java.util.Date
+		// java.text.SimpleDateFormat.parse(java.lang.String,
+		// java.text.ParsePosition)
+		TestFormat test = new TestFormat(
+				"test_formatLjava_util_DateLjava_lang_StringBufferLjava_text_FieldPosition");
+
+		Calendar cal = new GregorianCalendar(1970, Calendar.JANUARY, 1);
+		Date time = cal.getTime();
+		test.parse("h", " 12", time, 1, 3);
+		test.parse("H", " 0", time, 1, 2);
+		test.parse("k", " 24", time, 1, 3);
+		test.parse("K", " 0", time, 1, 2);
+
+		cal = new GregorianCalendar(1970, Calendar.JANUARY, 1, 1, 0);
+		time = cal.getTime();
+		test.parse("h", "1", time, 0, 1);
+		test.parse("H", "1 ", time, 0, 1);
+		test.parse("k", "1", time, 0, 1);
+		test.parse("K", "1", time, 0, 1);
+
+		cal = new GregorianCalendar(1970, Calendar.JANUARY, 1, 11, 0);
+		time = cal.getTime();
+		test.parse("h", "0011 ", time, 0, 4);
+		test.parse("K", "11", time, 0, 2);
+		cal = new GregorianCalendar(1970, Calendar.JANUARY, 1, 23, 0);
+		time = cal.getTime();
+		test.parse("H", "23", time, 0, 2);
+		test.parse("k", "23", time, 0, 2);
+
+		test.parse("h a", " 3 AM", new GregorianCalendar(1970,
+				Calendar.JANUARY, 1, 3, 0).getTime(), 1, 5);
+		test.parse("K a", " 3 pm ", new GregorianCalendar(1970,
+				Calendar.JANUARY, 1, 15, 0).getTime(), 1, 5);
+		test.parse("m:s", "0:59 ", new GregorianCalendar(1970,
+				Calendar.JANUARY, 1, 0, 0, 59).getTime(), 0, 4);
+		test.parse("m:s", "59:0", new GregorianCalendar(1970, Calendar.JANUARY,
+				1, 0, 59, 0).getTime(), 0, 4);
+		test.parse("ms", "059", new GregorianCalendar(1970, Calendar.JANUARY,
+				1, 0, 0, 59).getTime(), 0, 3);
+
+		cal = new GregorianCalendar(1970, Calendar.JANUARY, 1);
+		test.parse("S", "0", cal.getTime(), 0, 1);
+		cal.setTimeZone(TimeZone.getTimeZone("HST"));
+		cal.set(Calendar.MILLISECOND, 999);
+		test.parse("S z", "999 HST", cal.getTime(), 0, 7);
+
+		cal = new GregorianCalendar(1970, Calendar.JANUARY, 1);
+		cal.set(Calendar.ERA, GregorianCalendar.BC);
+		test.parse("G", "Bc ", cal.getTime(), 0, 2);
+
+		test.parse("y", "00", new GregorianCalendar(2000, Calendar.JANUARY, 1)
+				.getTime(), 0, 2);
+		test.parse("y", "99", new GregorianCalendar(1999, Calendar.JANUARY, 1)
+				.getTime(), 0, 2);
+		test.parse("y", "1", new GregorianCalendar(1, Calendar.JANUARY, 1)
+				.getTime(), 0, 1);
+		test.parse("y", "-1", new GregorianCalendar(-1, Calendar.JANUARY, 1)
+				.getTime(), 0, 2);
+		test.parse("y", "001", new GregorianCalendar(1, Calendar.JANUARY, 1)
+				.getTime(), 0, 3);
+		test.parse("y", "2005",
+				new GregorianCalendar(2005, Calendar.JANUARY, 1).getTime(), 0,
+				4);
+		test.parse("yy", "00", new GregorianCalendar(2000, Calendar.JANUARY, 1)
+				.getTime(), 0, 2);
+		test.parse("yy", "99", new GregorianCalendar(1999, Calendar.JANUARY, 1)
+				.getTime(), 0, 2);
+		test.parse("yy", "1", new GregorianCalendar(1, Calendar.JANUARY, 1)
+				.getTime(), 0, 1);
+		test.parse("yy", "-1", new GregorianCalendar(-1, Calendar.JANUARY, 1)
+				.getTime(), 0, 2);
+		test.parse("yy", "001", new GregorianCalendar(1, Calendar.JANUARY, 1)
+				.getTime(), 0, 3);
+		test.parse("yy", "2005", new GregorianCalendar(2005, Calendar.JANUARY,
+				1).getTime(), 0, 4);
+		test.parse("yyy", "99", new GregorianCalendar(99, Calendar.JANUARY, 1)
+				.getTime(), 0, 2);
+		test.parse("yyy", "1", new GregorianCalendar(1, Calendar.JANUARY, 1)
+				.getTime(), 0, 1);
+		test.parse("yyy", "-1", new GregorianCalendar(-1, Calendar.JANUARY, 1)
+				.getTime(), 0, 2);
+		test.parse("yyy", "001", new GregorianCalendar(1, Calendar.JANUARY, 1)
+				.getTime(), 0, 3);
+		test.parse("yyy", "2005", new GregorianCalendar(2005, Calendar.JANUARY,
+				1).getTime(), 0, 4);
+		test.parse("yyyy", "99", new GregorianCalendar(99, Calendar.JANUARY, 1)
+				.getTime(), 0, 2);
+		test.parse("yyyy", "  1999", new GregorianCalendar(1999,
+				Calendar.JANUARY, 1).getTime(), 2, 6);
+		test.parse("MM'M'", "4M",
+				new GregorianCalendar(1970, Calendar.APRIL, 1).getTime(), 0, 2);
+		test.parse("MMM", "Feb", new GregorianCalendar(1970, Calendar.FEBRUARY,
+				1).getTime(), 0, 3);
+		test.parse("MMMM d", "April 14 ", new GregorianCalendar(1970,
+				Calendar.APRIL, 14).getTime(), 0, 8);
+		test.parse("MMMMd", "April14 ", new GregorianCalendar(1970,
+				Calendar.APRIL, 14).getTime(), 0, 7);
+		test.parse("E w", "Mon 12", new GregorianCalendar(1970, Calendar.MARCH,
+				16).getTime(), 0, 6);
+		test.parse("Ew", "Mon12", new GregorianCalendar(1970, Calendar.MARCH,
+				16).getTime(), 0, 5);
+		test.parse("M EE ''W", "5 Tue '2", new GregorianCalendar(1970,
+				Calendar.MAY, 5).getTime(), 0, 8);
+		test.parse("MEE''W", "5Tue'2", new GregorianCalendar(1970,
+				Calendar.MAY, 5).getTime(), 0, 6);
+		test.parse("MMM EEE F", " JUL Sunday 3", new GregorianCalendar(1970,
+				Calendar.JULY, 19).getTime(), 1, 13);
+		test.parse("MMMEEEF", " JULSunday3", new GregorianCalendar(1970,
+				Calendar.JULY, 19).getTime(), 1, 11);
+
+		cal = new GregorianCalendar(1970, Calendar.JANUARY, 1);
+		cal.setTimeZone(TimeZone.getTimeZone("GMT+0:1"));
+		cal.set(Calendar.DAY_OF_YEAR, 243);
+		test.parse("D z", "243 GMT+0:0", cal.getTime(), 0, 11);
+		cal.setTimeZone(TimeZone.getTimeZone("EST"));
+		cal.set(1970, Calendar.JANUARY, 1, 4, 30);
+		test.parse("h:m z", "4:30 GMT-5 ", cal.getTime(), 0, 10);
+		test.parse("h z", "14 GMT-24 ", new Date(51840000), 0, 9);
+		test.parse("h z", "14 GMT-23 ", new Date(133200000), 0, 9);
+		test.parse("h z", "14 GMT-0001 ", new Date(54000000), 0, 11);
+		test.parse("h z", "14 GMT+24 ", new Date(48960000), 0, 9);
+		test.parse("h z", "14 GMT+23 ", new Date(-32400000), 0, 9);
+		test.parse("h z", "14 GMT+0001 ", new Date(46800000), 0, 11);
+		test.parse("h z", "14 +0001 ", new Date(46800000), 0, 8);
+		test.parse("h z", "14 -0001 ", new Date(54000000), 0, 8);
+
+		test.parse("yyyyMMddHHmmss", "19990913171901", new GregorianCalendar(
+				1999, Calendar.SEPTEMBER, 13, 17, 19, 01).getTime(), 0, 14);
+
+		Date d = new Date(1015822800000L);
+		SimpleDateFormat df = new SimpleDateFormat("", new Locale("en", "US"));
+		df.setTimeZone(TimeZone.getTimeZone("EST"));
+
+		try {
+			df.applyPattern("dd MMMM yyyy EEEE");
+			String output = df.format(d);
+			Date date = df.parse(output);
+			assertTrue("Invalid result 1: " + date, d.equals(date));
+
+			df.applyPattern("dd MMMM yyyy F");
+			output = df.format(d);
+			date = df.parse(output);
+			assertTrue("Invalid result 2: " + date, d.equals(date));
+
+			df.applyPattern("dd MMMM yyyy w");
+			output = df.format(d);
+			date = df.parse(output);
+			assertTrue("Invalid result 3: " + date, d.equals(date));
+
+			df.applyPattern("dd MMMM yyyy W");
+			output = df.format(d);
+			date = df.parse(output);
+			assertTrue("Invalid result 4: " + date, d.equals(date));
+
+			df.applyPattern("dd MMMM yyyy D");
+			date = df.parse("5 January 2002 70");
+			assertTrue("Invalid result 5: " + date, d.equals(date));
+
+			df.applyPattern("W w dd MMMM yyyy EEEE");
+			output = df.format(d);
+			date = df.parse("3 12 5 March 2002 Monday");
+			assertTrue("Invalid result 6: " + date, d.equals(date));
+
+			df.applyPattern("w W dd MMMM yyyy EEEE");
+			output = df.format(d);
+			date = df.parse("12 3 5 March 2002 Monday");
+			assertTrue("Invalid result 6a: " + date, d.equals(date));
+
+			df.applyPattern("F dd MMMM yyyy EEEE");
+			output = df.format(d);
+			date = df.parse("2 5 March 2002 Monday");
+			assertTrue("Invalid result 7: " + date, d.equals(date));
+
+			df.applyPattern("w dd MMMM yyyy EEEE");
+			output = df.format(d);
+			date = df.parse("11 5 January 2002 Monday");
+			assertTrue("Invalid result 8: " + date, d.equals(date));
+
+			df.applyPattern("w dd yyyy EEEE MMMM");
+			output = df.format(d);
+			date = df.parse("11 5 2002 Monday January");
+			assertTrue("Invalid result 9: " + date, d.equals(date));
+
+			df.applyPattern("w yyyy EEEE MMMM dd");
+			output = df.format(d);
+			date = df.parse("17 2002 Monday March 11");
+			assertTrue("Invalid result 10: " + date, d.equals(date));
+
+			df.applyPattern("dd D yyyy MMMM");
+			output = df.format(d);
+			date = df.parse("5 70 2002 January");
+			assertTrue("Invalid result 11: " + date, d.equals(date));
+
+			df.applyPattern("D dd yyyy MMMM");
+			output = df.format(d);
+			date = df.parse("240 11 2002 March");
+			assertTrue("Invalid result 12: " + date, d.equals(date));
+		} catch (ParseException e) {
+			fail("unexpected: " + e);
+		}
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#set2DigitYearStart(java.util.Date)
+	 */
+	public void test_set2DigitYearStartLjava_util_Date() {
+		// Test for method void
+		// java.text.SimpleDateFormat.set2DigitYearStart(java.util.Date)
+		SimpleDateFormat f1 = new SimpleDateFormat("yy");
+		f1.set2DigitYearStart(new GregorianCalendar(1950, Calendar.JANUARY, 1)
+				.getTime());
+		Calendar cal = new GregorianCalendar();
+		try {
+			cal.setTime(f1.parse("49"));
+			assertTrue("Incorrect year 2049", cal.get(Calendar.YEAR) == 2049);
+			cal.setTime(f1.parse("50"));
+			int year = cal.get(Calendar.YEAR);
+			assertTrue("Incorrect year 1950: " + year, year == 1950);
+			f1.applyPattern("y");
+			cal.setTime(f1.parse("00"));
+			assertTrue("Incorrect year 2000", cal.get(Calendar.YEAR) == 2000);
+			f1.applyPattern("yyy");
+			cal.setTime(f1.parse("50"));
+			assertTrue("Incorrect year 50", cal.get(Calendar.YEAR) == 50);
+		} catch (ParseException e) {
+			fail("ParseException");
+		}
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#setDateFormatSymbols(java.text.DateFormatSymbols)
+	 */
+	public void test_setDateFormatSymbolsLjava_text_DateFormatSymbols() {
+		// Test for method void
+		// java.text.SimpleDateFormat.setDateFormatSymbols(java.text.DateFormatSymbols)
+		SimpleDateFormat f1 = new SimpleDateFormat("a");
+		DateFormatSymbols symbols = new DateFormatSymbols();
+		symbols.setAmPmStrings(new String[] { "morning", "night" });
+		f1.setDateFormatSymbols(symbols);
+		DateFormatSymbols newSym = f1.getDateFormatSymbols();
+		assertTrue("Set incorrectly", newSym.equals(symbols));
+		assertTrue("Not a clone", f1.getDateFormatSymbols() != symbols);
+		String result = f1.format(new GregorianCalendar(1999, Calendar.JUNE,
+				12, 3, 0).getTime());
+		assertTrue("Incorrect symbols used", result.equals("morning"));
+		symbols.setEras(new String[] { "before", "after" });
+		assertTrue("Identical symbols", !f1.getDateFormatSymbols().equals(
+				symbols));
+	}
+
+	/**
+	 * @tests java.text.SimpleDateFormat#toLocalizedPattern()
+	 */
+	public void test_toLocalizedPattern() {
+		// Test for method java.lang.String
+		// java.text.SimpleDateFormat.toLocalizedPattern()
+		SimpleDateFormat f2 = new SimpleDateFormat("GyMdkHmsSEDFwWahKz",
+				new Locale("de", "CH"));
+		String pattern = f2.toLocalizedPattern();
+		assertTrue("Wrong pattern: " + pattern, pattern
+				.equals("GuMtkHmsSEDFwWahKz"));
+
+		// test the new "Z" pattern char
+		f2 = new SimpleDateFormat("G y M d Z", new Locale("de", "CH"));
+		pattern = f2.toLocalizedPattern();
+		assertTrue("Wrong pattern: " + pattern, pattern.equals("G u M t Z"));
+	}
+
+	/**
+	 * 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/text/src/test/java/tests/api/java/text/StringCharacterIteratorTest.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/StringCharacterIteratorTest.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/StringCharacterIteratorTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/api/java/text/StringCharacterIteratorTest.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,233 @@
+/* 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.text;
+
+import java.text.CharacterIterator;
+import java.text.StringCharacterIterator;
+
+public class StringCharacterIteratorTest extends junit.framework.TestCase {
+
+	/**
+	 * @tests java.text.StringCharacterIterator#StringCharacterIterator(java.lang.String)
+	 */
+	public void test_ConstructorLjava_lang_String() {
+		StringCharacterIterator it = new StringCharacterIterator("testing");
+		assertTrue("Wrong begin index", it.getBeginIndex() == 0);
+		assertTrue("Wrong end index", it.getEndIndex() == 7);
+		assertTrue("Wrong current index", it.getIndex() == 0);
+		assertTrue("Wrong current char", it.current() == 't');
+		assertTrue("Wrong next char", it.next() == 'e');
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#StringCharacterIterator(java.lang.String,
+	 *        int)
+	 */
+	public void test_ConstructorLjava_lang_StringI() {
+		StringCharacterIterator it = new StringCharacterIterator("testing", 3);
+		assertTrue("Wrong begin index", it.getBeginIndex() == 0);
+		assertTrue("Wrong end index", it.getEndIndex() == 7);
+		assertTrue("Wrong current index", it.getIndex() == 3);
+		assertTrue("Wrong current char", it.current() == 't');
+		assertTrue("Wrong next char", it.next() == 'i');
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#StringCharacterIterator(java.lang.String,
+	 *        int, int, int)
+	 */
+	public void test_ConstructorLjava_lang_StringIII() {
+		StringCharacterIterator it = new StringCharacterIterator("testing", 2,
+				6, 4);
+		assertTrue("Wrong begin index", it.getBeginIndex() == 2);
+		assertTrue("Wrong end index", it.getEndIndex() == 6);
+		assertTrue("Wrong current index", it.getIndex() == 4);
+		assertTrue("Wrong current char", it.current() == 'i');
+		assertTrue("Wrong next char", it.next() == 'n');
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#clone()
+	 */
+	public void test_clone() {
+		StringCharacterIterator it = new StringCharacterIterator("testing", 2,
+				6, 4);
+		StringCharacterIterator clone = (StringCharacterIterator) it.clone();
+		assertTrue("Clone not equal", it.equals(clone));
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#current()
+	 */
+	public void test_current() {
+		StringCharacterIterator it = new StringCharacterIterator("testing", 2,
+				6, 4);
+		assertTrue("Wrong current char", it.current() == 'i');
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#equals(java.lang.Object)
+	 */
+	public void test_equalsLjava_lang_Object() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 4);
+		StringCharacterIterator it2 = new StringCharacterIterator("xxstinx", 2,
+				6, 4);
+		assertTrue("Range is equal", !it1.equals(it2));
+		StringCharacterIterator it3 = new StringCharacterIterator("testing", 2,
+				6, 2);
+		it3.setIndex(4);
+		assertTrue("Not equal", it1.equals(it3));
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#first()
+	 */
+	public void test_first() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 4);
+		assertTrue("Wrong first char", it1.first() == 's');
+		assertTrue("Wrong next char", it1.next() == 't');
+		it1 = new StringCharacterIterator("testing", 2, 2, 2);
+		assertTrue("Not DONE", it1.first() == CharacterIterator.DONE);
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#getBeginIndex()
+	 */
+	public void test_getBeginIndex() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 4);
+		assertTrue("Wrong begin index 2", it1.getBeginIndex() == 2);
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#getEndIndex()
+	 */
+	public void test_getEndIndex() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 4);
+		assertTrue("Wrong end index 6", it1.getEndIndex() == 6);
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#getIndex()
+	 */
+	public void test_getIndex() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 4);
+		assertTrue("Wrong index 4", it1.getIndex() == 4);
+		it1.next();
+		assertTrue("Wrong index 5", it1.getIndex() == 5);
+		it1.last();
+		assertTrue("Wrong index 4/2", it1.getIndex() == 5);
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#hashCode()
+	 */
+	public void test_hashCode() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 4);
+		StringCharacterIterator it2 = new StringCharacterIterator("xxstinx", 2,
+				6, 4);
+		assertTrue("Hash is equal", it1.hashCode() != it2.hashCode());
+		StringCharacterIterator it3 = new StringCharacterIterator("testing", 2,
+				6, 2);
+		assertTrue("Hash equal1", it1.hashCode() != it3.hashCode());
+		it3 = new StringCharacterIterator("testing", 0, 6, 4);
+		assertTrue("Hash equal2", it1.hashCode() != it3.hashCode());
+		it3 = new StringCharacterIterator("testing", 2, 5, 4);
+		assertTrue("Hash equal3", it1.hashCode() != it3.hashCode());
+		it3 = new StringCharacterIterator("froging", 2, 6, 4);
+		assertTrue("Hash equal4", it1.hashCode() != it3.hashCode());
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#last()
+	 */
+	public void test_last() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 3);
+		assertTrue("Wrong last char", it1.last() == 'n');
+		assertTrue("Wrong previous char", it1.previous() == 'i');
+		it1 = new StringCharacterIterator("testing", 2, 2, 2);
+		assertTrue("Not DONE", it1.last() == CharacterIterator.DONE);
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#next()
+	 */
+	public void test_next() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 3);
+		char result = it1.next();
+		assertTrue("Wrong next char1: " + result, result == 'i');
+		assertTrue("Wrong next char2", it1.next() == 'n');
+		assertTrue("Wrong next char3", it1.next() == CharacterIterator.DONE);
+		assertTrue("Wrong next char4", it1.next() == CharacterIterator.DONE);
+		int index = it1.getIndex();
+		assertTrue("Wrong index: " + index, index == 6);
+		assertTrue("Wrong current char",
+				it1.current() == CharacterIterator.DONE);
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#previous()
+	 */
+	public void test_previous() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 4);
+		assertTrue("Wrong previous char1", it1.previous() == 't');
+		assertTrue("Wrong previous char2", it1.previous() == 's');
+		assertTrue("Wrong previous char3",
+				it1.previous() == CharacterIterator.DONE);
+		assertTrue("Wrong previous char4",
+				it1.previous() == CharacterIterator.DONE);
+		assertTrue("Wrong index", it1.getIndex() == 2);
+		assertTrue("Wrong current char", it1.current() == 's');
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#setIndex(int)
+	 */
+	public void test_setIndexI() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 4);
+		assertTrue("Wrong result1", it1.setIndex(2) == 's');
+		char result = it1.next();
+		assertTrue("Wrong next char: " + result, result == 't');
+		assertTrue("Wrong result2", it1.setIndex(6) == CharacterIterator.DONE);
+		assertTrue("Wrong previous char", it1.previous() == 'n');
+	}
+
+	/**
+	 * @tests java.text.StringCharacterIterator#setText(java.lang.String)
+	 */
+	public void test_setTextLjava_lang_String() {
+		StringCharacterIterator it1 = new StringCharacterIterator("testing", 2,
+				6, 4);
+		it1.setText("frog");
+		assertTrue("Wrong begin index", it1.getBeginIndex() == 0);
+		assertTrue("Wrong end index", it1.getEndIndex() == 4);
+		assertTrue("Wrong current index", it1.getIndex() == 0);
+	}
+
+	protected void setUp() {
+	}
+
+	protected void tearDown() {
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/text/AllTests.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/text/AllTests.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/text/AllTests.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/text/src/test/java/tests/text/AllTests.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,38 @@
+/* Copyright 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.text;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+/**
+ * Test suite that includes all tests for the Text project.
+ * 
+ */
+public class AllTests {
+
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(AllTests.suite());
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite("All Text test suites");
+		// $JUnit-BEGIN$
+		suite.addTest(tests.api.java.text.AllTests.suite());
+		// $JUnit-END$
+		return suite;
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/hyts_Foo.c
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/hyts_Foo.c?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/hyts_Foo.c (added)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/hyts_Foo.c Wed Mar 15 03:46:17 2006
@@ -0,0 +1 @@
+/* Some random file for it to look at. */
\ No newline at end of file

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/main/AllTests.java
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/main/AllTests.java?rev=386058&view=auto
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/main/AllTests.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/main/AllTests.java Wed Mar 15 03:46:17 2006
@@ -0,0 +1,96 @@
+/* Copyright 2004 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.main;
+
+import junit.extensions.TestSetup;
+import junit.framework.Assert;
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import tests.util.SomeTests;
+
+public class AllTests {
+
+	protected final static String TEST_COMPLETE_PROP_NAME = "confirmVMAlive";
+	
+	public static void main(String[] args) {
+		junit.textui.TestRunner.run(AllTests.suite());
+	}
+
+	public static Test suite() {
+		TestSuite suite = new TestSuite("All test suites");
+		// $JUnit-BEGIN$
+		suite.addTest(tests.archive.AllTests.suite());
+		suite.addTest(tests.luni.AllTests.suite());
+		suite.addTest(tests.nio_char.AllTests.suite());
+		suite.addTest(tests.text.AllTests.suite());
+		// $JUnit-END$
+
+		// Wrap all tests in the exclusion decorator
+		SomeTests st = new SomeTests(suite);
+
+		// Wrap the exclusion decorator with another decorator that helps
+		// identify if the test run made it all the way to the end.
+		TestSetup wrapper = new TestSetup(st) {
+			protected void tearDown() {
+				/*
+				 * Only carry out the check to see if the VM survived the tests
+				 * when requested to do so.
+				 */
+				String confirmCompletion = System.getProperty(TEST_COMPLETE_PROP_NAME);
+				if (confirmCompletion != null && confirmCompletion.equals("true")) {
+					confirmTestCompletion();
+				}
+			}
+
+			/*
+			 * (non-Javadoc)
+			 * 
+			 * @see junit.framework.Test#countTestCases()
+			 */
+			public int countTestCases() {
+				int result = this.getTest().countTestCases();
+				String confirmCompletion = System.getProperty(TEST_COMPLETE_PROP_NAME);
+				if (confirmCompletion != null && confirmCompletion.equals("true")) {
+					// This wrapper adds an extra test and so affects
+					// the total number of tests that get run.
+					result++;
+				}
+				return result;
+			}
+		};
+
+		return wrapper;
+	}
+
+	/*
+	 * This method creates a file at ${user.home}/junitCompleted, and is run
+	 * only after all junit tests have completed. The existence of this file
+	 * indicates that the vm being tested has not died before completing.
+	 */
+	public static void confirmTestCompletion() {
+		String fileLocation = System.getProperty("user.home")
+				+ "/junitCompleted";
+		java.io.File fileHandle = new java.io.File(fileLocation);
+		try {
+			// Create the empty file - assert if we cant create or it already
+			// exists
+			Assert.assertTrue(fileHandle.createNewFile());
+		} catch (java.io.IOException e) {
+			Assert.assertTrue(false);
+			e.printStackTrace();
+		}
+	}
+}

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/GZIPInputStream/hyts_gInput.txt
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/GZIPInputStream/hyts_gInput.txt?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/GZIPInputStream/hyts_gInput.txt
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.GIF
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.GIF?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.GIF
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_11.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_11.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_11.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_12.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_12.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_12.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_13.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_13.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_13.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_14.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_14.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_14.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_21.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_21.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_21.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_22-new.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_22-new.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_22-new.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_22.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_22.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_22.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_23.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_23.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_23.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_31.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_31.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_31.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_32.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_32.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_32.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_33.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_33.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_33.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_41.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_41.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_41.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_42.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_42.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/JarIndex/hyts_42.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_all_attributes.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_all_attributes.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_all_attributes.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_c.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_c.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_c.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_no_attributes.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_no_attributes.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_no_attributes.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_no_entry.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_no_entry.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_no_entry.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_pq.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_pq.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_pq.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_some_attributes.jar
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_some_attributes.jar?rev=386058&view=auto
==============================================================================
Binary file - no diff available.

Propchange: incubator/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Package/hyts_some_attributes.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream