Commit b8ab2bf3 authored by Joachim Sauer's avatar Joachim Sauer Committed by Koji Fukui
Browse files

Clear DateFormat.is24Hour during test.

TCKLocalizedPrinterParser checks if java.time.format.DateTimeFormatter
and java.text.DateFormat produce the same output for equivalent input.

java.text.DateFormat takes into account DateFormat.is24Hour which
represents a user-setting forcing a 12- or 24-hour clock. java.time
intentionally doesn't respect that, which causes this test to fail when
either a 12h or a 24h clock is forced.

This commits clears the setting for the duration of the test and re-sets
it to its orginal value afterwards.

Test: cts --primary-abi-only -m CtsLibcoreOjTestCases
Bug: 62651881
Change-Id: I30bab1d5f04cac8bdfc9a455c8ddc3ff39271077
(cherry picked from commit fd8f0567)
parent 76c13bb7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment