< prev index next >

test/jdk/java/text/Collator/FrenchTest.java

Print this page
@@ -1,7 +1,7 @@
  /*
-  * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
+  * Copyright (c) 1997, 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
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.

@@ -24,10 +24,11 @@
  /*
   * @test
   * @library /java/text/testlib
   * @summary test French Collation
   * @modules jdk.localedata
+  * @run junit FrenchTest
   */
  /*
  (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
  (C) Copyright IBM Corp. 1996 - All Rights Reserved
  

@@ -40,16 +41,16 @@
  */
  
  import java.util.Locale;
  import java.text.Collator;
  
- // Quick dummy program for printing out test results
- public class FrenchTest extends CollatorTest {
+ import org.junit.jupiter.api.Test;
  
-     public static void main(String[] args) throws Exception {
-         new FrenchTest().run(args);
-     }
+ import static org.junit.jupiter.api.Assertions.fail;
+ 
+ // Quick dummy program for printing out test results
+ public class FrenchTest {
  
      private static final String[] tertiarySourceData = {
          "abc",
          "COTE",
          "p\u00EAche",

@@ -84,17 +85,18 @@
          "\u00eb",
          "ea",
          "x"
      };
  
+     @Test
      public void TestTertiary() {
-         doTest(myCollation, Collator.TERTIARY,
+         TestUtils.doCollatorTest(myCollation, Collator.TERTIARY,
                 tertiarySourceData, tertiaryTargetData, tertiaryResults);
  
          for (int i = 0; i < testData.length-1; i++) {
              for (int j = i+1; j < testData.length; j++) {
-                 doTest(myCollation, testData[i], testData[j], -1);
+                 TestUtils.doCollatorTest(myCollation, testData[i], testData[j], -1);
              }
          }
      }
  
      private final Collator myCollation = Collator.getInstance(Locale.FRANCE);
< prev index next >