< prev index next >
test/jdk/java/util/Locale/LocaleProviders.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.
*** 235,248 ****
}
}
}
static void bug8027289Test(String expectedCodePoint) {
char[] expectedSymbol = Character.toChars(Integer.valueOf(expectedCodePoint, 16));
NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.CHINA);
char formatted = nf.format(7000).charAt(0);
System.out.println("returned: " + formatted + ", expected: " + expectedSymbol[0]);
if (formatted != expectedSymbol[0]) {
! throw new RuntimeException("Unexpected Chinese currency symbol. returned: " + formatted + ", expected: " + expectedSymbol[0]);
}
}
}
--- 235,252 ----
}
}
}
static void bug8027289Test(String expectedCodePoint) {
+ if (System.getProperty("os.name").startsWith("Windows")) {
char[] expectedSymbol = Character.toChars(Integer.valueOf(expectedCodePoint, 16));
NumberFormat nf = NumberFormat.getCurrencyInstance(Locale.CHINA);
char formatted = nf.format(7000).charAt(0);
System.out.println("returned: " + formatted + ", expected: " + expectedSymbol[0]);
if (formatted != expectedSymbol[0]) {
! throw new RuntimeException(
! "Unexpected Chinese currency symbol. returned: "
! + formatted + ", expected: " + expectedSymbol[0]);
! }
}
}
}
< prev index next >