< prev index next >

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

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 1997, 2022, 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) 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 Thai Collation
   * @modules jdk.localedata
+  * @run junit ThaiTest
   */
  /*
   * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved.
   *
   * This software is the proprietary information of Oracle.

*** 37,15 ***
  
  import java.util.Locale;
  import java.text.Collator;
  import java.text.RuleBasedCollator;
  
! public class ThaiTest extends CollatorTest {
  
!     public static void main(String[] args) throws Exception {
!         new ThaiTest().run(args);
!     }
  
      /*
       * Data for TestPrimary()
       */
      private static final String[] primarySourceData = {
--- 38,15 ---
  
  import java.util.Locale;
  import java.text.Collator;
  import java.text.RuleBasedCollator;
  
! import org.junit.jupiter.api.Test;
  
! import static org.junit.jupiter.api.Assertions.fail;
! 
! public class ThaiTest {
  
      /*
       * Data for TestPrimary()
       */
      private static final String[] primarySourceData = {

*** 146,12 ***
           0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
           0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
           0,  0,  0
      };
  
      public void TestPrimary() {
!         doTest(myCollation, Collator.PRIMARY,
                 primarySourceData, primaryTargetData, primaryResults);
      }
  
      private final Collator myCollation = Collator.getInstance(Locale.of("th"));
  }
--- 147,13 ---
           0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
           0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
           0,  0,  0
      };
  
+     @Test
      public void TestPrimary() {
!         TestUtils.doCollatorTest(myCollation, Collator.PRIMARY,
                 primarySourceData, primaryTargetData, primaryResults);
      }
  
      private final Collator myCollation = Collator.getInstance(Locale.of("th"));
  }
< prev index next >