This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
RE: java.util.SimpleDateFormat
- From: "Erik Poupaert" <erik dot poupaert at chello dot be>
- To: <tromey at redhat dot com>
- Cc: <java at gcc dot gnu dot org>
- Date: Tue, 22 Apr 2003 21:47:26 +0200
- Subject: RE: java.util.SimpleDateFormat
>>>> Could you write simple, obviously correct test cases that show the
>>>> problem? Preferably in Mauve format? That would help.
I've tried the following test case, but it works. So, it's not necessarily a
bug in ClassPath/java.util.Date. I haven't found a description, explanation
or tutorial on how to write a Mauve test case. This is the little test:
import java.util.Date;
public class BugDate
{
//X --- GCJ STATIC LINKING
private static final Class GNU_CALENDAR=gnu.java.locale.Calendar.class;
private static final Class
GNU_LOCALEINFORMATION=gnu.java.locale.LocaleInformation.class;
//otherwise it fails out-of-the-box on minGW
//X --- GCJ STATIC LINKING
public static void main(String args[])
{
Date date1=new Date(101,1,3);
System.out.println("original date=" + date1.toString());
Date date2=new Date(date1.getYear(),date1.getMonth(),date1.getDate());
System.out.println("copied date=" + date2.toString());
if(date1.equals(date2))
{
System.out.println("copy successful");
}
else
{
System.out.println("copy failed");
}
}
}