< prev index next >

test/jdk/java/text/Collator/GermanTest.java

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 1997, 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) 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.

*** 23,10 ***
--- 23,11 ---
  
  /*
   * @test
   * @library /java/text/testlib
   * @summary test German Collation
+  * @run junit GermanTest
   */
  /*
  (C) Copyright Taligent, Inc. 1996 - All Rights Reserved
  (C) Copyright IBM Corp. 1996 - All Rights Reserved
  

*** 39,16 ***
  */
  
  import java.util.Locale;
  import java.text.Collator;
  
! // Quick dummy program for printing out test results
- public class GermanTest extends CollatorTest {
  
!     public static void main(String[] args) throws Exception {
!         new GermanTest().run(args);
!     }
  
      /*
       * Shared data for TestPrimary() and TestTertiary()
       */
      private static final String testSourceData[] = {
--- 40,16 ---
  */
  
  import java.util.Locale;
  import java.text.Collator;
  
! import org.junit.jupiter.api.Test;
  
! import static org.junit.jupiter.api.Assertions.fail;
! 
! // Quick dummy program for printing out test results
+ public class GermanTest {
  
      /*
       * Shared data for TestPrimary() and TestTertiary()
       */
      private static final String testSourceData[] = {

*** 95,17 ***
      private static final int[] tertiaryResults = {
          -1, -1,  1,  1,  1, -1,  0, -1,  1,  0,
          -1,  1
      };
  
      public void TestPrimary() {
!         doTest(myCollation, Collator.PRIMARY,
                 testSourceData, testTargetData, primaryResults);
      }
  
      public void TestTertiary() {
!         doTest(myCollation, Collator.TERTIARY,
                 testSourceData, testTargetData, tertiaryResults);
      }
  
      private final Collator myCollation = Collator.getInstance(Locale.GERMAN);
  }
--- 96,19 ---
      private static final int[] tertiaryResults = {
          -1, -1,  1,  1,  1, -1,  0, -1,  1,  0,
          -1,  1
      };
  
+     @Test
      public void TestPrimary() {
!         TestUtils.doCollatorTest(myCollation, Collator.PRIMARY,
                 testSourceData, testTargetData, primaryResults);
      }
  
+     @Test
      public void TestTertiary() {
!         TestUtils.doCollatorTest(myCollation, Collator.TERTIARY,
                 testSourceData, testTargetData, tertiaryResults);
      }
  
      private final Collator myCollation = Collator.getInstance(Locale.GERMAN);
  }
< prev index next >