From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6991 invoked by alias); 19 Jun 2007 18:12:32 -0000 Received: (qmail 6761 invoked by uid 22791); 19 Jun 2007 18:12:27 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Jun 2007 18:12:23 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l5JICLlH002875 for ; Tue, 19 Jun 2007 14:12:21 -0400 Received: from pobox.toronto.redhat.com (pobox.toronto.redhat.com [172.16.14.4]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l5JICKfr013208 for ; Tue, 19 Jun 2007 14:12:20 -0400 Received: from [172.16.14.161] (toothpaste.toronto.redhat.com [172.16.14.161]) by pobox.toronto.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l5JICKdp018432 for ; Tue, 19 Jun 2007 14:12:20 -0400 Subject: Fixed Failing Tests From: Tania Bento To: mauve-patches@sources.redhat.com Content-Type: multipart/mixed; boundary="=-P5Tl0MsuFvfi9b2fEMTm" Date: Tue, 19 Jun 2007 18:12:00 -0000 Message-Id: <1182276740.2805.14.camel@toothpaste.toronto.redhat.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 (2.10.1-4.fc7) X-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2007/txt/msg00030.txt.bz2 --=-P5Tl0MsuFvfi9b2fEMTm Content-Type: text/plain Content-Transfer-Encoding: 7bit Content-length: 690 This patch fixes some tests that were failing. They now pass on both OpenJDK and IcedTea. 2007-06-19 Tania Bento * gnu/testlet/java/text/Collator/GetSet.java: Fixed failing test. * gnu/testlet/java/text/DateFormatSymbols/Test.java: Likewise. * gnu/testlet/java/text/DecimalFormat/MaximumAndMinimumDigits.java: Likewise. * gnu/testlet/java/text/DecimalFormat/digits.java: Likewise. * gnu/testlet/java/text/DecimalFormat/setDecimalFormatSymbols.java: Likewise. * gnu/testlet/java/text/DecimalFormat/toPattern.java: Likewise. * gnu/testlet/java/text/DecimalFormat/toPattern14.java: Likewise. --=-P5Tl0MsuFvfi9b2fEMTm Content-Disposition: attachment; filename=patch.diff Content-Type: text/x-patch; name=patch.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-length: 8188 Index: gnu/testlet/java/text/Collator/GetSet.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/Collator/GetSet.java,v retrieving revision 1.2 diff -u -r1.2 GetSet.java --- gnu/testlet/java/text/Collator/GetSet.java 3 Apr 1999 19:18:32 -0000 1.2 +++ gnu/testlet/java/text/Collator/GetSet.java 19 Jun 2007 18:11:21 -0000 @@ -36,7 +36,7 @@ Collator col = Collator.getInstance(Locale.US); harness.check(col.getStrength(), Collator.TERTIARY, "default strength"); - harness.check(col.getDecomposition(), Collator.CANONICAL_DECOMPOSITION, + harness.check(col.getDecomposition(), Collator.NO_DECOMPOSITION, "default decomposition"); col.setStrength(Collator.PRIMARY); @@ -46,7 +46,7 @@ harness.check(col.getDecomposition(), Collator.NO_DECOMPOSITION, "set/get decomposition"); - try + try { col.setStrength(999); harness.check(false, "invalid strength value"); Index: gnu/testlet/java/text/DateFormatSymbols/Test.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/DateFormatSymbols/Test.java,v retrieving revision 1.6 diff -u -r1.6 Test.java --- gnu/testlet/java/text/DateFormatSymbols/Test.java 20 Jan 2005 20:10:44 -0000 1.6 +++ gnu/testlet/java/text/DateFormatSymbols/Test.java 19 Jun 2007 18:11:21 -0000 @@ -126,11 +126,18 @@ dfs.setAmPmStrings(my_ampms); harness.check(arrayEquals(dfs.getAmPmStrings(), my_ampms), "am/pm"); - dfs.setZoneStrings(my_zonestrings); - harness.check(arrayEquals(dfs.getZoneStrings(), my_zonestrings), "zones"); - dfs.setLocalPatternChars(my_patternchars); harness.check(dfs.getLocalPatternChars(), my_patternchars, "patterns"); + + /* Invalid Argument */ + boolean fail = false; + try { + dfs.setZoneStrings(my_zonestrings); + } catch (IllegalArgumentException e) { + fail = true; + } + harness.check(fail, true, "InvalidArgumentException is thrown."); + } catch(MissingResourceException e) { Index: gnu/testlet/java/text/DecimalFormat/MaximumAndMinimumDigits.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/DecimalFormat/MaximumAndMinimumDigits.java,v retrieving revision 1.1 diff -u -r1.1 MaximumAndMinimumDigits.java --- gnu/testlet/java/text/DecimalFormat/MaximumAndMinimumDigits.java 22 Sep 2006 20:28:38 -0000 1.1 +++ gnu/testlet/java/text/DecimalFormat/MaximumAndMinimumDigits.java 19 Jun 2007 18:11:21 -0000 @@ -62,9 +62,8 @@ private void doTest() { - // this value is invalid on the RI, as of 1.5.0_08, - // it should be 2147483647 - int MAX = 309; + // this value is 2147483647 + int MAX = Integer.MAX_VALUE; harness.checkPoint("default pattern"); DecimalFormat format = new DecimalFormat(); Index: gnu/testlet/java/text/DecimalFormat/digits.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/DecimalFormat/digits.java,v retrieving revision 1.1 diff -u -r1.1 digits.java --- gnu/testlet/java/text/DecimalFormat/digits.java 7 Sep 2003 12:57:48 -0000 1.1 +++ gnu/testlet/java/text/DecimalFormat/digits.java 19 Jun 2007 18:11:21 -0000 @@ -37,12 +37,12 @@ df.setMaximumFractionDigits(1); harness.check(df.getMaximumFractionDigits(), 1); df.setMaximumFractionDigits(350); - harness.check(df.getMaximumFractionDigits(), 340); + harness.check(df.getMaximumFractionDigits(), 350); df.setMinimumFractionDigits(1); harness.check(df.getMinimumFractionDigits(), 1); df.setMinimumFractionDigits(350); - harness.check(df.getMinimumFractionDigits(), 340); + harness.check(df.getMinimumFractionDigits(), 350); df.setMinimumFractionDigits(16); df.setMaximumFractionDigits(12); @@ -55,12 +55,12 @@ df.setMaximumIntegerDigits(1); harness.check(df.getMaximumIntegerDigits(), 1); df.setMaximumIntegerDigits(310); - harness.check(df.getMaximumIntegerDigits(), 309); + harness.check(df.getMaximumIntegerDigits(), 310); df.setMinimumIntegerDigits(1); harness.check(df.getMinimumIntegerDigits(), 1); df.setMinimumIntegerDigits(310); - harness.check(df.getMinimumIntegerDigits(), 309); + harness.check(df.getMinimumIntegerDigits(), 310); df.setMinimumIntegerDigits(16); df.setMaximumIntegerDigits(12); Index: gnu/testlet/java/text/DecimalFormat/setDecimalFormatSymbols.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/DecimalFormat/setDecimalFormatSymbols.java,v retrieving revision 1.1 diff -u -r1.1 setDecimalFormatSymbols.java --- gnu/testlet/java/text/DecimalFormat/setDecimalFormatSymbols.java 13 Mar 2005 20:42:07 -0000 1.1 +++ gnu/testlet/java/text/DecimalFormat/setDecimalFormatSymbols.java 19 Jun 2007 18:11:21 -0000 @@ -52,18 +52,16 @@ symbols.setDecimalSeparator('y'); harness.check(f1.getDecimalFormatSymbols().getDecimalSeparator(), 'x'); - // try null argument. Behaviour is not specified, but it would be - // consistent with the rest of the API to throw a NullPointerException. - // In fact, in Sun's implementation, null is ignored (see bug parade - // 4329360). + // try null argument. boolean pass = false; try { - f1.setDecimalFormatSymbols(null); + f1.setDecimalFormatSymbols(null); + pass = true; } catch (NullPointerException e) { - pass = true; + // do nothing. } harness.check(pass); } Index: gnu/testlet/java/text/DecimalFormat/toPattern.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/DecimalFormat/toPattern.java,v retrieving revision 1.2 diff -u -r1.2 toPattern.java --- gnu/testlet/java/text/DecimalFormat/toPattern.java 14 Sep 2005 20:14:44 -0000 1.2 +++ gnu/testlet/java/text/DecimalFormat/toPattern.java 19 Jun 2007 18:11:21 -0000 @@ -64,8 +64,8 @@ // seem like any canonical output format is documented. DecimalFormat df = new DecimalFormat ("0.##"); - harness.check (df.toPattern (), "0.##"); - harness.check (df.toLocalizedPattern (), "0.##"); + harness.check (df.toPattern (), "#0.##"); + harness.check (df.toLocalizedPattern (), "#0.##"); DecimalFormatSymbols dfs = df.getDecimalFormatSymbols (); dfs.setDecimalSeparator (','); @@ -74,7 +74,7 @@ dfs.setGroupingSeparator ('!'); df.setDecimalFormatSymbols(dfs); // dfs is only a copy of the internal // symbols so pass symbols back to df - harness.check (df.toLocalizedPattern (), "1,XX"); + harness.check (df.toLocalizedPattern (), "X1,XX"); df.applyPattern ("Fr #,##0.##"); String x1 = df.toPattern (); Index: gnu/testlet/java/text/DecimalFormat/toPattern14.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/DecimalFormat/toPattern14.java,v retrieving revision 1.1 diff -u -r1.1 toPattern14.java --- gnu/testlet/java/text/DecimalFormat/toPattern14.java 22 Sep 2006 20:28:38 -0000 1.1 +++ gnu/testlet/java/text/DecimalFormat/toPattern14.java 19 Jun 2007 18:11:21 -0000 @@ -117,7 +117,7 @@ DecimalFormat f2 = new DecimalFormat("'#'1'.' ''nessuno ci capisce niente qui #0.00;(#0.00)"); harness.check(f2.toPattern(), - "'#'1'.' ''nessuno ci capisce niente qui #0.00;(#0.00)"); + "'#1. '''nessuno ci capisce niente qui #0.00;(#0.00)"); } public void test3(TestHarness harness) @@ -132,7 +132,7 @@ harness.check(f1.toPattern(), "#.00"); DecimalFormat f2 = new DecimalFormat("#0.#E0"); - harness.check(f2.toPattern(), "0.#E0"); + harness.check(f2.toPattern(), "#0.#E0"); DecimalFormat f3 = new DecimalFormat("0.#E0"); harness.check(f3.toPattern(), "0.#E0"); --=-P5Tl0MsuFvfi9b2fEMTm--