< prev index next >

test/java/time/tck/java/time/format/TCKOffsetPrinterParser.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 91,100 **** --- 91,108 ---- private static final ZoneOffset OFFSET_M0023 = ZoneOffset.ofHoursMinutes(0, -23); private static final ZoneOffset OFFSET_M012345 = ZoneOffset.ofHoursMinutesSeconds(-1, -23, -45); private static final ZoneOffset OFFSET_M000045 = ZoneOffset.ofHoursMinutesSeconds(0, 0, -45); private static final LocalDateTime DT_2012_06_30_12_30_40 = LocalDateTime.of(2012, 6, 30, 12, 30, 40); + private static final ZoneOffset OFFSET_P1100 = ZoneOffset.ofHours(11); + private static final ZoneOffset OFFSET_P1123 = ZoneOffset.ofHoursMinutes(11, 23); + private static final ZoneOffset OFFSET_P1023 = ZoneOffset.ofHoursMinutes(10, 23); + private static final ZoneOffset OFFSET_P112345 = ZoneOffset.ofHoursMinutesSeconds(11, 23, 45); + private static final ZoneOffset OFFSET_P100045 = ZoneOffset.ofHoursMinutesSeconds(10, 0, 45); + private static final ZoneOffset OFFSET_M1100 = ZoneOffset.ofHours(-11); + private static final ZoneOffset OFFSET_M1123 = ZoneOffset.ofHoursMinutes(-11, -23); + private static final ZoneOffset OFFSET_M112345 = ZoneOffset.ofHoursMinutesSeconds(-11, -23, -45); private DateTimeFormatterBuilder builder; @BeforeMethod public void setUp() { builder = new DateTimeFormatterBuilder();
*** 221,230 **** --- 229,444 ---- {"+HHmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-01"}, {"+HHmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-0123"}, {"+HHmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-0023"}, {"+HHmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-012345"}, {"+HHmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-000045"}, + + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+1"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+1"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "Z"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+1"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P000045, "Z"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-1"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-1"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "Z"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-1"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "Z"}, + + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+1"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+123"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "+023"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+123"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P000045, "Z"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-1"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-123"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-023"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-123"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "Z"}, + + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+100"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+123"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "+023"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+123"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P000045, "Z"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-100"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-123"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-023"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-123"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "Z"}, + + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+1:00"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+1:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "+0:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+1:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P000045, "Z"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-1:00"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-1:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-0:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-1:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "Z"}, + + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+100"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+123"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "+023"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+12345"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P000045, "+00045"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-100"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-123"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-023"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-12345"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-00045"}, + + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+1:00"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+1:23"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "+0:23"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+1:23:45"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-0:00:45"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-1:00"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-1:23"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-0:23"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-1:23:45"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-0:00:45"}, + + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+10000"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+12300"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "+02300"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+12345"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-00045"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-10000"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-12300"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-02300"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-12345"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-00045"}, + + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+1:00:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+1:23:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "+0:23:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+1:23:45"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-0:00:45"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-1:00:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-1:23:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-0:23:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-1:23:45"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-0:00:45"}, + + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+1"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+1:23"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "+0:23"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+1:23:45"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-0:00:45"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-1"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-1:23"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-0:23"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-1:23:45"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-0:00:45"}, + + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_UTC, "Z"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0100, "+1"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0123, "+123"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P0023, "+023"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P012345, "+12345"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P000045, "+00045"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0100, "-1"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0123, "-123"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M0023, "-023"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M012345, "-12345"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M000045, "-00045"}, + + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+11"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+11"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+10"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+11"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_P100045, "+10"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-11"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-11"}, + {"+H", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-11"}, + + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+11"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+1123"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+1023"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+1123"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_P100045, "+10"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-11"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-1123"}, + {"+Hmm", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-1123"}, + + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+1100"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+1123"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+1023"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+1123"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_P100045, "+1000"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-1100"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-1123"}, + {"+HMM", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-1123"}, + + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+11:00"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+11:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+10:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+11:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_P100045, "+10:00"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-11:00"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-11:23"}, + {"+H:MM", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-11:23"}, + + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+1100"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+1123"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+1023"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+112345"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_P100045, "+100045"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-1100"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-1123"}, + {"+HMMss", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-112345"}, + + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+11:00"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+11:23"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+10:23"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+11:23:45"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-11:00"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-11:23"}, + {"+H:MM:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-11:23:45"}, + + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+110000"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+112300"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+102300"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+112345"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-110000"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-112300"}, + {"+HMMSS", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-112345"}, + + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+11:00:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+11:23:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+10:23:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+11:23:45"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-11:00:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-11:23:00"}, + {"+H:MM:SS", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-11:23:45"}, + + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+11"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+11:23"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+10:23"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+11:23:45"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-11"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-11:23"}, + {"+H:mm:ss", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-11:23:45"}, + + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1100, "+11"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1123, "+1123"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P1023, "+1023"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P112345, "+112345"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_P100045, "+100045"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M1100, "-11"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M1123, "-1123"}, + {"+Hmmss", "Z", DT_2012_06_30_12_30_40, OFFSET_M112345, "-112345"}, }; } @DataProvider(name="print_localized") Object[][] data_print_localized() {
< prev index next >