< prev index next >
test/jdk/java/time/tck/java/time/format/TCKDateTimeFormatterBuilder.java
Print this page
*** 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.
--- 1,7 ----
/*
! * Copyright (c) 2012, 2019, 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.
*** 612,622 ****
};
}
@Test(dataProvider = "parseGenericTimeZonePatterns")
public void test_appendZoneText_parseGenericTimeZonePatterns(String pattern, LocalDateTime ldt, ZoneId zId, String input) {
! DateTimeFormatter df = new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter();
ZonedDateTime expected = ZonedDateTime.parse(input, df);
ZonedDateTime actual = ZonedDateTime.of(ldt, zId);
assertEquals(actual, expected);
}
--- 612,622 ----
};
}
@Test(dataProvider = "parseGenericTimeZonePatterns")
public void test_appendZoneText_parseGenericTimeZonePatterns(String pattern, LocalDateTime ldt, ZoneId zId, String input) {
! DateTimeFormatter df = new DateTimeFormatterBuilder().appendPattern(pattern).toFormatter(Locale.US);
ZonedDateTime expected = ZonedDateTime.parse(input, df);
ZonedDateTime actual = ZonedDateTime.of(ldt, zId);
assertEquals(actual, expected);
}
< prev index next >