Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/test/java/text/Collator/FinnishTest.java
47182 views
/*1* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation.7*8* This code is distributed in the hope that it will be useful, but WITHOUT9* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or10* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License11* version 2 for more details (a copy is included in the LICENSE file that12* accompanied this code).13*14* You should have received a copy of the GNU General Public License version15* 2 along with this work; if not, write to the Free Software Foundation,16* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.17*18* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA19* or visit www.oracle.com if you need additional information or have any20* questions.21*/2223/*24* @test25* @library /java/text/testlib26* @summary test Finnish Collation27*/28/*29(C) Copyright Taligent, Inc. 1996 - All Rights Reserved30(C) Copyright IBM Corp. 1996 - All Rights Reserved3132The original version of this source code and documentation is copyrighted and33owned by Taligent, Inc., a wholly-owned subsidiary of IBM. These materials are34provided under terms of a License Agreement between Taligent and Sun. This35technology is protected by multiple US and International patents. This notice and36attribution to Taligent may not be removed.37Taligent is a registered trademark of Taligent, Inc.38*/3940import java.util.Locale;41import java.text.Collator;4243// Quick dummy program for printing out test results44public class FinnishTest extends CollatorTest {4546public static void main(String[] args) throws Exception {47new FinnishTest().run(args);48}4950/*51* Data for TestPrimary()52*/53private static final String[] primarySourceData = {54"L\u00E5vi",55"wat"56};5758private static final String[] primaryTargetData = {59"L\u00E4we",60"vat"61};6263private static final int[] primaryResults = {64-1, 065};6667/*68* Data for TestTertiary()69*/70private static final String tertiarySourceData[] = {71"wat",72"vat",73"a\u00FCbeck"74};7576private static final String tertiaryTargetData[] = {77"vat",78"way",79"axbeck"80};8182private static final int[] tertiaryResults = {831, -1, 184};8586public void TestPrimary() {87doTest(myCollation, Collator.PRIMARY,88primarySourceData, primaryTargetData, primaryResults);89}9091public void TestTertiary() {92doTest(myCollation, Collator.TERTIARY,93tertiarySourceData, tertiaryTargetData, tertiaryResults);94}9596private final Collator myCollation = Collator.getInstance(new Locale("fi", "FI", ""));97}9899100