Skip to content

Commit 0a66b43

Browse files
committed
Resolved parts
1 parent 3697275 commit 0a66b43

22 files changed

+125
-155
lines changed

test/jdk/java/text/BreakIterator/BreakIteratorTest.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -26,8 +26,7 @@
2626
* @bug 4035266 4052418 4068133 4068137 4068139 4086052 4095322 4097779
2727
* 4097920 4098467 4111338 4113835 4117554 4143071 4146175 4152117
2828
* 4152416 4153072 4158381 4214367 4217703 4638433 8264765
29-
* @library /java/text/testlib
30-
* @run main/timeout=2000 BreakIteratorTest
29+
* @run junit/timeout=2000 BreakIteratorTest
3130
* @summary test BreakIterator
3231
*/
3332

test/jdk/java/text/Collator/APITest.java

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -64,103 +64,103 @@ public final void TestProperty( )
6464
Collator col = null;
6565
try {
6666
col = Collator.getInstance(Locale.ROOT);
67-
logln("The property tests begin : ");
68-
logln("Test ctors : ");
67+
System.out.println("The property tests begin : ");
68+
System.out.println("Test ctors : ");
6969
doAssert(col.compare("ab", "abc") < 0, "ab < abc comparison failed");
7070
doAssert(col.compare("ab", "AB") < 0, "ab < AB comparison failed");
7171
doAssert(col.compare("black-bird", "blackbird") > 0, "black-bird > blackbird comparison failed");
7272
doAssert(col.compare("black bird", "black-bird") < 0, "black bird < black-bird comparison failed");
7373
doAssert(col.compare("Hello", "hello") > 0, "Hello > hello comparison failed");
7474

75-
logln("Test ctors ends.");
76-
logln("testing Collator.getStrength() method ...");
75+
System.out.println("Test ctors ends.");
76+
System.out.println("testing Collator.getStrength() method ...");
7777
doAssert(col.getStrength() == Collator.TERTIARY, "collation object has the wrong strength");
7878
doAssert(col.getStrength() != Collator.PRIMARY, "collation object's strength is primary difference");
7979

80-
logln("testing Collator.setStrength() method ...");
80+
System.out.println("testing Collator.setStrength() method ...");
8181
col.setStrength(Collator.SECONDARY);
8282
doAssert(col.getStrength() != Collator.TERTIARY, "collation object's strength is secondary difference");
8383
doAssert(col.getStrength() != Collator.PRIMARY, "collation object's strength is primary difference");
8484
doAssert(col.getStrength() == Collator.SECONDARY, "collation object has the wrong strength");
8585

86-
logln("testing Collator.setDecomposition() method ...");
86+
System.out.println("testing Collator.setDecomposition() method ...");
8787
col.setDecomposition(Collator.NO_DECOMPOSITION);
8888
doAssert(col.getDecomposition() != Collator.FULL_DECOMPOSITION, "collation object's strength is secondary difference");
8989
doAssert(col.getDecomposition() != Collator.CANONICAL_DECOMPOSITION, "collation object's strength is primary difference");
9090
doAssert(col.getDecomposition() == Collator.NO_DECOMPOSITION, "collation object has the wrong strength");
9191
} catch (Exception foo) {
92-
errln("Error : " + foo.getMessage());
93-
errln("Default Collator creation failed.");
92+
fail("Error : " + foo.getMessage()
93+
+ "\n Default Collator creation failed.");
9494
}
95-
logln("Default collation property test ended.");
96-
logln("Collator.getRules() testing ...");
95+
System.out.println("Default collation property test ended.");
96+
System.out.println("Collator.getRules() testing ...");
9797
doAssert(((RuleBasedCollator)col).getRules().length() != 0, "getRules() result incorrect" );
98-
logln("getRules tests end.");
98+
System.out.println("getRules tests end.");
9999
try {
100100
col = Collator.getInstance(Locale.FRENCH);
101101
col.setStrength(Collator.PRIMARY);
102-
logln("testing Collator.getStrength() method again ...");
102+
System.out.println("testing Collator.getStrength() method again ...");
103103
doAssert(col.getStrength() != Collator.TERTIARY, "collation object has the wrong strength");
104104
doAssert(col.getStrength() == Collator.PRIMARY, "collation object's strength is not primary difference");
105105

106-
logln("testing French Collator.setStrength() method ...");
106+
System.out.println("testing French Collator.setStrength() method ...");
107107
col.setStrength(Collator.TERTIARY);
108108
doAssert(col.getStrength() == Collator.TERTIARY, "collation object's strength is not tertiary difference");
109109
doAssert(col.getStrength() != Collator.PRIMARY, "collation object's strength is primary difference");
110110
doAssert(col.getStrength() != Collator.SECONDARY, "collation object's strength is secondary difference");
111111

112112
} catch (Exception bar) {
113-
errln("Error : " + bar.getMessage());
114-
errln("Creating French collation failed.");
113+
fail("Error : " + bar.getMessage()
114+
+ "\n Creating French collation failed.");
115115
}
116116

117-
logln("Create junk collation: ");
117+
System.out.println("Create junk collation: ");
118118
Locale abcd = new Locale("ab", "CD", "");
119119
Collator junk = null;
120120
try {
121121
junk = Collator.getInstance(abcd);
122122
} catch (Exception err) {
123-
errln("Error : " + err.getMessage());
124-
errln("Junk collation creation failed, should at least return the collator for the base bundle.");
123+
fail("Error : " + err.getMessage()
124+
+ "\n Junk collation creation failed, should at least return the collator for the base bundle.");
125125
}
126126
try {
127127
col = Collator.getInstance(Locale.ROOT);
128128
doAssert(col.equals(junk), "The base bundle's collation should be returned.");
129129
} catch (Exception exc) {
130-
errln("Error : " + exc.getMessage());
131-
errln("Default collation comparison, caching not working.");
130+
fail("Error : " + exc.getMessage()
131+
+ "\n Default collation comparison, caching not working.");
132132
}
133133

134-
logln("Collator property test ended.");
134+
System.out.println("Collator property test ended.");
135135
}
136136

137137
public final void TestHashCode( )
138138
{
139-
logln("hashCode tests begin.");
139+
System.out.println("hashCode tests begin.");
140140
Collator col1 = null;
141141
try {
142142
col1 = Collator.getInstance(Locale.ROOT);
143143
} catch (Exception foo) {
144-
errln("Error : " + foo.getMessage());
145-
errln("Default collation creation failed.");
144+
fail("Error : " + foo.getMessage()
145+
+ "\n Default collation creation failed.");
146146
}
147147
Collator col2 = null;
148148
Locale dk = new Locale("da", "DK", "");
149149
try {
150150
col2 = Collator.getInstance(dk);
151151
} catch (Exception bar) {
152-
errln("Error : " + bar.getMessage());
153-
errln("Danish collation creation failed.");
152+
fail("Error : " + bar.getMessage()
153+
+ "\n Danish collation creation failed.");
154154
return;
155155
}
156156
Collator col3 = null;
157157
try {
158158
col3 = Collator.getInstance(Locale.ROOT);
159159
} catch (Exception err) {
160-
errln("Error : " + err.getMessage());
161-
errln("2nd default collation creation failed.");
160+
fail("Error : " + err.getMessage()
161+
+ "\n 2nd default collation creation failed.");
162162
}
163-
logln("Collator.hashCode() testing ...");
163+
System.out.println("Collator.hashCode() testing ...");
164164

165165
if (col1 != null) {
166166
doAssert(col1.hashCode() != col2.hashCode(), "Hash test1 result incorrect");

test/jdk/java/text/Collator/DanishTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

test/jdk/java/text/Collator/FinnishTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

test/jdk/java/text/Collator/Regression.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

test/jdk/java/text/Collator/SpanishTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

test/jdk/java/text/Collator/ThaiTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

test/jdk/java/text/Collator/TurkishTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

test/jdk/java/text/Collator/VietnameseTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

test/jdk/java/text/Format/DateFormat/Bug4322313.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2001, 2023, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

0 commit comments

Comments
 (0)