< prev index next >

test/java/util/Calendar/JavatimeTest.java

Print this page




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  *@test
  26  *@bug 8007520 8008254
  27  *@summary Test those bridge methods to/from java.time date/time classes

  28  */
  29 
  30 import java.util.Calendar;
  31 import java.util.Date;
  32 import java.util.GregorianCalendar;
  33 import java.util.Random;
  34 import java.util.TimeZone;
  35 import java.time.Instant;
  36 import java.time.LocalDateTime;
  37 import java.time.ZonedDateTime;
  38 import java.time.ZoneId;
  39 import java.time.ZoneOffset;
  40 
  41 public class JavatimeTest {
  42 
  43     static final int NANOS_PER_SECOND = 1000_000_000;
  44 
  45     public static void main(String[] args) throws Throwable {
  46 
  47         int N = 10000;




   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 /*
  25  *@test
  26  *@bug 8007520 8008254
  27  *@summary Test those bridge methods to/from java.time date/time classes
  28  * @key randomness
  29  */
  30 
  31 import java.util.Calendar;
  32 import java.util.Date;
  33 import java.util.GregorianCalendar;
  34 import java.util.Random;
  35 import java.util.TimeZone;
  36 import java.time.Instant;
  37 import java.time.LocalDateTime;
  38 import java.time.ZonedDateTime;
  39 import java.time.ZoneId;
  40 import java.time.ZoneOffset;
  41 
  42 public class JavatimeTest {
  43 
  44     static final int NANOS_PER_SECOND = 1000_000_000;
  45 
  46     public static void main(String[] args) throws Throwable {
  47 
  48         int N = 10000;


< prev index next >