harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r546284 - /harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ScannerTest.java
Date Mon, 11 Jun 2007 21:03:01 GMT
Author: tellison
Date: Mon Jun 11 14:03:00 2007
New Revision: 546284

URL: http://svn.apache.org/viewvc?view=rev&rev=546284
Log:
Apply test for HARMONY-4127 ([classlib][luni][java6] the new method "reset()" in java.util.Scanner
for java6)

Modified:
    harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ScannerTest.java

Modified: harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ScannerTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ScannerTest.java?view=diff&rev=546284&r1=546283&r2=546284
==============================================================================
--- harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ScannerTest.java
(original)
+++ harmony/enhanced/classlib/branches/java6/modules/luni/src/test/java/tests/api/java/util/ScannerTest.java
Mon Jun 11 14:03:00 2007
@@ -5644,6 +5644,24 @@
         assertEquals(1, matchResult.end());
     }
     
+    /**
+	 * @tests {@link java.util.Scanner#reset()}
+	 * @since 1.6
+	 */
+	public void test_reset() {
+		Scanner s = new Scanner("test");
+		s.useRadix(11);
+		assertEquals(11, s.radix());
+		s.useDelimiter("\\w+");
+		assertEquals("\\w+", s.delimiter().toString());
+		s.useLocale(new Locale("test", "test", "test"));
+		assertEquals("test", s.locale().getLanguage());
+		s.reset();
+		assertEquals(10, s.radix());
+		assertEquals("\\p{javaWhitespace}+", s.delimiter().toString());
+		assertEquals(Locale.getDefault(), s.locale());
+	}
+    
     protected void setUp() throws Exception {
         super.setUp();
 



Mime
View raw message