Details

    • Subcomponent:
    • Resolved In Build:
      1.0.2
    • CPU:
      sparc
    • OS:
      solaris_2.4
    • Verification:
      Verified

      Description

      Date_methods is failing:

      ------- java_util_tests/Date_methods java_run FAIL --------
      16,20c16,20
      < y3.setDate(10) Sun Dec 10 00:00:00 PST 1995
      < y3.setHours(int) Sun Dec 10 20:00:00 PST 1995
      < y3.setMinutes(int) Sun Dec 10 20:40:00 PST 1995
      < y3.setMonth(int) Tue Oct 10 20:40:00 PST 1995
      < y3.setSeconds(int) Tue Oct 10 20:40:23 PST 1995
      ---
      > y3.setDate(10) Thu Dec 10 00:00:00 PST 1995
      > y3.setHours(int) Thu Dec 10 20:00:00 PST 1995
      > y3.setMinutes(int) Thu Dec 10 20:40:00 PST 1995
      > y3.setMonth(int) Thu Oct 10 20:40:00 PST 1995
      > y3.setSeconds(int) Thu Oct 10 20:40:23 PST 1995
      22c22
      < y3.setYear(int) Sun Dec 31 16:02:00 PDT 2000
      ---
      > y3.setYear(int) Wed Dec 31 16:02:00 PST 2000

      Here's the code:

      // Test case for class java.util.Date methods

      import java.util.Properties;
      import java.util.*;


      public class Date_methods
      {
          public static void main (String args[])
          {

             Date y1 = new Date();
             Date y2 = new Date(1000000);
             Date y3 = new Date(95, 11, 21);
             Date y4 = new Date(95, 11, 20, 8, 57);
             Date y5 = new Date(95, 11, 19, 7, 50, 45);
             Date y6 = new Date("6 Feb 1972 5:23:00 PST");

             Properties p = new Properties();
             p.put("MYVAR","VAL");
             System.setProperties(p);

             System.out.print("y1.UTC(int, int, int, int, int, int) " + y1.UTC(1995, 11, 20, 8, 45, 45) + " \\n");

             System.out.print("y1.after(java.util.Date) " + y1.after(y2) + " \\n");

             System.out.print("y1.before(java.util.Date) " + y1.before(y3) + " \\n");

             System.out.print("y1.equals(java.lang.Object) " + y1.equals(y4) + " \\n");

             System.out.print("y6.getDate() " + y6.getDate() + " \\n");

             System.out.print("y6.getDay() " + y6.getDay() + " \\n");

             System.out.print("y6.getHours() " + y6.getHours() + " \\n");

             System.out.print("y6.getMinutes() " + y6.getMinutes() + " \\n");

             System.out.print("y6.getMonth() " + y6.getMonth() + " \\n");

             System.out.print("y6.getSeconds() " + y6.getSeconds() + " \\n");

             System.out.print("y6.getTime() " + y6.getTime() + " \\n");

             System.out.print("y6.getTimezoneOffset() " + y6.getTimezoneOffset() + " \\n");

             System.out.print("y6.getYear() " + y6.getYear() + " \\n");

             System.out.print("y6.hashCode() " + y6.hashCode() + " \\n");

             System.out.print("y1.parse(java.lang.String) " + y1.parse("21 Nov 1995 9:00:00 PST") + " \\n");

             // output void
             y3.setDate(10);
             System.out.print("y3.setDate(10) " + y3 + " \\n");

             y3.setHours(20);
             System.out.print("y3.setHours(int) " + y3 + " \\n");

             y3.setMinutes(40);
             System.out.print("y3.setMinutes(int) " + y3 + " \\n");

             y3.setMonth(9);
             System.out.print("y3.setMonth(int) " + y3 + " \\n");

             y3.setSeconds(23);
             System.out.print("y3.setSeconds(int) " + y3 + " \\n");

             y3.setTime(120000);
             System.out.print("y3.setTime(long) " + y3 + " \\n");

             y3.setYear(100);
             System.out.print("y3.setYear(int) " + y3 + " \\n");

             System.out.print("y4.toGMTString() " + y4.toGMTString() + " \\n");

             System.out.print("y4.toLocaleString() " + y4.toLocaleString() + " \\n");

             System.out.print("y4.toString() " + y4.toString() + " \\n");

              }
      }

        Attachments

          Activity

            People

            • Assignee:
              egilbertsunw Eric Gilbertson (Inactive)
              Reporter:
              duke J. Duke (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: