Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 13951 invoked from network); 22 Feb 2011 04:02:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 22 Feb 2011 04:02:53 -0000 Received: (qmail 76606 invoked by uid 500); 22 Feb 2011 04:02:52 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 76454 invoked by uid 500); 22 Feb 2011 04:02:51 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 76447 invoked by uid 99); 22 Feb 2011 04:02:51 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Feb 2011 04:02:51 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Feb 2011 04:02:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 5AA7C23889F7; Tue, 22 Feb 2011 04:02:30 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: svn commit: r1073219 - /commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java Date: Tue, 22 Feb 2011 04:02:30 -0000 To: commits@commons.apache.org From: ggregory@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110222040230.5AA7C23889F7@eris.apache.org> Author: ggregory Date: Tue Feb 22 04:02:30 2011 New Revision: 1073219 URL: http://svn.apache.org/viewvc?rev=1073219&view=rev Log: Format before adding tests. Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java Modified: commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java URL: http://svn.apache.org/viewvc/commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java?rev=1073219&r1=1073218&r2=1073219&view=diff ============================================================================== --- commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java (original) +++ commons/proper/codec/trunk/src/test/org/apache/commons/codec/language/ColognePhoneticTest.java Tue Feb 22 04:02:30 2011 @@ -33,26 +33,45 @@ public class ColognePhoneticTest extends public void testBorderCases() { ColognePhonetic koellePhon = new ColognePhonetic(); - String[][] data = { { "a", "0" }, { "e", "0" }, { "i", "0" }, - { "o", "0" }, { "u", "0" }, { "\u00E4", "0" }, { "\u00F6", "0" }, - { "\u00FC", "0" }, { "aa", "0" }, { "ha", "0" }, { "h", "" }, - { "aha", "0" }, { "b", "1" }, { "p", "1" }, { "ph", "3" }, - { "f", "3" }, { "v", "3" }, { "w", "3" }, { "g", "4" }, - { "k", "4" }, { "q", "4" }, { "x", "48" }, { "ax", "048" }, - { "cx", "48" }, { "l", "5" }, { "cl", "45" }, { "acl", "085" }, - { "mn", "6" }, { "r", "7" } }; + String[][] data = { + {"a", "0"}, + {"e", "0"}, + {"i", "0"}, + {"o", "0"}, + {"u", "0"}, + {"\u00E4", "0"}, + {"\u00F6", "0"}, + {"\u00FC", "0"}, + {"aa", "0"}, + {"ha", "0"}, + {"h", ""}, + {"aha", "0"}, + {"b", "1"}, + {"p", "1"}, + {"ph", "3"}, + {"f", "3"}, + {"v", "3"}, + {"w", "3"}, + {"g", "4"}, + {"k", "4"}, + {"q", "4"}, + {"x", "48"}, + {"ax", "048"}, + {"cx", "48"}, + {"l", "5"}, + {"cl", "45"}, + {"acl", "085"}, + {"mn", "6"}, + {"r", "7"}}; for (int i = 0; i < data.length; i++) { - assertEquals("Failed to correctly convert element of index: " + i, - data[i][1], koellePhon.colognePhonetic(data[i][0])); + assertEquals("Failed to correctly convert element of index: " + i, data[i][1], koellePhon.colognePhonetic(data[i][0])); } } public void testExamples() { ColognePhonetic koellePhon = new ColognePhonetic(); - String[][] data = { { "Müller-Lüdenscheidt", "65752682" }, - { "Breschnew", "17863" }, { "Wikipedia", "3412" } }; - + String[][] data = {{"Müller-Lüdenscheidt", "65752682"}, {"Breschnew", "17863"}, {"Wikipedia", "3412"}}; for (int i = 0; i < data.length; i++) { assertEquals(data[i][1], koellePhon.colognePhonetic(data[i][0])); } @@ -60,9 +79,7 @@ public class ColognePhoneticTest extends public void testIsCologneEquals() { ColognePhonetic koellePhon = new ColognePhonetic(); - assertFalse("Cologne-phonetic encodings should not be equal", - koellePhon.isCologneEqual("Meyer", "Müller")); - assertTrue("Cologne-phonetic encodings should be equal", - koellePhon.isCologneEqual("Meyer", "Mayr")); + assertFalse("Cologne-phonetic encodings should not be equal", koellePhon.isCologneEqual("Meyer", "Müller")); + assertTrue("Cologne-phonetic encodings should be equal", koellePhon.isCologneEqual("Meyer", "Mayr")); } }