public inbox for mauve-patches@sourceware.org
 help / color / mirror / Atom feed
* FYI: Test Fix
@ 2007-07-13 20:22 Joshua Sumali
  0 siblings, 0 replies; 10+ messages in thread
From: Joshua Sumali @ 2007-07-13 20:22 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 428 bytes --]

This patch fixed a couple of tests in gnu/testlet/java/text/SimpleDateFormat

It just needed a simple time zone change to match the locale. Now passes 
on openJDK.

2007-07-13    Joshua Sumali    <jsumali@redhat.com>

    * gnu/testlet/java/text/SimpleDateFormat/getDateFormatSymbols.java
    (test): Fixed incorrect test.
    * gnu/testlet/java/text/SimpleDateFormat/setDateFormatSymbols.java
    (test): Fixed incorrect test.

[-- Attachment #2: getDateFormatSymbols.patch.diff --]
[-- Type: text/x-patch, Size: 1107 bytes --]


#P mauve
Index: gnu/testlet/java/text/SimpleDateFormat/getDateFormatSymbols.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/SimpleDateFormat/getDateFormatSymbols.java,v
retrieving revision 1.1
diff -u -r1.1 getDateFormatSymbols.java
--- gnu/testlet/java/text/SimpleDateFormat/getDateFormatSymbols.java	11 Nov 2004 09:37:20 -0000	1.1
+++ gnu/testlet/java/text/SimpleDateFormat/getDateFormatSymbols.java	13 Jul 2007 20:16:01 -0000
@@ -28,6 +28,7 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Locale;
+import java.util.TimeZone;
 
 /**
  * Some checks for the getDateFormatSymbols() method in the SimpleDateFormat
@@ -47,6 +48,7 @@
     // symbols, so updating them should not affect the results of the
     // date formatter...
     SimpleDateFormat sdf = new SimpleDateFormat("E", Locale.UK);
+    sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
     Date jan1_2005 = new Date(1104537600000L);
     harness.check(sdf.format(jan1_2005), "Sat");
     DateFormatSymbols s = sdf.getDateFormatSymbols();


[-- Attachment #3: setDateFormatSymbols.patch.diff --]
[-- Type: text/x-patch, Size: 1075 bytes --]


#P mauve
Index: gnu/testlet/java/text/SimpleDateFormat/setDateFormatSymbols.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/SimpleDateFormat/setDateFormatSymbols.java,v
retrieving revision 1.1
diff -u -r1.1 setDateFormatSymbols.java
--- gnu/testlet/java/text/SimpleDateFormat/setDateFormatSymbols.java	11 Nov 2004 09:37:20 -0000	1.1
+++ gnu/testlet/java/text/SimpleDateFormat/setDateFormatSymbols.java	13 Jul 2007 20:14:26 -0000
@@ -28,6 +28,7 @@
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Locale;
+import java.util.TimeZone;
 
 /**
  * Some checks for the setDateFormatSymbols() method in the SimpleDateFormat
@@ -45,6 +46,7 @@
   {
     // check that changing the short weekdays does work...
     SimpleDateFormat sdf = new SimpleDateFormat("E", Locale.UK);
+    sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
     Date jan1_2005 = new Date(1104537600000L);
     harness.check(sdf.format(jan1_2005), "Sat");
     DateFormatSymbols s = sdf.getDateFormatSymbols();


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: FYI: Test Fix
  2007-07-24 13:28 Joshua Sumali
@ 2007-07-24 20:17 ` David Daney
  0 siblings, 0 replies; 10+ messages in thread
From: David Daney @ 2007-07-24 20:17 UTC (permalink / raw)
  To: Joshua Sumali; +Cc: mauve-patches

Joshua Sumali wrote:
> This small patch fixes the timeout test in 
> gnu/testlet/java/net/HttpURLConnection/
> 
> The test now passes on jamvm and openjdk.
> 
> 2007-07-24   Joshua Sumali   <jsumali@redhat.com>
> 
>    * gnu/testlet/java/net/HttpURLConnection/timeout.java:
>    (testConnectTimeout): Fixed test.
> 
> 
> 
> ------------------------------------------------------------------------
> 
> #P mauve
> Index: gnu/testlet/java/net/HttpURLConnection/timeout.java
> ===================================================================
> RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/HttpURLConnection/timeout.java,v
> retrieving revision 1.1
> diff -u -r1.1 timeout.java
> --- gnu/testlet/java/net/HttpURLConnection/timeout.java	8 Dec 2006 06:43:58 -0000	1.1
> +++ gnu/testlet/java/net/HttpURLConnection/timeout.java	24 Jul 2007 13:17:57 -0000
> @@ -248,7 +248,7 @@
>              // It should timeout.
>          	long end = System.currentTimeMillis();
>          	long delta = end - start;
> -            h.check((delta > 2000) && (delta < 5000));
> +            h.check((delta > 0) && (delta < 5000));
>            }
>        }   
>      catch (IOException e)

I wonder if this could have been caused by the extra ':' in the url on 
line 233.  Could you try changing the url from "http://10.20.30.40:/foo" 
to "http://10.20.30.40/foo", and see if that fixes the problem instead?

If not, I think the change you made is sensible.

Thanks
David Daney

^ permalink raw reply	[flat|nested] 10+ messages in thread

* FYI: Test Fix
@ 2007-07-24 19:37 Joshua Sumali
  0 siblings, 0 replies; 10+ messages in thread
From: Joshua Sumali @ 2007-07-24 19:37 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 290 bytes --]

Another small patch that fixes a test's expectations, in 
gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java

2007-07-24    Joshua Sumali    <jsumali@redhat.com>

    * gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java:
    (EXPECTED_PREFIX): Fixed expected string.


[-- Attachment #2: diff_formatMessage --]
[-- Type: text/plain, Size: 1447 bytes --]


#P mauve
Index: gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java,v
retrieving revision 1.1
diff -u -r1.1 formatMessage.java
--- gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java	26 Feb 2004 19:41:42 -0000	1.1
+++ gnu/testlet/java/util/logging/XMLFormatter/formatMessage.java	24 Jul 2007 19:07:29 -0000
@@ -28,6 +28,7 @@
 import java.util.logging.LogRecord;
 import java.util.logging.XMLFormatter;
 
+import java.util.TimeZone;
 
 /**
  * @author <a href="mailto:brawer@dandelis.ch">Sascha Brawer</a>
@@ -58,6 +59,11 @@
 
     // Check #2.
     rec = new LogRecord(Level.INFO, "foobar");
+    
+    //Need to force the default time zone to UTC or else
+    //the comparison uses system time zone and makes the tests
+    //break.
+    TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
     rec.setMillis(1234567);
     rec.setSequenceNumber(42);
     rec.setThreadID(21);
@@ -124,9 +130,11 @@
   }
 
 
+  //1234567 milliseconds is only 20 minutes and 
+  //34 seconds (past the Epoch, UTC time).
   private static final String EXPECTED_PREFIX =
      "<record>\n"
-    + "  <date>1970-01-01T01:20:34</date>\n"
+    + "  <date>1970-01-01T00:20:34</date>\n"
     + "  <millis>1234567</millis>\n"
     + "  <sequence>42</sequence>\n"
     + "  <level>INFO</level>\n";

^ permalink raw reply	[flat|nested] 10+ messages in thread

* FYI: Test Fix
@ 2007-07-24 13:28 Joshua Sumali
  2007-07-24 20:17 ` David Daney
  0 siblings, 1 reply; 10+ messages in thread
From: Joshua Sumali @ 2007-07-24 13:28 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

This small patch fixes the timeout test in 
gnu/testlet/java/net/HttpURLConnection/

The test now passes on jamvm and openjdk.

2007-07-24   Joshua Sumali   <jsumali@redhat.com>

    * gnu/testlet/java/net/HttpURLConnection/timeout.java:
    (testConnectTimeout): Fixed test.



[-- Attachment #2: diff_timeout --]
[-- Type: text/plain, Size: 738 bytes --]

#P mauve
Index: gnu/testlet/java/net/HttpURLConnection/timeout.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/HttpURLConnection/timeout.java,v
retrieving revision 1.1
diff -u -r1.1 timeout.java
--- gnu/testlet/java/net/HttpURLConnection/timeout.java	8 Dec 2006 06:43:58 -0000	1.1
+++ gnu/testlet/java/net/HttpURLConnection/timeout.java	24 Jul 2007 13:17:57 -0000
@@ -248,7 +248,7 @@
             // It should timeout.
         	long end = System.currentTimeMillis();
         	long delta = end - start;
-            h.check((delta > 2000) && (delta < 5000));
+            h.check((delta > 0) && (delta < 5000));
           }
       }   
     catch (IOException e)

^ permalink raw reply	[flat|nested] 10+ messages in thread

* FYI: Test Fix
@ 2007-07-18 18:49 Joshua Sumali
  0 siblings, 0 replies; 10+ messages in thread
From: Joshua Sumali @ 2007-07-18 18:49 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 771 bytes --]

These patches fixed the unicode test in gnu/testlet/java/lang/Character/

The unicode test needed a different implementation due to changes from 
Unicode 3 to Unicode 4.
It now passes on classpath, openjdk, and icedtea (and much, much faster 
:) ).

2007-07-18   Joshua Sumali   <jsumali@redhat.com>

    * gnu/testlet/java/lang/Character/CharInfo.java:
    Added a new instance variable to store Unicode character code
    * gnu/testlet/java/lang/Character/unicode.java:
    (test): Changed the Unicode file to use from version 3 to 4
    * gnu/testlet/java/lang/Character/UnicodeBase.java:
    Changed implementation of the test to work with Unicode version 4.
    * gnu/testlet/java/lang/Character/UnicodeData-4.0.0.txt:
    Added new Unicode data file (version 4).



[-- Attachment #2: diff_CharInfo --]
[-- Type: text/plain, Size: 884 bytes --]

#P mauve
Index: gnu/testlet/java/lang/Character/CharInfo.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Character/CharInfo.java,v
retrieving revision 1.4
diff -u -r1.4 CharInfo.java
--- gnu/testlet/java/lang/Character/CharInfo.java	13 Apr 2004 13:42:51 -0000	1.4
+++ gnu/testlet/java/lang/Character/CharInfo.java	18 Jul 2007 17:24:58 -0000
@@ -27,12 +27,13 @@
 
 public class CharInfo
 {
-  public String name;
-  public String category;
-  public int decimalDigit;
-  public int digit;
-  public int numericValue;
-  public char uppercase;
-  public char lowercase;
-  public char titlecase;
+	public String name;
+	public String category;
+	public int decimalDigit;
+	public int digit;
+	public int numericValue;
+	public int uppercase;
+	public int lowercase;
+	public int titlecase;
+	public int code;
 }

[-- Attachment #3: diff_unicode --]
[-- Type: text/plain, Size: 639 bytes --]

#P mauve
Index: gnu/testlet/java/lang/Character/unicode.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Character/unicode.java,v
retrieving revision 1.17
diff -u -r1.17 unicode.java
--- gnu/testlet/java/lang/Character/unicode.java	15 Apr 2004 06:08:58 -0000	1.17
+++ gnu/testlet/java/lang/Character/unicode.java	18 Jul 2007 17:25:14 -0000
@@ -51,7 +51,7 @@
 
   public void test(TestHarness harness)
   {
-    String fileName = "UnicodeData-3.0.0.txt";
+    String fileName = "UnicodeData-4.0.0.txt";
     long start = System.currentTimeMillis();
     try
       {

[-- Attachment #4: diff_UnicodeBase --]
[-- Type: text/plain, Size: 34194 bytes --]

#P mauve
Index: gnu/testlet/java/lang/Character/UnicodeBase.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Character/UnicodeBase.java,v
retrieving revision 1.1
diff -u -r1.1 UnicodeBase.java
--- gnu/testlet/java/lang/Character/UnicodeBase.java	8 Apr 2004 16:05:36 -0000	1.1
+++ gnu/testlet/java/lang/Character/UnicodeBase.java	18 Jul 2007 17:25:37 -0000
@@ -1,7 +1,8 @@
-// Uses: CharInfo
+//Uses: CharInfo
 
 /* Copyright (C) 1999 Artur Biesiadowski
-   Copyright (C) 2004 Stephen Crawley 
+   Copyright (C) 2004 Stephen Crawley
+   Copyright (C) 2007 Joshua Sumali
 
 This file is part of Mauve.
 
@@ -23,658 +24,632 @@
 package gnu.testlet.java.lang.Character;
 
 import java.io.*;
+
 import gnu.testlet.Testlet;
 import gnu.testlet.TestHarness;
 import gnu.testlet.ResourceNotFoundException;
 
-/*
-  MISSING:
-  Instance tests
-  (constructor, charValue, serialization): should be in other file
-*/
-
-public abstract class UnicodeBase implements Testlet
-{
-  public static boolean testDeprecated;
-  public static boolean verbose;
-  public static boolean benchmark;
-
-  public CharInfo[] chars = new CharInfo[0x10000];
-  public int failures;
-  public int tests;
-  TestHarness harness;
-
-
-  public UnicodeBase()
-  {
-  }
-
-  public UnicodeBase(TestHarness aHarness, String filename) 
-    throws IOException, ResourceNotFoundException
-  {
-    harness = aHarness;
-    Reader bir = 
-      harness.getResourceReader("gnu#testlet#java#lang#Character#" +
+public abstract class UnicodeBase implements Testlet {
+
+	public static boolean testDeprecated;
+	public static boolean verbose;
+	public static boolean benchmark;
+
+	public int failures;
+	public int tests;
+	TestHarness harness;
+
+	private Reader bir;
+	private StringBuffer sb;
+
+	public UnicodeBase()
+	{
+	}
+
+	public UnicodeBase(TestHarness aHarness, String filename) 
+	throws ResourceNotFoundException, FileNotFoundException
+	{
+		harness = aHarness;
+		bir = harness.getResourceReader("gnu#testlet#java#lang#Character#" +
 				filename);
-    harness.debug("Reading unicode database...");
-    while (bir.ready())
-      {
-	String str;
-	CharInfo ci = new CharInfo();
-	// 0 - Code value
-	str = getNext(bir);
-	int code = (char) Integer.parseInt(str, 16);
-	// 1 - Character name
-	ci.name = getNext(bir);
-	// 2 - General category
-	ci.category = getNext(bir);
-	// 3 - Canonical combining classes
-	getNext(bir);
-	// 4 - Bidirectional category
-	getNext(bir);
-	// 5 - Character decomposition mapping
-	getNext(bir);
-	// 6 - Decimal digit value
-	str = getNext(bir);
-	if (!str.equals(""))
-	  ci.decimalDigit = Integer.parseInt(str, 10);
-	else
-	  ci.decimalDigit = -1;
-	// 7 - Digit value
-	str = getNext(bir);
-	if (!str.equals(""))
-	  ci.digit = Integer.parseInt(str, 10);
-	else
-	  ci.digit = -1;
-	// 8 - Numeric value
-	str = getNext(bir);
-	if (str.equals(""))
-	  {
-	    ci.numericValue = -1;
-	  }
-	else
-	  {
-	    try {
-	      ci.numericValue = Integer.parseInt(str, 10);
-	      if (ci.numericValue < 0)
-		ci.numericValue = -2;
-	    } 
-	    catch (NumberFormatException e)
-	      {
-		ci.numericValue = -2;
-	      }
-	  }
-	// 9 - Mirrored
-	getNext(bir);
-	// 10 - Unicode 1.0 name
-	getNext(bir);
-	// 11 - ISO 10646 comment field
-	getNext(bir);
-	// 12 - Upper case mapping
-	str = getNext(bir);
-	if (!str.equals(""))
-	  ci.uppercase = (char) Integer.parseInt(str, 16);
-	// 13 - Lower case mapping
-	str = getNext(bir);
-	if (!str.equals(""))
-	  ci.lowercase = (char) Integer.parseInt(str, 16);
-	// 14 - Title case mapping
-	str = getNext(bir);
-	if (!str.equals(""))
-	  ci.titlecase = (char) Integer.parseInt(str, 16);
-
-	// Character.digit() only treats "Nd" as decimal digits, not "No" 
-	// or "Nl".  Tweak the character defns accordingly.
-	if (ci.digit != -1 && !("Nd".equals(ci.category))) 
-	  ci.digit = -1;
-	chars[code] = ci;
-      }
-
-    // Fill in the character ranges that are reserved in Unicode 3.0
-    CharInfo ch = new CharInfo();
-    ch.name = "CJK Ideograph";
-    ch.category = "Lo";
-    ch.decimalDigit = -1;
-    ch.digit = -1;
-    ch.numericValue = -1;
-    for (int i = 0x4E01; i <= 0x9FA4; i++)
-      {
-	chars[i] = ch;
-      }
-
-    ch = new CharInfo();
-    ch.name = "CJK Ideograph Extension A";
-    ch.category = "Lo";
-    ch.decimalDigit = -1;
-    ch.digit = -1;
-    ch.numericValue = -1;
-    for (int i = 0x3400; i <= 0x4DB5; i++)
-      {
-	chars[i] = ch;
-      }
-
-    ch = new CharInfo();
-    ch.name = "Hangul Syllable";
-    ch.category = "Lo";
-    ch.decimalDigit = -1;
-    ch.digit = -1;
-    ch.numericValue = -1;
-    for (int i = 0xAC01; i <= 0xD7A2; i++)
-      {
-	chars[i] = ch;
-      }
-
-    ch = new CharInfo();
-    ch.name = "CJK Compatibility Ideograph";
-    ch.category = "Lo";
-    ch.decimalDigit = -1;
-    ch.digit = -1;
-    ch.numericValue = -1;
-    for (int i = 0xF901; i <= 0xFA2C; i++)
-      {
-	chars[i] = ch;
-      }
-
-    ch = new CharInfo();
-    ch.name = "Surrogate";
-    ch.category= "Cs";
-    ch.decimalDigit = -1;
-    ch.digit = -1;
-    ch.numericValue = -1;
-    for (int i = 0xD800; i <= 0xDFFFl; i++)
-      {
-	chars[i] = ch;
-      }
-
-    ch = new CharInfo();
-    ch.name = "Private Use";
-    ch.category = "Co";
-    ch.decimalDigit = -1;
-    ch.digit = -1;
-    ch.numericValue = -1;
-    for (int i = 0xE000; i <= 0xF8FF; i++)
-      {
-	chars[i] = ch;
-      }
-
-    ch = new CharInfo();
-    ch.name = "UNDEFINED";
-    ch.category = "Cn";
-    ch.decimalDigit = -1;
-    ch.digit = -1;
-    ch.numericValue = -1;
-    for (int i = 0; i <= 0xFFFF; i++)
-      {
-	if (chars[i] == null)
-	  chars[i] = ch;
-      }
-
-    /*
-      Override the character definitions for Latin letters with digit
-      values to cope with the semantics of Character.digit(), etc.
-      It is not stated that A-Z and a-z should
-      have getNumericValue() (as it is in digit())
-    */
-    for (int i = 'A'; i <= 'Z'; i++)
-      {
-	chars[i].digit = i - 'A' + 10;
-	chars[i].numericValue = chars[i].digit; // ??
-      }
-    for (int i = 'a'; i <= 'z'; i++)
-      {
-	chars[i].digit = i - 'a' + 10;
-	chars[i].numericValue = chars[i].digit; // ??
-      }
-    for (int i = 0xFF21; i <= 0xFF3A; i++)
-      {
-	chars[i].digit = i - 0xFF21 + 10;
-	chars[i].numericValue = chars[i].digit; // ??
-      }
-    for (int i = 0xFF41; i <= 0xFF5A; i++)
-      {
-	chars[i].digit = i - 0xFF41 + 10;
-	chars[i].numericValue = chars[i].digit; // ??
-      }
-    
-    harness.debug("done");
-  }
-
-  private String getNext(Reader r) throws IOException
-  {
-    StringBuffer sb = new StringBuffer();
-    while (r.ready())
-      {
-	char ch = (char) r.read();
-	if (ch == '\r')
-	  {
-	    continue;
-	  }
-	else if (ch == ';' ||  ch == '\n')
-	  {
-	    return sb.toString();
-	  }
-	else
-	  sb.append(ch);
-      }
-    return sb.toString();
-  }
-
-  public String stringChar(int ch)
-  {
-    return "Character " + Integer.toString(ch,16) + ":" + chars[ch].name;
-  }
-	
-  protected void reportError( String what)
-  {
-    harness.check(false, what);
-  }
-	
-  protected void reportError( int ch, String what)
-  {
-    harness.check(false, stringChar(ch) +" incorrectly reported as " + what);
-  }
-	
-  protected void checkPassed()
-  {
-    harness.check(true);
-  }
-
-  public boolean range(int mid, int low, int high)
-  {
-    return (mid >= low && mid <= high);
-  }
-
-  public boolean ignorable(int i)
-  {
-    return (range(i, 0x0000, 0x0008) ||
-	    range(i, 0x000E, 0x001B) ||
-	    range(i, 0x007f, 0x009f) ||
-	    "Cf".equals(chars[i].category));
-  }
-
-  public boolean whitespace(int i) 
-  {
-    return ((chars[i].category.charAt(0) == 'Z' && 
-	     i != 0x00a0 && i != 0x2007 && i != 0x202f) ||
-	    range(i, 0x0009, 0x000D) || 
-	    range(i, 0x001C, 0x001F));
-  }
-
-  public boolean identifierStart(int i) 
-  {
-    return ("Ll".equals(chars[i].category) || 
-	    "Lu".equals(chars[i].category) || 
-	    "Lt".equals(chars[i].category) || 
-	    "Lm".equals(chars[i].category) || 
-	    "Lo".equals(chars[i].category) || 
-	    "Nl".equals(chars[i].category) || 
-	    "Sc".equals(chars[i].category) || 
-	    "Pc".equals(chars[i].category));
-  }
-
-  public boolean unicodeIdentifierStart(int i) 
-  {
-    return ("Ll".equals(chars[i].category) || 
-	    "Lu".equals(chars[i].category) || 
-	    "Lt".equals(chars[i].category) || 
-	    "Lm".equals(chars[i].category) || 
-	    "Lo".equals(chars[i].category) || 
-	    "Nl".equals(chars[i].category));
-  }
-
-  public void performTests()
-  {
-    for (int x = 0; x <= 0xffff; x++)
-      {
-
-	// isLowerCase
-	char i = (char) x;
-	if ("Ll".equals(chars[i].category) != Character.isLowerCase((char) i))
-	  {
-	    reportError(i,
-			(Character.isLowerCase((char) i) ? "lowercase" :
-			 "not-lowercase"));
-
-	  }
-	else checkPassed();
-
-	// isUpperCase
-	if ("Lu".equals(chars[i].category) != Character.isUpperCase((char) i))
-	  {
-	    reportError(i,
-			(Character.isUpperCase((char) i) ? "uppercase" :
-			 "not-uppercase"));
-	  }
-	else checkPassed();
-
-	// isTitleCase
-	if ( "Lt".equals(chars[i].category) !=
-	      Character.isTitleCase((char) i))
-	  {
-	    reportError(i,
-			(Character.isTitleCase((char) i) ? "titlecase" :
-			 "not-titlecase"));
-	  }
-	else checkPassed();
-
-	// isDigit
-	if ("Nd".equals(chars[i].category) != Character.isDigit((char) i))
-	  {
-	    reportError(i,
-			(Character.isDigit((char) i) ? "digit" : "not-digit"));
-	  }
-	else checkPassed();
-
-	// isDefined
-	if (!chars[i].category.equals("Cn") != Character.isDefined((char) i))
-	  {
-	    reportError(i,
-			(Character.isDefined((char) i) ? "defined" : 
-			 "not-defined"));
-	  }
-	else checkPassed();
-
-	// isLetter
-	if ((chars[i].category.charAt(0) == 'L') != 
-	    Character.isLetter((char) i))
-	  {
-	    reportError(i,
-			(Character.isLetter((char) i) ? "letter" : 
-			 "not-letter"));
-	  }
-	else checkPassed();
-
-	// isLetterOrDigit
-	if (Character.isLetterOrDigit(i) !=
-	    (Character.isLetter(i) || Character.isDigit(i)))
-	  {
-	    reportError(i,
-			(Character.isLetterOrDigit(i) ? "letterordigit" :
-			 "not-letterordigit"));
-	  }
-	else checkPassed();
-
-	// isSpaceChar
-	if ((chars[i].category.charAt(0) == 'Z') != Character.isSpaceChar(i))
-	  {
-	    reportError(i,
-			(Character.isSpaceChar(i) ? "spacechar" : 
-			 "not-spacechar"));
-	  }
-	else checkPassed();
-
-	// isWhiteSpace
-	if (whitespace(i) != Character.isWhitespace(i))
-	  {
-	    reportError(i,
-			Character.isWhitespace(i) ? "whitespace" : 
+	}
+
+	private String getNext(Reader r) throws IOException
+	{
+		sb = new StringBuffer();
+		while (r.ready())
+		{
+			char ch = (char) r.read();
+			if (ch == '\r')
+			{
+				continue;
+			}
+			else if (ch == ';' ||  ch == '\n')
+			{
+				return sb.toString();
+			}
+			else
+				sb.append(ch);
+		}
+		return sb.toString();
+	}
+
+	public void performTests() throws IOException{
+
+		//actual test loop
+		CharInfo ci = new CharInfo();
+		while (bir.ready())
+		{
+			String str;
+			ci = new CharInfo();
+			// 0 - Code value
+			str = getNext(bir);
+			int code = Integer.parseInt(str, 16);
+			//harness.debug(""+code);
+			ci.code = code;
+
+			// 1 - Character name
+			ci.name = getNext(bir);
+			// 2 - General category
+			ci.category = getNext(bir);
+			// 3 - Canonical combining classes
+			getNext(bir);
+			// 4 - Bidirectional category
+			getNext(bir);
+			// 5 - Character decomposition mapping
+			getNext(bir);
+			// 6 - Decimal digit value
+			str = getNext(bir);
+			if (!str.equals(""))
+				ci.decimalDigit = Integer.parseInt(str, 10);
+			else
+				ci.decimalDigit = -1;
+			// 7 - Digit value
+			str = getNext(bir);
+			if (!str.equals(""))
+				ci.digit = Integer.parseInt(str, 10);
+			else
+				ci.digit = -1;
+
+			// 8 - Numeric value
+			str = getNext(bir);
+			if (str.equals(""))
+			{
+				ci.numericValue = -1;
+			}
+			else
+			{
+				try {
+					ci.numericValue = Integer.parseInt(str, 10);
+					if (ci.numericValue < 0)
+						ci.numericValue = -2;
+				} 
+				catch (NumberFormatException e)
+				{
+					ci.numericValue = -2;
+				}
+			}
+			// 9 - Mirrored
+			getNext(bir);
+			// 10 - Unicode 1.0 name
+			getNext(bir);
+			// 11 - ISO 10646 comment field
+			getNext(bir);
+			// 12 - Upper case mapping
+			str = getNext(bir);
+			if (!str.equals(""))
+				ci.uppercase = Integer.parseInt(str, 16);
+			else 
+				ci.uppercase = ci.code;
+			// 13 - Lower case mapping
+			str = getNext(bir);
+			if (!str.equals(""))
+				ci.lowercase = Integer.parseInt(str, 16);
+			else 
+				ci.lowercase = ci.code;
+			// 14 - Title case mapping
+			str = getNext(bir);
+			if (!str.equals(""))
+				ci.titlecase = Integer.parseInt(str, 16);
+			else 
+				ci.titlecase = ci.code;
+
+			// Character.digit() only treats "Nd" as decimal digits, not "No" 
+			// or "Nl".  Tweak the character defns accordingly.
+			if (ci.digit != -1 && !("Nd".equals(ci.category))) 
+				ci.digit = -1;
+
+			//test the char
+			testChar(ci);
+		}
+
+
+		// Fill in the character ranges that are reserved in Unicode 3.0
+		CharInfo ch = new CharInfo();
+		ch.name = "CJK Ideograph";
+		ch.category = "Lo";
+		ch.decimalDigit = -1;
+		ch.digit = -1;
+		ch.numericValue = -1;
+		for (int i = 0x4E01; i <= 0x9FA4; i++)
+		{
+			ch.code = i;
+			testChar(ch);
+		}
+
+		ch = new CharInfo();
+		ch.name = "CJK Ideograph Extension A";
+		ch.category = "Lo";
+		ch.decimalDigit = -1;
+		ch.digit = -1;
+		ch.numericValue = -1;
+		for (int i = 0x3400; i <= 0x4DB5; i++)
+		{
+			ch.code = i;
+			testChar(ch);
+		}
+
+		ch = new CharInfo();
+		ch.name = "Hangul Syllable";
+		ch.category = "Lo";
+		ch.decimalDigit = -1;
+		ch.digit = -1;
+		ch.numericValue = -1;
+		for (int i = 0xAC01; i <= 0xD7A2; i++)
+		{
+			ch.code = i;
+			testChar(ch);
+		}
+
+		ch = new CharInfo();
+		ch.name = "CJK Compatibility Ideograph";
+		ch.category = "Lo";
+		ch.decimalDigit = -1;
+		ch.digit = -1;
+		ch.numericValue = -1;
+		for (int i = 0xF901; i <= 0xFA2C; i++)
+		{
+			ch.code = i;
+			testChar(ch);
+		}
+
+		ch = new CharInfo();
+		ch.name = "Surrogate";
+		ch.category= "Cs";
+		ch.decimalDigit = -1;
+		ch.digit = -1;
+		ch.numericValue = -1;
+		for (int i = 0xD800; i <= 0xDFFFl; i++)
+		{
+			ch.code = i;
+			testChar(ch);
+		}
+
+		ch = new CharInfo();
+		ch.name = "Private Use";
+		ch.category = "Co";
+		ch.decimalDigit = -1;
+		ch.digit = -1;
+		ch.numericValue = -1;
+		for (int i = 0xE000; i <= 0xF8FF; i++)
+		{
+			ch.code = i;
+			testChar(ch);
+		}
+	}
+
+	private void testChar(CharInfo c){
+
+		//All the checkPassed() calls are commented out since if they're
+		//included, this creates too many getStackTrace() calls in
+		//RunnerProcess.java, resulting in the heap running out of memory.
+		
+		// isLowerCase
+		//char i = (char) x;
+		if ("Ll".equals(c.category) != Character.isLowerCase( c.code))
+		{
+			reportError(c,
+					(Character.isLowerCase(c.code) ? "lowercase" :
+					"not-lowercase"));
+
+		}
+		//else checkPassed();
+
+		// isUpperCase
+		if ("Lu".equals(c.category) != Character.isUpperCase(c.code))
+		{
+			reportError(c,
+					(Character.isUpperCase((char) c.code) ? "uppercase" :
+					"not-uppercase"));
+		}
+		//else checkPassed();
+
+		// isTitleCase
+		if ( "Lt".equals(c.category) !=
+			Character.isTitleCase(c.code))
+		{
+			reportError(c,
+					(Character.isTitleCase((char) c.code) ? "titlecase" :
+					"not-titlecase"));
+		}
+		//else checkPassed();
+
+		// isDigit
+		if ("Nd".equals(c.category) != Character.isDigit(c.code))
+		{
+			reportError(c,
+					(Character.isDigit((char) c.code) ? "digit" : "not-digit"));
+		}
+		//else checkPassed();
+
+		// isDefined
+		if (!c.category.equals("Cn") != Character.isDefined(c.code))
+		{
+			reportError(c,
+					(Character.isDefined((char) c.code) ? "defined" : 
+					"not-defined"));
+		}
+		//else checkPassed();
+
+		// isLetter
+		if ((c.category.charAt(0) == 'L') != 
+			Character.isLetter(c.code))
+		{
+			reportError(c,
+					(Character.isLetter((char) c.code) ? "letter" : 
+					"not-letter"));
+		}
+		//else checkPassed();
+
+		// isLetterOrDigit
+		if (Character.isLetterOrDigit(c.code) !=
+			(Character.isLetter(c.code) || Character.isDigit(c.code)))
+		{
+			reportError(c,
+					(Character.isLetterOrDigit(c.code) ? "letterordigit" :
+					"not-letterordigit"));
+		}
+		//else checkPassed();
+
+		// isSpaceChar
+		if ((c.category.charAt(0) == 'Z') != Character.isSpaceChar(c.code))
+		{
+			reportError(c,
+					(Character.isSpaceChar(c.code) ? "spacechar" : 
+					"not-spacechar"));
+		}
+		//else checkPassed();
+
+		// isWhiteSpace
+		if (whitespace(c) != Character.isWhitespace(c.code))
+		{
+			reportError(c,
+					Character.isWhitespace(c.code) ? "whitespace" : 
 			"not-whitespace");
-	  }
-	else checkPassed();
+		}
+		//else checkPassed();
 
-	// isISOControl
-	if (((i <= 0x001F) || range(i, 0x007F, 0x009F)) !=
-	    Character.isISOControl(i))
-	  {
-	    reportError(i,
-			Character.isISOControl(i) ? "isocontrol" :
+		// isISOControl
+		if (((c.code <= 0x001F) || range(c.code, 0x007F, 0x009F)) !=
+			Character.isISOControl(c.code))
+		{
+			reportError(c,
+					Character.isISOControl(c.code) ? "isocontrol" :
 			"not-isocontrol");
-	  }
-	else checkPassed();
+		}
+		//else checkPassed();
 
-	int type = Character.getType(i);
-	String typeStr = null;
-	switch (type)
-	  {
-	  case Character.UNASSIGNED: typeStr = "Cn"; break;
-	  case Character.UPPERCASE_LETTER: typeStr = "Lu"; break;
-	  case Character.LOWERCASE_LETTER: typeStr = "Ll"; break;
-	  case Character.TITLECASE_LETTER: typeStr = "Lt"; break;
-	  case Character.MODIFIER_LETTER: typeStr = "Lm"; break;
-	  case Character.OTHER_LETTER: typeStr = "Lo"; break;
-	  case Character.NON_SPACING_MARK: typeStr = "Mn"; break;
-	  case Character.ENCLOSING_MARK: typeStr = "Me"; break;
-	  case Character.COMBINING_SPACING_MARK: typeStr = "Mc"; break;
-	  case Character.DECIMAL_DIGIT_NUMBER: typeStr = "Nd"; break;
-	  case Character.LETTER_NUMBER: typeStr = "Nl"; break;
-	  case Character.OTHER_NUMBER: typeStr = "No"; break;
-	  case Character.SPACE_SEPARATOR: typeStr = "Zs"; break;
-	  case Character.LINE_SEPARATOR: typeStr = "Zl"; break;
-	  case Character.PARAGRAPH_SEPARATOR: typeStr = "Zp"; break;
-	  case Character.CONTROL: typeStr = "Cc"; break;
-	  case Character.FORMAT: typeStr = "Cf"; break;
-	  case Character.PRIVATE_USE: typeStr = "Co"; break;
-	  case Character.SURROGATE: typeStr = "Cs"; break;
-	  case Character.DASH_PUNCTUATION: typeStr = "Pd"; break;
-	  case Character.START_PUNCTUATION: typeStr = "Ps"; break;
-	  case Character.END_PUNCTUATION: typeStr = "Pe"; break;
-	  case Character.CONNECTOR_PUNCTUATION: typeStr = "Pc"; break;
-	  case Character.FINAL_QUOTE_PUNCTUATION: typeStr = "Pf"; break;
-	  case Character.INITIAL_QUOTE_PUNCTUATION: typeStr = "Pi"; break;
-	  case Character.OTHER_PUNCTUATION: typeStr = "Po"; break;
-	  case Character.MATH_SYMBOL: typeStr = "Sm"; break;
-	  case Character.CURRENCY_SYMBOL: typeStr = "Sc"; break;
-	  case Character.MODIFIER_SYMBOL: typeStr = "Sk"; break;
-	  case Character.OTHER_SYMBOL: typeStr = "So"; break;
-	  default: typeStr = "ERROR (" + type + ")"; break;
-	  }
-
-	if (!(chars[i].category.equals(typeStr) ||
-	      (typeStr.equals("Ps") && chars[i].category.equals("Pi")) ||
-	      (typeStr.equals("Pe") && chars[i].category.equals("Pf"))))
-	  {
-	    reportError(stringChar(i) + " is reported to be type " + typeStr +
-			" instead of " + chars[i].category);
-	  }
-	else checkPassed();
-
-	// isJavaIdentifierStart
-	if (identifierStart(i) != Character.isJavaIdentifierStart(i))
-	  {
-	    reportError(i,
-			Character.isJavaIdentifierStart(i) ?
-			"javaindentifierstart" : "not-javaidentifierstart");
-	  }
-	else checkPassed();
-
-	// isJavaIdentifierPart
-	boolean shouldbe = false;
-	typeStr = chars[i].category;
-	if ((typeStr.charAt(0) == 'L' ||
-	     typeStr.equals("Sc") ||
-	     typeStr.equals("Pc") ||
-	     typeStr.equals("Nd") ||
-	     typeStr.equals("Nl") ||
-	     typeStr.equals("Mc") ||
-	     typeStr.equals("Mn") ||
-	     typeStr.equals("Cf") ||
-	     (typeStr.equals("Cc") && ignorable(i))) != 
-	    Character.isJavaIdentifierPart(i))
-	  {
-	    reportError(i,
-			Character.isJavaIdentifierPart(i) ? 
-			"javaidentifierpart" : "not-javaidentifierpart");
-	  }
-	else checkPassed();
-	
-	//isUnicodeIdentifierStart
-	if (unicodeIdentifierStart(i) != Character.isUnicodeIdentifierStart(i))
-	  {
-	    reportError(i,
-			Character.isUnicodeIdentifierStart(i) ? 
-			"unicodeidentifierstart" : 
+		int type = Character.getType(c.code);
+		String typeStr = null;
+		switch (type)
+		{
+		case Character.UNASSIGNED: typeStr = "Cn"; break;
+		case Character.UPPERCASE_LETTER: typeStr = "Lu"; break;
+		case Character.LOWERCASE_LETTER: typeStr = "Ll"; break;
+		case Character.TITLECASE_LETTER: typeStr = "Lt"; break;
+		case Character.MODIFIER_LETTER: typeStr = "Lm"; break;
+		case Character.OTHER_LETTER: typeStr = "Lo"; break;
+		case Character.NON_SPACING_MARK: typeStr = "Mn"; break;
+		case Character.ENCLOSING_MARK: typeStr = "Me"; break;
+		case Character.COMBINING_SPACING_MARK: typeStr = "Mc"; break;
+		case Character.DECIMAL_DIGIT_NUMBER: typeStr = "Nd"; break;
+		case Character.LETTER_NUMBER: typeStr = "Nl"; break;
+		case Character.OTHER_NUMBER: typeStr = "No"; break;
+		case Character.SPACE_SEPARATOR: typeStr = "Zs"; break;
+		case Character.LINE_SEPARATOR: typeStr = "Zl"; break;
+		case Character.PARAGRAPH_SEPARATOR: typeStr = "Zp"; break;
+		case Character.CONTROL: typeStr = "Cc"; break;
+		case Character.FORMAT: typeStr = "Cf"; break;
+		case Character.PRIVATE_USE: typeStr = "Co"; break;
+		case Character.SURROGATE: typeStr = "Cs"; break;
+		case Character.DASH_PUNCTUATION: typeStr = "Pd"; break;
+		case Character.START_PUNCTUATION: typeStr = "Ps"; break;
+		case Character.END_PUNCTUATION: typeStr = "Pe"; break;
+		case Character.CONNECTOR_PUNCTUATION: typeStr = "Pc"; break;
+		case Character.FINAL_QUOTE_PUNCTUATION: typeStr = "Pf"; break;
+		case Character.INITIAL_QUOTE_PUNCTUATION: typeStr = "Pi"; break;
+		case Character.OTHER_PUNCTUATION: typeStr = "Po"; break;
+		case Character.MATH_SYMBOL: typeStr = "Sm"; break;
+		case Character.CURRENCY_SYMBOL: typeStr = "Sc"; break;
+		case Character.MODIFIER_SYMBOL: typeStr = "Sk"; break;
+		case Character.OTHER_SYMBOL: typeStr = "So"; break;
+		default: typeStr = "ERROR (" + type + ")"; break;
+		}
+
+		if (!(c.category.equals(typeStr) ||
+				(typeStr.equals("Ps") && c.category.equals("Pi")) ||
+				(typeStr.equals("Pe") && c.category.equals("Pf"))))
+		{
+			reportError(stringChar(c) + " is reported to be type " + typeStr +
+					" instead of " + c.category);
+		}
+		//else checkPassed();
+
+		// isJavaIdentifierStart
+		if (identifierStart(c) != Character.isJavaIdentifierStart(c.code))
+		{
+			reportError(c,
+					Character.isJavaIdentifierStart(c.code) ?
+							"javaindentifierstart" : "not-javaidentifierstart");
+		}
+		//else checkPassed();
+
+		// isJavaIdentifierPart
+		typeStr = c.category;
+		if ((typeStr.charAt(0) == 'L' ||
+				typeStr.equals("Sc") ||
+				typeStr.equals("Pc") ||
+				typeStr.equals("Nd") ||
+				typeStr.equals("Nl") ||
+				typeStr.equals("Mc") ||
+				typeStr.equals("Mn") ||
+				typeStr.equals("Cf") ||
+				(typeStr.equals("Cc") && ignorable(c))) != 
+					Character.isJavaIdentifierPart(c.code))
+		{
+			reportError(c,
+					Character.isJavaIdentifierPart(c.code) ? 
+							"javaidentifierpart" : "not-javaidentifierpart");
+		}
+		//else checkPassed();
+
+		//isUnicodeIdentifierStart
+		if (unicodeIdentifierStart(c) != Character.isUnicodeIdentifierStart(c.code))
+		{
+			reportError(c,
+					Character.isUnicodeIdentifierStart(c.code) ? 
+							"unicodeidentifierstart" : 
 			"not-unicodeidentifierstart");
-	  }
-	else checkPassed();
-	
-	//isUnicodeIdentifierPart
-	shouldbe = false;
-	typeStr = chars[i].category;
-	if ((typeStr.charAt(0) == 'L' ||
-	     typeStr.equals("Pc") ||
-	     typeStr.equals("Nd") ||
-	     typeStr.equals("Nl") ||
-	     typeStr.equals("Mc") ||
-	     typeStr.equals("Mn") ||
-	     typeStr.equals("Cf") ||
-	     (typeStr.equals("Cc") && ignorable(i))) != 
-	    Character.isUnicodeIdentifierPart(i))
-	  {
-	    reportError(i,
-			Character.isUnicodeIdentifierPart(i) ?
-			"unicodeidentifierpart" : "not-unicodeidentifierpart");
-	  }
-	else checkPassed();
-
-
-	//isIdentifierIgnorable
-	if (ignorable(i) != Character.isIdentifierIgnorable(i))
-	  {
-	    reportError(i,
-			Character.isIdentifierIgnorable(i) ? 
-			"identifierignorable": "not-identifierignorable");
-	  }
-	else checkPassed();
-
-	// toLowerCase
-	char cs = (chars[i].lowercase != 0 ?
-		   chars[i].lowercase : i);
-	if (Character.toLowerCase(i) != cs)
-	  {
-	    reportError(stringChar(i) + " has wrong lowercase form of " +
-			stringChar(Character.toLowerCase(i)) +" instead of " +
-			stringChar(cs));
-	  }
-	else checkPassed();
-	
-	// toUpperCase
-	cs =(chars[i].uppercase != 0 ? 
-	     chars[i].uppercase : i);
-	if (Character.toUpperCase(i) != cs)
-	  {
-	    reportError(stringChar(i) +
-			" has wrong uppercase form of " +
-			stringChar(Character.toUpperCase(i)) +
-			" instead of " +
-			stringChar(cs));
-	  }
-	else checkPassed();
-	
-	// toTitleCase
-	cs = (chars[i].titlecase != 0 ? 
-	      chars[i].titlecase :
-	      (chars[i].uppercase != 0 ? 
-	       chars[i].uppercase : i));
-	
-	if ("Lt".equals(chars[i].category))
-	  {
-	    cs = i;
-	  }
-	
-	if (Character.toTitleCase(i) != cs)
-	  {
-	    reportError(stringChar(i) +
-			" has wrong titlecase form of " +
-			stringChar(Character.toTitleCase(i)) +
-			" instead of " + 
-			stringChar(cs));
-	  }
-	else checkPassed();
-	
-	// digit
-	for (int radix = Character.MIN_RADIX; 
-	     radix <= Character.MAX_RADIX;
-	     radix++)
-	  {
-	    int digit = chars[i].digit;	    
-	    if (digit >= radix) 
-	      digit = -1;
-	    if (Character.digit(i, radix) != digit)
-	      {
-		reportError(stringChar(i) + " has wrong digit form of " +
-			    Character.digit(i, radix) + " for radix " + 
-			    radix + " instead of " + digit +
-			    "(" + chars[i].digit + ")");
-	      }
-	    else checkPassed();
-	  }
-	
-	// getNumericValue
-	if (chars[i].numericValue != Character.getNumericValue(i))
-	  {
-	    reportError(stringChar(i) + " has wrong numeric value of " +
-			Character.getNumericValue(i) + " instead of " + 
-			chars[i].numericValue);
-	  }
-	
-	
-	
-	if (testDeprecated)
-	  {
-	    
-	    // isJavaLetter
-	    if ((i == '$' || i == '_' || Character.isLetter(i)) !=
-		Character.isJavaLetter(i))
-	      {
-		reportError(i,
-			    (Character.isJavaLetter(i)? "javaletter" : 
-			     "not-javaletter"));
-	      }
-	    else checkPassed();
-	    
-	    // isJavaLetterOrDigit
-	    if ((Character.isJavaLetter(i) || Character.isDigit(i) ||
-		 i == '$' || i == '_') !=
-		Character.isJavaLetterOrDigit(i)
-		)
-	      {
-		reportError(i,
-			    (Character.isJavaLetterOrDigit(i) ?
-			     "javaletterordigit" : "not-javaletterordigit"));
-	      }
-	    else checkPassed();
-	    
-	    // isSpace
-	    if (((i == ' ' || i == '\t' || i == '\n' || i == '\r' ||
-		  i == '\f')) != Character.isSpace(i))
-	      {
-		reportError(i,
-			    (Character.isSpace(i) ? "space" : "non-space"));
-	      }
-	    else checkPassed();
-	  } // testDeprecated
-	
-      } // for
-    
-    // forDigit
-    for (int r = -100; r < 100; r++)
-      {
-	for (int d = -100; d < 100; d++)
-	  {
-	    char dch = Character.forDigit(d,r);
-	    char wantch = 0;
-	    if (range(r, Character.MIN_RADIX, Character.MAX_RADIX) &&
-		 range(d, 0, r - 1))
-	      {
-		if (d < 10)
-		  {
-		    wantch = (char) ('0' + (char) d);
-		  }
-		else if (d < 36)
-		  {
-		    wantch = (char) ('a' + d - 10);
-		  }
-	      }
-
-	    if (dch != wantch)
-	      {
-		reportError("Error in forDigit(" + d +
-			     "," + r + "), got " + dch + " wanted " +
-			     wantch);
-	      }
-	    else checkPassed();
-	  }
-      }
-  }
+		}
+		//else checkPassed();
 
+		//isUnicodeIdentifierPart;
+		typeStr = c.category;
+		if ((typeStr.charAt(0) == 'L' ||
+				typeStr.equals("Pc") ||
+				typeStr.equals("Nd") ||
+				typeStr.equals("Nl") ||
+				typeStr.equals("Mc") ||
+				typeStr.equals("Mn") ||
+				typeStr.equals("Cf") ||
+				(typeStr.equals("Cc") && ignorable(c))) != 
+					Character.isUnicodeIdentifierPart(c.code))
+		{
+			reportError(c,
+					Character.isUnicodeIdentifierPart(c.code) ?
+							"unicodeidentifierpart" : "not-unicodeidentifierpart");
+		}
+		//else checkPassed();
+
+
+		//isIdentifierIgnorable
+		if (ignorable(c) != Character.isIdentifierIgnorable(c.code))
+		{
+			reportError(c,
+					Character.isIdentifierIgnorable(c.code) ? 
+							"identifierignorable": "not-identifierignorable");
+		}
+		//else checkPassed();
+
+
+		// toLowerCase
+		int lowerCase = (c.lowercase != 0 ?
+				c.lowercase : c.code);
+		if (Character.toLowerCase(c.code) != lowerCase)
+		{
+			reportError(stringChar(c) + " has wrong lowercase form of " +
+					c.lowercase +" instead of " +
+					stringChar(c));
+		}
+		//else checkPassed();
+
+		// toUpperCase
+
+		int upperCase = (c.uppercase != 0 ?
+				c.uppercase : c.code);
+		if (Character.toUpperCase(c.code) != upperCase)
+		{
+			reportError(stringChar(c) +
+					" has wrong uppercase form of " +
+					c.uppercase +
+					" instead of " +
+					stringChar(c));
+		}
+		//else checkPassed();
+
+		// toTitleCase
+		int titleCase = (c.titlecase != 0 ? c.titlecase :
+			(c.uppercase != 0 ? 
+					c.uppercase : c.code));
+		if ("Lt".equals(c.category))
+		{
+			titleCase = c.code;
+		}
+
+		if (Character.toTitleCase(c.code) != titleCase)
+		{
+			reportError(stringChar(c) +
+					" has wrong titlecase form of " +
+					c.titlecase +
+					" instead of " + 
+					stringChar(c));
+		}
+		//else checkPassed();
+
+		// digit
+		boolean radixPassed = true;
+		for (int radix = Character.MIN_RADIX; radix <= Character.MAX_RADIX;
+		radix++)
+		{
+			//special cases for A-Za-z and their fullwidth counterparts
+			if (range(c.code,'A','Z')){
+				c.digit = c.code - 'A' + 10;
+			} 
+			else if (range(c.code,'a','z')){
+				c.digit = c.code - 'a' + 10;
+			} 
+			else if (range(c.code,0xff21,0xff3a)){
+				c.digit = c.code - 0xff21 + 10;
+			} 
+			else if (range(c.code,0xff41,0xff5a)){
+				c.digit = c.code - 0xff41 + 10;
+			}
+			int digit = c.digit;
+			if (digit >= radix) 
+				digit = -1;
+			if (Character.digit( c.code, radix) != digit)
+			{
+				reportError(stringChar(c) + " has wrong digit form of " +
+						Character.digit(c.code, radix) + " for radix " + 
+						radix + " instead of " + digit +
+						"(" + c.digit + ")");
+				radixPassed = false;
+			}
+			//else checkPassed();
+		}
+		if (radixPassed)
+			checkPassed();
+
+
+		// getNumericValue
+
+		if (range(c.code,'A','Z') || range(c.code,'a','z')
+				|| range(c.code,0xff21,0xff3a) || range(c.code,0xff41,0xff5a)){
+			if(c.numericValue != -1){
+				reportError(stringChar(c) + " has wrong numeric value of " +
+						Character.getNumericValue(c.code) + " instead of -1");
+			}
+		} else {
+
+			if (c.numericValue != Character.getNumericValue(c.code))
+			{
+				reportError(stringChar(c) + " has wrong numeric value of " +
+						Character.getNumericValue(c.code) + " instead of " + 
+						c.numericValue);
+			}
+
+		}
+		if (testDeprecated)
+		{
+
+			// isJavaLetter
+			if (((char) c.code == '$' || (char) c.code == '_' 
+				|| Character.isLetter(c.code)) !=	Character.isJavaLetter((char) c.code))
+			{
+				reportError(c,
+						(Character.isJavaLetter((char) c.code)? "javaletter" : 
+						"not-javaletter"));
+			}
+			//else checkPassed();
+
+			// isJavaLetterOrDigit
+			if ((Character.isJavaLetter((char) c.code) || Character.isDigit(c.code) ||
+					(char) c.code == '$' || (char) c.code == '_') !=
+						Character.isJavaLetterOrDigit((char) c.code)
+			)
+			{
+				reportError(c,
+						(Character.isJavaLetterOrDigit((char) c.code) ?
+								"javaletterordigit" : "not-javaletterordigit"));
+			}
+			//else checkPassed();
+
+			// isSpace
+			if ((((char) c.code == ' ' || (char) c.code == '\t' 
+				|| (char) c.code == '\n' || (char) c.code == '\r' ||
+				(char) c.code == '\f')) != Character.isSpace((char) c.code))
+			{
+				reportError(c,
+						(Character.isSpace((char) c.code) ? "space" : "non-space"));
+			}
+			//else checkPassed();
+		} // testDeprecated
+
+
+	}
+
+	protected void reportError(CharInfo c, String what)
+	{
+		harness.check(false, stringChar(c) +" incorrectly reported as " + what);
+	}
+	protected void reportError( String what)
+	{
+		harness.check(false, what);
+	}
+	protected void checkPassed()
+	{
+		harness.check(true);
+	}
+
+	public boolean range(int mid, int low, int high)
+	{
+		return (mid >= low && mid <= high);
+	}
+
+	public boolean whitespace(CharInfo c) 
+	{
+		return ((c.category.charAt(0) == 'Z' && 
+				c.code != 0x00a0 && c.code != 0x2007 && c.code != 0x202f) ||
+				range(c.code, 0x0009, 0x000D) || 
+				range(c.code, 0x001C, 0x001F));
+	}
+
+	//public String stringChar(int ch)
+	public String stringChar(CharInfo c)
+	{
+		//return "Character " + Integer.toString(c.code,16) + ":"
+		return "Character " + c.code + ":"
+		+ (char) c.code + ":" + c.name;
+	}
+
+	public boolean identifierStart(CharInfo c) 
+	{
+		return ("Ll".equals(c.category) || 
+				"Lu".equals(c.category) || 
+				"Lt".equals(c.category) || 
+				"Lm".equals(c.category) || 
+				"Lo".equals(c.category) || 
+				"Nl".equals(c.category) || 
+				"Sc".equals(c.category) || 
+				"Pc".equals(c.category));
+	}
+
+	public boolean unicodeIdentifierStart(CharInfo c) 
+	{
+		return ("Ll".equals(c.category) || 
+				"Lu".equals(c.category) || 
+				"Lt".equals(c.category) || 
+				"Lm".equals(c.category) || 
+
+				"Lo".equals(c.category) || 
+				"Nl".equals(c.category));
+	}
+
+	public boolean ignorable(CharInfo c)
+	{
+		return (range(c.code, 0x0000, 0x0008) ||
+				range(c.code, 0x000E, 0x001B) ||
+				range(c.code, 0x007f, 0x009f) ||
+				"Cf".equals(c.category));
+	}
 }

^ permalink raw reply	[flat|nested] 10+ messages in thread

* FYI: Test Fix
@ 2007-07-13 16:04 Joshua Sumali
  0 siblings, 0 replies; 10+ messages in thread
From: Joshua Sumali @ 2007-07-13 16:04 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 336 bytes --]

This patch fixed an incorrect test in 
gnu/testlet/java/util/GregorianCalendar/internal.java

The test needed an extra else if conditional that it was missing. It now 
passes on openJDK.

2007-07-13    Joshua Sumali    <jsumali@redhat.com>

    * gnu/testlet/java/util/GregorianCalendar/internal.java
    (test): Fixed incorrect test.


[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 911 bytes --]

#P mauve
Index: gnu/testlet/java/util/GregorianCalendar/internal.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/GregorianCalendar/internal.java,v
retrieving revision 1.1
diff -u -r1.1 internal.java
--- gnu/testlet/java/util/GregorianCalendar/internal.java	18 Apr 2007 15:56:05 -0000	1.1
+++ gnu/testlet/java/util/GregorianCalendar/internal.java	13 Jul 2007 15:36:44 -0000
@@ -394,15 +394,17 @@
 		if (setOrder[i] == Calendar.WEEK_OF_YEAR)
 		  {
 		    // YEAR + DAY_OF_WEEK + WEEK_OF_YEAR
-		    // (the rest)
 		    expectTime = 1176361200000L;
 		  }
-		else
+		else if (setOrder[i] == Calendar.WEEK_OF_MONTH)
 		  {
 		    // YEAR + MONTH + WEEK_OF_MONTH + DAY_OF_WEEK
-		    // (some of them)
 		    expectTime = 1177570800000L;
 		  }
+		else {
+			// rest of them
+			expectTime = 1178175600000L;
+		}
 		break;
 	      }
 	  }


^ permalink raw reply	[flat|nested] 10+ messages in thread

* FYI: Test Fix
@ 2007-07-10 14:03 Joshua Sumali
  0 siblings, 0 replies; 10+ messages in thread
From: Joshua Sumali @ 2007-07-10 14:03 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

This patch fixed an incorrect test in 
gnu/testlet/java/beans/Expression/check.java

A test in Expression was looking for a return value for the Array.set 
method, but
should not be since the method is public static void. Test now passes 
for java 1.4.2
and 1.5.

2007-07-10    Joshua Sumali    <jsumali@redhat.com>

    * gnu/testlet/java/beans/Expression/check.java:
    (test):    Fixed incorrect test.



[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 859 bytes --]

### Eclipse Workspace Patch 1.0
#P mauve
Index: gnu/testlet/java/beans/Expression/check.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/beans/Expression/check.java,v
retrieving revision 1.2
diff -u -r1.2 check.java
--- gnu/testlet/java/beans/Expression/check.java	4 Jul 2004 15:58:18 -0000	1.2
+++ gnu/testlet/java/beans/Expression/check.java	10 Jul 2007 13:49:52 -0000
@@ -145,9 +145,9 @@
       {
 	harness.fail("Expression set failed");
       }
-    harness.check(res4 instanceof Integer);
-    harness.check(((Integer)res4).intValue() == 3,
-		  "Test Expression of array and method named set");
+    //Array.set is public static void and should have no return value
+    harness.check(res4 == null);
+
     harness.check(iarray[2] == 6);
 
     Object arg5[] = { new Integer(2) };




^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: FYI:  Test Fix
  2007-06-29 22:42 ` Mario Torre
@ 2007-07-03 13:11   ` Tania Bento
  0 siblings, 0 replies; 10+ messages in thread
From: Tania Bento @ 2007-07-03 13:11 UTC (permalink / raw)
  To: Mario Torre; +Cc: mauve-patches

Hey Mario!

On Sat, 2007-06-30 at 00:27 +0200, Mario Torre wrote:
> Hi Tania!
> 
> You are breaking Classpath!! :P
> 
> With Classpath CVS and JDK 1.6:
> 
> prior to the patch:
> 
> PASS: gnu.testlet.java.lang.Integer.parseInt (number 12)
> PASS: gnu.testlet.java.lang.Integer.parseInt (number 13)
> PASS: gnu.testlet.java.lang.Integer.parseInt (number 14)
> 
> after the patch:
> 
> FAIL: gnu.testlet.java.lang.Integer.parseInt: Leading '+' does not throw
> NumberFormatException (number 0)
> PASS: gnu.testlet.java.lang.Integer.parseInt: Leading '+' does not throw
> NumberFormatException (number 1)
> PASS: gnu.testlet.java.lang.Integer.parseInt: Leading '+' does not throw
> NumberFormatException (number 2)
> 
> So the test is wrong somewhere. I know that the javadoc for java 7
> states that '+' is a valid character, but I think this is too much a
> work in progress to include it as a test, removing old tests, especially
> if this ends up that current stable version fails, while development
> snapshots (whose specs may change at any time) works. I would wait to
> see that finalized, or just write a test specifically for IcedTea.
> 
> If you think there is a reason to break current behaviour ahead of time,
> please, go further and don't listen to me, but in this case I guess that
> a patch for classpath to fix it is needed too.
> 
> Of course, this is only my opinion.

You are right!  If only '+' is passed as an argument to
java.lang.parseInt(String) a NumberFormatException should be thrown.
Currently, the reference implementation does not throw such error in
this case, so, I didn't want to submit a patch to classpath just yet.  

On Friday, I submitted a new bug report to Sun and they're responded
stating that this is a new bug.  Here is the link:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6576055.  I will be
submitting a patch to classpath shortly.

Hope this makes sense!

Cheers,
Tania

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: FYI:  Test Fix
  2007-06-29 19:38 Tania Bento
@ 2007-06-29 22:42 ` Mario Torre
  2007-07-03 13:11   ` Tania Bento
  0 siblings, 1 reply; 10+ messages in thread
From: Mario Torre @ 2007-06-29 22:42 UTC (permalink / raw)
  To: Tania Bento; +Cc: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 2047 bytes --]

Il giorno ven, 29/06/2007 alle 15.38 -0400, Tania Bento ha scritto:
> This patch fixes an incorrect test in
> gnu.testlet.java.lang.Integer.parseInt.
> 
> 
> 2007-06-29  Tania Bento  <tbento@redhat.com>
> 
>         * gnu/testlet/java/lang/Integer/parsetInt.java:
>         (test):  Fixed incorrect test.

Hi Tania!

You are breaking Classpath!! :P

With Classpath CVS and JDK 1.6:

prior to the patch:

PASS: gnu.testlet.java.lang.Integer.parseInt (number 12)
PASS: gnu.testlet.java.lang.Integer.parseInt (number 13)
PASS: gnu.testlet.java.lang.Integer.parseInt (number 14)

after the patch:

FAIL: gnu.testlet.java.lang.Integer.parseInt: Leading '+' does not throw
NumberFormatException (number 0)
PASS: gnu.testlet.java.lang.Integer.parseInt: Leading '+' does not throw
NumberFormatException (number 1)
PASS: gnu.testlet.java.lang.Integer.parseInt: Leading '+' does not throw
NumberFormatException (number 2)

So the test is wrong somewhere. I know that the javadoc for java 7
states that '+' is a valid character, but I think this is too much a
work in progress to include it as a test, removing old tests, especially
if this ends up that current stable version fails, while development
snapshots (whose specs may change at any time) works. I would wait to
see that finalized, or just write a test specifically for IcedTea.

If you think there is a reason to break current behaviour ahead of time,
please, go further and don't listen to me, but in this case I guess that
a patch for classpath to fix it is needed too.

Of course, this is only my opinion.

Ciao!
Mario
-- 
Lima Software - http://www.limasoftware.net/
GNU Classpath Developer - http://www.classpath.org/
Fedora Ambassador - http://fedoraproject.org/wiki/MarioTorre
Jabber: neugens@jabber.org
pgp key: http://subkeys.pgp.net/ PGP Key ID: 80F240CF
Fingerprint: BA39 9666 94EC 8B73 27FA  FC7C 4086 63E3 80F2 40CF

Please, support open standards:
http://opendocumentfellowship.org/petition/
http://www.nosoftwarepatents.com/

[-- Attachment #2: Questa è una parte del messaggio firmata digitalmente --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* FYI:  Test Fix
@ 2007-06-29 19:38 Tania Bento
  2007-06-29 22:42 ` Mario Torre
  0 siblings, 1 reply; 10+ messages in thread
From: Tania Bento @ 2007-06-29 19:38 UTC (permalink / raw)
  To: mauve-patches

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

This patch fixes an incorrect test in
gnu.testlet.java.lang.Integer.parseInt.


2007-06-29  Tania Bento  <tbento@redhat.com>

        * gnu/testlet/java/lang/Integer/parsetInt.java:
        (test):  Fixed incorrect test.


[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 830 bytes --]

Index: gnu/testlet/java/lang/Integer/parseInt.java
===================================================================
RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Integer/parseInt.java,v
retrieving revision 1.1
diff -u -r1.1 parseInt.java
--- gnu/testlet/java/lang/Integer/parseInt.java	21 Jul 2002 14:48:33 -0000	1.1
+++ gnu/testlet/java/lang/Integer/parseInt.java	29 Jun 2007 19:33:44 -0000
@@ -95,14 +95,15 @@
 	harness.check(true);
       }
 
+    // In JDK1.7, '+' is considered a valid character.
     try
       {
         i = Integer.parseInt("+10");
-	harness.fail("Leading '+' must throw NumberFormatException");
+        harness.check(true);
       }
     catch (NumberFormatException nfe)
       {
-	harness.check(true);
+    	harness.fail("Leading '+' does not throw NumberFormatException");
       }
 
     try

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2007-07-24 20:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-13 20:22 FYI: Test Fix Joshua Sumali
  -- strict thread matches above, loose matches on Subject: below --
2007-07-24 19:37 Joshua Sumali
2007-07-24 13:28 Joshua Sumali
2007-07-24 20:17 ` David Daney
2007-07-18 18:49 Joshua Sumali
2007-07-13 16:04 Joshua Sumali
2007-07-10 14:03 Joshua Sumali
2007-06-29 19:38 Tania Bento
2007-06-29 22:42 ` Mario Torre
2007-07-03 13:11   ` Tania Bento

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).