Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
naotoj committed Oct 30, 2023
1 parent 3021639 commit 784dd23
Show file tree
Hide file tree
Showing 10 changed files with 33 additions and 192 deletions.
51 changes: 0 additions & 51 deletions test/jdk/java/text/Format/NumberFormat/TestPeruCurrencyFormat.java

This file was deleted.

14 changes: 7 additions & 7 deletions test/jdk/sun/text/resources/Format/Bug4395196.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, 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
Expand All @@ -23,10 +23,10 @@

/*
* @test
* @bug 4395196 4930708 4900884 4890240 8008577
* @bug 4395196 4930708 4900884 4890240 8008577 8174269
* @modules jdk.localedata
* @summary verify the ko DateFormat
* @run main/othervm -Djava.locale.providers=JRE,SPI Bug4395196
* @run main Bug4395196
*/

import java.text.DateFormat;
Expand All @@ -46,25 +46,25 @@ public static void main(String[] arg)
DateFormat df =
DateFormat.getDateTimeInstance(DateFormat.DEFAULT, DateFormat.SHORT,loc);
SimpleDateFormat sdf = new SimpleDateFormat("",loc);
sdf.applyPattern("yyyy. M. d a h:mm");
sdf.applyPattern("y. M. d. a h:mm");
if( !sdf.format(now).equals(df.format(now))){
result++;
System.out.println("error at " + sdf.format(now));
}
df = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM,loc);
sdf.applyPattern("yyyy'\ub144' M'\uc6d4' d'\uc77c' '('EE')' a h:mm:ss");
sdf.applyPattern("y\ub144 M\uc6d4 d\uc77c a h:mm:ss");
if( !sdf.format(now).equals(df.format(now))){
result++;
System.out.println("error at " + sdf.format(now));
}
df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.LONG,loc);
sdf.applyPattern("yyyy. M. d a h'\uc2dc' mm'\ubd84' ss'\ucd08'");
sdf.applyPattern("y. M. d. a h\uc2dc m\ubd84 s\ucd08 z");
if( !sdf.format(now).equals(df.format(now))){
result++;
System.out.println("error at " + sdf.format(now));
}
df = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.FULL,loc);
sdf.applyPattern("yy. M. d a h'\uc2dc' mm'\ubd84' ss'\ucd08' z");
sdf.applyPattern("yy. M. d. a h\uc2dc m\ubd84 s\ucd08 zzzz");
if( !sdf.format(now).equals(df.format(now))){
result++;
System.out.println("error at " + sdf.format(now));
Expand Down
8 changes: 4 additions & 4 deletions test/jdk/sun/text/resources/Format/Bug4651568.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, 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
Expand All @@ -23,10 +23,10 @@

/*
* @test
* @bug 4651568 8008577
* @bug 4651568 8008577 8174269
* @modules jdk.localedata
* @summary Verifies the currency pattern for pt_BR locale
* @run main/othervm -Djava.locale.providers=JRE,SPI Bug4651568
* @run main Bug4651568
*/

import java.text.DecimalFormat;
Expand All @@ -38,7 +38,7 @@ public class Bug4651568 {
public static void main (String argv[] ) {
Locale reservedLocale = Locale.getDefault();
try {
String expectedCurrencyPattern = "\u00A4 #.##0,00";
String expectedCurrencyPattern = "\u00a4\u00a0#.##0,00";

Locale locale = new Locale ("pt", "BR");
Locale.setDefault(locale);
Expand Down
8 changes: 4 additions & 4 deletions test/jdk/sun/text/resources/Format/Bug4807540.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, 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
Expand All @@ -23,10 +23,10 @@

/*
* @test %i%
* @bug 4807540 8008577
* @bug 4807540 8008577 8174269
* @modules jdk.localedata
* @summary updating dateformat for sl_SI
* @run main/othervm -Djava.locale.providers=JRE,SPI Bug4807540
* @run main Bug4807540
*/

import java.text.DateFormat;
Expand All @@ -39,7 +39,7 @@ public class Bug4807540 {
public static void main(String[] args) {
Locale si = Locale.of("sl", "si");

String expected = "30.4.2008";
String expected = "30. apr. 2008";
DateFormat dfSi = DateFormat.getDateInstance (DateFormat.MEDIUM, si);

String siString = new String (dfSi.format(new Date(108, Calendar.APRIL, 30)));
Expand Down
8 changes: 4 additions & 4 deletions test/jdk/sun/text/resources/Format/Bug4810032.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, 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
Expand All @@ -23,10 +23,10 @@

/*
* @test
* @bug 4810032 8008577
* @bug 4810032 8008577 8174269
* @modules jdk.localedata
* @summary verify the ja full time pattern parsing
* @run main/othervm -Djava.locale.providers=JRE,SPI Bug4810032
* @run main Bug4810032
*/

import java.text.DateFormat;
Expand All @@ -37,7 +37,7 @@ public class Bug4810032
{
public static void main(String[] arg)
{
String s = "2003\u5e749\u670826\u65e5"; // "2003y9m26d"
String s = "2003\u5e749\u670826\u65e5\u91d1\u66dc\u65e5"; // "2003y9m26dEEEE"
DateFormat df =
DateFormat.getDateInstance(DateFormat.FULL,Locale.JAPANESE);

Expand Down
44 changes: 0 additions & 44 deletions test/jdk/sun/text/resources/Format/Bug4994312.java

This file was deleted.

10 changes: 5 additions & 5 deletions test/jdk/sun/text/resources/Format/Bug5096553.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023, 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
Expand All @@ -23,14 +23,14 @@

/*
* @test
* @bug 5096553 8008577
* @bug 5096553 8008577 8174269
* @modules jdk.localedata
* @summary updating dateformat for da_DK
* following resources:
* http://oss.software.ibm.com/cvs/icu/~checkout~/locale/common/main/da.xml
* http://www.microsoft.com/globaldev/nlsweb/default.asp?submitted=406
* see bug evaluation for more details
* @run main/othervm -Djava.locale.providers=JRE,SPI Bug5096553
* @run main Bug5096553
*/

import java.util.Date;
Expand All @@ -42,8 +42,8 @@
public class Bug5096553
{
public static void main(String[] args) {
String expectedMed = "30-04-2008";
String expectedShort="30-04-08";
String expectedMed = "30. apr. 2008";
String expectedShort="30.04.2008";

Locale dk = Locale.of("da", "DK");
DateFormat df1 = DateFormat.getDateInstance(DateFormat.MEDIUM, dk);
Expand Down
10 changes: 5 additions & 5 deletions test/jdk/sun/text/resources/Format/Bug8037343.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2023, 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
Expand All @@ -23,10 +23,10 @@

/*
* @test
* @bug 8008577 8037343
* @bug 8008577 8037343 8174269
* @modules jdk.localedata
* @summary updating dateformat for es_DO
* @run main/othervm -Djava.locale.providers=JRE,SPI Bug8037343
* @run main Bug8037343
*/

import java.text.DateFormat;
Expand All @@ -39,8 +39,8 @@ public class Bug8037343
public static void main(String[] arg)
{
final Locale esDO = Locale.of("es", "DO");
final String expectedShort = "31/03/12";
final String expectedMedium = "31/03/2012";
final String expectedShort = "31/3/12";
final String expectedMedium = "31 mar 2012";

int errors = 0;
DateFormat format;
Expand Down
3 changes: 1 addition & 2 deletions test/jdk/sun/text/resources/LocaleDataTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,10 @@
* 8187946 8195478 8181157 8179071 8193552 8202026 8204269 8202537 8208746
* 8209775 8221432 8227127 8230284 8231273 8233579 8234288 8250665 8255086
* 8251317 8274658 8283277 8283805 8265315 8287868 8295564 8284840 8296715
* 8301206 8303472 8317979
* 8301206 8303472 8317979 8174269
* @summary Verify locale data
* @modules java.base/sun.util.resources
* @modules jdk.localedata
* @run main LocaleDataTest
* @run main LocaleDataTest -cldr
*
*/
Expand Down
Loading

0 comments on commit 784dd23

Please sign in to comment.