harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From py...@apache.org
Subject svn commit: r438382 - /incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java
Date Wed, 30 Aug 2006 06:00:43 GMT
Author: pyang
Date: Tue Aug 29 23:00:43 2006
New Revision: 438382

URL: http://svn.apache.org/viewvc?rev=438382&view=rev
Log:
Patch applied for HARMONY-1338 ([logging][test] unnecessary dependency on implementation of
j.l.Throwable.toString())

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java?rev=438382&r1=438381&r2=438382&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/logging/src/test/java/org/apache/harmony/logging/tests/java/util/logging/SimpleFormatterTest.java
Tue Aug 29 23:00:43 2006
@@ -73,6 +73,7 @@
 
 	public void testFormat() {
 		String str = sf.format(lr);
+		Throwable t;
 
 		lr.setMessage(MSG + " {0,number}");
 		lr.setLoggerName("logger");
@@ -81,7 +82,7 @@
 		lr.setSourceMethodName("method");
 		lr.setParameters(new Object[] { new Integer(100), new Object() });
 		lr.setThreadID(1000);
-		lr.setThrown(new Exception("exception") {
+		lr.setThrown(t = new Exception("exception") {
 			private static final long serialVersionUID = 1L;
 
 			public String getLocalizedMessage() {
@@ -97,7 +98,8 @@
 		assertTrue(str.indexOf("class") > 0);
 		assertTrue(str.indexOf("method") > 0);
 		assertTrue(str.indexOf("100") > 0);
-		assertTrue(str.indexOf("locale") > 0);
+		assertTrue(str.indexOf(t.toString()) > 0);
+        System.out.println(t.toString());
 		assertTrue(str.indexOf(Level.FINE.getLocalizedName()) > 0);
 	}
 



Mime
View raw message