From langel@redhat.com Tue Jan 3 18:37:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 03 Jan 2006 18:37:00 -0000 Subject: Patch: Fixed typo Message-ID: <1136313418.11457.12.camel@tow.toronto.redhat.com> 2006-01-03 Lillian Angel * gnu/testlet/javax/swing/plaf/metal/MetalComboBoxButton/constructors.java (testConstructor1): Fixed typo in test. This now passes for us and the JDK. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 824 bytes Desc: not available URL: From langel@redhat.com Tue Jan 3 19:03:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 03 Jan 2006 19:03:00 -0000 Subject: FYI: Fixed typo In-Reply-To: <1136313418.11457.12.camel@tow.toronto.redhat.com> References: <1136313418.11457.12.camel@tow.toronto.redhat.com> Message-ID: <1136315017.11457.18.camel@tow.toronto.redhat.com> Found another. 2006-01-03 Lillian Angel * gnu/testlet/javax/swing/UIManager/getUI.java (test): Fixed check. On Tue, 2006-01-03 at 13:36 -0500, Lillian Angel wrote: > 2006-01-03 Lillian Angel > > * > gnu/testlet/javax/swing/plaf/metal/MetalComboBoxButton/constructors.java > (testConstructor1): Fixed typo in test. This now passes for us > and the JDK. > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 598 bytes Desc: not available URL: From langel@redhat.com Tue Jan 3 19:48:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 03 Jan 2006 19:48:00 -0000 Subject: Patch: initComponentDefaults fix Message-ID: <1136317699.11457.20.camel@tow.toronto.redhat.com> Fixed several checks 2006-01-03 Lillian Angel * gnu/testlet/javax/swing/plaf/basic/BasicLookAndFeel/initComponentDefaults.java (test): Fixed checks so they pass with the JDK. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4545 bytes Desc: not available URL: From langel@redhat.com Tue Jan 3 21:19:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 03 Jan 2006 21:19:00 -0000 Subject: Patch: MetalLookAndFeel fixes Message-ID: <1136323130.11457.32.camel@tow.toronto.redhat.com> This patch is rather large, but I basically did the same thing in each class. The theme needed to be set prior to retrieving the colors, otherwise null would be returned. These tests would all fail on Classpath and Sun, but they pass now. 2006-01-03 Lillian Angel * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java:i (test): Fixed color. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorSelectedForeground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getBlack.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getControl.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getControlDarkShadow.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getControlDisabled.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getControlHighlight.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getControlInfo.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getControlShadow.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getControlTextColor.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getControlTextFont.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDesktopColor.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getFocusColor.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getHighlightedTextColor.java:i (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getInactiveControlTextColor.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getInactiveSystemTextColor.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getMenuBackground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getMenuDisabledForeground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getMenuForeground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getMenuSelectedBackground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getMenuSelectedForeground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getMenuTextFont.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getPrimaryControl.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getPrimaryControlDarkShadow.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getPrimaryControlHighlight.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getPrimaryControlInfo.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getPrimaryControlShadow.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getSeparatorBackground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getSeparatorForeground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getSubTextFont.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getSystemTextColor.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getSystemTextFont.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getTextHighlightColor.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getUserTextColor.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getUserTextFont.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getWhite.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getWindowBackground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getWindowTitleBackground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getWindowTitleFont.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getWindowTitleForeground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getWindowTitleInactiveBackground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getWindowTitleInactiveForeground.java: (test): Fixed to set the current theme, otherwise the color returned is null. * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java: (test): Fixed color. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 43721 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 43721 bytes Desc: not available URL: From gbenson@redhat.com Wed Jan 4 11:28:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 04 Jan 2006 11:28:00 -0000 Subject: FYI: Test security manager fix Message-ID: <20060104112821.GE5136@redhat.com> Hi everyone, This patch makes the test security manager load some classes on initialisation. This avoids some intermittent infinite loops that occur when the test security manager is in force. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1330 diff -u -r1.1330 ChangeLog --- ChangeLog 3 Jan 2006 22:45:32 -0000 1.1330 +++ ChangeLog 4 Jan 2006 11:20:25 -0000 @@ -1,3 +1,8 @@ +2006-01-04 Gary Benson + + * gnu/testlet/TestSecurityManager2.java (TestSecurityManager2): + Preload some classes to avoid infinite loops when in force. + 2006-01-03 Tom Tromey * gnu/testlet/java/lang/String/getBytes13.java (dumpArray): New Index: gnu/testlet/TestSecurityManager2.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/TestSecurityManager2.java,v retrieving revision 1.2 diff -u -r1.2 TestSecurityManager2.java --- gnu/testlet/TestSecurityManager2.java 18 Apr 2004 14:18:28 -0000 1.2 +++ gnu/testlet/TestSecurityManager2.java 4 Jan 2006 11:20:25 -0000 @@ -40,6 +40,20 @@ public TestSecurityManager2(TestHarness harness) { super(); this.harness = harness; + + // Preload some classes to avoid infinite loops + String[] preload = new String[] { + "java.lang.StringBuffer", // needed by checkCheck() + "java.lang.RuntimePermission" // needed by uninstall() + }; + for (int i = 0; i < preload.length; i++) { + try { + Class.forName(preload[i]); + } + catch (ClassNotFoundException e) { + harness.debug(e); + } + } } public void install() From gbenson@redhat.com Wed Jan 4 12:44:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 04 Jan 2006 12:44:00 -0000 Subject: FYI: Serialization throwpoint tests Message-ID: <20060104124439.GG5136@redhat.com> Hi again, I just added throwpoint checks for java.io.ObjectInputStream and java.io.ObjectOutputStream. With this patch all throwpoints in java.io.* are annotated, and all but a couple in java.io.File have tests. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1331 diff -u -r1.1331 ChangeLog --- ChangeLog 4 Jan 2006 11:20:48 -0000 1.1331 +++ ChangeLog 4 Jan 2006 12:37:54 -0000 @@ -1,5 +1,10 @@ 2006-01-04 Gary Benson + * gnu/testlet/java/io/ObjectInputStream/security.java: New test. + * gnu/testlet/java/io/ObjectOutputStream/security.java: Likewise. + +2006-01-04 Gary Benson + * gnu/testlet/TestSecurityManager2.java (TestSecurityManager2): Preload some classes to avoid infinite loops when in force. Index: gnu/testlet/java/io/ObjectInputStream/security.java =================================================================== RCS file: gnu/testlet/java/io/ObjectInputStream/security.java diff -N gnu/testlet/java/io/ObjectInputStream/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/io/ObjectInputStream/security.java 4 Jan 2006 12:37:54 -0000 @@ -0,0 +1,106 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.io.ObjectInputStream; + +import java.io.IOException; +import java.io.ObjectInputStream; +import java.io.SerializablePermission; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + TestObjectInputStream teststream = new TestObjectInputStream(); + + Permission[] enableSubclassImplementation = new Permission[] { + new SerializablePermission("enableSubclassImplementation")}; + + Permission[] enableSubstitution = new Permission[] { + new SerializablePermission("enableSubstitution")}; + + Permission[] noPerms = new Permission[] {}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // security: java.io.ObjectInputStream-ObjectInputStream + harness.checkPoint("constructor"); + try { + sm.prepareChecks(enableSubclassImplementation, noPerms); + new TestObjectInputStream(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.io.ObjectInputStream-enableResolveObject + harness.checkPoint("enableResolveObject"); + try { + sm.prepareChecks(noPerms, noPerms); + teststream.testEnableResolveObject(false); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(enableSubstitution, noPerms); + teststream.testEnableResolveObject(true); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + private static class TestObjectInputStream extends ObjectInputStream + { + public TestObjectInputStream() throws IOException + { + super(); + } + + public boolean testEnableResolveObject(boolean enable) + { + return enableResolveObject(enable); + } + } +} Index: gnu/testlet/java/io/ObjectOutputStream/security.java =================================================================== RCS file: gnu/testlet/java/io/ObjectOutputStream/security.java diff -N gnu/testlet/java/io/ObjectOutputStream/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/io/ObjectOutputStream/security.java 4 Jan 2006 12:37:54 -0000 @@ -0,0 +1,106 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.io.ObjectOutputStream; + +import java.io.IOException; +import java.io.ObjectOutputStream; +import java.io.SerializablePermission; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + TestObjectOutputStream teststream = new TestObjectOutputStream(); + + Permission[] enableSubclassImplementation = new Permission[] { + new SerializablePermission("enableSubclassImplementation")}; + + Permission[] enableSubstitution = new Permission[] { + new SerializablePermission("enableSubstitution")}; + + Permission[] noPerms = new Permission[] {}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // security: java.io.ObjectOutputStream-ObjectOutputStream + harness.checkPoint("constructor"); + try { + sm.prepareChecks(enableSubclassImplementation, noPerms); + new TestObjectOutputStream(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.io.ObjectOutputStream-enableReplaceObject + harness.checkPoint("enableReplaceObject"); + try { + sm.prepareChecks(noPerms, noPerms); + teststream.testEnableReplaceObject(false); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(enableSubstitution, noPerms); + teststream.testEnableReplaceObject(true); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + private static class TestObjectOutputStream extends ObjectOutputStream + { + public TestObjectOutputStream() throws IOException + { + super(); + } + + public boolean testEnableReplaceObject(boolean enable) + { + return enableReplaceObject(enable); + } + } +} From tony.balkissoon@utoronto.ca Wed Jan 4 16:34:00 2006 From: tony.balkissoon@utoronto.ca (Anthony Balkissoon) Date: Wed, 04 Jan 2006 16:34:00 -0000 Subject: FYI: More DefaultStyledDocument tests Message-ID: <1136392449.2812.102.camel@tony.toronto.redhat.com> Here are more tests that we currently fail. I'm still trying to figure out the internals of DefaultStyledDocument and its interaction with the text Views and events. 2006-01-04 Anthony Balkissoon * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure4.java: New test. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure5.java: New test. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: ElementStructure4And5.diff Type: text/x-patch Size: 6737 bytes Desc: not available URL: From abalkiss@redhat.com Thu Jan 5 19:33:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Thu, 05 Jan 2006 19:33:00 -0000 Subject: FYI: More DefaultStyledDocument tests Message-ID: <1136489598.2812.124.camel@tony.toronto.redhat.com> 2006-01-05 Anthony Balkissoon * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure6.java: New test. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: ElementStructure6.diff Type: text/x-patch Size: 3585 bytes Desc: not available URL: From langel@redhat.com Thu Jan 5 20:06:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 05 Jan 2006 20:06:00 -0000 Subject: Patch: GapContent PositionTest Message-ID: <1136491610.3075.31.camel@tow.toronto.redhat.com> I added some more complex test cases for GapContent. 2006-01-05 Lillian Angel * gnu/testlet/javax/swing/text/GapContent/PositionTest.java (testComplex): Added more test cases. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1149 bytes Desc: not available URL: From roman.kennke@aicas.com Thu Jan 12 00:10:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Thu, 12 Jan 2006 00:10:00 -0000 Subject: FYI: New Hashtable test Message-ID: This test accompanies my latest Hashtable fix. It checks if modifying a Hashtable while enumerating over it throws an exception or not. 2006-01-11 Roman Kennke * gnu/testlet/java/util/Hashtable/EnumerateAndModify.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: EnumerateAndModify.java Type: text/x-java Size: 4642 bytes Desc: not available URL: From theBohemian@gmx.net Thu Jan 12 11:44:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Thu, 12 Jan 2006 11:44:00 -0000 Subject: [Fwd: Re: [cp-patches] FYI: Another DefaultStyledDocument ElementBuffer fix] Message-ID: <43C641AB.50203@gmx.net> This was probably sent to the wrong list. cya Robert -------------- next part -------------- An embedded message was scrubbed... From: Anthony Balkissoon Subject: Re: [cp-patches] FYI: Another DefaultStyledDocument ElementBuffer fix Date: Wed, 11 Jan 2006 17:11:28 -0500 Size: 29561 URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From langel@redhat.com Thu Jan 12 15:37:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 12 Jan 2006 15:37:00 -0000 Subject: Patch: New DefaultStyledDocument.ElementBuffer test Message-ID: <1137080216.3075.164.camel@tow.toronto.redhat.com> 2006-01-12 Lillian Angel * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure7.java: New Test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3893 bytes Desc: not available URL: From abalkiss@redhat.com Thu Jan 12 15:59:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Thu, 12 Jan 2006 15:59:00 -0000 Subject: FYI: 6 more DefaultStyledDocument/ElementBuffer tests Message-ID: <1137081527.2812.172.camel@tony.toronto.redhat.com> 6 more tests used in the rewrite of DefaultStyledDocument.ElementBuffer. 2006-01-12 Anthony Balkissoon * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument1.java: New test. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument2.java: New test. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument3.java: New test. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument4.java: New test. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument5.java: New test. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument6.java: New test. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: StyledDocTests.diff Type: text/x-patch Size: 27960 bytes Desc: not available URL: From langel@redhat.com Thu Jan 12 16:49:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 12 Jan 2006 16:49:00 -0000 Subject: FYI: New DefaultStyledDocument.ElementBuffer test In-Reply-To: <1137080216.3075.164.camel@tow.toronto.redhat.com> References: <1137080216.3075.164.camel@tow.toronto.redhat.com> Message-ID: <1137084586.3075.177.camel@tow.toronto.redhat.com> 2006-01-12 Lillian Angel * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure7.java: Added new checks for ElementSpec data. On Thu, 2006-01-12 at 10:36 -0500, Lillian Angel wrote: > 2006-01-12 Lillian Angel > > * > gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure7.java: New Test. > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1521 bytes Desc: not available URL: From abalkiss@redhat.com Thu Jan 12 20:00:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Thu, 12 Jan 2006 20:00:00 -0000 Subject: FYI: New test for JTextField. Message-ID: <1137096001.2812.174.camel@tony.toronto.redhat.com> This test was to fix one of the regressions that Mark pointed out before we release tomorrow. 2006-01-12 Anthony Balkissoon * gnu/testlet/javax/swing/JTextField/setDocument.java: New test. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: JTextFieldSetDocument.diff Type: text/x-patch Size: 2721 bytes Desc: not available URL: From abalkiss@redhat.com Thu Jan 12 20:44:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Thu, 12 Jan 2006 20:44:00 -0000 Subject: FYI: new test for TransferHandler Message-ID: <1137098689.2812.178.camel@tony.toronto.redhat.com> Another test to fix a regression that Mark pointed out. 2006-01-12 Anthony Balkissoon * gnu/testlet/javax/swing/TransferHandler/TransferActionConstructor: New test. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: TransferHandler.diff Type: text/x-patch Size: 1773 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Jan 13 15:01:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 13 Jan 2006 15:01:00 -0000 Subject: FYI: some tests for SimpleAttributeSet Message-ID: <43C7C0BA.2050804@object-refinery.com> I committed these new checks: 2006-01-13 David Gilbert * gnu/testlet/javax/swing/text/SimpleAttributeSet/addAttribute.java: New file, * gnu/testlet/javax/swing/text/SimpleAttributeSet/addAttributes.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/clone.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/constructors.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/containsAttribute.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/containsAttributes.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/copyAttributes.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/EMPTY.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/equals.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/getAttribute.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/getAttributeCount.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/getAttributeNames.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/getResolveParent.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/isDefined.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/isEmpty.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/isEqual.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/removeAttribute.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/removeAttributes.java: Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/setResolveParent.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From WBaer@gmx.de Fri Jan 13 22:30:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Fri, 13 Jan 2006 22:30:00 -0000 Subject: FYI: New test for javax.print.attribute.standard.MediaSize Message-ID: <43C82A98.4040801@gmx.de> Hi, this is a new test showing that our implementation is right :-) such that user constructed objects of subclasses of MediaSize are added to the static cache. Regards, Wolfgang 2006-01-13 Wolfgang Baer * gnu/testlet/javax/print/attribute/standard, * gnu/testlet/javax/print/attribute/standard/MediaSize: New directories. * gnu/testlet/javax/print/attribute/standard/MediaSize/userClass.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: userClass.java Type: text/x-java Size: 2066 bytes Desc: not available URL: From WBaer@gmx.de Sat Jan 14 13:30:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Sat, 14 Jan 2006 13:30:00 -0000 Subject: FYI: Tests for new javax.print.SimpleDoc class Message-ID: <43C8FD9E.6000004@gmx.de> Hi, here are the tests for the newly committed SimpleDoc class. Regards, Wolfgang 2006-01-14 Wolfgang Baer * gnu/testlet/javax/print/SimpleDoc/: New directory. * gnu/testlet/javax/print/SimpleDoc/constructor.java, * gnu/testlet/javax/print/SimpleDoc/getAttributes.java, * gnu/testlet/javax/print/SimpleDoc/getReaderForText.java, * gnu/testlet/javax/print/SimpleDoc/getStreamForBytes.java: New tests. -------------- next part -------------- A non-text attachment was scrubbed... Name: constructor.java Type: text/x-java Size: 2409 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: getAttributes.java Type: text/x-java Size: 2140 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: getReaderForText.java Type: text/x-java Size: 2969 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: getStreamForBytes.java Type: text/x-java Size: 2084 bytes Desc: not available URL: From gbenson@redhat.com Mon Jan 16 11:13:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Mon, 16 Jan 2006 11:13:00 -0000 Subject: FYI: SocketPermission action check tests Message-ID: <20060116111332.GB5523@redhat.com> Hi all, This test checks that all possible action lists are handled correctly by java.net.SocketPermission's implies method. There's more to come, but I'm committing now as it tests the fix I just committed to Classpath. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1347 diff -u -r1.1347 ChangeLog --- ChangeLog 15 Jan 2006 19:48:29 -0000 1.1347 +++ ChangeLog 16 Jan 2006 11:06:22 -0000 @@ -1,3 +1,7 @@ +2006-01-16 Gary Benson + + * gnu/testlet/java/net/SocketPermission/implies.java: New test. + 2006-01-16 Raif S. Naffah * gnu/testlet/javax/security/auth/login/TestOfPR25202.java: New file. Index: gnu/testlet/java/net/SocketPermission/implies.java =================================================================== RCS file: gnu/testlet/java/net/SocketPermission/implies.java diff -N gnu/testlet/java/net/SocketPermission/implies.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/SocketPermission/implies.java 16 Jan 2006 11:06:22 -0000 @@ -0,0 +1,76 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.SocketPermission; + +import java.net.SocketPermission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +public class implies implements Testlet +{ + public void test(TestHarness harness) + { + harness.checkPoint("action checking"); + for (int i = 1; i < 1 << actions.length; i++) { + for (int j = 1; j < 1 << actions.length; j++) { + SocketPermission pi = new SocketPermission("localhost", makeAction(i)); + SocketPermission pj = new SocketPermission("localhost", makeAction(j)); + + harness.checkPoint(pi.getActions() + " implies " + pj.getActions()); + + harness.check(pi.implies(pj) == ((maybeAddResolve(i) & j) == j)); + } + } + } + + // stuff for action checking + private static String[] actions = {"accept", "connect", "listen", "resolve"}; + private static String makeAction(int mask) + { + String result = ""; + for (int i = 0; i < actions.length; i++) { + if ((mask & (1 << i)) != 0) { + if (result.length() > 0) + result += ","; + result += actions[i]; + } + } + return result; + } + + // All other actions imply resolve + private static int maybeAddResolve(int mask) + { + boolean addit = false; + int addwhat = 0; + + for (int i = 0; i < actions.length; i++) { + if (actions[i].equals("resolve")) + addwhat = 1 << i; + else if ((mask & (1 << i)) != 0) + addit = true; + } + if (addit) + mask |= addwhat; + return mask; + } +} From gbenson@redhat.com Mon Jan 16 11:21:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Mon, 16 Jan 2006 11:21:00 -0000 Subject: FYI: Remove unnecessary test security manager workaround Message-ID: <20060116112123.GC5523@redhat.com> Hi again, This commit removes a now-unnecessary workaround from the test security manager. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1348 diff -u -r1.1348 ChangeLog --- ChangeLog 16 Jan 2006 11:08:25 -0000 1.1348 +++ ChangeLog 16 Jan 2006 11:17:13 -0000 @@ -1,3 +1,8 @@ +2006-01-16 Gary Benson + + * gnu/testlet/TestSecurityManager2.java (TestSecurityManager2): + Remove a now-unnecessary workaround. + 2006-01-16 Gary Benson * gnu/testlet/java/net/SocketPermission/implies.java: New test. Index: gnu/testlet/TestSecurityManager2.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/TestSecurityManager2.java,v retrieving revision 1.3 diff -u -r1.3 TestSecurityManager2.java --- gnu/testlet/TestSecurityManager2.java 4 Jan 2006 11:20:48 -0000 1.3 +++ gnu/testlet/TestSecurityManager2.java 16 Jan 2006 11:17:13 -0000 @@ -40,20 +40,6 @@ public TestSecurityManager2(TestHarness harness) { super(); this.harness = harness; - - // Preload some classes to avoid infinite loops - String[] preload = new String[] { - "java.lang.StringBuffer", // needed by checkCheck() - "java.lang.RuntimePermission" // needed by uninstall() - }; - for (int i = 0; i < preload.length; i++) { - try { - Class.forName(preload[i]); - } - catch (ClassNotFoundException e) { - harness.debug(e); - } - } } public void install() From langel@redhat.com Mon Jan 16 15:54:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 16 Jan 2006 15:54:00 -0000 Subject: Patch: ElementBuffer test Message-ID: <1137426875.5743.10.camel@tow.toronto.redhat.com> 2006-01-16 Lillian Angel * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: New Class. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3489 bytes Desc: not available URL: From langel@redhat.com Mon Jan 16 18:20:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 16 Jan 2006 18:20:00 -0000 Subject: FYI: ElementBuffer test In-Reply-To: <1137426875.5743.10.camel@tow.toronto.redhat.com> References: <1137426875.5743.10.camel@tow.toronto.redhat.com> Message-ID: <1137435644.5743.11.camel@tow.toronto.redhat.com> 2006-01-16 Lillian Angel * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: Added new checks. On Mon, 2006-01-16 at 10:54 -0500, Lillian Angel wrote: > 2006-01-16 Lillian Angel > > * > gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: > New Class. > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2624 bytes Desc: not available URL: From mark@klomp.org Mon Jan 16 18:47:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Mon, 16 Jan 2006 18:47:00 -0000 Subject: Patch: ElementBuffer test In-Reply-To: <1137426875.5743.10.camel@tow.toronto.redhat.com> References: <1137426875.5743.10.camel@tow.toronto.redhat.com> Message-ID: <1137437253.8135.13.camel@localhost.localdomain> Hi Lilian, On Mon, 2006-01-16 at 10:54 -0500, Lillian Angel wrote: > + > +// Tags: FIXME > + FIXME? -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From langel@redhat.com Mon Jan 16 18:51:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 16 Jan 2006 18:51:00 -0000 Subject: Patch: ElementBuffer test In-Reply-To: <1137437253.8135.13.camel@localhost.localdomain> References: <1137426875.5743.10.camel@tow.toronto.redhat.com> <1137437253.8135.13.camel@localhost.localdomain> Message-ID: <1137437496.5743.13.camel@tow.toronto.redhat.com> On Mon, 2006-01-16 at 19:47 +0100, Mark Wielaard wrote: > Hi Lilian, > > On Mon, 2006-01-16 at 10:54 -0500, Lillian Angel wrote: > > + > > +// Tags: FIXME > > + > > FIXME? Whoops! Fixed. thanks!2006-01-16 Lillian Angel * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: Fixed Tags, removed FIXME. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 14258 bytes Desc: not available URL: From langel@redhat.com Mon Jan 16 18:53:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 16 Jan 2006 18:53:00 -0000 Subject: Patch: ElementBuffer test In-Reply-To: <1137437496.5743.13.camel@tow.toronto.redhat.com> References: <1137426875.5743.10.camel@tow.toronto.redhat.com> <1137437253.8135.13.camel@localhost.localdomain> <1137437496.5743.13.camel@tow.toronto.redhat.com> Message-ID: <1137437598.5743.15.camel@tow.toronto.redhat.com> Another mistake.. Attached is the correct patch. On Mon, 2006-01-16 at 13:51 -0500, Lillian Angel wrote: > On Mon, 2006-01-16 at 19:47 +0100, Mark Wielaard wrote: > > Hi Lilian, > > > > On Mon, 2006-01-16 at 10:54 -0500, Lillian Angel wrote: > > > + > > > +// Tags: FIXME > > > + > > > > FIXME? > > Whoops! Fixed. > > thanks!2006-01-16 Lillian Angel > > * > gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: > Fixed Tags, removed FIXME. > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 719 bytes Desc: not available URL: From langel@redhat.com Mon Jan 16 19:59:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 16 Jan 2006 19:59:00 -0000 Subject: FYI: More DefaultStyledDocument tests Message-ID: <1137441550.5743.22.camel@tow.toronto.redhat.com> Added more tests to check different structures when newlines are inserted in various places. This currently causes regressions. 2006-01-16 Lillian Angel * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: Added more complicated tests and checkpoints. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3936 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Jan 17 10:27:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 17 Jan 2006 10:27:00 -0000 Subject: FYI: javax.swing.text.StyleConstants - new tests Message-ID: <43CCC698.3040506@object-refinery.com> I committed these new tests - Classpath fails on about 22 checks, I have a patch that fixes those: 2006-01-17 David Gilbert * gnu/testlet/javax/swing/text/StyleConstants/constants.java: New file, * gnu/testlet/javax/swing/text/StyleConstants/getAlignment.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getBackground.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getBidiLevel.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getComponent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getFirstLineIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getFontFamily.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getFontSize.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getForeground.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getIcon.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getLeftIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getLineSpacing.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getRightIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getSpaceAbove.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getSpaceBelow.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getTabSet.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isBold.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isItalic.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isStrikeThrough.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isSubscript.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isSuperscript.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isUnderline.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setAlignment.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setBackground.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setBidiLevel.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setBold.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setComponent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setFirstLineIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setFontFamily.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setFontSize.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setForeground.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setIcon.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setItalic.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setLeftIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setLineSpacing.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setRightIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setSpaceAbove.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setSpaceBelow.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setStrikeThrough.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setSubscript.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setSuperscript.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setTabSet.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setUnderline.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Tue Jan 17 15:14:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 17 Jan 2006 15:14:00 -0000 Subject: FYI: Remove debug code Message-ID: <20060117151358.GB19079@redhat.com> Hi all, This commit removes a bit of debugging code that sneaked in. What's the deal with tiny little things like this? Do people still want them mailed to mauve-patches, or is it just noise? Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1356 diff -u -r1.1356 ChangeLog --- ChangeLog 17 Jan 2006 10:23:14 -0000 1.1356 +++ ChangeLog 17 Jan 2006 15:10:30 -0000 @@ -1,3 +1,8 @@ +2006-01-17 Gary Benson + + * gnu/testlet/java/net/SocketPermission/implies.java: Remove a bit + of debugging code that sneaked through. + 2006-01-17 David Gilbert * gnu/testlet/javax/swing/text/StyleConstants/constants.java: New file, Index: gnu/testlet/java/net/SocketPermission/implies.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/implies.java,v retrieving revision 1.1 diff -u -r1.1 implies.java --- gnu/testlet/java/net/SocketPermission/implies.java 16 Jan 2006 11:08:25 -0000 1.1 +++ gnu/testlet/java/net/SocketPermission/implies.java 17 Jan 2006 15:10:30 -0000 @@ -35,8 +35,6 @@ SocketPermission pi = new SocketPermission("localhost", makeAction(i)); SocketPermission pj = new SocketPermission("localhost", makeAction(j)); - harness.checkPoint(pi.getActions() + " implies " + pj.getActions()); - harness.check(pi.implies(pj) == ((maybeAddResolve(i) & j) == j)); } } From mark@klomp.org Tue Jan 17 20:34:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 17 Jan 2006 20:34:00 -0000 Subject: FYI: Remove debug code In-Reply-To: <20060117151358.GB19079@redhat.com> References: <20060117151358.GB19079@redhat.com> Message-ID: <1137530105.8135.106.camel@localhost.localdomain> Hi Gary, On Tue, 2006-01-17 at 15:13 +0000, Gary Benson wrote: > This commit removes a bit of debugging code that sneaked in. > > What's the deal with tiny little things like this? Do people still > want them mailed to mauve-patches, or is it just noise? I like reading patches so please keep them coming :) Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From olivier.jolly@pcedev.com Wed Jan 18 19:19:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Wed, 18 Jan 2006 19:19:00 -0000 Subject: Patch: setting Double.MAX_VALUE as Double into double primitive setter through Method.invoke Message-ID: <43CE94D1.6030504@pcedev.com> 2006-01-18 Olivier Jolly * gnu/testlet/java/lang/Double/DoubleTest.java: Added tests which make sure that unwrapping of new Double(Double.MAX_VALUE) in Method.invoke works correctly -------------- next part -------------- A non-text attachment was scrubbed... Name: double_max.patch Type: text/x-patch Size: 2342 bytes Desc: not available URL: From langel@redhat.com Wed Jan 18 20:32:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 18 Jan 2006 20:32:00 -0000 Subject: Patch: More ElementBuffer tests Message-ID: <1137616362.5743.108.camel@tow.toronto.redhat.com> Added another test to this class. 2006-01-16 Lillian Angel * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: Added more complicated tests and checkpoints. From tromey@redhat.com Wed Jan 18 20:44:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Wed, 18 Jan 2006 20:44:00 -0000 Subject: Patch: setting Double.MAX_VALUE as Double into double primitive setter through Method.invoke In-Reply-To: <43CE94D1.6030504@pcedev.com> References: <43CE94D1.6030504@pcedev.com> Message-ID: >>>>> "Olivier" == Olivier Jolly writes: Olivier> 2006-01-18 Olivier Jolly Olivier> * gnu/testlet/java/lang/Double/DoubleTest.java: Added tests which Olivier> make sure that unwrapping of new Double(Double.MAX_VALUE) in Olivier> Method.invoke works correctly Hmm, was Method in 1.0? I think you should write a new test file for this test. You can just copy the boilerplate bits from DoubleTest, and up the tag to 1.2 or whatever it is. Tom From olivier.jolly@pcedev.com Wed Jan 18 21:47:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Wed, 18 Jan 2006 21:47:00 -0000 Subject: Patch: setting Double.MAX_VALUE as Double into double primitive setter through Method.invoke In-Reply-To: References: <43CE94D1.6030504@pcedev.com> Message-ID: <43CEB76A.8090804@pcedev.com> No problem, as discussed on IRC, here is the same patch within a separate testlet flagged to be tested in 1.1+ Hence, the changelog becomes 2006-01-18 Olivier Jolly * gnu/testlet/java/lang/Double/DoubleSetterTest.java: new test which makes sure that unwrapping of new Double(Double.MAX_VALUE) in Method.invoke works correctly Olivier Tom Tromey a ??crit : >>>>>>"Olivier" == Olivier Jolly writes: >>>>>> >>>>>> > >Olivier> 2006-01-18 Olivier Jolly >Olivier> * gnu/testlet/java/lang/Double/DoubleTest.java: Added tests which >Olivier> make sure that unwrapping of new Double(Double.MAX_VALUE) in >Olivier> Method.invoke works correctly > >Hmm, was Method in 1.0? >I think you should write a new test file for this test. >You can just copy the boilerplate bits from DoubleTest, and up the >tag to 1.2 or whatever it is. > >Tom > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: double_max_separate.patch Type: text/x-patch Size: 2883 bytes Desc: not available URL: From gbenson@redhat.com Thu Jan 19 14:04:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 19 Jan 2006 14:04:00 -0000 Subject: FYI: SocketPermission ports tests Message-ID: <20060119140401.GB8725@redhat.com> Hi all, This commit adds checks that ports and port ranges are handled correctly by java.net.SocketPermission's implies method. The structure for testing hosts was also added, but there are no strenuous host checks in place yet. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1359 diff -u -r1.1359 ChangeLog --- ChangeLog 18 Jan 2006 20:31:58 -0000 1.1359 +++ ChangeLog 19 Jan 2006 13:58:38 -0000 @@ -1,3 +1,8 @@ +2006-01-19 Gary Benson + + * gnu/testlet/java/net/SocketPermission/implies.java: Add checks + for ports and (minimally) for hosts. + 2006-01-16 Lillian Angel * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: Index: gnu/testlet/java/net/SocketPermission/implies.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/implies.java,v retrieving revision 1.2 diff -u -r1.2 implies.java --- gnu/testlet/java/net/SocketPermission/implies.java 17 Jan 2006 15:10:53 -0000 1.2 +++ gnu/testlet/java/net/SocketPermission/implies.java 19 Jan 2006 13:58:38 -0000 @@ -27,9 +27,101 @@ public class implies implements Testlet { + private Test[] hosts = new Test[] { + new Test("", "", true), + new Test("localhost", "localhost", true), // XXX need more! + }; + + private Test[] ports = new Test[] { + // no restriction + new Test("", "", true), + new Test("", ":80", true), + new Test("", ":-80", true), + new Test("", ":80-", true), + new Test("", ":70-90", true), + // one port + new Test(":80", "", false), + new Test(":80", ":70", false), + new Test(":80", ":80", true), + new Test(":80", ":-80", false), + new Test(":80", ":80-", false), + new Test(":80", ":70-90", false), + new Test(":80", ":80-80", true), + new Test(":80", ":90-90", false), + // up to and including x + new Test(":-80", "", false), + new Test(":-80", ":70", true), + new Test(":-80", ":80", true), + new Test(":-80", ":90", false), + new Test(":-80", ":-70", true), + new Test(":-80", ":-80", true), + new Test(":-80", ":-90", false), + new Test(":-80", ":70-", false), + new Test(":-80", ":80-", false), + new Test(":-80", ":90-", false), + new Test(":-80", ":60-70", true), + new Test(":-80", ":70-90", false), + new Test(":-80", ":90-100", false), + new Test(":-80", ":70-70", true), + new Test(":-80", ":80-80", true), + new Test(":-80", ":90-90", false), + // x and above + new Test(":80-", "", false), + new Test(":80-", ":70", false), + new Test(":80-", ":80", true), + new Test(":80-", ":90", true), + new Test(":80-", ":-70", false), + new Test(":80-", ":-80", false), + new Test(":80-", ":-90", false), + new Test(":80-", ":70-", false), + new Test(":80-", ":80-", true), + new Test(":80-", ":90-", true), + new Test(":80-", ":60-70", false), + new Test(":80-", ":70-90", false), + new Test(":80-", ":90-100", true), + new Test(":80-", ":70-70", false), + new Test(":80-", ":80-80", true), + new Test(":80-", ":90-90", true), + // double-ended range + new Test(":75-85", "", false), + new Test(":75-85", ":70", false), + new Test(":75-85", ":80", true), + new Test(":75-85", ":90", false), + new Test(":75-85", ":-70", false), + new Test(":75-85", ":-80", false), + new Test(":75-85", ":-90", false), + new Test(":75-85", ":70-", false), + new Test(":75-85", ":80-", false), + new Test(":75-85", ":90-", false), + new Test(":75-85", ":70-80", false), + new Test(":75-85", ":75-85", true), + new Test(":75-85", ":80-90", false), + new Test(":75-85", ":70-90", false), + new Test(":75-85", ":70-70", false), + new Test(":75-85", ":80-80", true), + new Test(":75-85", ":90-90", false), + // bit loss + new Test(":80", ":65616", false), // 65616 & 0xFFFF = 80 + new Test(":80", ":-65456", false), // -65456 & 0xFFFF = 80 + // also 4294967376? + }; + public void test(TestHarness harness) { - harness.checkPoint("action checking"); + harness.checkPoint("hostport checking"); + + for (int i = 0; i < hosts.length; i++) { + for (int j = 0; j < ports.length; j++) { + Test test = new Test(hosts[i], ports[j]); + + SocketPermission px = new SocketPermission(test.x, "connect"); + SocketPermission py = new SocketPermission(test.y, "connect"); + + harness.check(px.implies(py) == test.expect); + } + } + + harness.checkPoint("actions checking"); for (int i = 1; i < 1 << actions.length; i++) { for (int j = 1; j < 1 << actions.length; j++) { SocketPermission pi = new SocketPermission("localhost", makeAction(i)); @@ -40,7 +132,28 @@ } } - // stuff for action checking + // stuff for hosts checking + private static class Test + { + String x, y; + boolean expect; + + Test(String x, String y, boolean expect) + { + this.x = x; + this.y = y; + this.expect = expect; + } + + Test(Test host, Test port) + { + x = host.x + port.x; + y = host.y + port.y; + expect = host.expect && port.expect; + } + } + + // stuff for actions checking private static String[] actions = {"accept", "connect", "listen", "resolve"}; private static String makeAction(int mask) { From gbenson@redhat.com Thu Jan 19 14:09:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 19 Jan 2006 14:09:00 -0000 Subject: FYI: SocketPermission constructor tests Message-ID: <20060119140924.GC8725@redhat.com> Hi, This test checks that illegal arguments to java.net.SocketPermission's constructor are detected. This is intended to reduce the risk of misconfigurations in security policy files becoming exploitable. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1360 diff -u -r1.1360 ChangeLog --- ChangeLog 19 Jan 2006 13:59:49 -0000 1.1360 +++ ChangeLog 19 Jan 2006 14:05:11 -0000 @@ -1,3 +1,7 @@ +2006-01-19 Gary Benson + + * gnu/testlet/java/net/SocketPermission/argument.java: New test. + 2006-01-19 Gary Benson * gnu/testlet/java/net/SocketPermission/implies.java: Add checks Index: gnu/testlet/java/net/SocketPermission/argument.java =================================================================== RCS file: gnu/testlet/java/net/SocketPermission/argument.java diff -N gnu/testlet/java/net/SocketPermission/argument.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/SocketPermission/argument.java 19 Jan 2006 14:05:11 -0000 @@ -0,0 +1,120 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.SocketPermission; + +import java.net.SocketPermission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +public class argument implements Testlet +{ + private Test[] hosts = new Test[] { + new Test("", true), + + new Test("local:host", false), + new Test("localhost", true), + new Test("example.com", true), + new Test("*.com", true), // XXX try wildcard in other positions + + new Test("209.132:177.50", false), + new Test("209.132.177.50", true), // XXX try broken addresses + + new Test("[", false), + new Test("[::192.9.5.5]3", false), + new Test("[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", true), + new Test("[3ffe:2a00:100:7031::1]", true), + new Test("[1080::8:800:200C:417A]", true), + new Test("[::192.9.5.5]", true), + new Test("[:FFFF:129.144.52.38]", true), // XXX try broken addresses + }; + + private Test[] ports = new Test[] { + new Test("", true), + new Test(":", true), + + new Test(":80", true), + new Test(":-80", true), + new Test(":80-", true), + new Test(":70-90", true), + + new Test(":8a", false), + new Test(":-8a", false), + new Test(":8a-", false), + new Test(":7a-90", false), + new Test(":70-9a", false), + + new Test(":800000", true), + new Test(":-800000", true), + new Test(":800000-", true), + new Test(":700000-900000", true), + + new Test(":-", false), + new Test(":--80", false), + new Test(":-80-", false), + new Test(":80--", false), + new Test(":70--90", false), + new Test(":-70-90", false), + new Test(":-70--90", false), + new Test(":70-90-", false), + new Test(":-70-90-", false), + }; + + public void test(TestHarness harness) + { + harness.checkPoint("argument checking"); + + for (int i = 0; i < hosts.length; i++) { + for (int j = 0; j < ports.length; j++) { + Test test = new Test(hosts[i], ports[j]); + boolean success; + + try { + new SocketPermission(test.hostport, "connect"); + success = true; + } + catch (IllegalArgumentException e) { + success = false; + } + + harness.check(success == test.expect); + } + } + } + + private static class Test + { + String hostport; + boolean expect; + + Test(String hostport, boolean expect) + { + this.hostport = hostport; + this.expect = expect; + } + + Test(Test host, Test port) + { + hostport = host.hostport + port.hostport; + expect = host.expect && port.expect; + } + } +} From david.gilbert@object-refinery.com Thu Jan 19 16:38:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 19 Jan 2006 16:38:00 -0000 Subject: FYI: Added new tag for tests in gnu.* namespace Message-ID: <43CFC087.60301@object-refinery.com> Mauve contains some tests for classes in the gnu.* namespace, which aren't runnable against non GNU Classpath-based runtimes. I've added the tag 'GNU' to these tests so that they can be excluded easily from the list of tests to run, when that is necessary: 2006-01-19 David Gilbert * gnu/testlet/gnu/javax/swing/text/html/parser/support/low/Buffer/Buffer_Test.java: Added 'GNU' tag, * gnu/testlet/gnu/javax/swing/text/html/parser/support/low/Constants/Constants_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/low/ReaderTokenizer/ReaderTokenizer_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/AttributeList_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/DTD_test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/Element_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/Entity_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/HTML_parsing.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/HTML_randomTable.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/HTML_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/parameterDefaulter_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/Parser_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/ParserEntityResolverTest.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/ParserTest.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/supplementaryNotifications.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/TagElement_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/TestCase.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/Text.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/textPreProcessor_Test.java: Likewise, * gnu/testlet/gnu/javax/swing/text/html/parser/support/Parser/Token_locations.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From james.damour@request.com Thu Jan 19 16:42:00 2006 From: james.damour@request.com (James Damour) Date: Thu, 19 Jan 2006 16:42:00 -0000 Subject: Don't pass null String to LayoutManager#addLayoutComponent(String, Component) Message-ID: <43CFC183.1090100@request.com> The attached patch tests to see if Container#addImpl passes a null String to LayoutManager#addLayoutComponent(String, Component). The Sun VMs do not. Beware!! I don't have a working mauve test suite so this patch is completely untested!!! -- James Damour I hang out on the FreeNode IRC in #classpath as Suvarov454 -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ChangeLog URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: addImpl.patch Type: text/x-patch Size: 1146 bytes Desc: not available URL: From roman.kennke@aicas.com Fri Jan 20 11:55:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Fri, 20 Jan 2006 11:55:00 -0000 Subject: FYI: New DefaultFormatter test Message-ID: I committed this new test for the DefaultFormatter class. This checks the default value for the valueClass property. 2006-01-20 Roman Kennke * gnu/testlet/javax/swing/text/DefaultFormatter/getValueClass.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2049 bytes Desc: not available URL: From mark@klomp.org Sun Jan 22 20:14:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 22 Jan 2006 20:14:00 -0000 Subject: Don't pass null String to LayoutManager#addLayoutComponent(String, Component) In-Reply-To: <43CFC183.1090100@request.com> References: <43CFC183.1090100@request.com> Message-ID: <1137960829.4570.39.camel@localhost> Hi James, On Thu, 2006-01-19 at 11:42 -0500, James Damour wrote: > Beware!! I don't have a working mauve test suite so this patch is > completely untested!!! > > 2006-01-19 James Damour > > * java/awt/Container/addImpl.java > (test): Added check for non-null String passed to addLayoutComponent. Thanks, checked in as attached. I'll also commit a fix to GNU Classpath for this. BTW you can just run one test as follows: jikes gnu/testlet/*.java gnu/testlet/java/awt/Container/addImpl.java echo gnu.testlet.java.awt.Container.addImpl | jamvm gnu.testlet.SimpleTestHarness cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: addImpl.patch Type: text/x-patch Size: 1581 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From edwin.steiner@gmx.net Mon Jan 23 13:50:00 2006 From: edwin.steiner@gmx.net (Edwin Steiner) Date: Mon, 23 Jan 2006 13:50:00 -0000 Subject: Patch: misleading output "PASS: Error: ..." In-Reply-To: <1137858855.4418.4.camel@localhost> References: <20060120195947.GA8058@localhost.localdomain> <1137858855.4418.4.camel@localhost> Message-ID: <20060123135013.GA29683@localhost.localdomain> Hi! This string-only patch cleans up test names in java.lang testlets that contain redundant/misleading "Error", "failed", or "returned wrong results" parts. There is still more cleanup to be done, but that's a start. -Edwin 2005-01-23 Edwin Steiner * gnu/testlet/java/lang/Byte/ByteTest.java, gnu/testlet/java/lang/Character/CharacterTest.java, gnu/testlet/java/lang/Double/DoubleTest.java, gnu/testlet/java/lang/Float/FloatTest.java, gnu/testlet/java/lang/Integer/IntegerTest.java, gnu/testlet/java/lang/Long/LongTest.java, gnu/testlet/java/lang/Math/MathTest.java, gnu/testlet/java/lang/Short/ShortTest.java, gnu/testlet/java/lang/String/StringTest.java, gnu/testlet/java/lang/StringBuffer/StringBufferTest.java: Cleaned up test names containing "Error", "failed", or "returned wrong results". Index: ./gnu/testlet/java/lang/Byte/ByteTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Byte/ByteTest.java,v retrieving revision 1.3 diff -u -u -r1.3 ByteTest.java --- ./gnu/testlet/java/lang/Byte/ByteTest.java 21 Feb 2005 15:52:45 -0000 1.3 +++ ./gnu/testlet/java/lang/Byte/ByteTest.java 22 Jan 2006 21:14:49 -0000 @@ -30,20 +30,20 @@ public void test_Basics() { harness.check(!( Byte.MIN_VALUE != -128 ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); harness.check(!( Byte.MAX_VALUE != 127 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); Byte ch = new Byte((byte)'b'); harness.check(!( ch.byteValue() != (byte)'b' ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); Byte ch1 = new Byte("122"); harness.check(!( ch1.byteValue() != 122 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); harness.check(!( (Byte.valueOf( "120")).byteValue() != 120 ), - "Error: test_Basics failed - 5" ); + "test_Basics - 5" ); harness.check(!( (Byte.valueOf( "120")).byteValue() != 120 ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); } @@ -52,7 +52,7 @@ Byte ch = new Byte((byte)'a'); String str = ch.toString(); harness.check(!( str.length() != 2 || !str.equals("97")), - "Error: test_toString failed " ); + "test_toString" ); } @@ -63,7 +63,7 @@ Byte ch3 = new Byte((byte)'-'); harness.check(!( !ch1.equals(ch2) || ch1.equals(ch3) || ch1.equals(null)), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); } public void test_hashCode( ) @@ -71,28 +71,28 @@ Byte ch1 = new Byte((byte)'a'); harness.check(!( ch1.hashCode() != (int) 'a' ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } public void test_decode() { try { Byte.decode("1234"); - harness.fail("Error : test_decode failed - 1" ); + harness.fail("test_decode - 1" ); } catch ( NumberFormatException e ){} harness.check(!( Byte.decode("34").intValue() != 34 ), - "Error : test_decode failed - 2" ); + "test_decode - 2" ); try { Byte.decode("123.34"); - harness.fail("Error : test_decode failed - 3" ); + harness.fail("test_decode - 3" ); } catch ( NumberFormatException e ){} try { Byte.decode("ff"); - harness.fail("Error : test_decode failed - 4" ); + harness.fail("test_decode - 4" ); } catch ( NumberFormatException e ){} @@ -103,30 +103,30 @@ Byte b = new Byte( (byte)100 ); Byte b1 = new Byte((byte) -123 ); harness.check(!( b.intValue () != 100 ), - "Error : test_values failed - 1" ); + "test_values - 1" ); harness.check(!( b1.intValue () != -123 ), - "Error : test_values failed - 2" ); + "test_values - 2" ); harness.check(!( b.longValue () != 100 ), - "Error : test_values failed - 3" ); + "test_values - 3" ); harness.check(!( b1.longValue () != -123 ), - "Error : test_values failed - 4" ); + "test_values - 4" ); harness.check(!( b.floatValue () != 100.0f ), - "Error : test_values failed - 5" ); + "test_values - 5" ); harness.check(!( b1.floatValue () != -123.0f ), - "Error : test_values failed - 6" ); + "test_values - 6" ); harness.check(!( b.doubleValue () != 100.0 ), - "Error : test_values failed - 7" ); + "test_values - 7" ); harness.check(!( b1.doubleValue () != -123.0 ), - "Error : test_values failed - 8" ); + "test_values - 8" ); harness.check(!( b.shortValue () != 100 ), - "Error : test_values failed - 9" ); + "test_values - 9" ); harness.check(!( b1.shortValue () != -123 ), - "Error : test_values failed - 10" ); + "test_values - 10" ); harness.check(!( b.byteValue () != 100 ), - "Error : test_values failed - 11" ); + "test_values - 11" ); harness.check(!( b1.byteValue () != -123 ), - "Error : test_values failed - 12" ); + "test_values - 12" ); } public void testall() Index: ./gnu/testlet/java/lang/Character/CharacterTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Character/CharacterTest.java,v retrieving revision 1.3 diff -u -u -r1.3 CharacterTest.java --- ./gnu/testlet/java/lang/Character/CharacterTest.java 21 Feb 2005 15:52:45 -0000 1.3 +++ ./gnu/testlet/java/lang/Character/CharacterTest.java 22 Jan 2006 21:14:49 -0000 @@ -30,33 +30,33 @@ public void test_Basics() { harness.check(!(Character.forDigit(8, 2) != '\0'), - "Error: test_forDigit - 50"); + "test_forDigit - 50"); harness.check(!(Character.forDigit(-3, 2) != '\0'), - "Error: test_forDigit - 51"); + "test_forDigit - 51"); harness.check(!(Character.forDigit(2, 8) != '2'), - "Error: test_forDigit - 52"); + "test_forDigit - 52"); harness.check(!(Character.forDigit(12, 16) != 'c'), - "Error: test_forDigit - 53"); + "test_forDigit - 53"); harness.check(!(Character.isJavaLetter('\uFFFF')), - "Error: test_forDigit - 54"); + "test_forDigit - 54"); harness.check(!(!Character.isJavaLetter('a')), - "Error: test_forDigit - 55"); + "test_forDigit - 55"); harness.check(!( Character.MIN_VALUE != '\u0000' ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); harness.check(!( Character.MAX_VALUE != '\uffff' ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); harness.check(!( Character.MIN_RADIX != 2 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); harness.check(!( Character.MAX_RADIX != 36 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); Character ch = new Character('b'); harness.check(!( ch.charValue() != 'b' ), - "Error: test_Basics failed - 5" ); + "test_Basics - 5" ); } public void test_toString() @@ -65,7 +65,7 @@ String str = ch.toString(); harness.check(!( str.length() != 1 || !str.equals("a")), - "Error: test_toString failed " ); + "test_toString " ); } @@ -76,7 +76,7 @@ Character ch3 = new Character('-'); harness.check(!( !ch1.equals(ch2) || ch1.equals(ch3) || ch1.equals(null)), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); } public void test_hashCode( ) @@ -84,7 +84,7 @@ Character ch1 = new Character('a'); harness.check(!( ch1.hashCode() != (int) 'a' ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } @@ -96,7 +96,7 @@ !Character.isSpace('\n') || !Character.isSpace(' ') || Character.isSpace('+') ), - "Error: test_isSpace returned wrong results" ); + "test_isSpace" ); } @@ -104,9 +104,9 @@ { // radix wrong harness.check(!( Character.digit( 'a' , Character.MIN_RADIX - 1 ) != -1 ), - "Error: test_digit returned wrong results - 1" ); + "test_digit - 1" ); harness.check(!( Character.digit( 'a' , Character.MAX_RADIX + 1 ) != -1 ), - "Error: test_digit returned wrong results - 2" ); + "test_digit - 2" ); } @@ -141,9 +141,9 @@ // not supported Character.isJavaLetter( 'a' ); Character.isJavaLetterOrDigit( 'a' ); harness.check(!(Character.isJavaLetterOrDigit('\uFFFF')), - "Error: isJavaLetterOrDigit - 60"); + "isJavaLetterOrDigit - 60"); harness.check(!(Character.isLetterOrDigit('\uFFFF')), - "Error: isLetterOrDigit - 61"); + "isLetterOrDigit - 61"); // not supported Character.isLetter( 'a' ); Index: ./gnu/testlet/java/lang/Double/DoubleTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Double/DoubleTest.java,v retrieving revision 1.7 diff -u -u -r1.7 DoubleTest.java --- ./gnu/testlet/java/lang/Double/DoubleTest.java 21 Feb 2005 15:52:46 -0000 1.7 +++ ./gnu/testlet/java/lang/Double/DoubleTest.java 22 Jan 2006 21:14:49 -0000 @@ -42,27 +42,27 @@ Double nan2 = new Double(Double.NaN); if ( min1 != min2 ) { - harness.fail("Error: test_Basics failed - 1a"); + harness.fail("test_Basics - 1a"); System.out.println("Expected: " + min1); System.out.println("Got: " + min2); } if ( max1 != max2 ) { - harness.fail("Error: test_Basics failed - 1b"); + harness.fail("test_Basics - 1b"); System.out.println("Expected: " + max1); System.out.println("Got: " + max2); } if (ninf1 != ninf2) { - harness.fail("Error: test_Basics failed - 1c"); + harness.fail("test_Basics - 1c"); System.out.println("Expected: " + ninf1); System.out.println("Got: " + ninf2); } if (pinf1 != pinf2) { - harness.fail("Error: test_Basics failed - 1d"); + harness.fail("test_Basics - 1d"); System.out.println("Expected: " + pinf1); System.out.println("Got: " + pinf2); } if (!nan2.equals(nan1) ) { - harness.fail("Error: test_Basics failed CYGNUS: NaN.equals - 1e"); + harness.fail("test_Basics CYGNUS: NaN.equals - 1e"); System.out.println("Expected: " + nan1); System.out.println("Got: " + nan2); } @@ -70,110 +70,110 @@ Double i1 = new Double(100.5); harness.check(!( i1.doubleValue() != 100.5 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Double("234.34")).doubleValue() != 234.34 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } try { harness.check(!( (new Double("1.4e-45")).doubleValue() != 1.4e-45 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 4" ); + harness.fail("test_Basics - 4" ); } try { new Double("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { } harness.check(!( (new Double(3.4)).doubleValue() != 3.4 ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); Double nan = new Double(Double.NaN ); harness.check(!( !nan.isNaN()), - "Error: test_Basics failed - 7" ); + "test_Basics - 7" ); harness.check(!( (new Double(10.0f)).isNaN()), - "Error: test_Basics failed - 8" ); + "test_Basics - 8" ); harness.check(!( !Double.isNaN( Double.NaN )), - "Error: test_Basics failed - 9" ); + "test_Basics - 9" ); harness.check(!( !(new Double(Double.POSITIVE_INFINITY)).isInfinite()), - "Error: test_Basics failed - 10" ); + "test_Basics - 10" ); harness.check(!( !(new Double(Double.NEGATIVE_INFINITY)).isInfinite()), - "Error: test_Basics failed - 11" ); + "test_Basics - 11" ); harness.check(!( !( Double.isInfinite( Double.NEGATIVE_INFINITY))), - "Error: test_Basics failed - 12" ); + "test_Basics - 12" ); harness.check(!( !( Double.isInfinite( Double.POSITIVE_INFINITY))), - "Error: test_Basics failed - 13" ); + "test_Basics - 13" ); harness.check(!( 0.0 - 0.0 != 0.0), - "Error: test_Basics failed - 14" ); + "test_Basics - 14" ); harness.check(!( 0.0 + 0.0 != 0.0), - "Error: test_Basics failed - 15" ); + "test_Basics - 15" ); harness.check(!( 0.0 + -0.0 != 0.0), - "Error: test_Basics failed - 16" ); + "test_Basics - 16" ); harness.check(!( 0.0 - -0.0 != 0.0), - "Error: test_Basics failed - 17" ); + "test_Basics - 17" ); harness.check(!( -0.0 - 0.0 != -0.0), - "Error: test_Basics failed - 18" ); + "test_Basics - 18" ); harness.check(!( -0.0 + 0.0 != 0.0), - "Error: test_Basics failed - 19" ); + "test_Basics - 19" ); harness.check(!( -0.0 + -0.0 != -0.0), - "Error: test_Basics failed - 20" ); + "test_Basics - 20" ); harness.check(!( -0.0 - -0.0 != 0.0), - "Error: test_Basics failed - 21" ); + "test_Basics - 21" ); harness.check(!( !"0.0".equals(0.0 - 0.0 +"" )), - "Error: test_Basics failed - 22" ); + "test_Basics - 22" ); } public void test_toString() { harness.check(!( !( new Double(123.0)).toString().equals("123.0")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Double(-44.5343)).toString().equals("-44.5343")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Double.toString( 23.04 ).equals ("23.04" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Double.toString( Double.NaN ).equals ("NaN" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Double.toString( Double.POSITIVE_INFINITY ).equals ("Infinity" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); harness.check(!( !Double.toString( Double.NEGATIVE_INFINITY ).equals ("-Infinity" )), - "Error: test_toString failed - 6" ); + "test_toString - 6" ); harness.check(!( !Double.toString( 0.0 ).equals ("0.0" )), - "Error: test_toString failed - 7" ); + "test_toString - 7" ); String str; str = Double.toString( -0.0 ); harness.check(!( !str.equals ("-0.0" )), - "Error: test_toString failed - 8" ); + "test_toString - 8" ); str = Double.toString( -9412128.34 ); harness.check(!( !str.equals ("-9412128.34" )), - "Error: test_toString failed - 9" ); + "test_toString - 9" ); // The following case fails for some Sun JDKs (e.g. 1.3.1 // and 1.4.0) where toString(0.001) returns "0.0010". This @@ -181,21 +181,21 @@ // case has been noted as a comment to Sun Java bug #4642835 str = Double.toString( 0.001 ); if ( !Double.toString( 0.001 ).equals ("0.001" )) { - harness.fail("Error: test_toString failed - 10" ); + harness.fail("test_toString - 10" ); System.out.println("Expected: " + "0.001"); System.out.println("Got: " + Double.toString(0.001)); } str = Double.toString( 1e4d ); if ( !Double.toString( 1e4d ).equals ("10000.0" )) { - harness.fail("Error: test_toString failed - 11" ); + harness.fail("test_toString - 11" ); System.out.println("Expected: " + "10000.0"); System.out.println("Got: " + Double.toString(1e4d)); } str = Double.toString(33333333.33 ); if ( !(new Double( str)).equals(new Double(33333333.33))) { - harness.fail("Error: test_toString failed - 12" ); + harness.fail("test_toString - 12" ); System.out.println("Expected: " + (new Double(33333333.33)).toString()); System.out.println("Got: " + @@ -203,7 +203,7 @@ } str = Double.toString(-123232324253.32 ); if ( !(new Double( str)).equals(new Double(-123232324253.32))) { - harness.fail("Error: test_toString failed - 13" ); + harness.fail("test_toString - 13" ); System.out.println("Expected: " + (new Double(-123232324253.32)).toString()); System.out.println("Got: " + @@ -211,7 +211,7 @@ } str = Double.toString(1.243E10); if ( !(new Double( str)).equals(new Double(1.243E10))) { - harness.fail("Error: test_toString failed - 14" ); + harness.fail("test_toString - 14" ); System.out.println("Expected: " + (new Double(1.243E10)).toString()); System.out.println("Got: " + @@ -219,7 +219,7 @@ } str = Double.toString(-23.43E33); /* if ( !(new Double( str)).equals(new Double(-23.43E33))) - harness.fail("Error: test_toString failed - 14" ); + harness.fail("test_toString - 14" ); */ @@ -231,35 +231,35 @@ Double i2 = new Double(-2334.34E4); harness.check(!( !i1.equals( new Double(2334.34E4))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Double(-2334.34E4))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); double n1 = Double.NaN; double n2 = Double.NaN; harness.check(!( n1 == n2 ), - "Error: test_equals failed - 5" ); + "test_equals - 5" ); Double flt1 = new Double( Double.NaN); Double flt2 = new Double( Double.NaN); harness.check(!( !flt1.equals(flt2)), - "Error: test_equals failed CYGNUS: NaN.equals - 6" ); + "test_equals CYGNUS: NaN.equals - 6" ); harness.check(!( 0.0 != -0.0 ), - "Error: test_equals failed - 7" ); + "test_equals - 7" ); Double pzero = new Double( 0.0 ); Double nzero = new Double( -0.0 ); harness.check(!( pzero.equals(nzero) ), - "Error: test_equals failed CYGNUS: Double.equals - 8" ); + "test_equals CYGNUS: Double.equals - 8" ); } @@ -270,13 +270,13 @@ long lng1 = Double.doubleToLongBits( 3.4028235e+38); harness.check(!( flt1.hashCode() != (int) ( lng1^(lng1>>>32)) ), - "Error: test_hashCode returned wrong results - 1"); + "test_hashCode - 1"); Double flt2 = new Double( -2343323354.0 ); long lng2 = Double.doubleToLongBits( -2343323354.0 ); harness.check(!( flt2.hashCode() != (int) ( lng2^(lng2>>>32)) ), - "Error: test_hashCode returned wrong results - 2"); + "test_hashCode - 2"); } public void test_intValue( ) @@ -288,25 +288,25 @@ int i2 = b2.intValue(); harness.check(!( i1 != (int) 3.4e+32), - "Error: test_intValue returned wrong results CYGNUS: Float to int conversions - 1" ); + "test_intValue CYGNUS: Float to int conversions - 1" ); harness.check(!( i2 != (int) -23.45 ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); Double b3 = new Double(3000.54); harness.check(!( b3.intValue() != 3000 ), - "Error: test_intValue returned wrong results - 3" ); + "test_intValue - 3" ); Double b4 = new Double(32735.3249); harness.check(!( b4.intValue() != 32735 ), - "Error: test_intValue returned wrong results - 4" ); + "test_intValue - 4" ); Double b5 = new Double(-32735.3249); harness.check(!( b5.intValue() != -32735 ), - "Error: test_intValue returned wrong results - 5" ); + "test_intValue - 5" ); Double b6 = new Double(-32735.3249); harness.check(!( b6.intValue() != -32735 ), - "Error: test_intValue returned wrong results - 6" ); + "test_intValue - 6" ); Double b7 = new Double(0.0); harness.check(!( b7.intValue() != 0 ), - "Error: test_intValue returned wrong results - 7" ); + "test_intValue - 7" ); } public void test_longValue( ) @@ -315,10 +315,10 @@ Double b2 = new Double(-23.45); harness.check(!( b1.longValue() != (long) 3.4e+32), - "Error: test_longValue returned wrong results CYGNUS: Float to int conversions - 1" ); + "test_longValue CYGNUS: Float to int conversions - 1" ); harness.check(!( b2.longValue() != (long) -23.45 ), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_DoubleValue( ) @@ -327,10 +327,10 @@ Double b2 = new Double(-3276.32); harness.check(!( b1.doubleValue() != 3276.34 ), - "Error: test_DoubleValue returned wrong results - 1" ); + "test_DoubleValue - 1" ); harness.check(!( b2.doubleValue() != -3276.32 ), - "Error: test_DoubleValue returned wrong results - 2" ); + "test_DoubleValue - 2" ); } public void test_doubleValue( ) @@ -339,10 +339,10 @@ Double b2 = new Double(30.0); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_floatValue( ) @@ -351,17 +351,17 @@ Double b2 = new Double(30.0); harness.check(!( b1.floatValue() != 0.0f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != 30.0f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_valueOf( ) { try { Double.valueOf(null); - harness.fail("Error: test_valueOf returned wrong results - 1" ); + harness.fail("test_valueOf - 1" ); } catch ( NumberFormatException nfe ) {harness.check(false, "test_valueOf null should throw NullPointerException");} @@ -370,21 +370,21 @@ try { Double.valueOf("Kona"); - harness.fail("Error: test_valueOf returned wrong results - 2" ); + harness.fail("test_valueOf - 2" ); }catch( NumberFormatException e) {} harness.check(!( Double.valueOf( "3.4e+32" ).doubleValue() != 3.4e+32 ), - "Error: test_valueOf returned wrong results - 3" ); + "test_valueOf - 3" ); harness.check(!( Double.valueOf(" -23.45 ").doubleValue() != -23.45 ), - "Error: test_valueOf returned wrong results - 4" ); + "test_valueOf - 4" ); } public void test_parseDouble( ) { try { Double.parseDouble(null); - harness.fail("Error: test_parseDouble returned wrong results - 1" ); + harness.fail("test_parseDouble - 1" ); } catch ( NumberFormatException nfe ) {harness.check(false, "test_parseDouble null should throw NullPointerException");} @@ -393,26 +393,26 @@ try { Double.parseDouble("Kona"); - harness.fail("Error: test_parseDouble returned wrong results - 2" ); + harness.fail("test_parseDouble - 2" ); }catch( NumberFormatException e) {} harness.check(!( Double.parseDouble( "3.4e+32" ) != 3.4e+32 ), - "Error: test_parseDouble returned wrong results - 3" ); + "test_parseDouble - 3" ); harness.check(!( Double.parseDouble(" -23.45 ") != -23.45 ), - "Error: test_parseDouble returned wrong results - 4" ); + "test_parseDouble - 4" ); } public void test_doubleToLongBits() { harness.check(!( Double.doubleToLongBits( Double.POSITIVE_INFINITY ) != 0x7ff0000000000000L ), - "Error: test_doubleToLongBits returned wrong results - 1" ); + "test_doubleToLongBits - 1" ); harness.check(!( Double.doubleToLongBits( Double.NEGATIVE_INFINITY ) != 0xfff0000000000000L ), - "Error: test_doubleToLongBits returned wrong results - 2" ); + "test_doubleToLongBits - 2" ); long nanval = Double.doubleToLongBits( Double.NaN ); harness.check(!( nanval != 0x7ff8000000000000L ), - "Error: test_doubleToLongBits CYGNUS: NaN.doubleToLongBits" ); + "test_doubleToLongBits CYGNUS: NaN.doubleToLongBits" ); long i1 = Double.doubleToLongBits(3.4e+32f); long i2 = Double.doubleToLongBits(-34.56f); @@ -427,55 +427,55 @@ long man2 = i2 & 0x000fffffffffffffL ; harness.check(!(sign1 != 0 ), - "Error: test_doubleToLongBits returned wrong results - 4" ); + "test_doubleToLongBits - 4" ); harness.check(!( sign2 != 0x8000000000000000L ), - "Error: test_doubleToLongBits returned wrong results - 5" ); + "test_doubleToLongBits - 5" ); harness.check(!( exp1 != 5093571178556030976L ), - "Error: test_doubleToLongBits returned wrong results - 6" ); + "test_doubleToLongBits - 6" ); harness.check(!( exp2 != 4629700416936869888L ), - "Error: test_doubleToLongBits returned wrong results - 7" ); + "test_doubleToLongBits - 7" ); harness.check(!( man1 != 214848222789632L ), - "Error: test_doubleToLongBits returned wrong results - 8" ); + "test_doubleToLongBits - 8" ); harness.check(!( man2 != 360288163463168L ), - "Error: test_doubleToLongBits returned wrong results - 9" ); + "test_doubleToLongBits - 9" ); } public void test_longBitsToDouble( ) { harness.check(!( Double.longBitsToDouble( 0x7ff0000000000000L) != Double.POSITIVE_INFINITY ), - "Error: test_longBitsToDouble returned wrong results - 1" ); + "test_longBitsToDouble - 1" ); harness.check(!( Double.longBitsToDouble( 0xfff0000000000000L ) != Double.NEGATIVE_INFINITY ), - "Error: test_longBitsToDouble returned wrong results - 2" ); + "test_longBitsToDouble - 2" ); harness.check(!( !Double.isNaN(Double.longBitsToDouble( 0xfff8000000000000L ))), - "Error: test_longBitsToDouble returned wrong results - 3" ); + "test_longBitsToDouble - 3" ); harness.check(!( !Double.isNaN(Double.longBitsToDouble( 0x7ffffff000000000L ))), - "Error: test_longBitsToDouble returned wrong results - 4" ); + "test_longBitsToDouble - 4" ); harness.check(!( !Double.isNaN(Double.longBitsToDouble( 0xfff8000020000001L ))), - "Error: test_longBitsToDouble returned wrong results - 5" ); + "test_longBitsToDouble - 5" ); harness.check(!( !Double.isNaN(Double.longBitsToDouble( 0xfffffffffffffff1L ))), - "Error: test_longBitsToDouble returned wrong results - 6" ); + "test_longBitsToDouble - 6" ); double fl1 = Double.longBitsToDouble( 0x34343f33 ); if ( Double.doubleToLongBits(fl1) != 0x34343f33 ) { - harness.fail("Error: test_longBitsToDouble returned wrong results - 7" ); + harness.fail("test_longBitsToDouble - 7" ); System.out.println("Expected: " + Long.toHexString(0x34343f33)); System.out.println("Got: " + Long.toHexString(Double.doubleToLongBits(fl1))); } harness.check(!( Double.doubleToLongBits( Double.longBitsToDouble(0x33439943)) != 0x33439943 ), - "Error: test_longBitsToDouble returned wrong results - 8"); + "test_longBitsToDouble - 8"); } public void check_remainder( double val, double val1 , @@ -483,7 +483,7 @@ { double res = val % val1; harness.check(!( res < ret - 0.001 || res > ret + 0.001 ), - "Error: test_remainder failed " + errno ); + "test_remainder " + errno ); } public void check_remainder_NaN( double val, double val1 , @@ -491,7 +491,7 @@ { double res = val % val1; if (!Double.isNaN(res)) { - harness.fail("Error: test_remainder failed " + + harness.fail("test_remainder " + errno); } } @@ -552,18 +552,18 @@ Double d3 = new Double(0.0 ); harness.check(!( d1.shortValue() != 123 ), - "Error: test_shortbyteValue failed - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( d2.shortValue() != 400 ), - "Error: test_shortbyteValue failed - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( d3.shortValue() != 0 ), - "Error: test_shortbyteValue failed - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( d1.byteValue() != 123 ), - "Error: test_shortbyteValue failed - 4" ); + "test_shortbyteValue - 4" ); harness.check(!( d2.byteValue() != (byte) 400 ), - "Error: test_shortbyteValue failed - 5" ); + "test_shortbyteValue - 5" ); harness.check(!( d3.byteValue() != 0 ), - "Error: test_shortbyteValue failed - 6" ); + "test_shortbyteValue - 6" ); } @@ -571,38 +571,38 @@ double zero = 0.0; String zero1 = String.valueOf(zero); if (!zero1.equals("0.0")) { - harness.fail("Error: test_neg failed - 1"); + harness.fail("test_neg - 1"); } zero = -zero; String zero2 = String.valueOf(zero); if (!zero2.equals("-0.0")) { - harness.fail("Error: test_neg failed - 2"); + harness.fail("test_neg - 2"); System.out.println("Expected -0.0, got: " + zero2); } zero = -zero; String zero3 = String.valueOf(zero); if (!zero3.equals("0.0")) { - harness.fail("Error: test_neg failed - 3"); + harness.fail("test_neg - 3"); } double nonzero = -21.23; String nonzero1 = String.valueOf(nonzero); if (!nonzero1.equals("-21.23")) { - harness.fail("Error: test_neg failed - 4"); + harness.fail("test_neg - 4"); } nonzero = -nonzero; String nonzero2 = String.valueOf(nonzero); if (!nonzero2.equals("21.23")) { - harness.fail("Error: test_neg failed - 5"); + harness.fail("test_neg - 5"); } nonzero = -nonzero; String nonzero3 = String.valueOf(nonzero); if (!nonzero3.equals("-21.23")) { - harness.fail("Error: test_neg failed - 6"); + harness.fail("test_neg - 6"); } } public void testall() Index: ./gnu/testlet/java/lang/Float/FloatTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Float/FloatTest.java,v retrieving revision 1.8 diff -u -u -r1.8 FloatTest.java --- ./gnu/testlet/java/lang/Float/FloatTest.java 21 Feb 2005 15:52:47 -0000 1.8 +++ ./gnu/testlet/java/lang/Float/FloatTest.java 22 Jan 2006 21:14:49 -0000 @@ -44,21 +44,21 @@ harness.check(!( min1 != min2 || max1 != max2 || ninf1 != ninf2 || pinf1 != pinf2 || !nan2.equals(nan1) ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); Float i1 = new Float(100.5f); harness.check(!( i1.floatValue() != 100.5f ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Float("234.34f")).floatValue() != 234.34f ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } if (!System.getProperty("os.name").equals("VxWorks")){ @@ -66,80 +66,80 @@ // Test is disabled for smallvm 2.0.1 release. try { harness.check(!( (new Float("1.4e-45f")).floatValue() != 1.4e-45f ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 4" ); + harness.fail("test_Basics - 4" ); } } try { new Float("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { } harness.check(!( (new Float(3.4)).floatValue() != 3.4f ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); Float nan = new Float(Float.NaN ); harness.check(!( !nan.isNaN()), - "Error: test_Basics failed - 7" ); + "test_Basics - 7" ); harness.check(!( (new Float(10.0f)).isNaN()), - "Error: test_Basics failed - 8" ); + "test_Basics - 8" ); harness.check(!( !Float.isNaN( Float.NaN )), - "Error: test_Basics failed - 9" ); + "test_Basics - 9" ); harness.check(!( !(new Float(Float.POSITIVE_INFINITY)).isInfinite()), - "Error: test_Basics failed - 10" ); + "test_Basics - 10" ); harness.check(!( !(new Float(Float.NEGATIVE_INFINITY)).isInfinite()), - "Error: test_Basics failed - 11" ); + "test_Basics - 11" ); harness.check(!( !(Float.isInfinite( Float.POSITIVE_INFINITY))), - "Error: test_Basics failed - 12" ); + "test_Basics - 12" ); harness.check(!( !(Float.isInfinite( Float.NEGATIVE_INFINITY))), - "Error: test_Basics failed - 13" ); + "test_Basics - 13" ); harness.check(!( Float.isInfinite( 2.30f )), - "Error: test_Basics failed - 14" ); + "test_Basics - 14" ); } public void test_toString() { harness.check(!( !( new Float(123.0f)).toString().equals("123.0")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Float(-44.5343f)).toString().equals("-44.5343")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Float.toString( 23.04f ).equals ("23.04" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Float.toString( Float.NaN ).equals ("NaN" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Float.toString( Float.POSITIVE_INFINITY ).equals ("Infinity" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); harness.check(!( !Float.toString( Float.NEGATIVE_INFINITY ).equals ("-Infinity" )), - "Error: test_toString failed - 6" ); + "test_toString - 6" ); harness.check(!( !Float.toString( 0.0f ).equals ("0.0" )), - "Error: test_toString failed - 7" ); + "test_toString - 7" ); String str; str = Float.toString( -0.0f ); harness.check(!( !str.equals ("-0.0" )), - "Error: test_toString failed - 8" ); + "test_toString - 8" ); str = Float.toString( -912125.45f); if ( !str.equals ("-912125.44" )) { - harness.fail("Error: test_toString failed - 9" ); + harness.fail("test_toString - 9" ); System.out.println("Bug EJWcr00027"); System.out.println("expected '-912125.45', got '" + str + "'"); @@ -151,11 +151,11 @@ // case has been noted as a comment to Sun Java bug #4642835 str = Float.toString( 0.001f ); harness.check(!( !Float.toString( 0.001f ).equals ("0.001" )), - "Error: test_toString failed - 10" ); + "test_toString - 10" ); str = Float.toString(33333333.33f ); if ( !(new Float( str)).equals(new Float(33333333.33f))) { - harness.fail("Error: test_toString failed - 11" ); + harness.fail("test_toString - 11" ); System.out.println("Bug EJWcr00029"); int i = Float.floatToIntBits(new Float( str).floatValue()); int j = Float.floatToIntBits(new Float(33333333.33f).floatValue()); @@ -166,7 +166,7 @@ } str = Float.toString(-123232324253.32f ); if ( !(new Float( str)).equals(new Float(-123232324253.32f))) { - harness.fail("Error: test_toString failed - 12" ); + harness.fail("test_toString - 12" ); System.out.println("Bug EJWcr00030"); int i = Float.floatToIntBits(new Float( str).floatValue()); int j = Float.floatToIntBits(new Float(-123232324253.32f).floatValue()); @@ -177,10 +177,10 @@ } str = Float.toString(1.243E10f); harness.check(!( !(new Float( str)).equals(new Float(1.243E10f))), - "Error: test_toString failed - 13" ); + "test_toString - 13" ); str = Float.toString(-23.43E33f); harness.check(!( !(new Float( str)).equals(new Float(-23.43E33f))), - "Error: test_toString failed - 14" ); + "test_toString - 14" ); } @@ -190,36 +190,36 @@ Float i2 = new Float(-2334.34E4); harness.check(!( !i1.equals( new Float(2334.34E4))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Float(-2334.34E4))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); float n1 = Float.NaN; float n2 = Float.NaN; harness.check(!( n1 == n2 ), - "Error: test_equals failed - 5" ); + "test_equals - 5" ); Float flt1 = new Float( Float.NaN); Float flt2 = new Float( Float.NaN); harness.check(!( !flt1.equals(flt2)), - "Error: test_equals failed - 6" ); + "test_equals - 6" ); harness.check(!( 0.0f != -0.0f ), - "Error: test_equals failed - 7" ); + "test_equals - 7" ); Float pzero = new Float( 0.0f ); Float nzero = new Float( -0.0f ); harness.check(!( pzero.equals(nzero) ), - "Error: test_equals failed - 8" ); + "test_equals - 8" ); } @@ -229,11 +229,11 @@ Float flt1 = new Float(3.4028235e+38f); harness.check(!( flt1.hashCode() != Float.floatToIntBits( 3.4028235e+38f )), - "Error: test_hashCode returned wrong results - 1"); + "test_hashCode - 1"); Float flt2 = new Float( -2343323354f ); harness.check(!( flt2.hashCode() != Float.floatToIntBits( -2343323354f )), - "Error: test_hashCode returned wrong results - 2"); + "test_hashCode - 2"); } public void test_intValue( ) @@ -245,10 +245,10 @@ int i2 = b2.intValue(); harness.check(!( i1 != (int) 3.4e+32f), - "Error: test_intValue returned wrong results - 1" ); + "test_intValue - 1" ); harness.check(!( i2 != (int) -23.45f ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); } public void test_longValue( ) @@ -260,12 +260,12 @@ long l3 = (long)b3; harness.check(!( b1.longValue() != l3), - "Error: test_longValue returned wrong results - 1" ); + "test_longValue - 1" ); b3 = -23.45f; l3 = (long)b3; harness.check(!( b2.longValue() != l3), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_floatValue( ) @@ -274,10 +274,10 @@ Float b2 = new Float(-3276.32); harness.check(!( b1.floatValue() != 3276.34f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != -3276.32f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_doubleValue( ) @@ -286,17 +286,17 @@ Float b2 = new Float(30.0f); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_valueOf( ) { try { Float.valueOf(null); - harness.fail("Error: test_valueOf returned wrong results - 1" ); + harness.fail("test_valueOf - 1" ); } catch ( NumberFormatException nfe ) {harness.check(false, "test_valueOf null should throw NullPointerException");} @@ -306,20 +306,20 @@ try { Float.valueOf("Kona"); - harness.fail("Error: test_valueOf returned wrong results - 2" ); + harness.fail("test_valueOf - 2" ); }catch( NumberFormatException e) {harness.check(true, "test_valueOf Kona");} try { harness.check(!( Float.valueOf( "3.4e+32f" ).floatValue() != 3.4e+32f ), - "Error: test_valueOf returned wrong results - 3" ); + "test_valueOf - 3" ); }catch( NumberFormatException e) {harness.check(false, "test_valueOf 3.4e+32f");} try { harness.check(!( Float.valueOf(" -23.45f ").floatValue() != -23.45f ), - "Error: test_valueOf returned wrong results - 4" ); + "test_valueOf - 4" ); }catch( NumberFormatException e) {harness.check(false, "test_valueOf \" -23.45f \"");} @@ -330,7 +330,7 @@ { try { Float.parseFloat(null); - harness.fail("Error: test_parseFloat returned wrong results - 1" ); + harness.fail("test_parseFloat - 1" ); } catch ( NumberFormatException nfe ) {harness.check(false, "test_parseFloat null should throw NullPointerException");} @@ -340,20 +340,20 @@ try { Float.parseFloat("Kona"); - harness.fail("Error: test_parseFloat returned wrong results - 2" ); + harness.fail("test_parseFloat - 2" ); }catch( NumberFormatException e) {harness.check(true, "test_parseFloat Kona");} try { harness.check(!( Float.parseFloat( "3.4e+32f" ) != 3.4e+32f ), - "Error: test_parseFloat returned wrong results - 3" ); + "test_parseFloat - 3" ); }catch( NumberFormatException e) {harness.check(false, "test_parseFloat 3.4e+32f");} try { harness.check(!( Float.parseFloat(" -23.45f ") != -23.45f ), - "Error: test_parseFloat returned wrong results - 4" ); + "test_parseFloat - 4" ); }catch( NumberFormatException e) {harness.check(false, "test_parseFloat \" -23.45f \"");} @@ -362,13 +362,13 @@ public void test_floatToIntBits() { harness.check(!( Float.floatToIntBits( Float.POSITIVE_INFINITY ) != 0x7f800000 ), - "Error: test_floatToIntBits returned wrong results - 1" ); + "test_floatToIntBits - 1" ); harness.check(!( Float.floatToIntBits( Float.NEGATIVE_INFINITY ) != 0xff800000 ), - "Error: test_floatToIntBits returned wrong results - 2" ); + "test_floatToIntBits - 2" ); int nanval = Float.floatToIntBits( Float.NaN ); harness.check(!( nanval != 0x7fc00000 ), - "Error: test_floatToIntBits returned wrong results - 3" ); + "test_floatToIntBits - 3" ); int i1 = Float.floatToIntBits(3.4e+32f); int i2 = Float.floatToIntBits(-34.56f); @@ -383,55 +383,55 @@ int man2 = i2 & 0x007fffff ; harness.check(!(sign1 != 0 ), - "Error: test_floatToIntBits returned wrong results - 4" ); + "test_floatToIntBits - 4" ); harness.check(!( sign2 != 0x80000000 ), - "Error: test_floatToIntBits returned wrong results - 5" ); + "test_floatToIntBits - 5" ); harness.check(!( exp1 != 1971322880 ), - "Error: test_floatToIntBits returned wrong results - 6" ); + "test_floatToIntBits - 6" ); harness.check(!( exp2 != 1107296256 ), - "Error: test_floatToIntBits returned wrong results - 7" ); + "test_floatToIntBits - 7" ); harness.check(!( man1 != 400186 ), - "Error: test_floatToIntBits returned wrong results - 8" ); + "test_floatToIntBits - 8" ); harness.check(!( man2 != 671089 ), - "Error: test_floatToIntBits returned wrong results - 9" ); + "test_floatToIntBits - 9" ); } public void test_intBitsToFloat( ) { harness.check(!( Float.intBitsToFloat( 0x7f800000 ) != Float.POSITIVE_INFINITY ), - "Error: test_intBitsToFloat returned wrong results - 1" ); + "test_intBitsToFloat - 1" ); harness.check(!( Float.intBitsToFloat( 0xff800000 ) != Float.NEGATIVE_INFINITY ), - "Error: test_intBitsToFloat returned wrong results - 2" ); + "test_intBitsToFloat - 2" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0x7f800002 ))), - "Error: test_intBitsToFloat returned wrong results - 3" ); + "test_intBitsToFloat - 3" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0x7f8ffff0 ))), - "Error: test_intBitsToFloat returned wrong results - 4" ); + "test_intBitsToFloat - 4" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0xff800002 ) )), - "Error: test_intBitsToFloat returned wrong results - 5" ); + "test_intBitsToFloat - 5" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0xfffffff1 ))), - "Error: test_intBitsToFloat returned wrong results - 6" ); + "test_intBitsToFloat - 6" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0xffc00000 ))), - "Error: test_intBitsToFloat returned wrong results - 7" ); + "test_intBitsToFloat - 7" ); float fl1 = Float.intBitsToFloat( 0x34343f34 ); harness.check(!( fl1 != 1.67868e-007f ), - "Error: test_intBitsToFloat returned wrong results - 8" ); + "test_intBitsToFloat - 8" ); harness.check(!( Float.floatToIntBits( Float.intBitsToFloat(0x33439943)) != 0x33439943 ), - "Error: test_intBitsToFloat returned wrong results - 9"); + "test_intBitsToFloat - 9"); } public void test_shortbyteValue() @@ -441,18 +441,18 @@ Float d3 = new Float(0.0 ); harness.check(!( d1.shortValue() != 123 ), - "Error: test_shortbyteValue failed - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( d2.shortValue() != 400 ), - "Error: test_shortbyteValue failed - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( d3.shortValue() != 0 ), - "Error: test_shortbyteValue failed - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( d1.byteValue() != 123 ), - "Error: test_shortbyteValue failed - 4" ); + "test_shortbyteValue - 4" ); harness.check(!( d2.byteValue() != (byte) 400 ), - "Error: test_shortbyteValue failed - 5" ); + "test_shortbyteValue - 5" ); harness.check(!( d3.byteValue() != 0 ), - "Error: test_shortbyteValue failed - 6" ); + "test_shortbyteValue - 6" ); } @@ -460,37 +460,37 @@ float zero = 0.0f; String zero1 = String.valueOf(zero); if (!zero1.equals("0.0")) { - harness.fail("Error: test_neg failed - 1"); + harness.fail("test_neg - 1"); } zero = -zero; String zero2 = String.valueOf(zero); if (!zero2.equals("-0.0")) { - harness.fail("Error: test_neg failed - 2"); + harness.fail("test_neg - 2"); } zero = -zero; String zero3 = String.valueOf(zero); if (!zero3.equals("0.0")) { - harness.fail("Error: test_neg failed - 3"); + harness.fail("test_neg - 3"); } float nonzero = -12.24f; String nonzero1 = String.valueOf(nonzero); if (!nonzero1.equals("-12.24")) { - harness.fail("Error: test_neg failed - 4"); + harness.fail("test_neg - 4"); } nonzero = -nonzero; String nonzero2 = String.valueOf(nonzero); if (!nonzero2.equals("12.24")) { - harness.fail("Error: test_neg failed - 5"); + harness.fail("test_neg - 5"); } nonzero = -nonzero; String nonzero3 = String.valueOf(nonzero); if (!nonzero3.equals("-12.24")) { - harness.fail("Error: test_neg failed - 6"); + harness.fail("test_neg - 6"); } } Index: ./gnu/testlet/java/lang/Integer/IntegerTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Integer/IntegerTest.java,v retrieving revision 1.4 diff -u -u -r1.4 IntegerTest.java --- ./gnu/testlet/java/lang/Integer/IntegerTest.java 21 Feb 2005 15:52:47 -0000 1.4 +++ ./gnu/testlet/java/lang/Integer/IntegerTest.java 22 Jan 2006 21:14:49 -0000 @@ -32,29 +32,29 @@ { harness.check(!( Integer.MIN_VALUE != 0x80000000 || Integer.MAX_VALUE != 0x7fffffff ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); harness.check(Integer.TYPE == new int[0].getClass().getComponentType(), - "Error: test_Basics failed - 1a"); + "test_Basics - 1a"); Integer i1 = new Integer(100); harness.check(!( i1.intValue() != 100 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Integer("234")).intValue() != 234 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } try { harness.check(!( (new Integer("-FF")).intValue() != -255 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { @@ -62,56 +62,56 @@ try { new Integer("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { } harness.check(!( Integer.decode( "123").intValue() != 123 ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); harness.check(!( Integer.decode( "32767").intValue() != 32767 ), - "Error: test_Basics failed - 7" ); + "test_Basics - 7" ); } public void test_toString() { harness.check(!( !( new Integer(123)).toString().equals("123")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Integer(-44)).toString().equals("-44")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Integer.toString( 234 ).equals ("234" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Integer.toString( -34 ).equals ("-34" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Integer.toString( -34 ).equals ("-34" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); harness.check(!( !Integer.toString(99 , 1 ).equals("99")), - "Error: test_toString failed - 6" ); + "test_toString - 6" ); harness.check(!( !Integer.toString(99 , 37 ).equals("99")), - "Error: test_toString failed - 7" ); + "test_toString - 7" ); harness.check(!( !Integer.toString(15 , 2 ).equals("1111")), - "Error: test_toString failed - 8" ); + "test_toString - 8" ); harness.check(!( !Integer.toString(37 , 36 ).equals("11")), - "Error: test_toString failed - 9" ); + "test_toString - 9" ); harness.check(!( !Integer.toString(31 , 16 ).equals("1f")), - "Error: test_toString failed - 10" ); + "test_toString - 10" ); harness.check(!( !Integer.toString(-99 , 1 ).equals("-99")), - "Error: test_toString failed - 11" ); + "test_toString - 11" ); harness.check(!( !Integer.toString(-99 , 37 ).equals("-99")), - "Error: test_toString failed - 12" ); + "test_toString - 12" ); harness.check(!( !Integer.toString(-15 , 2 ).equals("-1111")), - "Error: test_toString failed - 13" ); + "test_toString - 13" ); harness.check(!( !Integer.toString(-37 , 36 ).equals("-11")), - "Error: test_toString failed - 14" ); + "test_toString - 14" ); harness.check(!( !Integer.toString(-31 , 16 ).equals("-1f")), - "Error: test_toString failed - 15" ); + "test_toString - 15" ); } public void test_equals() @@ -120,16 +120,16 @@ Integer i2 = new Integer(-23); harness.check(!( !i1.equals( new Integer(23))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Integer(-23))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); } public void test_hashCode( ) @@ -138,7 +138,7 @@ Integer b2 = new Integer(-3439); harness.check(!( b1.hashCode() != 3439 || b2.hashCode() != -3439 ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } public void test_intValue( ) @@ -147,10 +147,10 @@ Integer b2 = new Integer(-32767); harness.check(!( b1.intValue() != 32767 ), - "Error: test_intValue returned wrong results - 1" ); + "test_intValue - 1" ); harness.check(!( b2.intValue() != -32767 ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); } public void test_longValue( ) @@ -159,10 +159,10 @@ Integer b2 = new Integer(-3767); harness.check(!( b1.longValue() != (long)3767 ), - "Error: test_longValue returned wrong results - 1" ); + "test_longValue - 1" ); harness.check(!( b2.longValue() != -3767 ), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_floatValue( ) { @@ -170,10 +170,10 @@ Integer b2 = new Integer(-3276); harness.check(!( b1.floatValue() != 3276.0f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != -3276.0f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_doubleValue( ) { @@ -181,10 +181,10 @@ Integer b2 = new Integer(30); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_shortbyteValue( ) @@ -193,20 +193,20 @@ Integer b2 = new Integer(300); harness.check(!( b1.byteValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( b2.byteValue() != (byte)300 ), - "Error: test_shortbyteValue returned wrong results - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( b1.shortValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( b2.shortValue() != (short)300 ), - "Error: test_shortbyteValue returned wrong results - 4" ); + "test_shortbyteValue - 4" ); harness.check(!( ((Number)b1).shortValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 5" ); + "test_shortbyteValue - 5" ); harness.check(!( ((Number)b2).byteValue() != (byte)300 ), - "Error: test_shortbyteValue returned wrong results - 6" ); + "test_shortbyteValue - 6" ); } public void test_toHexString() @@ -217,10 +217,10 @@ str1 = Integer.toHexString( -5361 ); harness.check( "20b7".equals(str), - "Error: test_toHexString returned wrong results - 1" ); + "test_toHexString - 1" ); harness.check( "ffffeb0f".equals(str1), - "Error: test_toHexString returned wrong results - 2" ); + "test_toHexString - 2" ); } public void test_toOctalString() @@ -230,63 +230,63 @@ str1= Integer.toOctalString(-9863 ); harness.check(!( !str.equals("13327")), - "Error: test_toOctalString returned wrong results - 1" ); + "test_toOctalString - 1" ); harness.check(!( !str1.equals("37777754571")), - "Error: test_toOctalString returned wrong results - 2" ); + "test_toOctalString - 2" ); } public void test_toBinaryString() { harness.check(!( !Integer.toBinaryString(358).equals("101100110")), - "Error: test_toBinaryString returned wrong results - 1" ); + "test_toBinaryString - 1" ); harness.check(!( !Integer.toBinaryString( -5478 ).equals("11111111111111111110101010011010")), - "Error: test_toBinaryString returned wrong results - 2" ); + "test_toBinaryString - 2" ); } public void test_parseInt() { harness.check(!( Integer.parseInt("473") != Integer.parseInt("473" , 10 )), - "Error: test_parseInt returned wrong results - 1" ); + "test_parseInt - 1" ); harness.check(!( Integer.parseInt("0" , 10 ) != 0 ), - "Error: test_parseInt returned wrong results - 2" ); + "test_parseInt - 2" ); harness.check(!( Integer.parseInt("473" , 10 ) != 473 ), - "Error: test_parseInt returned wrong results - 3" ); + "test_parseInt - 3" ); harness.check(!( Integer.parseInt("-0" , 10 ) != 0 ), - "Error: test_parseInt returned wrong results - 4" ); + "test_parseInt - 4" ); harness.check(!( Integer.parseInt("-FF" , 16 ) != -255 ), - "Error: test_parseInt returned wrong results - 5" ); + "test_parseInt - 5" ); harness.check(!( Integer.parseInt("1100110" , 2 ) != 102 ), - "Error: test_parseInt returned wrong results - 6" ); + "test_parseInt - 6" ); harness.check(!( Integer.parseInt("2147483647" , 10 ) != 2147483647 ), - "Error: test_parseInt returned wrong results - 7" ); + "test_parseInt - 7" ); harness.check(!( Integer.parseInt("-2147483647" , 10 ) != -2147483647 ), - "Error: test_parseInt returned wrong results - 8" ); + "test_parseInt - 8" ); try { Integer.parseInt("2147483648" , 10 ); - harness.fail("Error: test_parseInt returned wrong results - 9" ); + harness.fail("test_parseInt - 9" ); }catch ( NumberFormatException e ){} try { Integer.parseInt("99" , 8 ); - harness.fail("Error: test_parseInt returned wrong results - 10" ); + harness.fail("test_parseInt - 10" ); }catch ( NumberFormatException e ){} try { Integer.parseInt("kona" , 10 ); - harness.fail("Error: test_parseInt returned wrong results - 11" ); + harness.fail("test_parseInt - 11" ); }catch ( NumberFormatException e ){} harness.check(!( Integer.parseInt("Kona" , 27 ) != 411787 ), - "Error: test_parseInt returned wrong results - 12" ); + "test_parseInt - 12" ); } public void test_valueOf( ) { harness.check(!( Integer.valueOf("21234").intValue() != Integer.parseInt("21234")), - "Error: test_valueOf returned wrong results - 1" ); + "test_valueOf - 1" ); harness.check(!( Integer.valueOf("Kona", 27).intValue() != Integer.parseInt("Kona", 27)), - "Error: test_valueOf returned wrong results - 2" ); + "test_valueOf - 2" ); } public void test_getInteger( ) @@ -309,17 +309,17 @@ harness.check(!( Integer.getInteger("integerkey1").intValue() != 2345 || Integer.getInteger("integerkey2").intValue() != -984 || Integer.getInteger("integerkey3").intValue() != 0 ), - "Error: test_getInteger returned wrong results - 1" ); + "test_getInteger - 1" ); harness.check(!( Integer.getInteger("integerkey4", new Integer(0)).intValue() != 31 || Integer.getInteger("integerkey5",new Integer(0)).intValue() != 31 || Integer.getInteger("integerkey6",new Integer(0)).intValue() != 15 ), - "Error: test_getInteger returned wrong results - 2" ); + "test_getInteger - 2" ); harness.check(!( Integer.getInteger("integerkey7", new Integer(0)).intValue() != 0 ), - "Error: test_getInteger returned wrong results - 3" ); + "test_getInteger - 3" ); harness.check(!( Integer.getInteger("integerkey7", 0).intValue() != 0 ), - "Error: test_getInteger returned wrong results - 4" ); + "test_getInteger - 4" ); } Index: ./gnu/testlet/java/lang/Long/LongTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Long/LongTest.java,v retrieving revision 1.4 diff -u -u -r1.4 LongTest.java --- ./gnu/testlet/java/lang/Long/LongTest.java 21 Feb 2005 15:52:47 -0000 1.4 +++ ./gnu/testlet/java/lang/Long/LongTest.java 22 Jan 2006 21:14:49 -0000 @@ -36,25 +36,25 @@ long max2 = 0x7fffffffffffffffL; harness.check(!( min1 != min2 || max1 != max2 ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); Long i1 = new Long(100); harness.check(!( i1.longValue() != 100 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Long("234")).longValue() != 234 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } try { harness.check(!( (new Long("-FF")).longValue() != -255 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { @@ -62,7 +62,7 @@ try { new Long("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { @@ -72,41 +72,41 @@ public void test_toString() { harness.check(!( !( new Long(123)).toString().equals("123")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Long(-44)).toString().equals("-44")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Long.toString( 234 ).equals ("234" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Long.toString( -34 ).equals ("-34" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Long.toString( -34 ).equals ("-34" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); harness.check(!( !Long.toString(99 , 1 ).equals("99")), - "Error: test_toString failed - 6" ); + "test_toString - 6" ); harness.check(!( !Long.toString(99 , 37 ).equals("99")), - "Error: test_toString failed - 7" ); + "test_toString - 7" ); harness.check(!( !Long.toString(15 , 2 ).equals("1111")), - "Error: test_toString failed - 8" ); + "test_toString - 8" ); harness.check(!( !Long.toString(37 , 36 ).equals("11")), - "Error: test_toString failed - 9" ); + "test_toString - 9" ); harness.check(!( !Long.toString(31 , 16 ).equals("1f")), - "Error: test_toString failed - 10" ); + "test_toString - 10" ); harness.check(!( !Long.toString(-99 , 1 ).equals("-99")), - "Error: test_toString failed - 11" ); + "test_toString - 11" ); harness.check(!( !Long.toString(-99 , 37 ).equals("-99")), - "Error: test_toString failed - 12" ); + "test_toString - 12" ); harness.check(!( !Long.toString(-15 , 2 ).equals("-1111")), - "Error: test_toString failed - 13" ); + "test_toString - 13" ); harness.check(!( !Long.toString(-37 , 36 ).equals("-11")), - "Error: test_toString failed - 14" ); + "test_toString - 14" ); harness.check(!( !Long.toString(-31 , 16 ).equals("-1f")), - "Error: test_toString failed - 15" ); + "test_toString - 15" ); } public void test_equals() @@ -115,16 +115,16 @@ Long i2 = new Long(-23); harness.check(!( !i1.equals( new Long(23))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Long(-23))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); } public void test_hashCode( ) @@ -133,7 +133,7 @@ Long b2 = new Long(-34395555); harness.check(!( b1.hashCode() != ((int)(b1.longValue()^(b1.longValue()>>>32))) || b2.hashCode() != ((int)(b2.longValue()^(b2.longValue()>>>32))) ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } public void test_intValue( ) @@ -142,10 +142,10 @@ Long b2 = new Long(-32767); harness.check(!( b1.intValue() != 32767 ), - "Error: test_intValue returned wrong results - 1" ); + "test_intValue - 1" ); harness.check(!( b2.intValue() != -32767 ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); } public void test_shortbyteValue( ) { @@ -153,15 +153,15 @@ Long b2 = new Long(-32767); harness.check(!( b1.byteValue() != (byte)32767 ), - "Error: test_shortbyteValue returned wrong results - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( b2.byteValue() != (byte)-32767 ), - "Error: test_shortbyteValue returned wrong results - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( b1.shortValue() != (short)32767 ), - "Error: test_shortbyteValue returned wrong results - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( b2.shortValue() != (short)-32767 ), - "Error: test_shortbyteValue returned wrong results - 4" ); + "test_shortbyteValue - 4" ); } public void test_longValue( ) @@ -170,10 +170,10 @@ Long b2 = new Long(9223372036854775807L); harness.check(!( b1.longValue() != (long)-9223372036854775807L ), - "Error: test_longValue returned wrong results - 1" ); + "test_longValue - 1" ); harness.check(!( b2.longValue() != 9223372036854775807L ), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_floatValue( ) { @@ -181,10 +181,10 @@ Long b2 = new Long(-3276); harness.check(!( b1.floatValue() != 3276.0f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != -3276.0f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_doubleValue( ) { @@ -192,10 +192,10 @@ Long b2 = new Long(30); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_toHexString() @@ -206,10 +206,10 @@ str1 = Long.toHexString( -5361 ); harness.check(!( !str.equalsIgnoreCase("20B7")), - "Error: test_toHexString returned wrong results - 1" ); + "test_toHexString - 1" ); harness.check(!( !str1.equalsIgnoreCase("ffffffffffffeb0f")), - "Error: test_toHexString returned wrong results - 2" ); + "test_toHexString - 2" ); } public void test_toOctalString() @@ -219,55 +219,55 @@ str1= Long.toOctalString(-9863 ); harness.check(!( !str.equals("13327")), - "Error: test_toOctalString returned wrong results - 1" ); + "test_toOctalString - 1" ); harness.check(!( !str1.equals("1777777777777777754571")), - "Error: test_toOctalString returned wrong results - 2" ); + "test_toOctalString - 2" ); } public void test_toBinaryString() { String str1 = Long.toBinaryString( -5478 ); harness.check(!( !Long.toBinaryString(358).equals("101100110")), - "Error: test_toBinaryString returned wrong results - 1" ); + "test_toBinaryString - 1" ); harness.check(!( !str1.equals("1111111111111111111111111111111111111111111111111110101010011010")), - "Error: test_toBinaryString returned wrong results - 2" ); + "test_toBinaryString - 2" ); } public void test_parseLong() { harness.check(!( Long.parseLong("473") != Long.parseLong("473" , 10 )), - "Error: test_parseLong returned wrong results - 1" ); + "test_parseLong - 1" ); harness.check(!( Long.parseLong("0" , 10 ) != 0L ), - "Error: test_parseLong returned wrong results - 2" ); + "test_parseLong - 2" ); harness.check(!( Long.parseLong("473" , 10 ) != 473L ), - "Error: test_parseLong returned wrong results - 3" ); + "test_parseLong - 3" ); harness.check(!( Long.parseLong("-0" , 10 ) != 0L ), - "Error: test_parseLong returned wrong results - 4" ); + "test_parseLong - 4" ); harness.check(!( Long.parseLong("-FF" , 16 ) != -255L ), - "Error: test_parseLong returned wrong results - 5" ); + "test_parseLong - 5" ); harness.check(!( Long.parseLong("1100110" , 2 ) != 102L ), - "Error: test_parseLong returned wrong results - 6" ); + "test_parseLong - 6" ); harness.check(!( Long.parseLong("2147483647" , 10 ) != 2147483647L ), - "Error: test_parseLong returned wrong results - 7" ); + "test_parseLong - 7" ); harness.check(!( Long.parseLong("-2147483647" , 10 ) != -2147483647L ), - "Error: test_parseLong returned wrong results - 8" ); + "test_parseLong - 8" ); try { Long.parseLong("99" , 8 ); - harness.fail("Error: test_parseLong returned wrong results - 10" ); + harness.fail("test_parseLong - 10" ); }catch ( NumberFormatException e ){} try { Long.parseLong("Hazelnut" , 10 ); - harness.fail("Error: test_parseLong returned wrong results - 11" ); + harness.fail("test_parseLong - 11" ); }catch ( NumberFormatException e ){} harness.check(!( Long.parseLong("Hazelnut" , 36 ) != 1356099454469L ), - "Error: test_parseLong returned wrong results - 12" ); + "test_parseLong - 12" ); long_hex_ok("-8000000000000000", -0x8000000000000000L); @@ -316,7 +316,7 @@ static void long_hex_bad(String s) { try { Long.parseLong(s, 16); - harness.fail("Error long_hex_bad " + + harness.fail("long_hex_bad " + s + " should not be valid!" ); } catch (NumberFormatException e ){ } @@ -351,9 +351,9 @@ public void test_valueOf( ) { harness.check(!( Long.valueOf("21234").longValue() != Long.parseLong("21234")), - "Error: test_valueOf returned wrong results - 1" ); + "test_valueOf - 1" ); harness.check(!( Long.valueOf("Kona", 27).longValue() != Long.parseLong("Kona", 27)), - "Error: test_valueOf returned wrong results - 2" ); + "test_valueOf - 2" ); } public void test_getLong( ) @@ -395,11 +395,11 @@ try { harness.check(!( Long.getLong("longkey7", new Long(0)).longValue() != 0 ), - "Error: test_getLong returned wrong results - 3" ); + "test_getLong - 3" ); } catch (NullPointerException npe) { harness.check(false); } try { harness.check(!( Long.getLong("longkey7", 0).longValue() != 0 ), - "Error: test_getLong returned wrong results - 4" ); + "test_getLong - 4" ); } catch (NullPointerException npe) { harness.check(false); } } Index: ./gnu/testlet/java/lang/Math/MathTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Math/MathTest.java,v retrieving revision 1.3 diff -u -u -r1.3 MathTest.java --- ./gnu/testlet/java/lang/Math/MathTest.java 21 Feb 2005 15:52:47 -0000 1.3 +++ ./gnu/testlet/java/lang/Math/MathTest.java 22 Jan 2006 21:14:49 -0000 @@ -31,253 +31,253 @@ public void test_Basics() { harness.check(!( Math.E != 2.7182818284590452354 ), - "Error : test_Basics failed - 1"); + "test_Basics - 1"); harness.check(!( Math.PI != 3.14159265358979323846 ), - "Error : test_Basics failed - 2"); + "test_Basics - 2"); } public void test_sincostan() { harness.check(!( !(new Double(Math.sin( Double.NaN ))).isNaN() ), - "Error : test_sincostan failed - 1"); + "test_sincostan - 1"); harness.check(!( !(new Double(Math.sin( Double.POSITIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 2"); + "test_sincostan - 2"); harness.check(!( !(new Double(Math.sin( Double.NEGATIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 3"); + "test_sincostan - 3"); harness.check(!( Math.sin( -0.0 ) != -0.0 ), - "Error : test_sincostan failed - 4"); + "test_sincostan - 4"); harness.check(!( Math.sin( 0.0 ) != 0.0 ), - "Error : test_sincostan failed - 5"); + "test_sincostan - 5"); harness.check(!( !(new Double(Math.cos( Double.NaN ))).isNaN() ), - "Error : test_sincostan failed - 6"); + "test_sincostan - 6"); harness.check(!( !(new Double(Math.cos( Double.POSITIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 7"); + "test_sincostan - 7"); harness.check(!( !(new Double(Math.cos( Double.NEGATIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 8"); + "test_sincostan - 8"); harness.check(!( !(new Double(Math.tan( Double.NaN ))).isNaN() ), - "Error : test_sincostan failed - 9"); + "test_sincostan - 9"); harness.check(!( !(new Double(Math.tan( Double.POSITIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 10"); + "test_sincostan - 10"); harness.check(!( !(new Double(Math.tan( Double.NEGATIVE_INFINITY ))).isNaN()), - "Error : test_sincostan failed - 11"); + "test_sincostan - 11"); harness.check(!( Math.tan( -0.0 ) != -0.0 ), - "Error : test_sincostan failed - 12"); + "test_sincostan - 12"); harness.check(!( Math.tan( 0.0 ) != 0.0 ), - "Error : test_sincostan failed - 13"); + "test_sincostan - 13"); harness.check(!( Math.sin( Math.PI / 2.0 + Math.PI /6.0 ) <= 0.0 ), - "Error : test_sincostan failed - 14"); + "test_sincostan - 14"); harness.check(!( Math.cos( Math.PI / 2.0 + Math.PI /6.0 ) >= 0.0 ), - "Error : test_sincostan failed - 14"); + "test_sincostan - 14"); harness.check(!( Math.tan( Math.PI / 2.0 + Math.PI /6.0 ) >= 0.0 ), - "Error : test_sincostan failed - 14"); + "test_sincostan - 14"); } public void test_asinacosatan() { harness.check(!( !(new Double(Math.asin( Double.NaN ))).isNaN() ), - "Error : test_asinacosatan failed - 1"); + "test_asinacosatan - 1"); harness.check(!( Math.asin( -0.0 ) != -0.0 ), - "Error : test_asinacosatan failed - 2"); + "test_asinacosatan - 2"); harness.check(!( Math.asin( 0.0 ) != 0.0 ), - "Error : test_asinacosatan failed - 3"); + "test_asinacosatan - 3"); harness.check(!( !(new Double(Math.asin( 10.0 ))).isNaN() ), - "Error : test_asinacosatan failed - 4"); + "test_asinacosatan - 4"); harness.check(!( !(new Double(Math.acos( Double.NaN ))).isNaN() ), - "Error : test_asinacosatan failed - 5"); + "test_asinacosatan - 5"); harness.check(!( !(new Double(Math.acos( 10.0 ))).isNaN() ), - "Error : test_asinacosatan failed - 6"); + "test_asinacosatan - 6"); harness.check(!( !(new Double(Math.atan( Double.NaN ))).isNaN() ), - "Error : test_asinacosatan failed - 7"); + "test_asinacosatan - 7"); harness.check(!( Math.atan( -0.0 ) != -0.0 ), - "Error : test_asinacosatan failed - 8"); + "test_asinacosatan - 8"); harness.check(!( Math.atan( 0.0 ) != 0.0 ), - "Error : test_asinacosatan failed - 9"); + "test_asinacosatan - 9"); } public void test_atan2() { harness.check(!(!(new Double( Math.atan2 (1.0 , Double.NaN ))).isNaN()), - "Error : test_atan2 failed - 1"); + "test_atan2 - 1"); harness.check(!(!(new Double( Math.atan2 (Double.NaN,1.0 ))).isNaN()), - "Error : test_atan2 failed - 2"); + "test_atan2 - 2"); harness.check(!(( Math.atan2(0.0, 10.0 ) != -0.0 ) || ( Math.atan2(2.0 , Double.POSITIVE_INFINITY ) != -0.0 )), - "Error : test_atan2 failed - 3"); + "test_atan2 - 3"); harness.check(!(( Math.atan2(-0.0, 10.0 ) != -0.0 ) || ( Math.atan2(-2.0 , Double.POSITIVE_INFINITY ) != -0.0 )), - "Error : test_atan2 failed - 4"); + "test_atan2 - 4"); harness.check(!(( Math.atan2(0.0, -10.0 ) != Math.PI) || ( Math.atan2(2.0 , Double.NEGATIVE_INFINITY ) != Math.PI )), - "Error : test_atan2 failed - 4"); + "test_atan2 - 4"); harness.check(!(( Math.atan2(-0.0, -10.0 ) != -Math.PI) || ( Math.atan2(-2.0 , Double.NEGATIVE_INFINITY ) != -Math.PI )), - "Error : test_atan2 failed - 5"); + "test_atan2 - 5"); harness.check(!(( Math.atan2(10.0, 0.0 ) != Math.PI/2.0) || ( Math.atan2(Double.POSITIVE_INFINITY , 3.0) != Math.PI /2.0)), - "Error : test_atan2 failed - 6"); + "test_atan2 - 6"); harness.check(!(( Math.atan2(-10.0, 0.0 ) != -Math.PI/2.0) || ( Math.atan2(Double.NEGATIVE_INFINITY , 3.0) != -Math.PI /2.0)), - "Error : test_atan2 failed - 7"); + "test_atan2 - 7"); harness.check(!(( Math.atan2(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY ) != Math.PI/4.0)), - "Error : test_atan2 failed - 8"); + "test_atan2 - 8"); harness.check(!(( Math.atan2(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY ) != Math.PI*3.0/4.0)), - "Error : test_atan2 failed - 9"); + "test_atan2 - 9"); harness.check(!(( Math.atan2(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY ) != -Math.PI/4.0)), - "Error : test_atan2 failed - 10"); + "test_atan2 - 10"); harness.check(!(( Math.atan2(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY ) != -Math.PI*3.0/4.0)), - "Error : test_atan2 failed - 11"); + "test_atan2 - 11"); } public void test_exp() { harness.check(!( !(new Double(Math.exp( Double.NaN ))).isNaN() ), - "Error : test_exp failed - 1"); + "test_exp - 1"); harness.check(!( !(new Double(Math.exp( Double.POSITIVE_INFINITY))).isInfinite() ), - "Error : test_exp failed - 2"); + "test_exp - 2"); harness.check(!( Math.exp( Double.NEGATIVE_INFINITY) != 0.0 ), - "Error : test_exp failed - 3"); + "test_exp - 3"); } public void test_log() { harness.check(!( !(new Double(Math.log( Double.NaN ))).isNaN() ), - "Error : test_log failed - 1"); + "test_log - 1"); harness.check(!( !(new Double(Math.log( -1.0 ))).isNaN() ), - "Error : test_log failed - 2"); + "test_log - 2"); harness.check(!( !(new Double(Math.log( Double.POSITIVE_INFINITY ))).isInfinite() ), - "Error : test_log failed - 3"); + "test_log - 3"); } public void test_sqrt() { harness.check(!( !(new Double(Math.sqrt( Double.NaN ))).isNaN() || !(new Double(Math.sqrt( -10.0 ))).isNaN()), - "Error : test_sqrt failed - 1"); + "test_sqrt - 1"); harness.check(!( !(new Double(Math.sqrt( Double.NaN ))).isNaN() || !(new Double(Math.sqrt( -10.0 ))).isNaN()), - "Error : test_sqrt failed - 2"); + "test_sqrt - 2"); harness.check(!( !(new Double(Math.sqrt( Double.POSITIVE_INFINITY))).isInfinite()), - "Error : test_sqrt failed - 3"); + "test_sqrt - 3"); harness.check(!( Math.sqrt( -0.0) != -0.0 || Math.sqrt( 0.0) != 0.0 ), - "Error : test_sqrt failed - 4"); + "test_sqrt - 4"); harness.check(!( Math.sqrt( -0.0) != -0.0 || Math.sqrt( 0.0) != 0.0 ), - "Error : test_sqrt failed - 5"); + "test_sqrt - 5"); double sq = Math.sqrt(4.0); harness.check(!(!( sq >= 1.9999 && sq <= 2.111 )), - "Error : test_sqrt failed - 6"); + "test_sqrt - 6"); } public void test_pow() { harness.check(!( Math.pow(1.0 , 0.0 ) != 1.0 ), - "Error : test_pow failed - 1"); + "test_pow - 1"); harness.check(!( Math.pow(2.0 , -0.0 ) != 1.0 ), - "Error : test_pow failed - 2"); + "test_pow - 2"); harness.check(!( Math.pow(123.0 , 1.0 ) != 123.0 ), - "Error : test_pow failed - 3"); + "test_pow - 3"); harness.check(!( !(new Double(Math.pow( 10.0, Double.NaN ))).isNaN()), - "Error : test_pow failed - 4"); + "test_pow - 4"); harness.check(!( !(new Double(Math.pow( Double.NaN, 1.0 ))).isNaN()), - "Error : test_pow failed - 5"); + "test_pow - 5"); harness.check(!( !(new Double(Math.pow( 2.0, Double.POSITIVE_INFINITY ))).isInfinite()), - "Error : test_pow failed - 6"); + "test_pow - 6"); harness.check(!( !(new Double(Math.pow( 0.5, Double.NEGATIVE_INFINITY ))).isInfinite()), - "Error : test_pow failed - 7"); + "test_pow - 7"); harness.check(!( Math.pow( 1.5, Double.NEGATIVE_INFINITY ) != 0.0 || Math.pow( 0.5, Double.POSITIVE_INFINITY ) != 0.0), - "Error : test_pow failed - 8"); + "test_pow - 8"); harness.check(!( !(new Double(Math.pow( 1.0, Double.POSITIVE_INFINITY ))).isNaN()), - "Error : test_pow failed - 9"); + "test_pow - 9"); harness.check(!( Math.pow( 0.0, 1.0) != 0.0 || Math.pow( Double.POSITIVE_INFINITY , -1.0 ) != 0.0), - "Error : test_pow failed - 10"); + "test_pow - 10"); harness.check(!( !(new Double(Math.pow( 0.0, -1.0 ))).isInfinite() || !(new Double(Math.pow( Double.POSITIVE_INFINITY, 1.0 ))).isInfinite() ), - "Error : test_pow failed - 11"); + "test_pow - 11"); harness.check(!( Math.pow( -0.0, 5.0) != -0.0 || Math.pow( Double.NEGATIVE_INFINITY , -7.0 ) != -0.0), - "Error : test_pow failed - 12"); + "test_pow - 12"); harness.check(!( Math.pow( -2.0, 6.0) != Math.pow(2.0,6.0)), - "Error : test_pow failed - 13"); + "test_pow - 13"); harness.check(!( Math.pow( -2.0, 5.0) != -Math.pow(2.0,5.0)), - "Error : test_pow failed - 14"); + "test_pow - 14"); } public void test_IEEEremainder() { harness.check(!( !(new Double(Math.IEEEremainder( Double.NaN, 1.0 ))).isNaN()), - "Error : test_IEEEremainder failed - 1"); + "test_IEEEremainder - 1"); harness.check(!( !(new Double(Math.IEEEremainder( 1.0,Double.NaN))).isNaN()), - "Error : test_IEEEremainder failed - 2"); + "test_IEEEremainder - 2"); harness.check(!( !(new Double(Math.IEEEremainder( Double.POSITIVE_INFINITY , 2.0))).isNaN()), - "Error : test_IEEEremainder failed - 3"); + "test_IEEEremainder - 3"); harness.check(!( !(new Double(Math.IEEEremainder( 2.0,0.0))).isNaN() ), - "Error : test_IEEEremainder failed - 4"); + "test_IEEEremainder - 4"); harness.check(!( Math.IEEEremainder( 3.0, Double.POSITIVE_INFINITY ) != 3.0 ), - "Error : test_IEEEremainder failed - 5"); + "test_IEEEremainder - 5"); } public void test_ceil() { harness.check(!( Math.ceil(5.0) != 5.0 ), - "Error : test_ceil failed - 1"); + "test_ceil - 1"); harness.check(!( Math.ceil(0.0) != 0.0 || Math.ceil(-0.0) != -0.0 ), - "Error : test_ceil failed - 2"); + "test_ceil - 2"); harness.check(!( !(new Double(Math.ceil(Double.POSITIVE_INFINITY))).isInfinite() || !(new Double(Math.ceil(Double.NaN))).isNaN()), - "Error : test_ceil failed - 3"); + "test_ceil - 3"); harness.check(!( Math.ceil(-0.5) != -0.0 ), - "Error : test_ceil failed - 4"); + "test_ceil - 4"); harness.check(!( Math.ceil( 2.5 ) != 3.0 ), - "Error : test_ceil failed - 5"); + "test_ceil - 5"); } @@ -285,268 +285,268 @@ public void test_floor() { harness.check(!( Math.floor(5.0) != 5.0 ), - "Error : test_floor failed - 1"); + "test_floor - 1"); harness.check(!( Math.floor(2.5) != 2.0 ), - "Error : test_floor failed - 2"); + "test_floor - 2"); harness.check(!( !(new Double(Math.floor(Double.POSITIVE_INFINITY))).isInfinite() || !(new Double(Math.floor(Double.NaN))).isNaN()), - "Error : test_floor failed - 3"); + "test_floor - 3"); harness.check(!( Math.floor(0.0) != 0.0 || Math.floor(-0.0) != -0.0 ), - "Error : test_floor failed - 4"); + "test_floor - 4"); } public void test_rint() { harness.check(!( Math.rint( 2.3 ) != 2.0 ), - "Error : test_rint failed - 1"); + "test_rint - 1"); harness.check(!( Math.rint( 2.7 ) != 3.0 ), - "Error : test_rint failed - 2"); + "test_rint - 2"); harness.check(!(Math.rint( 2.5) != 2.0 ), - "Error : test_rint failed - 3"); + "test_rint - 3"); harness.check(!( Math.rint( 2.0) != 2.0 ), - "Error : test_rint failed - 4"); + "test_rint - 4"); harness.check(!( Math.rint( 2.0) != 2.0 ), - "Error : test_rint failed - 5"); + "test_rint - 5"); harness.check(!( !(new Double(Math.rint(Double.POSITIVE_INFINITY))).isInfinite() || !(new Double(Math.rint(Double.NaN))).isNaN()), - "Error : test_rint failed - 6"); + "test_rint - 6"); harness.check(!( Math.rint(0.0) != 0.0 || Math.rint(-0.0) != -0.0 ), - "Error : test_rint failed - 7"); + "test_rint - 7"); } public void test_round() { harness.check(!( Math.round( 3.4 ) != 3 ), - "Error : test_round failed - 1"); + "test_round - 1"); harness.check(!( Math.round( 9.55 ) != 10 ), - "Error : test_round failed - 2"); + "test_round - 2"); harness.check(!( Math.round(Double.NaN) != 0 ), - "Error : test_round failed - 3"); + "test_round - 3"); float f1 = Integer.MIN_VALUE; f1 -= 5; harness.check(!( Math.round(f1) != Integer.MIN_VALUE || Math.round(Float.NEGATIVE_INFINITY) != Integer.MIN_VALUE ), - "Error : test_round failed - 4"); + "test_round - 4"); f1 = Integer.MAX_VALUE; f1 += 5; harness.check(!( Math.round(f1) != Integer.MAX_VALUE || Math.round(Float.POSITIVE_INFINITY) != Integer.MAX_VALUE ), - "Error : test_round failed - 5"); + "test_round - 5"); double d1 = Long.MIN_VALUE; d1 -= 5; harness.check(!( Math.round(d1) != Long.MIN_VALUE || Math.round(Double.NEGATIVE_INFINITY) != Long.MIN_VALUE ), - "Error : test_round failed - 6"); + "test_round - 6"); d1 = Long.MAX_VALUE; d1 += 5; harness.check(!( Math.round(d1) != Long.MAX_VALUE || Math.round(Double.POSITIVE_INFINITY) != Long.MAX_VALUE ), - "Error : test_round failed - 7"); + "test_round - 7"); harness.check(!( Math.round( 3.4f ) != 3 ), - "Error : test_round failed - 8"); + "test_round - 8"); harness.check(!( Math.round( 9.55f ) != 10 ), - "Error : test_round failed - 9"); + "test_round - 9"); harness.check(!( Math.round(Float.NaN) != 0 ), - "Error : test_round failed - 10"); + "test_round - 10"); } public void test_random() { harness.check(!( Math.random() < 0.0 || Math.random() > 1.0 ), - "Error : test_random failed - 1"); + "test_random - 1"); } public void test_abs() { harness.check(!( Math.abs( 10 ) != 10 ), - "Error : test_abs failed - 1"); + "test_abs - 1"); harness.check(!( Math.abs( -23 ) != 23 ), - "Error : test_abs failed - 2"); + "test_abs - 2"); harness.check(!( Math.abs( Integer.MIN_VALUE ) != Integer.MIN_VALUE ), - "Error : test_abs failed - 3" ); + "test_abs - 3" ); harness.check(!( Math.abs(-0) != 0 ), - "Error : test_abs failed - 4" ); + "test_abs - 4" ); harness.check(!( Math.abs( 1000L ) != 1000 ), - "Error : test_abs failed - 5"); + "test_abs - 5"); harness.check(!( Math.abs( -2334242L ) != 2334242 ), - "Error : test_abs failed - 6"); + "test_abs - 6"); harness.check(!( Math.abs( Long.MIN_VALUE ) != Long.MIN_VALUE ), - "Error : test_abs failed - 7" ); + "test_abs - 7" ); harness.check(!( Math.abs( 0.0f ) != 0.0f || Math.abs(-0.0f) != 0.0f ), - "Error : test_abs failed - 8" ); + "test_abs - 8" ); harness.check(!( !(new Float(Math.abs( Float.POSITIVE_INFINITY ))).isInfinite() ), - "Error : test_abs failed - 9" ); + "test_abs - 9" ); harness.check(!( !(new Float(Math.abs( Float.NaN ))).isNaN() ), - "Error : test_abs failed - 10" ); + "test_abs - 10" ); harness.check(!( Math.abs( 23.34f ) != 23.34f ), - "Error : test_abs failed - 11" ); + "test_abs - 11" ); harness.check(!( Math.abs( 0.0 ) != 0.0 || Math.abs(-0.0) != 0.0 ), - "Error : test_abs failed - 12" ); + "test_abs - 12" ); harness.check(!( !(new Double(Math.abs( Double.POSITIVE_INFINITY ))).isInfinite() ), - "Error : test_abs failed - 13" ); + "test_abs - 13" ); harness.check(!( !(new Double(Math.abs( Double.NaN ))).isNaN() ), - "Error : test_abs failed - 14" ); + "test_abs - 14" ); harness.check(!( Math.abs( 23.34 ) != 23.34 ), - "Error : test_abs failed - 15" ); + "test_abs - 15" ); } public void test_min() { harness.check(!( Math.min( 100 , 12 ) != 12 ), - "Error : test_min failed - 1" ); + "test_min - 1" ); harness.check(!( Math.min( Integer.MIN_VALUE , Integer.MIN_VALUE + 1 ) != Integer.MIN_VALUE ), - "Error : test_min failed - 2" ); + "test_min - 2" ); harness.check(!( Math.min( Integer.MAX_VALUE , Integer.MAX_VALUE -1 ) != Integer.MAX_VALUE -1 ), - "Error : test_min failed - 3" ); + "test_min - 3" ); harness.check(!( Math.min( 10 , 10 ) != 10 ), - "Error : test_min failed - 4" ); + "test_min - 4" ); harness.check(!( Math.min( 0 , -0 ) != -0 ), - "Error : test_min failed - 5" ); + "test_min - 5" ); harness.check(!( Math.min( 100L , 12L ) != 12L ), - "Error : test_min failed - 6" ); + "test_min - 6" ); harness.check(!( Math.min( Long.MIN_VALUE , Long.MIN_VALUE + 1 ) != Long.MIN_VALUE ), - "Error : test_min failed - 7" ); + "test_min - 7" ); harness.check(!( Math.min( Long.MAX_VALUE , Long.MAX_VALUE -1 ) != Long.MAX_VALUE -1 ), - "Error : test_min failed - 8" ); + "test_min - 8" ); harness.check(!( Math.min( 10L , 10L ) != 10L ), - "Error : test_min failed - 9" ); + "test_min - 9" ); harness.check(!( Math.min( 0L , -0L ) != -0L ), - "Error : test_min failed - 10" ); + "test_min - 10" ); harness.check(!( Math.min( 23.4f , 12.3f ) != 12.3f ), - "Error : test_min failed - 11" ); + "test_min - 11" ); harness.check(!( !(new Float(Math.min( Float.NaN , 1.0f ))).isNaN() ), - "Error : test_min failed - 12" ); + "test_min - 12" ); harness.check(!( Math.min( 10.0f , 10.0f ) != 10.0f ), - "Error : test_min failed - 13" ); + "test_min - 13" ); harness.check(!( Math.min( 0.0f , -0.0f ) != -0.0f ), - "Error : test_min failed - 14" ); + "test_min - 14" ); harness.check(!( Math.min( 23.4 , 12.3 ) != 12.3 ), - "Error : test_min failed - 15" ); + "test_min - 15" ); harness.check(!( !(new Double(Math.min( Double.NaN , 1.0 ))).isNaN() ), - "Error : test_min failed - 16" ); + "test_min - 16" ); harness.check(!( Math.min( 10.0 , 10.0 ) != 10.0 ), - "Error : test_min failed - 17" ); + "test_min - 17" ); harness.check(!( Math.min( 0.0 , -0.0 ) != -0.0 ), - "Error : test_min failed - 18" ); + "test_min - 18" ); } public void test_max() { harness.check(!( Math.max( 100 , 12 ) != 100 ), - "Error : test_max failed - 1" ); + "test_max - 1" ); harness.check(!( Math.max( Integer.MAX_VALUE , Integer.MAX_VALUE - 1 ) != Integer.MAX_VALUE ), - "Error : test_max failed - 2" ); + "test_max - 2" ); harness.check(!( Math.max( Integer.MIN_VALUE , Integer.MIN_VALUE + 1 ) != Integer.MIN_VALUE +1 ), - "Error : test_max failed - 3" ); + "test_max - 3" ); harness.check(!( Math.max( 10 , 10 ) != 10 ), - "Error : test_max failed - 4" ); + "test_max - 4" ); harness.check(!( Math.max( 0 , -0 ) != 0 ), - "Error : test_max failed - 5" ); + "test_max - 5" ); harness.check(!( Math.max( 100L , 12L ) != 100L ), - "Error : test_max failed - 6" ); + "test_max - 6" ); harness.check(!( Math.max( Long.MAX_VALUE , Long.MAX_VALUE - 1 ) != Long.MAX_VALUE ), - "Error : test_max failed - 7" ); + "test_max - 7" ); harness.check(!( Math.max( Long.MIN_VALUE , Long.MIN_VALUE +1 ) != Long.MIN_VALUE + 1 ), - "Error : test_max failed - 8" ); + "test_max - 8" ); harness.check(!( Math.max( 10L , 10L ) != 10L ), - "Error : test_max failed - 9" ); + "test_max - 9" ); harness.check(!( Math.max( 0L , -0L ) != 0L ), - "Error : test_max failed - 10" ); + "test_max - 10" ); harness.check(!( Math.max( 23.4f , 12.3f ) != 23.4f ), - "Error : test_max failed - 11" ); + "test_max - 11" ); harness.check(!( !(new Float(Math.max( Float.NaN , 1.0f ))).isNaN() ), - "Error : test_max failed - 12" ); + "test_max - 12" ); harness.check(!( Math.max( 10.0f , 10.0f ) != 10.0f ), - "Error : test_max failed - 13" ); + "test_max - 13" ); harness.check(!( Math.max( 0.0f , -0.0f ) != 0.0f ), - "Error : test_max failed - 14" ); + "test_max - 14" ); harness.check(!( Math.max( 23.4 , 12.3 ) != 23.4 ), - "Error : test_max failed - 15" ); + "test_max - 15" ); harness.check(!( !(new Double(Math.max( Double.NaN , 1.0 ))).isNaN() ), - "Error : test_max failed - 16" ); + "test_max - 16" ); harness.check(!( Math.max( 10.0 , 10.0 ) != 10.0 ), - "Error : test_max failed - 17" ); + "test_max - 17" ); harness.check(!( Math.max( 0.0 , -0.0 ) != 0.0 ), - "Error : test_max failed - 18" ); + "test_max - 18" ); } Index: ./gnu/testlet/java/lang/Short/ShortTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Short/ShortTest.java,v retrieving revision 1.3 diff -u -u -r1.3 ShortTest.java --- ./gnu/testlet/java/lang/Short/ShortTest.java 21 Feb 2005 15:52:48 -0000 1.3 +++ ./gnu/testlet/java/lang/Short/ShortTest.java 22 Jan 2006 21:14:49 -0000 @@ -32,25 +32,25 @@ { harness.check(!( Short.MIN_VALUE != -32768 || Short.MAX_VALUE != 32767 ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); Short i1 = new Short((short)100); harness.check(!( i1.shortValue() != 100 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Short("234")).shortValue() != 234 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } try { harness.check(!( (new Short("-FF")).shortValue() != -255 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { @@ -58,31 +58,31 @@ try { new Short("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { } harness.check(!( Short.decode( "123").shortValue() != 123 ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); harness.check(!( Short.decode( "32767").shortValue() != 32767 ), - "Error: test_Basics failed - 7" ); + "test_Basics - 7" ); } public void test_toString() { harness.check(!( !( new Short((short)123)).toString().equals("123")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Short((short)-44)).toString().equals("-44")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Short.toString((short) 234 ).equals ("234" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Short.toString((short) -34 ).equals ("-34" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Short.toString((short) -34 ).equals ("-34" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); } @@ -92,16 +92,16 @@ Short i2 = new Short((short)-23); harness.check(!( !i1.equals( new Short((short)23))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Short((short)-23))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); } public void test_hashCode( ) @@ -110,7 +110,7 @@ Short b2 = new Short((short)-3439); harness.check(!( b1.hashCode() != 3439 || b2.hashCode() != -3439 ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } public void test_intValue( ) @@ -119,10 +119,10 @@ Short b2 = new Short((short)-32767); harness.check(!( b1.intValue() != 32767 ), - "Error: test_intValue returned wrong results - 1" ); + "test_intValue - 1" ); harness.check(!( b2.intValue() != -32767 ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); } public void test_longValue( ) @@ -131,10 +131,10 @@ Short b2 = new Short((short)-3767); harness.check(!( b1.longValue() != (long)3767 ), - "Error: test_longValue returned wrong results - 1" ); + "test_longValue - 1" ); harness.check(!( b2.longValue() != -3767 ), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_floatValue( ) { @@ -142,10 +142,10 @@ Short b2 = new Short((short)-3276); harness.check(!( b1.floatValue() != 3276.0f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != -3276.0f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_doubleValue( ) { @@ -153,10 +153,10 @@ Short b2 = new Short((short)30); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_shortbyteValue( ) @@ -165,52 +165,52 @@ Short b2 = new Short((short)300); harness.check(!( b1.byteValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( b2.byteValue() != (byte)300 ), - "Error: test_shortbyteValue returned wrong results - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( b1.shortValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( b2.shortValue() != (short)300 ), - "Error: test_shortbyteValue returned wrong results - 4" ); + "test_shortbyteValue - 4" ); harness.check(!( ((Number)b1).shortValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 5" ); + "test_shortbyteValue - 5" ); harness.check(!( ((Number)b2).byteValue() != (byte)300 ), - "Error: test_shortbyteValue returned wrong results - 6" ); + "test_shortbyteValue - 6" ); } public void test_parseShort() { harness.check(!( Short.parseShort("473") != Short.parseShort("473" , 10 )), - "Error: test_parseInt returned wrong results - 1" ); + "test_parseInt - 1" ); harness.check(!( Short.parseShort("0" , 10 ) != 0 ), - "Error: test_parseInt returned wrong results - 2" ); + "test_parseInt - 2" ); harness.check(!( Short.parseShort("473" , 10 ) != 473 ), - "Error: test_parseInt returned wrong results - 3" ); + "test_parseInt - 3" ); harness.check(!( Short.parseShort("-0" , 10 ) != 0 ), - "Error: test_parseInt returned wrong results - 4" ); + "test_parseInt - 4" ); harness.check(!( Short.parseShort("-FF" , 16 ) != -255 ), - "Error: test_parseInt returned wrong results - 5" ); + "test_parseInt - 5" ); harness.check(!( Short.parseShort("1100110" , 2 ) != 102 ), - "Error: test_parseInt returned wrong results - 6" ); + "test_parseInt - 6" ); try { Short.parseShort("99" , 8 ); - harness.fail("Error: test_parseInt returned wrong results - 10" ); + harness.fail("test_parseInt - 10" ); }catch ( NumberFormatException e ){} try { Short.parseShort("kona" , 10 ); - harness.fail("Error: test_parseInt returned wrong results - 11" ); + harness.fail("test_parseInt - 11" ); }catch ( NumberFormatException e ){} } public void test_valueOf( ) { harness.check(!( Short.valueOf("21234").intValue() != Short.parseShort("21234")), - "Error: test_valueOf returned wrong results - 1" ); + "test_valueOf - 1" ); } public void testall() Index: ./gnu/testlet/java/lang/String/StringTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/String/StringTest.java,v retrieving revision 1.5 diff -u -u -r1.5 StringTest.java --- ./gnu/testlet/java/lang/String/StringTest.java 21 Feb 2005 15:52:48 -0000 1.5 +++ ./gnu/testlet/java/lang/String/StringTest.java 22 Jan 2006 21:14:49 -0000 @@ -32,40 +32,40 @@ { String str1 = new String(); harness.check(!( str1.length() != 0 ), - "Error : test_Basics failed - 1"); + "test_Basics - 1"); harness.check(!( !str1.toString().equals("")), - "Error : test_Basics failed - 2"); + "test_Basics - 2"); String str2 = new String("testing" ); harness.check(!( str2.length() != 7 ), - "Error : test_Basics failed - 3"); + "test_Basics - 3"); harness.check(!( !str2.toString().equals("testing")), - "Error : test_Basics failed - 4"); + "test_Basics - 4"); try { String str = null; String str3 = new String(str); - harness.fail("Error : test_Basics failed - 5"); + harness.fail("test_Basics - 5"); } catch ( NullPointerException e ){} String str4 = new String( new StringBuffer("hi there")); harness.check(!( str4.length () != 8 ), - "Error : test_Basics failed - 6"); + "test_Basics - 6"); harness.check(!( !str4.toString().equals("hi there")), - "Error : test_Basics failed - 7"); + "test_Basics - 7"); char cdata[] = { 'h' , 'e' , 'l' , 'l' , 'o' }; String str5 = new String( cdata ); harness.check(!( str5.length () != 5 ), - "Error : test_Basics failed - 8"); + "test_Basics - 8"); harness.check(!( !str5.toString().equals("hello")), - "Error : test_Basics failed - 9"); + "test_Basics - 9"); try { String str6 = new String( cdata , 0 , 10 ); - harness.fail("Error : test_Basics failed - 10"); + harness.fail("test_Basics - 10"); }catch ( IndexOutOfBoundsException e ) {} @@ -73,18 +73,18 @@ try { byte [] barr = null; String str7 = new String( barr , 0 , 10 ); - harness.fail("Error : test_Basics failed - 11"); + harness.fail("test_Basics - 11"); }catch ( NullPointerException e ) {} String str8 = new String( cdata , 0 , 4 ); harness.check(!( !str8.equals("hell")), - "Error : test_Basics failed - 12"); + "test_Basics - 12"); try { String str10 = new String( null , 10 ); - harness.fail("Error : test_Basics failed - 13"); + harness.fail("test_Basics - 13"); }catch ( NullPointerException e ) {} @@ -97,18 +97,18 @@ byte b = (byte)(ch & 0x00ff ); harness.check(!( i != 10 || b != 'a' ), - "Error : test_Basics failed - 14"); + "test_Basics - 14"); byte bnull [] = null; try { String str11 = new String( bnull , 10 , 0 , 5); - harness.fail("Error : test_Basics failed - 15"); + harness.fail("test_Basics - 15"); }catch ( NullPointerException e ){} try { String str12 = new String( bdata , 10 , -1 , 3); - harness.fail("Error : test_Basics failed - 16"); + harness.fail("test_Basics - 16"); }catch ( IndexOutOfBoundsException e ){} @@ -117,30 +117,30 @@ b = (byte)(ch & 0x00ff ); harness.check(!( i != 10 || b != 'a' ), - "Error : test_Basics failed - 17"); + "test_Basics - 17"); String str14 = new String( bdata); harness.check(!( !str14.equals("dancing")), - "Error : test_Basics failed - 18"); + "test_Basics - 18"); // EJWcr00461 byte arr[]={(byte)'a'}; String str15 = new String(arr,0x1234,0,1); if (!str15.equals("\u3461")) { - harness.fail("Error : test_Basics failed - 19"); + harness.fail("test_Basics - 19"); } // EJWcr00462 char carr[] = {'h','e','l','l','o'}; try { String str16 = new String(carr, Integer.MAX_VALUE, 1); - harness.fail("Error : test_Basics failed - 20"); + harness.fail("test_Basics - 20"); } catch (IndexOutOfBoundsException e) { } byte arr2[]={(byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e'}; try { String str17 = new String(arr2,0x1234,Integer.MAX_VALUE,1); - harness.fail("Error : test_Basics failed - 21"); + harness.fail("test_Basics - 21"); } catch (IndexOutOfBoundsException e) { } @@ -154,13 +154,13 @@ String str1 = "218943289"; harness.check(!( !str1.toString().equals("218943289")), - "Error : test_toString failed - 1"); + "test_toString - 1"); harness.check(!( str1 != "218943289" ), - "Error : test_toString failed - 2"); + "test_toString - 2"); harness.check(!( !str1.equals(str1.toString())), - "Error : test_toString failed - 3"); + "test_toString - 3"); } public void test_equals() @@ -168,19 +168,19 @@ String str2 = new String("Nectar"); harness.check(!( str2.equals( null )), - "Error : test_equals failed - 1"); + "test_equals - 1"); harness.check(!( !str2.equals("Nectar")), - "Error : test_equals failed - 2"); + "test_equals - 2"); harness.check(!( str2.equals("")), - "Error : test_equals failed - 3"); + "test_equals - 3"); harness.check(!( str2.equals("nectar")), - "Error : test_equals failed - 4"); + "test_equals - 4"); harness.check(!( !"".equals("")), - "Error : test_equals failed - 5"); + "test_equals - 5"); } @@ -193,33 +193,33 @@ int acthash1 = str1.hashCode(); harness.check(!( hash1 != acthash1 ), - "Error : test_hashCode failed - 1"); + "test_hashCode - 1"); } public void test_length() { harness.check(!( "".length() != 0 ), - "Error : test_length failed - 1"); + "test_length - 1"); harness.check(!( "pentium".length() != 7 ), - "Error : test_length failed - 2"); + "test_length - 2"); } public void test_charAt() { harness.check(!( "abcd".charAt(0) != 'a' || "abcd".charAt(1) != 'b' || "abcd".charAt(2) != 'c' || "abcd".charAt(3) != 'd' ), - "Error : test_charAt failed - 1"); + "test_charAt - 1"); try { char ch = "abcd".charAt(4); - harness.fail("Error : test_charAt failed - 2"); + harness.fail("test_charAt - 2"); } catch ( IndexOutOfBoundsException e ){} try { char ch = "abcd".charAt(-1); - harness.fail("Error : test_charAt failed - 3"); + harness.fail("test_charAt - 3"); } catch ( IndexOutOfBoundsException e ){} } @@ -230,52 +230,52 @@ try { str.getChars(0 , 3 , null , 1 ); - harness.fail("Error : test_getChars failed - 1"); + harness.fail("test_getChars - 1"); }catch ( NullPointerException e ){} char dst[] = new char[5]; try { str.getChars(-1 , 3 , dst , 1 ); - harness.fail("Error : test_getChars failed - 2"); + harness.fail("test_getChars - 2"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(4 , 3 , dst , 1 ); - harness.fail("Error : test_getChars failed - 3"); + harness.fail("test_getChars - 3"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 15 , dst , 1 ); - harness.fail("Error : test_getChars failed - 4"); + harness.fail("test_getChars - 4"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 5 , dst , -1 ); - harness.fail("Error : test_getChars failed - 5"); + harness.fail("test_getChars - 5"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 10 , dst , 1 ); - harness.fail("Error : test_getChars failed - 6"); + harness.fail("test_getChars - 6"); }catch ( IndexOutOfBoundsException e ){} str.getChars(0,5,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != 'b' || dst[2] != 'c' || dst[3] != 'd' || dst[4] != 'e' ), - "Error : test_getChars failed - 7"); + "test_getChars - 7"); dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = ' '; str.getChars(0,0,dst, 0 ); harness.check(!( dst[0] != ' ' || dst[1] != ' ' || dst[2] != ' ' || dst[3] != ' ' || dst[4] != ' ' ), - "Error : test_getChars failed - 9"); + "test_getChars - 9"); dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = ' '; str.getChars(0,1,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != ' ' || dst[2] != ' ' || dst[3] != ' ' || dst[4] != ' ' ), - "Error : test_getChars failed - 10"); + "test_getChars - 10"); } @@ -285,46 +285,46 @@ try { str.getBytes(0 , 3 , null , 1 ); - harness.fail("Error : test_getBytes failed - 1"); + harness.fail("test_getBytes - 1"); }catch ( NullPointerException e ){} byte dst[] = new byte[5]; try { str.getBytes(-1 , 3 , dst , 1 ); - harness.fail("Error : test_getBytes failed - 2"); + harness.fail("test_getBytes - 2"); }catch ( IndexOutOfBoundsException e ){} try { str.getBytes(4 , 3 , dst , 1 ); - harness.fail("Error : test_getBytes failed - 3"); + harness.fail("test_getBytes - 3"); }catch ( IndexOutOfBoundsException e ){} try { str.getBytes(1 , 15 , dst , 1 ); - harness.fail("Error : test_getBytes failed - 4"); + harness.fail("test_getBytes - 4"); }catch ( IndexOutOfBoundsException e ){} try { str.getBytes(1 , 5 , dst , -1 ); - harness.fail("Error : test_getBytes failed - 5"); + harness.fail("test_getBytes - 5"); }catch ( IndexOutOfBoundsException e ){} try { str.getBytes(1 , 10 , dst , 1 ); - harness.fail("Error : test_getBytes failed - 6"); + harness.fail("test_getBytes - 6"); }catch ( IndexOutOfBoundsException e ){} str.getBytes(0,5,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != 'b' || dst[2] != 'c' || dst[3] != 'd' || dst[4] != 'e' ), - "Error : test_getBytes failed - 7"); + "test_getBytes - 7"); byte [] dst1 = new byte[40]; dst1 = str.getBytes(); harness.check(!( dst1[0] != 'a' || dst1[1] != 'b' || dst1[2] != 'c' || dst1[3] != 'd' || dst1[4] != 'e' ), - "Error : test_getBytes failed - 8"); + "test_getBytes - 8"); } public void test_toCharArray() @@ -334,27 +334,27 @@ harness.check(!( charr[0] != 'a' || charr[1] != 'b' || charr[2] != 'c' || charr[3] != 'd' || charr[4] != 'e' ), - "Error : test_toCharArray failed - 1"); + "test_toCharArray - 1"); char [] charr1 = "".toCharArray(); harness.check(!( charr1.length > 0 ), - "Error : test_toCharArray failed - 2"); + "test_toCharArray - 2"); } public void test_equalsIgnoreCase() { harness.check(!( "hi".equalsIgnoreCase(null)), - "Error : test_equalsIgnoreCase failed - 1"); + "test_equalsIgnoreCase - 1"); harness.check(!( !"hi".equalsIgnoreCase("HI")), - "Error : test_equalsIgnoreCase failed - 2"); + "test_equalsIgnoreCase - 2"); harness.check(!( "hi".equalsIgnoreCase("pq")), - "Error : test_equalsIgnoreCase failed - 3"); + "test_equalsIgnoreCase - 3"); harness.check(!( "hi".equalsIgnoreCase("HI ")), - "Error : test_equalsIgnoreCase failed - 4"); + "test_equalsIgnoreCase - 4"); } @@ -362,311 +362,311 @@ { try { int res = "abc".compareTo(null); - harness.fail("Error : test_compareTo failed - 1"); + harness.fail("test_compareTo - 1"); } catch ( NullPointerException e ){} harness.check(!( "abc".compareTo("bcdef") >= 0 ), - "Error : test_compareTo failed - 2"); + "test_compareTo - 2"); harness.check(!( "abc".compareTo("abc") != 0 ), - "Error : test_compareTo failed - 3"); + "test_compareTo - 3"); harness.check(!( "abc".compareTo("aabc") <= 0 ), - "Error : test_compareTo failed - 4"); + "test_compareTo - 4"); harness.check(!( "abcd".compareTo("abc") <= 0 ), - "Error : test_compareTo failed - 5"); + "test_compareTo - 5"); harness.check(!( "".compareTo("abc") >= 0 ), - "Error : test_compareTo failed - 6"); + "test_compareTo - 6"); } public void test_regionMatches() { try { boolean res = "abc".regionMatches(0 , null , 0 , 2); - harness.fail("Error : test_regionMatches failed - 1"); + harness.fail("test_regionMatches - 1"); } catch ( NullPointerException e ){} harness.check(!( "abcd".regionMatches(-1 , "abcd" , 0 , 2 )), - "Error : test_regionMatches failed - 2"); + "test_regionMatches - 2"); harness.check(!( "abcd".regionMatches(0 , "abcd" , - 1 , 2 )), - "Error : test_regionMatches failed - 3"); + "test_regionMatches - 3"); harness.check(!( "abcd".regionMatches(0 , "abcd" , 0 , 10 )), - "Error : test_regionMatches failed - 4"); + "test_regionMatches - 4"); harness.check(!( "abcd".regionMatches(0 , "ab" , 0 , 3 )), - "Error : test_regionMatches failed - 5"); + "test_regionMatches - 5"); harness.check(!( !"abcd".regionMatches(1 , "abc" , 1 , 2 )), - "Error : test_regionMatches failed - 6"); + "test_regionMatches - 6"); harness.check(!( !"abcd".regionMatches(1 , "abc" , 1 , 0 )), - "Error : test_regionMatches failed - 7"); + "test_regionMatches - 7"); harness.check(!( "abcd".regionMatches(1 , "ABC" , 1 , 2 )), - "Error : test_regionMatches failed - 8"); + "test_regionMatches - 8"); try { boolean res = "abc".regionMatches(true , 0 , null , 0 , 2); - harness.fail("Error : test_regionMatches failed - 11"); + harness.fail("test_regionMatches - 11"); } catch ( NullPointerException e ){} harness.check(!( "abcd".regionMatches(true , -1 , "abcd" , 0 , 2 )), - "Error : test_regionMatches failed - 12"); + "test_regionMatches - 12"); harness.check(!( "abcd".regionMatches(true , 0 , "abcd" , - 1 , 2 )), - "Error : test_regionMatches failed - 13"); + "test_regionMatches - 13"); harness.check(!( "abcd".regionMatches(true , 0 , "abcd" , 0 , 10 )), - "Error : test_regionMatches failed - 14"); + "test_regionMatches - 14"); harness.check(!( "abcd".regionMatches(true , 0 , "ab" , 0 , 3 )), - "Error : test_regionMatches failed - 15"); + "test_regionMatches - 15"); harness.check(!( !"abcd".regionMatches(true , 1 , "abc" , 1 , 2 )), - "Error : test_regionMatches failed - 16"); + "test_regionMatches - 16"); harness.check(!( !"abcd".regionMatches(true , 1 , "abc" , 1 , 0 )), - "Error : test_regionMatches failed - 17"); + "test_regionMatches - 17"); harness.check(!( !"abcd".regionMatches(true , 1 , "ABC" , 1 , 2 )), - "Error : test_regionMatches failed - 18"); + "test_regionMatches - 18"); harness.check(!( "abcd".regionMatches(false , 1 , "ABC" , 1 , 2 )), - "Error : test_regionMatches failed - 19"); + "test_regionMatches - 19"); } public void test_startsWith() { harness.check(!( !"abcdef".startsWith( "abc")), - "Error : test_startsWith failed - 1"); + "test_startsWith - 1"); try { boolean b = "abcdef".startsWith( null ); - harness.fail("Error : test_startsWith failed - 2"); + harness.fail("test_startsWith - 2"); } catch ( NullPointerException e ){} harness.check(!( "abcdef".startsWith( "ABC")), - "Error : test_startsWith failed - 3"); + "test_startsWith - 3"); harness.check(!( !"abcdef".startsWith( "")), - "Error : test_startsWith failed - 4"); + "test_startsWith - 4"); harness.check(!( "abc".startsWith( "abcd")), - "Error : test_startsWith failed - 5"); + "test_startsWith - 5"); harness.check(!( !"abcdef".startsWith( "abc" , 0 )), - "Error : test_startsWith failed - 6"); + "test_startsWith - 6"); try { boolean b = "abcdef".startsWith( null ,0); - harness.fail("Error : test_startsWith failed - 7"); + harness.fail("test_startsWith - 7"); } catch ( NullPointerException e ){} harness.check(!( "abcdef".startsWith( "ABC", 2)), - "Error : test_startsWith failed - 8"); + "test_startsWith - 8"); harness.check(!( !"abcdef".startsWith( "", 0 )), - "Error : test_startsWith failed - 9"); + "test_startsWith - 9"); harness.check(!( "abc".startsWith( "abcd" , 3)), - "Error : test_startsWith failed - 10"); + "test_startsWith - 10"); harness.check(!( "abc".startsWith( "abc" , 10)), - "Error : test_startsWith failed - 11"); + "test_startsWith - 11"); } public void test_endsWith() { harness.check(!( !"abcdef".endsWith( "def")), - "Error : test_endsWith failed - 1"); + "test_endsWith - 1"); try { boolean b = "abcdef".endsWith( null ); - harness.fail("Error : test_endsWith failed - 2"); + harness.fail("test_endsWith - 2"); } catch ( NullPointerException e ){} harness.check(!( "abcdef".endsWith( "DEF")), - "Error : test_endsWith failed - 3"); + "test_endsWith - 3"); harness.check(!( !"abcdef".endsWith( "")), - "Error : test_endsWith failed - 4"); + "test_endsWith - 4"); harness.check(!( "bcde".endsWith( "abcd")), - "Error : test_endsWith failed - 5"); + "test_endsWith - 5"); } public void test_indexOf() { harness.check(!( "a".indexOf('a') != 0 ), - "Error : test_indexOf failed - 1"); + "test_indexOf - 1"); harness.check(!( "aabc".indexOf('c') != 3 ), - "Error : test_indexOf failed - 2"); + "test_indexOf - 2"); harness.check(!( "a".indexOf('c') != -1 ), - "Error : test_indexOf failed - 3"); + "test_indexOf - 3"); harness.check(!( "".indexOf('a') != -1 ), - "Error : test_indexOf failed - 4"); + "test_indexOf - 4"); harness.check(!( "abcde".indexOf('b', 3) != -1 ), - "Error : test_indexOf failed - 5"); + "test_indexOf - 5"); harness.check(!( "abcde".indexOf('b', 0) != 1 ), - "Error : test_indexOf failed - 6"); + "test_indexOf - 6"); harness.check(!( "abcdee".indexOf('e', 3) != 4 ), - "Error : test_indexOf failed - 7"); + "test_indexOf - 7"); harness.check(!( "abcdee".indexOf('e', 5) != 5 ), - "Error : test_indexOf failed - 8"); + "test_indexOf - 8"); harness.check(!( "abcdee".indexOf('e', -5) != 4 ), - "Error : test_indexOf failed - 9"); + "test_indexOf - 9"); harness.check(!( "abcdee".indexOf('e', 15) != -1 ), - "Error : test_indexOf failed - 10"); + "test_indexOf - 10"); harness.check(!( "abcdee".indexOf("babu") != -1 ), - "Error : test_indexOf failed - 11"); + "test_indexOf - 11"); try { int x = "abcdee".indexOf(null); - harness.fail("Error : test_indexOf failed - 12"); + harness.fail("test_indexOf - 12"); }catch ( NullPointerException e ){} harness.check(!( "abcdee".indexOf("") != 0 ), - "Error : test_indexOf failed - 13"); + "test_indexOf - 13"); harness.check(!( "abcdee".indexOf("ee") != 4 ), - "Error : test_indexOf failed - 14"); + "test_indexOf - 14"); harness.check(!( "abcbcbc".indexOf("cbc") != 2 ), - "Error : test_indexOf failed - 15"); + "test_indexOf - 15"); harness.check(!( "abcdee".indexOf("babu", 3) != -1 ), - "Error : test_indexOf failed - 16"); + "test_indexOf - 16"); try { int x = "abcdee".indexOf(null,0); - harness.fail("Error : test_indexOf failed - 17"); + harness.fail("test_indexOf - 17"); }catch ( NullPointerException e ){} harness.check(!( "abcdee".indexOf("", 0) != 0 ), - "Error : test_indexOf failed - 18"); + "test_indexOf - 18"); harness.check(!( "abcdee".indexOf("ee", 4) != 4 ), - "Error : test_indexOf failed - 19"); + "test_indexOf - 19"); harness.check(!( "abcbcbc".indexOf("cbc",4 ) != 4 ), - "Error : test_indexOf failed - 20"); + "test_indexOf - 20"); // EJWcr00463 if ( "hello \u5236 world".indexOf('\u5236') != 6 ) { - harness.fail("Error : test_indexOf failed - 21"); + harness.fail("test_indexOf - 21"); } if ( "hello \u0645 world".indexOf('\u0645') != 6 ) { - harness.fail("Error : test_indexOf failed - 22"); + harness.fail("test_indexOf - 22"); } if ( "hello \u07ff world".indexOf('\u07ff') != 6 ) { - harness.fail("Error : test_indexOf failed - 23"); + harness.fail("test_indexOf - 23"); } } public void test_lastIndexOf() { harness.check(!( "a".lastIndexOf('a') != 0 ), - "Error : test_lastIndexOf failed - 1"); + "test_lastIndexOf - 1"); harness.check(!( "aabc".lastIndexOf('c') != 3 ), - "Error : test_lastIndexOf failed - 2"); + "test_lastIndexOf - 2"); harness.check(!( "a".lastIndexOf('c') != -1 ), - "Error : test_lastIndexOf failed - 3"); + "test_lastIndexOf - 3"); harness.check(!( "".lastIndexOf('a') != -1 ), - "Error : test_lastIndexOf failed - 4"); + "test_lastIndexOf - 4"); harness.check(!( "abcde".lastIndexOf('b', 0) != -1 ), - "Error : test_lastIndexOf failed - 5"); + "test_lastIndexOf - 5"); harness.check(!( "abcde".lastIndexOf('b', 4) != 1 ), - "Error : test_lastIndexOf failed - 6"); + "test_lastIndexOf - 6"); harness.check(!( "abcdee".lastIndexOf('e', 7) != 5 ), - "Error : test_lastIndexOf failed - 7"); + "test_lastIndexOf - 7"); harness.check(!( "abcdee".lastIndexOf('e', 5) != 5 ), - "Error : test_lastIndexOf failed - 8"); + "test_lastIndexOf - 8"); harness.check(!( "abcdee".lastIndexOf('e', -5) != -1 ), - "Error : test_lastIndexOf failed - 9"); + "test_lastIndexOf - 9"); harness.check(!( "abcdee".lastIndexOf('e', 15) != 5 ), - "Error : test_lastIndexOf failed - 10"); + "test_lastIndexOf - 10"); harness.check(!( "abcdee".lastIndexOf("babu") != -1 ), - "Error : test_lastIndexOf failed - 11"); + "test_lastIndexOf - 11"); try { int x = "abcdee".lastIndexOf(null); - harness.fail("Error : test_lastIndexOf failed - 12"); + harness.fail("test_lastIndexOf - 12"); }catch ( NullPointerException e ){} harness.check(!( "abcdee".lastIndexOf("") != 6 ), - "Error : test_lastIndexOf failed - 13"); + "test_lastIndexOf - 13"); harness.check(!( "abcdee".lastIndexOf("ee") != 4 ), - "Error : test_lastIndexOf failed - 14"); + "test_lastIndexOf - 14"); harness.check(!( "abcbcbc".lastIndexOf("cbc") != 4 ), - "Error : test_lastIndexOf failed - 15"); + "test_lastIndexOf - 15"); harness.check(!( "abcdee".lastIndexOf("babu", 3) != -1 ), - "Error : test_lastIndexOf failed - 16"); + "test_lastIndexOf - 16"); try { int x = "abcdee".lastIndexOf(null,0); - harness.fail("Error : test_lastIndexOf failed - 17"); + harness.fail("test_lastIndexOf - 17"); }catch ( NullPointerException e ){} harness.check(!( "abcdee".lastIndexOf("", 0) != 0 ), - "Error : test_lastIndexOf failed - 18"); + "test_lastIndexOf - 18"); harness.check(!( "abcdee".lastIndexOf("ee", 4) != 4 ), - "Error : test_lastIndexOf failed - 19"); + "test_lastIndexOf - 19"); harness.check(!( "abcbcbc".lastIndexOf("cbc",3 ) != 2 ), - "Error : test_lastIndexOf failed - 20"); + "test_lastIndexOf - 20"); } public void test_substring() { harness.check(!( !"unhappy".substring(2).equals("happy")), - "Error : test_substring failed - 1"); + "test_substring - 1"); harness.check(!( !"Harbison".substring(3).equals("bison")), - "Error : test_substring failed - 2"); + "test_substring - 2"); harness.check(!( !"emptiness".substring(9).equals("")), - "Error : test_substring failed - 3"); + "test_substring - 3"); try { String str = "hi there".substring(-1); - harness.fail("Error : test_substring failed - 4"); + harness.fail("test_substring - 4"); }catch( IndexOutOfBoundsException e ){} try { String str = "hi there".substring(10); - harness.fail("Error : test_substring failed - 5"); + harness.fail("test_substring - 5"); }catch( IndexOutOfBoundsException e ){} harness.check(!( !"hamburger".substring(4,8).equals("urge")), - "Error : test_substring failed - 6"); + "test_substring - 6"); harness.check(!( !"smiles".substring(1,5).equals("mile")), - "Error : test_substring failed - 7"); + "test_substring - 7"); harness.check(!( !"emptiness".substring(2,2).equals("")), - "Error : test_substring failed - 8"); + "test_substring - 8"); try { String str = "hi there".substring(-1, 3); - harness.fail("Error : test_substring failed - 9"); + harness.fail("test_substring - 9"); }catch( IndexOutOfBoundsException e ){} try { String str = "hi there".substring(0, 10); - harness.fail("Error : test_substring failed - 10"); + harness.fail("test_substring - 10"); }catch( IndexOutOfBoundsException e ){} try { String str = "hi there".substring(7, 6); - harness.fail("Error : test_substring failed - 11"); + harness.fail("test_substring - 11"); }catch( IndexOutOfBoundsException e ){} @@ -676,31 +676,31 @@ { try { String str = "help".concat(null); - harness.fail("Error : test_concat failed - 1"); + harness.fail("test_concat - 1"); }catch ( NullPointerException e){} harness.check(!( !"help".concat("me").equals("helpme")), - "Error : test_concat failed - 2"); + "test_concat - 2"); harness.check(!( ! "to".concat("get").concat("her").equals("together")), - "Error : test_concat failed - 3"); + "test_concat - 3"); harness.check(!( "hi".concat("") != "hi"), - "Error : test_concat failed - 4"); + "test_concat - 4"); String str1 = "".concat("there"); harness.check(!( !str1.equals("there")), - "Error : test_concat failed - 5"); + "test_concat - 5"); // EJWcr00467 String str2 = new String(); try { str2 = str2.concat("hello"); if (!str2.equals("hello")) { - harness.fail("Error : test_concat failed - 7"); + harness.fail("test_concat - 7"); } } catch (Exception e) { - harness.fail("Error : test_concat failed - 6"); + harness.fail("test_concat - 6"); } } @@ -709,28 +709,28 @@ { harness.check(!( !"mesquite in your cellar".replace('e' , 'o' ).equals( "mosquito in your collar" )), - "Error : test_replace failed - 1"); + "test_replace - 1"); harness.check(!( !"the war of baronets".replace('r' , 'y' ).equals( "the way of bayonets" )), - "Error : test_replace failed - 2"); + "test_replace - 2"); harness.check(!( !"sparring with a purple porpoise".replace('p' , 't' ).equals( "starring with a turtle tortoise" )), - "Error : test_replace failed - 3"); + "test_replace - 3"); harness.check(!( !"JonL".replace('q' , 'x' ).equals("JonL" )), - "Error : test_replace failed - 4"); + "test_replace - 4"); harness.check(!( !"ppppppppppppp".replace('p' , 'p' ).equals("ppppppppppppp")), - "Error : test_replace failed - 5"); + "test_replace - 5"); harness.check(!( !"ppppppppppppp".replace('p' , '1' ).equals("1111111111111")), - "Error : test_replace failed - 6"); + "test_replace - 6"); harness.check(!( !"hp".replace('c' , 'd' ).equals("hp")), - "Error : test_replace failed - 7"); + "test_replace - 7"); harness.check(!( !"vmhere".replace('a' , 'd' ).equals("vmhere")), - "Error : test_replace failed - 8"); + "test_replace - 8"); } @@ -738,41 +738,41 @@ public void test_toLowerCase() { harness.check(!( !"".toLowerCase().equals("")), - "Error : test_toLowerCase failed - 1"); + "test_toLowerCase - 1"); harness.check(!( !"French Fries".toLowerCase().equals("french fries")), - "Error : test_toLowerCase failed - 2"); + "test_toLowerCase - 2"); harness.check(!( !"SMALL-VM".toLowerCase().equals("small-vm")), - "Error : test_toLowerCase failed - 3"); + "test_toLowerCase - 3"); } public void test_toUpperCase() { harness.check(!( !"".toUpperCase().equals("")), - "Error : test_toUpperCase failed - 1"); + "test_toUpperCase - 1"); harness.check(!( !"French Fries".toUpperCase().equals("FRENCH FRIES")), - "Error : test_toUpperCase failed - 2"); + "test_toUpperCase - 2"); harness.check(!( !"SMALL-VM".toUpperCase().equals("SMALL-VM")), - "Error : test_toUpperCase failed - 3"); + "test_toUpperCase - 3"); harness.check(!( !"small-jvm".toUpperCase().equals("SMALL-JVM")), - "Error : test_toUpperCase failed - 4"); + "test_toUpperCase - 4"); } public void test_valueOf() { harness.check(!( !String.valueOf((Object)null).equals("null")), - "Error : test_valueOf failed - 1"); + "test_valueOf - 1"); Object obj = new Object(); harness.check(!( !String.valueOf(obj).equals(obj.toString())), - "Error : test_valueOf failed - 2"); + "test_valueOf - 2"); try { @@ -782,60 +782,60 @@ char [] data = { 'h' , 'e' , 'l' , 'l' , 'o' }; harness.check(!( !String.valueOf( data ).equals("hello")), - "Error : test_valueOf failed - 3"); + "test_valueOf - 3"); harness.check(!( !String.copyValueOf( data ).equals("hello")), - "Error : test_valueOf failed - 3a"); + "test_valueOf - 3a"); try { String str = String.valueOf(data , -1 , 4 ); - harness.fail("Error : test_valueOf failed - 4"); + harness.fail("test_valueOf - 4"); }catch ( IndexOutOfBoundsException e ){} try { String str = String.valueOf(data , 1 , 5 ); - harness.fail("Error : test_valueOf failed - 5"); + harness.fail("test_valueOf - 5"); }catch ( IndexOutOfBoundsException e ){} try { String str = String.valueOf(data , 1 , -5 ); - harness.fail("Error : test_valueOf failed - 6"); + harness.fail("test_valueOf - 6"); }catch ( IndexOutOfBoundsException e ){} try { String str = String.valueOf(null , 1 , 3 ); - harness.fail("Error : test_valueOf failed - 7"); + harness.fail("test_valueOf - 7"); }catch ( NullPointerException e ){} harness.check(!( !String.valueOf(data , 2 , 2 ).equals("ll")), - "Error : test_valueOf failed - 8"); + "test_valueOf - 8"); harness.check(!( !String.copyValueOf(data , 2 , 2 ).equals("ll")), - "Error : test_valueOf failed - 8a"); + "test_valueOf - 8a"); harness.check(!( !String.valueOf(true).equals("true")), - "Error : test_valueOf failed - 9"); + "test_valueOf - 9"); harness.check(!( !String.valueOf(false).equals("false")), - "Error : test_valueOf failed - 10"); + "test_valueOf - 10"); harness.check(!( !String.valueOf('c').equals("c")), - "Error : test_valueOf failed - 11"); + "test_valueOf - 11"); harness.check(!( !String.valueOf(' ').equals(" ")), - "Error : test_valueOf failed - 12"); + "test_valueOf - 12"); harness.check(!( !String.valueOf(234).equals("234")), - "Error : test_valueOf failed - 13"); + "test_valueOf - 13"); harness.check(!( !String.valueOf(234L).equals("234")), - "Error : test_valueOf failed - 14"); + "test_valueOf - 14"); harness.check(!( !String.valueOf(23.45f).equals("23.45")), - "Error : test_valueOf failed - 15"); + "test_valueOf - 15"); harness.check(!( !String.valueOf(23.4).equals("23.4")), - "Error : test_valueOf failed - 16"); + "test_valueOf - 16"); } public void test_intern() @@ -843,24 +843,24 @@ String hp = "hp"; String nullstr = ""; harness.check(!( "hp".intern() != hp.intern()), - "Error : test_intern failed - 1"); + "test_intern - 1"); harness.check(!( "pqr".intern() == hp.intern()), - "Error : test_intern failed - 2"); + "test_intern - 2"); harness.check(!( "".intern() != nullstr.intern()), - "Error : test_intern failed - 3"); + "test_intern - 3"); harness.check(!( "".intern() == hp.intern()), - "Error : test_intern failed - 4"); + "test_intern - 4"); hp = ""; harness.check(!( "".intern() != hp.intern()), - "Error : test_intern failed - 5"); + "test_intern - 5"); StringBuffer buff= new StringBuffer(); buff.append('a'); buff.append('b'); harness.check(!( "ab".intern() != buff.toString().intern()), - "Error : test_intern failed - 6"); + "test_intern - 6"); StringBuffer buff1 = new StringBuffer(); harness.check(!( "".intern() != buff1.toString().intern()), - "Error : test_intern failed - 7"); + "test_intern - 7"); } public void test_trim() Index: ./gnu/testlet/java/lang/StringBuffer/StringBufferTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/StringBuffer/StringBufferTest.java,v retrieving revision 1.6 diff -u -u -r1.6 StringBufferTest.java --- ./gnu/testlet/java/lang/StringBuffer/StringBufferTest.java 21 Feb 2005 15:52:49 -0000 1.6 +++ ./gnu/testlet/java/lang/StringBuffer/StringBufferTest.java 22 Jan 2006 21:14:50 -0000 @@ -32,20 +32,20 @@ { try { StringBuffer str0 = new StringBuffer(-10); - harness.fail("Error : test_Basics failed - 0"); + harness.fail("test_Basics - 0"); }catch ( NegativeArraySizeException e ){} StringBuffer str1 = new StringBuffer(); harness.check(!( str1.length() != 0 || str1.capacity() != 16 ), - "Error : test_Basics failed - 1"); + "test_Basics - 1"); harness.check(!( !str1.toString().equals("")), - "Error : test_Basics failed - 2"); + "test_Basics - 2"); StringBuffer str2 = new StringBuffer( "testing" ); harness.check(!( str2.length() != 7 ), - "Error : test_Basics failed - 3"); + "test_Basics - 3"); harness.check(!( !str2.toString().equals("testing")), - "Error : test_Basics failed - 4"); + "test_Basics - 4"); try { @@ -60,7 +60,7 @@ thaht reason, this test is commented out here: it's not a failure. - harness.fail("Error : test_Basics failed - 5"); + harness.fail("test_Basics - 5"); */ } @@ -68,17 +68,17 @@ StringBuffer str4 = new StringBuffer("hi there"); harness.check(!( str4.length () != 8 || str4.capacity () != 24 ), - "Error : test_Basics failed - 6"); + "test_Basics - 6"); harness.check(!( !str4.toString().equals("hi there")), - "Error : test_Basics failed - 7"); + "test_Basics - 7"); StringBuffer strbuf = new StringBuffer(0); harness.check(!( ! strbuf.append("hiii").toString().equals("hiii")), - "Error : test_Basics failed - 8"); + "test_Basics - 8"); strbuf = new StringBuffer(10); harness.check(!( strbuf.capacity() != 10 ), - "Error : test_Basics failed - 9"); + "test_Basics - 9"); } @@ -88,11 +88,11 @@ StringBuffer str1 = new StringBuffer("218943289"); harness.check(!( !str1.toString().equals("218943289")), - "Error : test_toString failed - 1"); + "test_toString - 1"); str1 = new StringBuffer(); harness.check(!( !str1.toString().equals("")), - "Error : test_toString failed - 2"); + "test_toString - 2"); } public void test_length() @@ -101,10 +101,10 @@ StringBuffer buf2 = new StringBuffer("pentium"); harness.check(!( buf1.length() != 0 ), - "Error : test_length failed - 1"); + "test_length - 1"); harness.check(!( buf2.length() != 7 ), - "Error : test_length failed - 2"); + "test_length - 2"); } public void test_capacity() @@ -113,18 +113,18 @@ StringBuffer buf2 = new StringBuffer("pentiumpentiumpentium"); harness.check(!( buf1.capacity() != 16 ), - "Error : test_capacity failed - 1"); + "test_capacity - 1"); int cap = buf2.capacity(); harness.check(!( cap != 37 ), - "Error : test_capacity failed - 2"); + "test_capacity - 2"); buf1.ensureCapacity( 17); // CYGNUS: This is a test for JDK 1.2 conformance harness.check(!( buf1.capacity() != 34 ), - "Error : test_capacity failed - 3"); + "test_capacity - 3"); } public void test_setLength() @@ -133,17 +133,17 @@ try { strbuf.setLength( -10); - harness.fail("Error : test_setLength failed - 1"); + harness.fail("test_setLength - 1"); } catch ( IndexOutOfBoundsException e ){} strbuf.setLength( 4 ); harness.check(!(strbuf.length() != 4 ), - "Error : test_setLength failed - 2"); + "test_setLength - 2"); harness.check(!( strbuf.charAt(0 ) != 'b' || strbuf.charAt(1 ) != 'a' || strbuf.charAt(2 ) != '\u0000' || strbuf.charAt(3 ) != '\u0000' ), - "Error : test_setLength failed - 3"); + "test_setLength - 3"); } public void test_charAt() @@ -153,17 +153,17 @@ (new StringBuffer("abcd")).charAt(2) != 'c' || (new StringBuffer("abcd")).charAt(3) != 'd' ), - "Error : test_charAt failed - 1"); + "test_charAt - 1"); try { char ch = (new StringBuffer("abcd")).charAt(4); - harness.fail("Error : test_charAt failed - 2"); + harness.fail("test_charAt - 2"); } catch ( IndexOutOfBoundsException e ){} try { char ch = (new StringBuffer("abcd")).charAt(-1); - harness.fail("Error : test_charAt failed - 3"); + harness.fail("test_charAt - 3"); } catch ( IndexOutOfBoundsException e ){} } @@ -174,53 +174,53 @@ try { str.getChars(0 , 3 , null , 1 ); - harness.fail("Error : test_getChars failed - 1"); + harness.fail("test_getChars - 1"); }catch ( NullPointerException e ){} char dst[] = new char[5]; try { str.getChars(-1 , 3 , dst , 1 ); - harness.fail("Error : test_getChars failed - 2"); + harness.fail("test_getChars - 2"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(4 , 3 , dst , 3 ); // CYGNUS: This is a test for JDK 1.2 conformance - harness.fail("Error : test_getChars failed - 3"); + harness.fail("test_getChars - 3"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 15 , dst , 1 ); - harness.fail("Error : test_getChars failed - 4"); + harness.fail("test_getChars - 4"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 5 , dst , -1 ); - harness.fail("Error : test_getChars failed - 5"); + harness.fail("test_getChars - 5"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 10 , dst , 1 ); - harness.fail("Error : test_getChars failed - 6"); + harness.fail("test_getChars - 6"); }catch ( IndexOutOfBoundsException e ){} str.getChars(0,5,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != 'b' || dst[2] != 'c' || dst[3] != 'd' || dst[4] != 'e' ), - "Error : test_getChars failed - 7"); + "test_getChars - 7"); dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = ' '; str.getChars(0,0,dst, 0 ); harness.check(!( dst[0] != ' ' || dst[1] != ' ' || dst[2] != ' ' || dst[3] != ' ' || dst[4] != ' ' ), - "Error : test_getChars failed - 9"); + "test_getChars - 9"); dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = ' '; str.getChars(0,1,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != ' ' || dst[2] != ' ' || dst[3] != ' ' || dst[4] != ' ' ), - "Error : test_getChars failed - 10"); + "test_getChars - 10"); dst = new char[25]; str.getChars(3,14,dst,12); @@ -233,53 +233,53 @@ StringBuffer str = new StringBuffer(); Object nullobj = null; harness.check(!( !str.append( nullobj ).toString().equals("null")), - "Error : test_append failed - 1"); + "test_append - 1"); harness.check(!( !str.append( new Integer(100) ).toString().equals("null100")), - "Error : test_append failed - 2"); + "test_append - 2"); StringBuffer str1 = new StringBuffer("hi"); str1 = str1.append( " there" ); str1 = str1.append( " buddy"); harness.check(!( !str1.toString().equals("hi there buddy")), - "Error : test_append failed - 2"); + "test_append - 2"); StringBuffer str2 = new StringBuffer(); str2 = str2.append("sdljfksdjfklsdjflksdjflkjsdlkfjlsdkjflksdjfklsd"); harness.check(!( !str2.toString().equals( "sdljfksdjfklsdjflksdjflkjsdlkfjlsdkjflksdjfklsd")), - "Error : test_append failed - 3"); + "test_append - 3"); char carr[] = null; StringBuffer str3 = new StringBuffer(); try { str3 = str3.append( carr ); - harness.fail("Error : test_append failed - 4"); + harness.fail("test_append - 4"); } catch ( NullPointerException e ){} char carr1[] = {'h','i','t','h','e','r'}; StringBuffer str4 = new StringBuffer("!"); harness.check(!( !str4.append( carr1 ).toString().equals("!hither")), - "Error : test_append failed - 5"); + "test_append - 5"); try { str3 = str3.append( carr , 0 , 3); - harness.fail("Error : test_append failed - 6"); + harness.fail("test_append - 6"); } catch ( NullPointerException e ){} str3 = new StringBuffer(); try { str3 = str3.append( carr1 , -1 , 3); - harness.fail("Error : test_append failed - 6"); + harness.fail("test_append - 6"); } catch ( IndexOutOfBoundsException e ){} try { str3 = str3.append ( carr1 , 0 , -3); - harness.fail("Error : test_append failed - 6"); + harness.fail("test_append - 6"); } catch ( IndexOutOfBoundsException e ){} @@ -287,35 +287,35 @@ StringBuffer str5 = new StringBuffer("!"); str5 = str5.append(carr1 , 2 , 3 ); harness.check(!( !str5.toString().equals("!the")), - "Error : test_append failed - 7"); + "test_append - 7"); str5 = new StringBuffer(); str5 = str5.append( true ); harness.check(!( !str5.toString().equals("true")), - "Error : test_append failed - 8"); + "test_append - 8"); str5 = str5.append( false ); harness.check(!( !str5.toString().equals("truefalse")), - "Error : test_append failed - 9"); + "test_append - 9"); str5 = str5.append( 20); harness.check(!( !str5.toString().equals("truefalse20")), - "Error : test_append failed - 10"); + "test_append - 10"); str5 = new StringBuffer(); str5 = str5.append( 2034L ); harness.check(!( !str5.toString().equals("2034")), - "Error : test_append failed - 11"); + "test_append - 11"); str5 = new StringBuffer(); str5 = str5.append( 34.45f ); harness.check(!( !str5.toString().equals("34.45")), - "Error : test_append failed - 12"); + "test_append - 12"); str5 = new StringBuffer(); str5 = str5.append( 34.46 ); harness.check(!( !str5.toString().equals("34.46")), - "Error : test_append failed - 13"); + "test_append - 13"); } public void test_insert() @@ -324,92 +324,92 @@ Object obj = null; buf = buf.insert(5 , obj); harness.check(!( !buf.toString().equals("12345null67")), - "Error : test_insert failed - 1"); + "test_insert - 1"); try { buf = buf.insert(-1 , new Object()); - harness.fail("Error : test_insert failed - 2"); + harness.fail("test_insert - 2"); }catch ( IndexOutOfBoundsException e ){} buf = new StringBuffer("1234567"); try { buf = buf.insert(8 , new Object() ); - harness.fail("Error : test_insert failed - 3"); + harness.fail("test_insert - 3"); }catch ( IndexOutOfBoundsException e ){} buf = new StringBuffer("1234567"); buf = buf.insert(4 , "inserted" ); harness.check(!( !buf.toString().equals("1234inserted567")), - "Error : test_insert failed - 4"); + "test_insert - 4"); buf = new StringBuffer("1234567"); char cdata[] = null; try { buf = buf.insert(4 , cdata ); - harness.fail("Error : test_insert failed - 5"); + harness.fail("test_insert - 5"); }catch ( NullPointerException e ) {} cdata = new char[2]; try { buf = buf.insert(-1 , cdata ); - harness.fail("Error : test_insert failed - 6"); + harness.fail("test_insert - 6"); }catch ( IndexOutOfBoundsException e ){} try { buf = buf.insert(8 , cdata ); - harness.fail("Error : test_insert failed - 7"); + harness.fail("test_insert - 7"); }catch ( IndexOutOfBoundsException e ){} buf = new StringBuffer("1234567"); char cdata1[] = {'h','e','l','l','o'}; buf = buf.insert(4 , cdata1 ); harness.check(!( !buf.toString().equals("1234hello567")), - "Error : test_insert failed - 8"); + "test_insert - 8"); buf = new StringBuffer("1234567"); buf = buf.insert(0 , true ); harness.check(!( !buf.toString().equals("true1234567")), - "Error : test_insert failed - 9"); + "test_insert - 9"); buf = new StringBuffer("1234567"); buf = buf.insert(7 , false ); harness.check(!( !buf.toString().equals("1234567false")), - "Error : test_insert failed - 10"); + "test_insert - 10"); buf = new StringBuffer("1234567"); buf = buf.insert(0 , 'c' ); harness.check(!( !buf.toString().equals("c1234567")), - "Error : test_insert failed - 11"); + "test_insert - 11"); buf = new StringBuffer("1234567"); buf = buf.insert(7 , 'b' ); harness.check(!( !buf.toString().equals("1234567b")), - "Error : test_insert failed - 12"); + "test_insert - 12"); buf = new StringBuffer("1234567"); buf = buf.insert(7 , 999 ); harness.check(!( !buf.toString().equals("1234567999")), - "Error : test_insert failed - 13"); + "test_insert - 13"); buf = new StringBuffer("1234567"); buf = buf.insert(0, 99.9f ); harness.check(!( !buf.toString().equals("99.91234567")), - "Error : test_insert failed - 14"); + "test_insert - 14"); buf = new StringBuffer("1234567"); buf = buf.insert(3, 34.46 ); harness.check(!( !buf.toString().equals("12334.464567")), - "Error : test_insert failed - 15 " + "test_insert - 15 " + buf.toString()); buf = new StringBuffer("1234567"); buf = buf.insert(3, (long)1230 ); harness.check(!( !buf.toString().equals("12312304567")), - "Error : test_insert failed - 16 " + "test_insert - 16 " + buf.toString()); } @@ -418,23 +418,23 @@ { StringBuffer buff = new StringBuffer(); harness.check(!( !buff.reverse().toString().equals("")), - "Error : test_reverse failed - 1"); + "test_reverse - 1"); buff = new StringBuffer("babu"); harness.check(!( !buff.reverse().toString().equals("ubab")), - "Error : test_reverse failed - 2"); + "test_reverse - 2"); buff = new StringBuffer("malayalam"); harness.check(!( !buff.reverse().toString().equals("malayalam")), - "Error : test_reverse failed - 3"); + "test_reverse - 3"); buff = new StringBuffer("cnbcbnc"); harness.check(!( !buff.reverse().toString().equals("cnbcbnc")), - "Error : test_reverse failed - 4"); + "test_reverse - 4"); buff = new StringBuffer("vinod"); harness.check(!( !buff.reverse().toString().equals("doniv")), - "Error : test_reverse failed - 5"); + "test_reverse - 5"); } public void testall() From edwin.steiner@gmx.net Mon Jan 23 13:54:00 2006 From: edwin.steiner@gmx.net (Edwin Steiner) Date: Mon, 23 Jan 2006 13:54:00 -0000 Subject: Patch: misleading output "PASS: Error: ..." Message-ID: <20060123135358.GB29683@localhost.localdomain> Gah! I'm still in 2005. Resent with correct year. ;) -Edwin 2006-01-23 Edwin Steiner * gnu/testlet/java/lang/Byte/ByteTest.java, gnu/testlet/java/lang/Character/CharacterTest.java, gnu/testlet/java/lang/Double/DoubleTest.java, gnu/testlet/java/lang/Float/FloatTest.java, gnu/testlet/java/lang/Integer/IntegerTest.java, gnu/testlet/java/lang/Long/LongTest.java, gnu/testlet/java/lang/Math/MathTest.java, gnu/testlet/java/lang/Short/ShortTest.java, gnu/testlet/java/lang/String/StringTest.java, gnu/testlet/java/lang/StringBuffer/StringBufferTest.java: Cleaned up test names containing "Error", "failed", or "returned wrong results". Index: ./gnu/testlet/java/lang/Byte/ByteTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Byte/ByteTest.java,v retrieving revision 1.3 diff -u -u -r1.3 ByteTest.java --- ./gnu/testlet/java/lang/Byte/ByteTest.java 21 Feb 2005 15:52:45 -0000 1.3 +++ ./gnu/testlet/java/lang/Byte/ByteTest.java 22 Jan 2006 21:14:49 -0000 @@ -30,20 +30,20 @@ public void test_Basics() { harness.check(!( Byte.MIN_VALUE != -128 ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); harness.check(!( Byte.MAX_VALUE != 127 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); Byte ch = new Byte((byte)'b'); harness.check(!( ch.byteValue() != (byte)'b' ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); Byte ch1 = new Byte("122"); harness.check(!( ch1.byteValue() != 122 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); harness.check(!( (Byte.valueOf( "120")).byteValue() != 120 ), - "Error: test_Basics failed - 5" ); + "test_Basics - 5" ); harness.check(!( (Byte.valueOf( "120")).byteValue() != 120 ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); } @@ -52,7 +52,7 @@ Byte ch = new Byte((byte)'a'); String str = ch.toString(); harness.check(!( str.length() != 2 || !str.equals("97")), - "Error: test_toString failed " ); + "test_toString" ); } @@ -63,7 +63,7 @@ Byte ch3 = new Byte((byte)'-'); harness.check(!( !ch1.equals(ch2) || ch1.equals(ch3) || ch1.equals(null)), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); } public void test_hashCode( ) @@ -71,28 +71,28 @@ Byte ch1 = new Byte((byte)'a'); harness.check(!( ch1.hashCode() != (int) 'a' ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } public void test_decode() { try { Byte.decode("1234"); - harness.fail("Error : test_decode failed - 1" ); + harness.fail("test_decode - 1" ); } catch ( NumberFormatException e ){} harness.check(!( Byte.decode("34").intValue() != 34 ), - "Error : test_decode failed - 2" ); + "test_decode - 2" ); try { Byte.decode("123.34"); - harness.fail("Error : test_decode failed - 3" ); + harness.fail("test_decode - 3" ); } catch ( NumberFormatException e ){} try { Byte.decode("ff"); - harness.fail("Error : test_decode failed - 4" ); + harness.fail("test_decode - 4" ); } catch ( NumberFormatException e ){} @@ -103,30 +103,30 @@ Byte b = new Byte( (byte)100 ); Byte b1 = new Byte((byte) -123 ); harness.check(!( b.intValue () != 100 ), - "Error : test_values failed - 1" ); + "test_values - 1" ); harness.check(!( b1.intValue () != -123 ), - "Error : test_values failed - 2" ); + "test_values - 2" ); harness.check(!( b.longValue () != 100 ), - "Error : test_values failed - 3" ); + "test_values - 3" ); harness.check(!( b1.longValue () != -123 ), - "Error : test_values failed - 4" ); + "test_values - 4" ); harness.check(!( b.floatValue () != 100.0f ), - "Error : test_values failed - 5" ); + "test_values - 5" ); harness.check(!( b1.floatValue () != -123.0f ), - "Error : test_values failed - 6" ); + "test_values - 6" ); harness.check(!( b.doubleValue () != 100.0 ), - "Error : test_values failed - 7" ); + "test_values - 7" ); harness.check(!( b1.doubleValue () != -123.0 ), - "Error : test_values failed - 8" ); + "test_values - 8" ); harness.check(!( b.shortValue () != 100 ), - "Error : test_values failed - 9" ); + "test_values - 9" ); harness.check(!( b1.shortValue () != -123 ), - "Error : test_values failed - 10" ); + "test_values - 10" ); harness.check(!( b.byteValue () != 100 ), - "Error : test_values failed - 11" ); + "test_values - 11" ); harness.check(!( b1.byteValue () != -123 ), - "Error : test_values failed - 12" ); + "test_values - 12" ); } public void testall() Index: ./gnu/testlet/java/lang/Character/CharacterTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Character/CharacterTest.java,v retrieving revision 1.3 diff -u -u -r1.3 CharacterTest.java --- ./gnu/testlet/java/lang/Character/CharacterTest.java 21 Feb 2005 15:52:45 -0000 1.3 +++ ./gnu/testlet/java/lang/Character/CharacterTest.java 22 Jan 2006 21:14:49 -0000 @@ -30,33 +30,33 @@ public void test_Basics() { harness.check(!(Character.forDigit(8, 2) != '\0'), - "Error: test_forDigit - 50"); + "test_forDigit - 50"); harness.check(!(Character.forDigit(-3, 2) != '\0'), - "Error: test_forDigit - 51"); + "test_forDigit - 51"); harness.check(!(Character.forDigit(2, 8) != '2'), - "Error: test_forDigit - 52"); + "test_forDigit - 52"); harness.check(!(Character.forDigit(12, 16) != 'c'), - "Error: test_forDigit - 53"); + "test_forDigit - 53"); harness.check(!(Character.isJavaLetter('\uFFFF')), - "Error: test_forDigit - 54"); + "test_forDigit - 54"); harness.check(!(!Character.isJavaLetter('a')), - "Error: test_forDigit - 55"); + "test_forDigit - 55"); harness.check(!( Character.MIN_VALUE != '\u0000' ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); harness.check(!( Character.MAX_VALUE != '\uffff' ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); harness.check(!( Character.MIN_RADIX != 2 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); harness.check(!( Character.MAX_RADIX != 36 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); Character ch = new Character('b'); harness.check(!( ch.charValue() != 'b' ), - "Error: test_Basics failed - 5" ); + "test_Basics - 5" ); } public void test_toString() @@ -65,7 +65,7 @@ String str = ch.toString(); harness.check(!( str.length() != 1 || !str.equals("a")), - "Error: test_toString failed " ); + "test_toString " ); } @@ -76,7 +76,7 @@ Character ch3 = new Character('-'); harness.check(!( !ch1.equals(ch2) || ch1.equals(ch3) || ch1.equals(null)), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); } public void test_hashCode( ) @@ -84,7 +84,7 @@ Character ch1 = new Character('a'); harness.check(!( ch1.hashCode() != (int) 'a' ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } @@ -96,7 +96,7 @@ !Character.isSpace('\n') || !Character.isSpace(' ') || Character.isSpace('+') ), - "Error: test_isSpace returned wrong results" ); + "test_isSpace" ); } @@ -104,9 +104,9 @@ { // radix wrong harness.check(!( Character.digit( 'a' , Character.MIN_RADIX - 1 ) != -1 ), - "Error: test_digit returned wrong results - 1" ); + "test_digit - 1" ); harness.check(!( Character.digit( 'a' , Character.MAX_RADIX + 1 ) != -1 ), - "Error: test_digit returned wrong results - 2" ); + "test_digit - 2" ); } @@ -141,9 +141,9 @@ // not supported Character.isJavaLetter( 'a' ); Character.isJavaLetterOrDigit( 'a' ); harness.check(!(Character.isJavaLetterOrDigit('\uFFFF')), - "Error: isJavaLetterOrDigit - 60"); + "isJavaLetterOrDigit - 60"); harness.check(!(Character.isLetterOrDigit('\uFFFF')), - "Error: isLetterOrDigit - 61"); + "isLetterOrDigit - 61"); // not supported Character.isLetter( 'a' ); Index: ./gnu/testlet/java/lang/Double/DoubleTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Double/DoubleTest.java,v retrieving revision 1.7 diff -u -u -r1.7 DoubleTest.java --- ./gnu/testlet/java/lang/Double/DoubleTest.java 21 Feb 2005 15:52:46 -0000 1.7 +++ ./gnu/testlet/java/lang/Double/DoubleTest.java 22 Jan 2006 21:14:49 -0000 @@ -42,27 +42,27 @@ Double nan2 = new Double(Double.NaN); if ( min1 != min2 ) { - harness.fail("Error: test_Basics failed - 1a"); + harness.fail("test_Basics - 1a"); System.out.println("Expected: " + min1); System.out.println("Got: " + min2); } if ( max1 != max2 ) { - harness.fail("Error: test_Basics failed - 1b"); + harness.fail("test_Basics - 1b"); System.out.println("Expected: " + max1); System.out.println("Got: " + max2); } if (ninf1 != ninf2) { - harness.fail("Error: test_Basics failed - 1c"); + harness.fail("test_Basics - 1c"); System.out.println("Expected: " + ninf1); System.out.println("Got: " + ninf2); } if (pinf1 != pinf2) { - harness.fail("Error: test_Basics failed - 1d"); + harness.fail("test_Basics - 1d"); System.out.println("Expected: " + pinf1); System.out.println("Got: " + pinf2); } if (!nan2.equals(nan1) ) { - harness.fail("Error: test_Basics failed CYGNUS: NaN.equals - 1e"); + harness.fail("test_Basics CYGNUS: NaN.equals - 1e"); System.out.println("Expected: " + nan1); System.out.println("Got: " + nan2); } @@ -70,110 +70,110 @@ Double i1 = new Double(100.5); harness.check(!( i1.doubleValue() != 100.5 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Double("234.34")).doubleValue() != 234.34 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } try { harness.check(!( (new Double("1.4e-45")).doubleValue() != 1.4e-45 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 4" ); + harness.fail("test_Basics - 4" ); } try { new Double("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { } harness.check(!( (new Double(3.4)).doubleValue() != 3.4 ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); Double nan = new Double(Double.NaN ); harness.check(!( !nan.isNaN()), - "Error: test_Basics failed - 7" ); + "test_Basics - 7" ); harness.check(!( (new Double(10.0f)).isNaN()), - "Error: test_Basics failed - 8" ); + "test_Basics - 8" ); harness.check(!( !Double.isNaN( Double.NaN )), - "Error: test_Basics failed - 9" ); + "test_Basics - 9" ); harness.check(!( !(new Double(Double.POSITIVE_INFINITY)).isInfinite()), - "Error: test_Basics failed - 10" ); + "test_Basics - 10" ); harness.check(!( !(new Double(Double.NEGATIVE_INFINITY)).isInfinite()), - "Error: test_Basics failed - 11" ); + "test_Basics - 11" ); harness.check(!( !( Double.isInfinite( Double.NEGATIVE_INFINITY))), - "Error: test_Basics failed - 12" ); + "test_Basics - 12" ); harness.check(!( !( Double.isInfinite( Double.POSITIVE_INFINITY))), - "Error: test_Basics failed - 13" ); + "test_Basics - 13" ); harness.check(!( 0.0 - 0.0 != 0.0), - "Error: test_Basics failed - 14" ); + "test_Basics - 14" ); harness.check(!( 0.0 + 0.0 != 0.0), - "Error: test_Basics failed - 15" ); + "test_Basics - 15" ); harness.check(!( 0.0 + -0.0 != 0.0), - "Error: test_Basics failed - 16" ); + "test_Basics - 16" ); harness.check(!( 0.0 - -0.0 != 0.0), - "Error: test_Basics failed - 17" ); + "test_Basics - 17" ); harness.check(!( -0.0 - 0.0 != -0.0), - "Error: test_Basics failed - 18" ); + "test_Basics - 18" ); harness.check(!( -0.0 + 0.0 != 0.0), - "Error: test_Basics failed - 19" ); + "test_Basics - 19" ); harness.check(!( -0.0 + -0.0 != -0.0), - "Error: test_Basics failed - 20" ); + "test_Basics - 20" ); harness.check(!( -0.0 - -0.0 != 0.0), - "Error: test_Basics failed - 21" ); + "test_Basics - 21" ); harness.check(!( !"0.0".equals(0.0 - 0.0 +"" )), - "Error: test_Basics failed - 22" ); + "test_Basics - 22" ); } public void test_toString() { harness.check(!( !( new Double(123.0)).toString().equals("123.0")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Double(-44.5343)).toString().equals("-44.5343")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Double.toString( 23.04 ).equals ("23.04" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Double.toString( Double.NaN ).equals ("NaN" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Double.toString( Double.POSITIVE_INFINITY ).equals ("Infinity" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); harness.check(!( !Double.toString( Double.NEGATIVE_INFINITY ).equals ("-Infinity" )), - "Error: test_toString failed - 6" ); + "test_toString - 6" ); harness.check(!( !Double.toString( 0.0 ).equals ("0.0" )), - "Error: test_toString failed - 7" ); + "test_toString - 7" ); String str; str = Double.toString( -0.0 ); harness.check(!( !str.equals ("-0.0" )), - "Error: test_toString failed - 8" ); + "test_toString - 8" ); str = Double.toString( -9412128.34 ); harness.check(!( !str.equals ("-9412128.34" )), - "Error: test_toString failed - 9" ); + "test_toString - 9" ); // The following case fails for some Sun JDKs (e.g. 1.3.1 // and 1.4.0) where toString(0.001) returns "0.0010". This @@ -181,21 +181,21 @@ // case has been noted as a comment to Sun Java bug #4642835 str = Double.toString( 0.001 ); if ( !Double.toString( 0.001 ).equals ("0.001" )) { - harness.fail("Error: test_toString failed - 10" ); + harness.fail("test_toString - 10" ); System.out.println("Expected: " + "0.001"); System.out.println("Got: " + Double.toString(0.001)); } str = Double.toString( 1e4d ); if ( !Double.toString( 1e4d ).equals ("10000.0" )) { - harness.fail("Error: test_toString failed - 11" ); + harness.fail("test_toString - 11" ); System.out.println("Expected: " + "10000.0"); System.out.println("Got: " + Double.toString(1e4d)); } str = Double.toString(33333333.33 ); if ( !(new Double( str)).equals(new Double(33333333.33))) { - harness.fail("Error: test_toString failed - 12" ); + harness.fail("test_toString - 12" ); System.out.println("Expected: " + (new Double(33333333.33)).toString()); System.out.println("Got: " + @@ -203,7 +203,7 @@ } str = Double.toString(-123232324253.32 ); if ( !(new Double( str)).equals(new Double(-123232324253.32))) { - harness.fail("Error: test_toString failed - 13" ); + harness.fail("test_toString - 13" ); System.out.println("Expected: " + (new Double(-123232324253.32)).toString()); System.out.println("Got: " + @@ -211,7 +211,7 @@ } str = Double.toString(1.243E10); if ( !(new Double( str)).equals(new Double(1.243E10))) { - harness.fail("Error: test_toString failed - 14" ); + harness.fail("test_toString - 14" ); System.out.println("Expected: " + (new Double(1.243E10)).toString()); System.out.println("Got: " + @@ -219,7 +219,7 @@ } str = Double.toString(-23.43E33); /* if ( !(new Double( str)).equals(new Double(-23.43E33))) - harness.fail("Error: test_toString failed - 14" ); + harness.fail("test_toString - 14" ); */ @@ -231,35 +231,35 @@ Double i2 = new Double(-2334.34E4); harness.check(!( !i1.equals( new Double(2334.34E4))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Double(-2334.34E4))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); double n1 = Double.NaN; double n2 = Double.NaN; harness.check(!( n1 == n2 ), - "Error: test_equals failed - 5" ); + "test_equals - 5" ); Double flt1 = new Double( Double.NaN); Double flt2 = new Double( Double.NaN); harness.check(!( !flt1.equals(flt2)), - "Error: test_equals failed CYGNUS: NaN.equals - 6" ); + "test_equals CYGNUS: NaN.equals - 6" ); harness.check(!( 0.0 != -0.0 ), - "Error: test_equals failed - 7" ); + "test_equals - 7" ); Double pzero = new Double( 0.0 ); Double nzero = new Double( -0.0 ); harness.check(!( pzero.equals(nzero) ), - "Error: test_equals failed CYGNUS: Double.equals - 8" ); + "test_equals CYGNUS: Double.equals - 8" ); } @@ -270,13 +270,13 @@ long lng1 = Double.doubleToLongBits( 3.4028235e+38); harness.check(!( flt1.hashCode() != (int) ( lng1^(lng1>>>32)) ), - "Error: test_hashCode returned wrong results - 1"); + "test_hashCode - 1"); Double flt2 = new Double( -2343323354.0 ); long lng2 = Double.doubleToLongBits( -2343323354.0 ); harness.check(!( flt2.hashCode() != (int) ( lng2^(lng2>>>32)) ), - "Error: test_hashCode returned wrong results - 2"); + "test_hashCode - 2"); } public void test_intValue( ) @@ -288,25 +288,25 @@ int i2 = b2.intValue(); harness.check(!( i1 != (int) 3.4e+32), - "Error: test_intValue returned wrong results CYGNUS: Float to int conversions - 1" ); + "test_intValue CYGNUS: Float to int conversions - 1" ); harness.check(!( i2 != (int) -23.45 ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); Double b3 = new Double(3000.54); harness.check(!( b3.intValue() != 3000 ), - "Error: test_intValue returned wrong results - 3" ); + "test_intValue - 3" ); Double b4 = new Double(32735.3249); harness.check(!( b4.intValue() != 32735 ), - "Error: test_intValue returned wrong results - 4" ); + "test_intValue - 4" ); Double b5 = new Double(-32735.3249); harness.check(!( b5.intValue() != -32735 ), - "Error: test_intValue returned wrong results - 5" ); + "test_intValue - 5" ); Double b6 = new Double(-32735.3249); harness.check(!( b6.intValue() != -32735 ), - "Error: test_intValue returned wrong results - 6" ); + "test_intValue - 6" ); Double b7 = new Double(0.0); harness.check(!( b7.intValue() != 0 ), - "Error: test_intValue returned wrong results - 7" ); + "test_intValue - 7" ); } public void test_longValue( ) @@ -315,10 +315,10 @@ Double b2 = new Double(-23.45); harness.check(!( b1.longValue() != (long) 3.4e+32), - "Error: test_longValue returned wrong results CYGNUS: Float to int conversions - 1" ); + "test_longValue CYGNUS: Float to int conversions - 1" ); harness.check(!( b2.longValue() != (long) -23.45 ), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_DoubleValue( ) @@ -327,10 +327,10 @@ Double b2 = new Double(-3276.32); harness.check(!( b1.doubleValue() != 3276.34 ), - "Error: test_DoubleValue returned wrong results - 1" ); + "test_DoubleValue - 1" ); harness.check(!( b2.doubleValue() != -3276.32 ), - "Error: test_DoubleValue returned wrong results - 2" ); + "test_DoubleValue - 2" ); } public void test_doubleValue( ) @@ -339,10 +339,10 @@ Double b2 = new Double(30.0); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_floatValue( ) @@ -351,17 +351,17 @@ Double b2 = new Double(30.0); harness.check(!( b1.floatValue() != 0.0f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != 30.0f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_valueOf( ) { try { Double.valueOf(null); - harness.fail("Error: test_valueOf returned wrong results - 1" ); + harness.fail("test_valueOf - 1" ); } catch ( NumberFormatException nfe ) {harness.check(false, "test_valueOf null should throw NullPointerException");} @@ -370,21 +370,21 @@ try { Double.valueOf("Kona"); - harness.fail("Error: test_valueOf returned wrong results - 2" ); + harness.fail("test_valueOf - 2" ); }catch( NumberFormatException e) {} harness.check(!( Double.valueOf( "3.4e+32" ).doubleValue() != 3.4e+32 ), - "Error: test_valueOf returned wrong results - 3" ); + "test_valueOf - 3" ); harness.check(!( Double.valueOf(" -23.45 ").doubleValue() != -23.45 ), - "Error: test_valueOf returned wrong results - 4" ); + "test_valueOf - 4" ); } public void test_parseDouble( ) { try { Double.parseDouble(null); - harness.fail("Error: test_parseDouble returned wrong results - 1" ); + harness.fail("test_parseDouble - 1" ); } catch ( NumberFormatException nfe ) {harness.check(false, "test_parseDouble null should throw NullPointerException");} @@ -393,26 +393,26 @@ try { Double.parseDouble("Kona"); - harness.fail("Error: test_parseDouble returned wrong results - 2" ); + harness.fail("test_parseDouble - 2" ); }catch( NumberFormatException e) {} harness.check(!( Double.parseDouble( "3.4e+32" ) != 3.4e+32 ), - "Error: test_parseDouble returned wrong results - 3" ); + "test_parseDouble - 3" ); harness.check(!( Double.parseDouble(" -23.45 ") != -23.45 ), - "Error: test_parseDouble returned wrong results - 4" ); + "test_parseDouble - 4" ); } public void test_doubleToLongBits() { harness.check(!( Double.doubleToLongBits( Double.POSITIVE_INFINITY ) != 0x7ff0000000000000L ), - "Error: test_doubleToLongBits returned wrong results - 1" ); + "test_doubleToLongBits - 1" ); harness.check(!( Double.doubleToLongBits( Double.NEGATIVE_INFINITY ) != 0xfff0000000000000L ), - "Error: test_doubleToLongBits returned wrong results - 2" ); + "test_doubleToLongBits - 2" ); long nanval = Double.doubleToLongBits( Double.NaN ); harness.check(!( nanval != 0x7ff8000000000000L ), - "Error: test_doubleToLongBits CYGNUS: NaN.doubleToLongBits" ); + "test_doubleToLongBits CYGNUS: NaN.doubleToLongBits" ); long i1 = Double.doubleToLongBits(3.4e+32f); long i2 = Double.doubleToLongBits(-34.56f); @@ -427,55 +427,55 @@ long man2 = i2 & 0x000fffffffffffffL ; harness.check(!(sign1 != 0 ), - "Error: test_doubleToLongBits returned wrong results - 4" ); + "test_doubleToLongBits - 4" ); harness.check(!( sign2 != 0x8000000000000000L ), - "Error: test_doubleToLongBits returned wrong results - 5" ); + "test_doubleToLongBits - 5" ); harness.check(!( exp1 != 5093571178556030976L ), - "Error: test_doubleToLongBits returned wrong results - 6" ); + "test_doubleToLongBits - 6" ); harness.check(!( exp2 != 4629700416936869888L ), - "Error: test_doubleToLongBits returned wrong results - 7" ); + "test_doubleToLongBits - 7" ); harness.check(!( man1 != 214848222789632L ), - "Error: test_doubleToLongBits returned wrong results - 8" ); + "test_doubleToLongBits - 8" ); harness.check(!( man2 != 360288163463168L ), - "Error: test_doubleToLongBits returned wrong results - 9" ); + "test_doubleToLongBits - 9" ); } public void test_longBitsToDouble( ) { harness.check(!( Double.longBitsToDouble( 0x7ff0000000000000L) != Double.POSITIVE_INFINITY ), - "Error: test_longBitsToDouble returned wrong results - 1" ); + "test_longBitsToDouble - 1" ); harness.check(!( Double.longBitsToDouble( 0xfff0000000000000L ) != Double.NEGATIVE_INFINITY ), - "Error: test_longBitsToDouble returned wrong results - 2" ); + "test_longBitsToDouble - 2" ); harness.check(!( !Double.isNaN(Double.longBitsToDouble( 0xfff8000000000000L ))), - "Error: test_longBitsToDouble returned wrong results - 3" ); + "test_longBitsToDouble - 3" ); harness.check(!( !Double.isNaN(Double.longBitsToDouble( 0x7ffffff000000000L ))), - "Error: test_longBitsToDouble returned wrong results - 4" ); + "test_longBitsToDouble - 4" ); harness.check(!( !Double.isNaN(Double.longBitsToDouble( 0xfff8000020000001L ))), - "Error: test_longBitsToDouble returned wrong results - 5" ); + "test_longBitsToDouble - 5" ); harness.check(!( !Double.isNaN(Double.longBitsToDouble( 0xfffffffffffffff1L ))), - "Error: test_longBitsToDouble returned wrong results - 6" ); + "test_longBitsToDouble - 6" ); double fl1 = Double.longBitsToDouble( 0x34343f33 ); if ( Double.doubleToLongBits(fl1) != 0x34343f33 ) { - harness.fail("Error: test_longBitsToDouble returned wrong results - 7" ); + harness.fail("test_longBitsToDouble - 7" ); System.out.println("Expected: " + Long.toHexString(0x34343f33)); System.out.println("Got: " + Long.toHexString(Double.doubleToLongBits(fl1))); } harness.check(!( Double.doubleToLongBits( Double.longBitsToDouble(0x33439943)) != 0x33439943 ), - "Error: test_longBitsToDouble returned wrong results - 8"); + "test_longBitsToDouble - 8"); } public void check_remainder( double val, double val1 , @@ -483,7 +483,7 @@ { double res = val % val1; harness.check(!( res < ret - 0.001 || res > ret + 0.001 ), - "Error: test_remainder failed " + errno ); + "test_remainder " + errno ); } public void check_remainder_NaN( double val, double val1 , @@ -491,7 +491,7 @@ { double res = val % val1; if (!Double.isNaN(res)) { - harness.fail("Error: test_remainder failed " + + harness.fail("test_remainder " + errno); } } @@ -552,18 +552,18 @@ Double d3 = new Double(0.0 ); harness.check(!( d1.shortValue() != 123 ), - "Error: test_shortbyteValue failed - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( d2.shortValue() != 400 ), - "Error: test_shortbyteValue failed - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( d3.shortValue() != 0 ), - "Error: test_shortbyteValue failed - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( d1.byteValue() != 123 ), - "Error: test_shortbyteValue failed - 4" ); + "test_shortbyteValue - 4" ); harness.check(!( d2.byteValue() != (byte) 400 ), - "Error: test_shortbyteValue failed - 5" ); + "test_shortbyteValue - 5" ); harness.check(!( d3.byteValue() != 0 ), - "Error: test_shortbyteValue failed - 6" ); + "test_shortbyteValue - 6" ); } @@ -571,38 +571,38 @@ double zero = 0.0; String zero1 = String.valueOf(zero); if (!zero1.equals("0.0")) { - harness.fail("Error: test_neg failed - 1"); + harness.fail("test_neg - 1"); } zero = -zero; String zero2 = String.valueOf(zero); if (!zero2.equals("-0.0")) { - harness.fail("Error: test_neg failed - 2"); + harness.fail("test_neg - 2"); System.out.println("Expected -0.0, got: " + zero2); } zero = -zero; String zero3 = String.valueOf(zero); if (!zero3.equals("0.0")) { - harness.fail("Error: test_neg failed - 3"); + harness.fail("test_neg - 3"); } double nonzero = -21.23; String nonzero1 = String.valueOf(nonzero); if (!nonzero1.equals("-21.23")) { - harness.fail("Error: test_neg failed - 4"); + harness.fail("test_neg - 4"); } nonzero = -nonzero; String nonzero2 = String.valueOf(nonzero); if (!nonzero2.equals("21.23")) { - harness.fail("Error: test_neg failed - 5"); + harness.fail("test_neg - 5"); } nonzero = -nonzero; String nonzero3 = String.valueOf(nonzero); if (!nonzero3.equals("-21.23")) { - harness.fail("Error: test_neg failed - 6"); + harness.fail("test_neg - 6"); } } public void testall() Index: ./gnu/testlet/java/lang/Float/FloatTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Float/FloatTest.java,v retrieving revision 1.8 diff -u -u -r1.8 FloatTest.java --- ./gnu/testlet/java/lang/Float/FloatTest.java 21 Feb 2005 15:52:47 -0000 1.8 +++ ./gnu/testlet/java/lang/Float/FloatTest.java 22 Jan 2006 21:14:49 -0000 @@ -44,21 +44,21 @@ harness.check(!( min1 != min2 || max1 != max2 || ninf1 != ninf2 || pinf1 != pinf2 || !nan2.equals(nan1) ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); Float i1 = new Float(100.5f); harness.check(!( i1.floatValue() != 100.5f ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Float("234.34f")).floatValue() != 234.34f ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } if (!System.getProperty("os.name").equals("VxWorks")){ @@ -66,80 +66,80 @@ // Test is disabled for smallvm 2.0.1 release. try { harness.check(!( (new Float("1.4e-45f")).floatValue() != 1.4e-45f ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 4" ); + harness.fail("test_Basics - 4" ); } } try { new Float("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { } harness.check(!( (new Float(3.4)).floatValue() != 3.4f ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); Float nan = new Float(Float.NaN ); harness.check(!( !nan.isNaN()), - "Error: test_Basics failed - 7" ); + "test_Basics - 7" ); harness.check(!( (new Float(10.0f)).isNaN()), - "Error: test_Basics failed - 8" ); + "test_Basics - 8" ); harness.check(!( !Float.isNaN( Float.NaN )), - "Error: test_Basics failed - 9" ); + "test_Basics - 9" ); harness.check(!( !(new Float(Float.POSITIVE_INFINITY)).isInfinite()), - "Error: test_Basics failed - 10" ); + "test_Basics - 10" ); harness.check(!( !(new Float(Float.NEGATIVE_INFINITY)).isInfinite()), - "Error: test_Basics failed - 11" ); + "test_Basics - 11" ); harness.check(!( !(Float.isInfinite( Float.POSITIVE_INFINITY))), - "Error: test_Basics failed - 12" ); + "test_Basics - 12" ); harness.check(!( !(Float.isInfinite( Float.NEGATIVE_INFINITY))), - "Error: test_Basics failed - 13" ); + "test_Basics - 13" ); harness.check(!( Float.isInfinite( 2.30f )), - "Error: test_Basics failed - 14" ); + "test_Basics - 14" ); } public void test_toString() { harness.check(!( !( new Float(123.0f)).toString().equals("123.0")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Float(-44.5343f)).toString().equals("-44.5343")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Float.toString( 23.04f ).equals ("23.04" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Float.toString( Float.NaN ).equals ("NaN" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Float.toString( Float.POSITIVE_INFINITY ).equals ("Infinity" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); harness.check(!( !Float.toString( Float.NEGATIVE_INFINITY ).equals ("-Infinity" )), - "Error: test_toString failed - 6" ); + "test_toString - 6" ); harness.check(!( !Float.toString( 0.0f ).equals ("0.0" )), - "Error: test_toString failed - 7" ); + "test_toString - 7" ); String str; str = Float.toString( -0.0f ); harness.check(!( !str.equals ("-0.0" )), - "Error: test_toString failed - 8" ); + "test_toString - 8" ); str = Float.toString( -912125.45f); if ( !str.equals ("-912125.44" )) { - harness.fail("Error: test_toString failed - 9" ); + harness.fail("test_toString - 9" ); System.out.println("Bug EJWcr00027"); System.out.println("expected '-912125.45', got '" + str + "'"); @@ -151,11 +151,11 @@ // case has been noted as a comment to Sun Java bug #4642835 str = Float.toString( 0.001f ); harness.check(!( !Float.toString( 0.001f ).equals ("0.001" )), - "Error: test_toString failed - 10" ); + "test_toString - 10" ); str = Float.toString(33333333.33f ); if ( !(new Float( str)).equals(new Float(33333333.33f))) { - harness.fail("Error: test_toString failed - 11" ); + harness.fail("test_toString - 11" ); System.out.println("Bug EJWcr00029"); int i = Float.floatToIntBits(new Float( str).floatValue()); int j = Float.floatToIntBits(new Float(33333333.33f).floatValue()); @@ -166,7 +166,7 @@ } str = Float.toString(-123232324253.32f ); if ( !(new Float( str)).equals(new Float(-123232324253.32f))) { - harness.fail("Error: test_toString failed - 12" ); + harness.fail("test_toString - 12" ); System.out.println("Bug EJWcr00030"); int i = Float.floatToIntBits(new Float( str).floatValue()); int j = Float.floatToIntBits(new Float(-123232324253.32f).floatValue()); @@ -177,10 +177,10 @@ } str = Float.toString(1.243E10f); harness.check(!( !(new Float( str)).equals(new Float(1.243E10f))), - "Error: test_toString failed - 13" ); + "test_toString - 13" ); str = Float.toString(-23.43E33f); harness.check(!( !(new Float( str)).equals(new Float(-23.43E33f))), - "Error: test_toString failed - 14" ); + "test_toString - 14" ); } @@ -190,36 +190,36 @@ Float i2 = new Float(-2334.34E4); harness.check(!( !i1.equals( new Float(2334.34E4))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Float(-2334.34E4))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); float n1 = Float.NaN; float n2 = Float.NaN; harness.check(!( n1 == n2 ), - "Error: test_equals failed - 5" ); + "test_equals - 5" ); Float flt1 = new Float( Float.NaN); Float flt2 = new Float( Float.NaN); harness.check(!( !flt1.equals(flt2)), - "Error: test_equals failed - 6" ); + "test_equals - 6" ); harness.check(!( 0.0f != -0.0f ), - "Error: test_equals failed - 7" ); + "test_equals - 7" ); Float pzero = new Float( 0.0f ); Float nzero = new Float( -0.0f ); harness.check(!( pzero.equals(nzero) ), - "Error: test_equals failed - 8" ); + "test_equals - 8" ); } @@ -229,11 +229,11 @@ Float flt1 = new Float(3.4028235e+38f); harness.check(!( flt1.hashCode() != Float.floatToIntBits( 3.4028235e+38f )), - "Error: test_hashCode returned wrong results - 1"); + "test_hashCode - 1"); Float flt2 = new Float( -2343323354f ); harness.check(!( flt2.hashCode() != Float.floatToIntBits( -2343323354f )), - "Error: test_hashCode returned wrong results - 2"); + "test_hashCode - 2"); } public void test_intValue( ) @@ -245,10 +245,10 @@ int i2 = b2.intValue(); harness.check(!( i1 != (int) 3.4e+32f), - "Error: test_intValue returned wrong results - 1" ); + "test_intValue - 1" ); harness.check(!( i2 != (int) -23.45f ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); } public void test_longValue( ) @@ -260,12 +260,12 @@ long l3 = (long)b3; harness.check(!( b1.longValue() != l3), - "Error: test_longValue returned wrong results - 1" ); + "test_longValue - 1" ); b3 = -23.45f; l3 = (long)b3; harness.check(!( b2.longValue() != l3), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_floatValue( ) @@ -274,10 +274,10 @@ Float b2 = new Float(-3276.32); harness.check(!( b1.floatValue() != 3276.34f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != -3276.32f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_doubleValue( ) @@ -286,17 +286,17 @@ Float b2 = new Float(30.0f); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_valueOf( ) { try { Float.valueOf(null); - harness.fail("Error: test_valueOf returned wrong results - 1" ); + harness.fail("test_valueOf - 1" ); } catch ( NumberFormatException nfe ) {harness.check(false, "test_valueOf null should throw NullPointerException");} @@ -306,20 +306,20 @@ try { Float.valueOf("Kona"); - harness.fail("Error: test_valueOf returned wrong results - 2" ); + harness.fail("test_valueOf - 2" ); }catch( NumberFormatException e) {harness.check(true, "test_valueOf Kona");} try { harness.check(!( Float.valueOf( "3.4e+32f" ).floatValue() != 3.4e+32f ), - "Error: test_valueOf returned wrong results - 3" ); + "test_valueOf - 3" ); }catch( NumberFormatException e) {harness.check(false, "test_valueOf 3.4e+32f");} try { harness.check(!( Float.valueOf(" -23.45f ").floatValue() != -23.45f ), - "Error: test_valueOf returned wrong results - 4" ); + "test_valueOf - 4" ); }catch( NumberFormatException e) {harness.check(false, "test_valueOf \" -23.45f \"");} @@ -330,7 +330,7 @@ { try { Float.parseFloat(null); - harness.fail("Error: test_parseFloat returned wrong results - 1" ); + harness.fail("test_parseFloat - 1" ); } catch ( NumberFormatException nfe ) {harness.check(false, "test_parseFloat null should throw NullPointerException");} @@ -340,20 +340,20 @@ try { Float.parseFloat("Kona"); - harness.fail("Error: test_parseFloat returned wrong results - 2" ); + harness.fail("test_parseFloat - 2" ); }catch( NumberFormatException e) {harness.check(true, "test_parseFloat Kona");} try { harness.check(!( Float.parseFloat( "3.4e+32f" ) != 3.4e+32f ), - "Error: test_parseFloat returned wrong results - 3" ); + "test_parseFloat - 3" ); }catch( NumberFormatException e) {harness.check(false, "test_parseFloat 3.4e+32f");} try { harness.check(!( Float.parseFloat(" -23.45f ") != -23.45f ), - "Error: test_parseFloat returned wrong results - 4" ); + "test_parseFloat - 4" ); }catch( NumberFormatException e) {harness.check(false, "test_parseFloat \" -23.45f \"");} @@ -362,13 +362,13 @@ public void test_floatToIntBits() { harness.check(!( Float.floatToIntBits( Float.POSITIVE_INFINITY ) != 0x7f800000 ), - "Error: test_floatToIntBits returned wrong results - 1" ); + "test_floatToIntBits - 1" ); harness.check(!( Float.floatToIntBits( Float.NEGATIVE_INFINITY ) != 0xff800000 ), - "Error: test_floatToIntBits returned wrong results - 2" ); + "test_floatToIntBits - 2" ); int nanval = Float.floatToIntBits( Float.NaN ); harness.check(!( nanval != 0x7fc00000 ), - "Error: test_floatToIntBits returned wrong results - 3" ); + "test_floatToIntBits - 3" ); int i1 = Float.floatToIntBits(3.4e+32f); int i2 = Float.floatToIntBits(-34.56f); @@ -383,55 +383,55 @@ int man2 = i2 & 0x007fffff ; harness.check(!(sign1 != 0 ), - "Error: test_floatToIntBits returned wrong results - 4" ); + "test_floatToIntBits - 4" ); harness.check(!( sign2 != 0x80000000 ), - "Error: test_floatToIntBits returned wrong results - 5" ); + "test_floatToIntBits - 5" ); harness.check(!( exp1 != 1971322880 ), - "Error: test_floatToIntBits returned wrong results - 6" ); + "test_floatToIntBits - 6" ); harness.check(!( exp2 != 1107296256 ), - "Error: test_floatToIntBits returned wrong results - 7" ); + "test_floatToIntBits - 7" ); harness.check(!( man1 != 400186 ), - "Error: test_floatToIntBits returned wrong results - 8" ); + "test_floatToIntBits - 8" ); harness.check(!( man2 != 671089 ), - "Error: test_floatToIntBits returned wrong results - 9" ); + "test_floatToIntBits - 9" ); } public void test_intBitsToFloat( ) { harness.check(!( Float.intBitsToFloat( 0x7f800000 ) != Float.POSITIVE_INFINITY ), - "Error: test_intBitsToFloat returned wrong results - 1" ); + "test_intBitsToFloat - 1" ); harness.check(!( Float.intBitsToFloat( 0xff800000 ) != Float.NEGATIVE_INFINITY ), - "Error: test_intBitsToFloat returned wrong results - 2" ); + "test_intBitsToFloat - 2" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0x7f800002 ))), - "Error: test_intBitsToFloat returned wrong results - 3" ); + "test_intBitsToFloat - 3" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0x7f8ffff0 ))), - "Error: test_intBitsToFloat returned wrong results - 4" ); + "test_intBitsToFloat - 4" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0xff800002 ) )), - "Error: test_intBitsToFloat returned wrong results - 5" ); + "test_intBitsToFloat - 5" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0xfffffff1 ))), - "Error: test_intBitsToFloat returned wrong results - 6" ); + "test_intBitsToFloat - 6" ); harness.check(!( !Float.isNaN(Float.intBitsToFloat( 0xffc00000 ))), - "Error: test_intBitsToFloat returned wrong results - 7" ); + "test_intBitsToFloat - 7" ); float fl1 = Float.intBitsToFloat( 0x34343f34 ); harness.check(!( fl1 != 1.67868e-007f ), - "Error: test_intBitsToFloat returned wrong results - 8" ); + "test_intBitsToFloat - 8" ); harness.check(!( Float.floatToIntBits( Float.intBitsToFloat(0x33439943)) != 0x33439943 ), - "Error: test_intBitsToFloat returned wrong results - 9"); + "test_intBitsToFloat - 9"); } public void test_shortbyteValue() @@ -441,18 +441,18 @@ Float d3 = new Float(0.0 ); harness.check(!( d1.shortValue() != 123 ), - "Error: test_shortbyteValue failed - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( d2.shortValue() != 400 ), - "Error: test_shortbyteValue failed - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( d3.shortValue() != 0 ), - "Error: test_shortbyteValue failed - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( d1.byteValue() != 123 ), - "Error: test_shortbyteValue failed - 4" ); + "test_shortbyteValue - 4" ); harness.check(!( d2.byteValue() != (byte) 400 ), - "Error: test_shortbyteValue failed - 5" ); + "test_shortbyteValue - 5" ); harness.check(!( d3.byteValue() != 0 ), - "Error: test_shortbyteValue failed - 6" ); + "test_shortbyteValue - 6" ); } @@ -460,37 +460,37 @@ float zero = 0.0f; String zero1 = String.valueOf(zero); if (!zero1.equals("0.0")) { - harness.fail("Error: test_neg failed - 1"); + harness.fail("test_neg - 1"); } zero = -zero; String zero2 = String.valueOf(zero); if (!zero2.equals("-0.0")) { - harness.fail("Error: test_neg failed - 2"); + harness.fail("test_neg - 2"); } zero = -zero; String zero3 = String.valueOf(zero); if (!zero3.equals("0.0")) { - harness.fail("Error: test_neg failed - 3"); + harness.fail("test_neg - 3"); } float nonzero = -12.24f; String nonzero1 = String.valueOf(nonzero); if (!nonzero1.equals("-12.24")) { - harness.fail("Error: test_neg failed - 4"); + harness.fail("test_neg - 4"); } nonzero = -nonzero; String nonzero2 = String.valueOf(nonzero); if (!nonzero2.equals("12.24")) { - harness.fail("Error: test_neg failed - 5"); + harness.fail("test_neg - 5"); } nonzero = -nonzero; String nonzero3 = String.valueOf(nonzero); if (!nonzero3.equals("-12.24")) { - harness.fail("Error: test_neg failed - 6"); + harness.fail("test_neg - 6"); } } Index: ./gnu/testlet/java/lang/Integer/IntegerTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Integer/IntegerTest.java,v retrieving revision 1.4 diff -u -u -r1.4 IntegerTest.java --- ./gnu/testlet/java/lang/Integer/IntegerTest.java 21 Feb 2005 15:52:47 -0000 1.4 +++ ./gnu/testlet/java/lang/Integer/IntegerTest.java 22 Jan 2006 21:14:49 -0000 @@ -32,29 +32,29 @@ { harness.check(!( Integer.MIN_VALUE != 0x80000000 || Integer.MAX_VALUE != 0x7fffffff ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); harness.check(Integer.TYPE == new int[0].getClass().getComponentType(), - "Error: test_Basics failed - 1a"); + "test_Basics - 1a"); Integer i1 = new Integer(100); harness.check(!( i1.intValue() != 100 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Integer("234")).intValue() != 234 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } try { harness.check(!( (new Integer("-FF")).intValue() != -255 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { @@ -62,56 +62,56 @@ try { new Integer("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { } harness.check(!( Integer.decode( "123").intValue() != 123 ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); harness.check(!( Integer.decode( "32767").intValue() != 32767 ), - "Error: test_Basics failed - 7" ); + "test_Basics - 7" ); } public void test_toString() { harness.check(!( !( new Integer(123)).toString().equals("123")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Integer(-44)).toString().equals("-44")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Integer.toString( 234 ).equals ("234" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Integer.toString( -34 ).equals ("-34" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Integer.toString( -34 ).equals ("-34" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); harness.check(!( !Integer.toString(99 , 1 ).equals("99")), - "Error: test_toString failed - 6" ); + "test_toString - 6" ); harness.check(!( !Integer.toString(99 , 37 ).equals("99")), - "Error: test_toString failed - 7" ); + "test_toString - 7" ); harness.check(!( !Integer.toString(15 , 2 ).equals("1111")), - "Error: test_toString failed - 8" ); + "test_toString - 8" ); harness.check(!( !Integer.toString(37 , 36 ).equals("11")), - "Error: test_toString failed - 9" ); + "test_toString - 9" ); harness.check(!( !Integer.toString(31 , 16 ).equals("1f")), - "Error: test_toString failed - 10" ); + "test_toString - 10" ); harness.check(!( !Integer.toString(-99 , 1 ).equals("-99")), - "Error: test_toString failed - 11" ); + "test_toString - 11" ); harness.check(!( !Integer.toString(-99 , 37 ).equals("-99")), - "Error: test_toString failed - 12" ); + "test_toString - 12" ); harness.check(!( !Integer.toString(-15 , 2 ).equals("-1111")), - "Error: test_toString failed - 13" ); + "test_toString - 13" ); harness.check(!( !Integer.toString(-37 , 36 ).equals("-11")), - "Error: test_toString failed - 14" ); + "test_toString - 14" ); harness.check(!( !Integer.toString(-31 , 16 ).equals("-1f")), - "Error: test_toString failed - 15" ); + "test_toString - 15" ); } public void test_equals() @@ -120,16 +120,16 @@ Integer i2 = new Integer(-23); harness.check(!( !i1.equals( new Integer(23))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Integer(-23))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); } public void test_hashCode( ) @@ -138,7 +138,7 @@ Integer b2 = new Integer(-3439); harness.check(!( b1.hashCode() != 3439 || b2.hashCode() != -3439 ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } public void test_intValue( ) @@ -147,10 +147,10 @@ Integer b2 = new Integer(-32767); harness.check(!( b1.intValue() != 32767 ), - "Error: test_intValue returned wrong results - 1" ); + "test_intValue - 1" ); harness.check(!( b2.intValue() != -32767 ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); } public void test_longValue( ) @@ -159,10 +159,10 @@ Integer b2 = new Integer(-3767); harness.check(!( b1.longValue() != (long)3767 ), - "Error: test_longValue returned wrong results - 1" ); + "test_longValue - 1" ); harness.check(!( b2.longValue() != -3767 ), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_floatValue( ) { @@ -170,10 +170,10 @@ Integer b2 = new Integer(-3276); harness.check(!( b1.floatValue() != 3276.0f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != -3276.0f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_doubleValue( ) { @@ -181,10 +181,10 @@ Integer b2 = new Integer(30); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_shortbyteValue( ) @@ -193,20 +193,20 @@ Integer b2 = new Integer(300); harness.check(!( b1.byteValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( b2.byteValue() != (byte)300 ), - "Error: test_shortbyteValue returned wrong results - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( b1.shortValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( b2.shortValue() != (short)300 ), - "Error: test_shortbyteValue returned wrong results - 4" ); + "test_shortbyteValue - 4" ); harness.check(!( ((Number)b1).shortValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 5" ); + "test_shortbyteValue - 5" ); harness.check(!( ((Number)b2).byteValue() != (byte)300 ), - "Error: test_shortbyteValue returned wrong results - 6" ); + "test_shortbyteValue - 6" ); } public void test_toHexString() @@ -217,10 +217,10 @@ str1 = Integer.toHexString( -5361 ); harness.check( "20b7".equals(str), - "Error: test_toHexString returned wrong results - 1" ); + "test_toHexString - 1" ); harness.check( "ffffeb0f".equals(str1), - "Error: test_toHexString returned wrong results - 2" ); + "test_toHexString - 2" ); } public void test_toOctalString() @@ -230,63 +230,63 @@ str1= Integer.toOctalString(-9863 ); harness.check(!( !str.equals("13327")), - "Error: test_toOctalString returned wrong results - 1" ); + "test_toOctalString - 1" ); harness.check(!( !str1.equals("37777754571")), - "Error: test_toOctalString returned wrong results - 2" ); + "test_toOctalString - 2" ); } public void test_toBinaryString() { harness.check(!( !Integer.toBinaryString(358).equals("101100110")), - "Error: test_toBinaryString returned wrong results - 1" ); + "test_toBinaryString - 1" ); harness.check(!( !Integer.toBinaryString( -5478 ).equals("11111111111111111110101010011010")), - "Error: test_toBinaryString returned wrong results - 2" ); + "test_toBinaryString - 2" ); } public void test_parseInt() { harness.check(!( Integer.parseInt("473") != Integer.parseInt("473" , 10 )), - "Error: test_parseInt returned wrong results - 1" ); + "test_parseInt - 1" ); harness.check(!( Integer.parseInt("0" , 10 ) != 0 ), - "Error: test_parseInt returned wrong results - 2" ); + "test_parseInt - 2" ); harness.check(!( Integer.parseInt("473" , 10 ) != 473 ), - "Error: test_parseInt returned wrong results - 3" ); + "test_parseInt - 3" ); harness.check(!( Integer.parseInt("-0" , 10 ) != 0 ), - "Error: test_parseInt returned wrong results - 4" ); + "test_parseInt - 4" ); harness.check(!( Integer.parseInt("-FF" , 16 ) != -255 ), - "Error: test_parseInt returned wrong results - 5" ); + "test_parseInt - 5" ); harness.check(!( Integer.parseInt("1100110" , 2 ) != 102 ), - "Error: test_parseInt returned wrong results - 6" ); + "test_parseInt - 6" ); harness.check(!( Integer.parseInt("2147483647" , 10 ) != 2147483647 ), - "Error: test_parseInt returned wrong results - 7" ); + "test_parseInt - 7" ); harness.check(!( Integer.parseInt("-2147483647" , 10 ) != -2147483647 ), - "Error: test_parseInt returned wrong results - 8" ); + "test_parseInt - 8" ); try { Integer.parseInt("2147483648" , 10 ); - harness.fail("Error: test_parseInt returned wrong results - 9" ); + harness.fail("test_parseInt - 9" ); }catch ( NumberFormatException e ){} try { Integer.parseInt("99" , 8 ); - harness.fail("Error: test_parseInt returned wrong results - 10" ); + harness.fail("test_parseInt - 10" ); }catch ( NumberFormatException e ){} try { Integer.parseInt("kona" , 10 ); - harness.fail("Error: test_parseInt returned wrong results - 11" ); + harness.fail("test_parseInt - 11" ); }catch ( NumberFormatException e ){} harness.check(!( Integer.parseInt("Kona" , 27 ) != 411787 ), - "Error: test_parseInt returned wrong results - 12" ); + "test_parseInt - 12" ); } public void test_valueOf( ) { harness.check(!( Integer.valueOf("21234").intValue() != Integer.parseInt("21234")), - "Error: test_valueOf returned wrong results - 1" ); + "test_valueOf - 1" ); harness.check(!( Integer.valueOf("Kona", 27).intValue() != Integer.parseInt("Kona", 27)), - "Error: test_valueOf returned wrong results - 2" ); + "test_valueOf - 2" ); } public void test_getInteger( ) @@ -309,17 +309,17 @@ harness.check(!( Integer.getInteger("integerkey1").intValue() != 2345 || Integer.getInteger("integerkey2").intValue() != -984 || Integer.getInteger("integerkey3").intValue() != 0 ), - "Error: test_getInteger returned wrong results - 1" ); + "test_getInteger - 1" ); harness.check(!( Integer.getInteger("integerkey4", new Integer(0)).intValue() != 31 || Integer.getInteger("integerkey5",new Integer(0)).intValue() != 31 || Integer.getInteger("integerkey6",new Integer(0)).intValue() != 15 ), - "Error: test_getInteger returned wrong results - 2" ); + "test_getInteger - 2" ); harness.check(!( Integer.getInteger("integerkey7", new Integer(0)).intValue() != 0 ), - "Error: test_getInteger returned wrong results - 3" ); + "test_getInteger - 3" ); harness.check(!( Integer.getInteger("integerkey7", 0).intValue() != 0 ), - "Error: test_getInteger returned wrong results - 4" ); + "test_getInteger - 4" ); } Index: ./gnu/testlet/java/lang/Long/LongTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Long/LongTest.java,v retrieving revision 1.4 diff -u -u -r1.4 LongTest.java --- ./gnu/testlet/java/lang/Long/LongTest.java 21 Feb 2005 15:52:47 -0000 1.4 +++ ./gnu/testlet/java/lang/Long/LongTest.java 22 Jan 2006 21:14:49 -0000 @@ -36,25 +36,25 @@ long max2 = 0x7fffffffffffffffL; harness.check(!( min1 != min2 || max1 != max2 ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); Long i1 = new Long(100); harness.check(!( i1.longValue() != 100 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Long("234")).longValue() != 234 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } try { harness.check(!( (new Long("-FF")).longValue() != -255 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { @@ -62,7 +62,7 @@ try { new Long("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { @@ -72,41 +72,41 @@ public void test_toString() { harness.check(!( !( new Long(123)).toString().equals("123")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Long(-44)).toString().equals("-44")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Long.toString( 234 ).equals ("234" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Long.toString( -34 ).equals ("-34" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Long.toString( -34 ).equals ("-34" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); harness.check(!( !Long.toString(99 , 1 ).equals("99")), - "Error: test_toString failed - 6" ); + "test_toString - 6" ); harness.check(!( !Long.toString(99 , 37 ).equals("99")), - "Error: test_toString failed - 7" ); + "test_toString - 7" ); harness.check(!( !Long.toString(15 , 2 ).equals("1111")), - "Error: test_toString failed - 8" ); + "test_toString - 8" ); harness.check(!( !Long.toString(37 , 36 ).equals("11")), - "Error: test_toString failed - 9" ); + "test_toString - 9" ); harness.check(!( !Long.toString(31 , 16 ).equals("1f")), - "Error: test_toString failed - 10" ); + "test_toString - 10" ); harness.check(!( !Long.toString(-99 , 1 ).equals("-99")), - "Error: test_toString failed - 11" ); + "test_toString - 11" ); harness.check(!( !Long.toString(-99 , 37 ).equals("-99")), - "Error: test_toString failed - 12" ); + "test_toString - 12" ); harness.check(!( !Long.toString(-15 , 2 ).equals("-1111")), - "Error: test_toString failed - 13" ); + "test_toString - 13" ); harness.check(!( !Long.toString(-37 , 36 ).equals("-11")), - "Error: test_toString failed - 14" ); + "test_toString - 14" ); harness.check(!( !Long.toString(-31 , 16 ).equals("-1f")), - "Error: test_toString failed - 15" ); + "test_toString - 15" ); } public void test_equals() @@ -115,16 +115,16 @@ Long i2 = new Long(-23); harness.check(!( !i1.equals( new Long(23))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Long(-23))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); } public void test_hashCode( ) @@ -133,7 +133,7 @@ Long b2 = new Long(-34395555); harness.check(!( b1.hashCode() != ((int)(b1.longValue()^(b1.longValue()>>>32))) || b2.hashCode() != ((int)(b2.longValue()^(b2.longValue()>>>32))) ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } public void test_intValue( ) @@ -142,10 +142,10 @@ Long b2 = new Long(-32767); harness.check(!( b1.intValue() != 32767 ), - "Error: test_intValue returned wrong results - 1" ); + "test_intValue - 1" ); harness.check(!( b2.intValue() != -32767 ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); } public void test_shortbyteValue( ) { @@ -153,15 +153,15 @@ Long b2 = new Long(-32767); harness.check(!( b1.byteValue() != (byte)32767 ), - "Error: test_shortbyteValue returned wrong results - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( b2.byteValue() != (byte)-32767 ), - "Error: test_shortbyteValue returned wrong results - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( b1.shortValue() != (short)32767 ), - "Error: test_shortbyteValue returned wrong results - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( b2.shortValue() != (short)-32767 ), - "Error: test_shortbyteValue returned wrong results - 4" ); + "test_shortbyteValue - 4" ); } public void test_longValue( ) @@ -170,10 +170,10 @@ Long b2 = new Long(9223372036854775807L); harness.check(!( b1.longValue() != (long)-9223372036854775807L ), - "Error: test_longValue returned wrong results - 1" ); + "test_longValue - 1" ); harness.check(!( b2.longValue() != 9223372036854775807L ), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_floatValue( ) { @@ -181,10 +181,10 @@ Long b2 = new Long(-3276); harness.check(!( b1.floatValue() != 3276.0f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != -3276.0f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_doubleValue( ) { @@ -192,10 +192,10 @@ Long b2 = new Long(30); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_toHexString() @@ -206,10 +206,10 @@ str1 = Long.toHexString( -5361 ); harness.check(!( !str.equalsIgnoreCase("20B7")), - "Error: test_toHexString returned wrong results - 1" ); + "test_toHexString - 1" ); harness.check(!( !str1.equalsIgnoreCase("ffffffffffffeb0f")), - "Error: test_toHexString returned wrong results - 2" ); + "test_toHexString - 2" ); } public void test_toOctalString() @@ -219,55 +219,55 @@ str1= Long.toOctalString(-9863 ); harness.check(!( !str.equals("13327")), - "Error: test_toOctalString returned wrong results - 1" ); + "test_toOctalString - 1" ); harness.check(!( !str1.equals("1777777777777777754571")), - "Error: test_toOctalString returned wrong results - 2" ); + "test_toOctalString - 2" ); } public void test_toBinaryString() { String str1 = Long.toBinaryString( -5478 ); harness.check(!( !Long.toBinaryString(358).equals("101100110")), - "Error: test_toBinaryString returned wrong results - 1" ); + "test_toBinaryString - 1" ); harness.check(!( !str1.equals("1111111111111111111111111111111111111111111111111110101010011010")), - "Error: test_toBinaryString returned wrong results - 2" ); + "test_toBinaryString - 2" ); } public void test_parseLong() { harness.check(!( Long.parseLong("473") != Long.parseLong("473" , 10 )), - "Error: test_parseLong returned wrong results - 1" ); + "test_parseLong - 1" ); harness.check(!( Long.parseLong("0" , 10 ) != 0L ), - "Error: test_parseLong returned wrong results - 2" ); + "test_parseLong - 2" ); harness.check(!( Long.parseLong("473" , 10 ) != 473L ), - "Error: test_parseLong returned wrong results - 3" ); + "test_parseLong - 3" ); harness.check(!( Long.parseLong("-0" , 10 ) != 0L ), - "Error: test_parseLong returned wrong results - 4" ); + "test_parseLong - 4" ); harness.check(!( Long.parseLong("-FF" , 16 ) != -255L ), - "Error: test_parseLong returned wrong results - 5" ); + "test_parseLong - 5" ); harness.check(!( Long.parseLong("1100110" , 2 ) != 102L ), - "Error: test_parseLong returned wrong results - 6" ); + "test_parseLong - 6" ); harness.check(!( Long.parseLong("2147483647" , 10 ) != 2147483647L ), - "Error: test_parseLong returned wrong results - 7" ); + "test_parseLong - 7" ); harness.check(!( Long.parseLong("-2147483647" , 10 ) != -2147483647L ), - "Error: test_parseLong returned wrong results - 8" ); + "test_parseLong - 8" ); try { Long.parseLong("99" , 8 ); - harness.fail("Error: test_parseLong returned wrong results - 10" ); + harness.fail("test_parseLong - 10" ); }catch ( NumberFormatException e ){} try { Long.parseLong("Hazelnut" , 10 ); - harness.fail("Error: test_parseLong returned wrong results - 11" ); + harness.fail("test_parseLong - 11" ); }catch ( NumberFormatException e ){} harness.check(!( Long.parseLong("Hazelnut" , 36 ) != 1356099454469L ), - "Error: test_parseLong returned wrong results - 12" ); + "test_parseLong - 12" ); long_hex_ok("-8000000000000000", -0x8000000000000000L); @@ -316,7 +316,7 @@ static void long_hex_bad(String s) { try { Long.parseLong(s, 16); - harness.fail("Error long_hex_bad " + + harness.fail("long_hex_bad " + s + " should not be valid!" ); } catch (NumberFormatException e ){ } @@ -351,9 +351,9 @@ public void test_valueOf( ) { harness.check(!( Long.valueOf("21234").longValue() != Long.parseLong("21234")), - "Error: test_valueOf returned wrong results - 1" ); + "test_valueOf - 1" ); harness.check(!( Long.valueOf("Kona", 27).longValue() != Long.parseLong("Kona", 27)), - "Error: test_valueOf returned wrong results - 2" ); + "test_valueOf - 2" ); } public void test_getLong( ) @@ -395,11 +395,11 @@ try { harness.check(!( Long.getLong("longkey7", new Long(0)).longValue() != 0 ), - "Error: test_getLong returned wrong results - 3" ); + "test_getLong - 3" ); } catch (NullPointerException npe) { harness.check(false); } try { harness.check(!( Long.getLong("longkey7", 0).longValue() != 0 ), - "Error: test_getLong returned wrong results - 4" ); + "test_getLong - 4" ); } catch (NullPointerException npe) { harness.check(false); } } Index: ./gnu/testlet/java/lang/Math/MathTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Math/MathTest.java,v retrieving revision 1.3 diff -u -u -r1.3 MathTest.java --- ./gnu/testlet/java/lang/Math/MathTest.java 21 Feb 2005 15:52:47 -0000 1.3 +++ ./gnu/testlet/java/lang/Math/MathTest.java 22 Jan 2006 21:14:49 -0000 @@ -31,253 +31,253 @@ public void test_Basics() { harness.check(!( Math.E != 2.7182818284590452354 ), - "Error : test_Basics failed - 1"); + "test_Basics - 1"); harness.check(!( Math.PI != 3.14159265358979323846 ), - "Error : test_Basics failed - 2"); + "test_Basics - 2"); } public void test_sincostan() { harness.check(!( !(new Double(Math.sin( Double.NaN ))).isNaN() ), - "Error : test_sincostan failed - 1"); + "test_sincostan - 1"); harness.check(!( !(new Double(Math.sin( Double.POSITIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 2"); + "test_sincostan - 2"); harness.check(!( !(new Double(Math.sin( Double.NEGATIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 3"); + "test_sincostan - 3"); harness.check(!( Math.sin( -0.0 ) != -0.0 ), - "Error : test_sincostan failed - 4"); + "test_sincostan - 4"); harness.check(!( Math.sin( 0.0 ) != 0.0 ), - "Error : test_sincostan failed - 5"); + "test_sincostan - 5"); harness.check(!( !(new Double(Math.cos( Double.NaN ))).isNaN() ), - "Error : test_sincostan failed - 6"); + "test_sincostan - 6"); harness.check(!( !(new Double(Math.cos( Double.POSITIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 7"); + "test_sincostan - 7"); harness.check(!( !(new Double(Math.cos( Double.NEGATIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 8"); + "test_sincostan - 8"); harness.check(!( !(new Double(Math.tan( Double.NaN ))).isNaN() ), - "Error : test_sincostan failed - 9"); + "test_sincostan - 9"); harness.check(!( !(new Double(Math.tan( Double.POSITIVE_INFINITY ))).isNaN() ), - "Error : test_sincostan failed - 10"); + "test_sincostan - 10"); harness.check(!( !(new Double(Math.tan( Double.NEGATIVE_INFINITY ))).isNaN()), - "Error : test_sincostan failed - 11"); + "test_sincostan - 11"); harness.check(!( Math.tan( -0.0 ) != -0.0 ), - "Error : test_sincostan failed - 12"); + "test_sincostan - 12"); harness.check(!( Math.tan( 0.0 ) != 0.0 ), - "Error : test_sincostan failed - 13"); + "test_sincostan - 13"); harness.check(!( Math.sin( Math.PI / 2.0 + Math.PI /6.0 ) <= 0.0 ), - "Error : test_sincostan failed - 14"); + "test_sincostan - 14"); harness.check(!( Math.cos( Math.PI / 2.0 + Math.PI /6.0 ) >= 0.0 ), - "Error : test_sincostan failed - 14"); + "test_sincostan - 14"); harness.check(!( Math.tan( Math.PI / 2.0 + Math.PI /6.0 ) >= 0.0 ), - "Error : test_sincostan failed - 14"); + "test_sincostan - 14"); } public void test_asinacosatan() { harness.check(!( !(new Double(Math.asin( Double.NaN ))).isNaN() ), - "Error : test_asinacosatan failed - 1"); + "test_asinacosatan - 1"); harness.check(!( Math.asin( -0.0 ) != -0.0 ), - "Error : test_asinacosatan failed - 2"); + "test_asinacosatan - 2"); harness.check(!( Math.asin( 0.0 ) != 0.0 ), - "Error : test_asinacosatan failed - 3"); + "test_asinacosatan - 3"); harness.check(!( !(new Double(Math.asin( 10.0 ))).isNaN() ), - "Error : test_asinacosatan failed - 4"); + "test_asinacosatan - 4"); harness.check(!( !(new Double(Math.acos( Double.NaN ))).isNaN() ), - "Error : test_asinacosatan failed - 5"); + "test_asinacosatan - 5"); harness.check(!( !(new Double(Math.acos( 10.0 ))).isNaN() ), - "Error : test_asinacosatan failed - 6"); + "test_asinacosatan - 6"); harness.check(!( !(new Double(Math.atan( Double.NaN ))).isNaN() ), - "Error : test_asinacosatan failed - 7"); + "test_asinacosatan - 7"); harness.check(!( Math.atan( -0.0 ) != -0.0 ), - "Error : test_asinacosatan failed - 8"); + "test_asinacosatan - 8"); harness.check(!( Math.atan( 0.0 ) != 0.0 ), - "Error : test_asinacosatan failed - 9"); + "test_asinacosatan - 9"); } public void test_atan2() { harness.check(!(!(new Double( Math.atan2 (1.0 , Double.NaN ))).isNaN()), - "Error : test_atan2 failed - 1"); + "test_atan2 - 1"); harness.check(!(!(new Double( Math.atan2 (Double.NaN,1.0 ))).isNaN()), - "Error : test_atan2 failed - 2"); + "test_atan2 - 2"); harness.check(!(( Math.atan2(0.0, 10.0 ) != -0.0 ) || ( Math.atan2(2.0 , Double.POSITIVE_INFINITY ) != -0.0 )), - "Error : test_atan2 failed - 3"); + "test_atan2 - 3"); harness.check(!(( Math.atan2(-0.0, 10.0 ) != -0.0 ) || ( Math.atan2(-2.0 , Double.POSITIVE_INFINITY ) != -0.0 )), - "Error : test_atan2 failed - 4"); + "test_atan2 - 4"); harness.check(!(( Math.atan2(0.0, -10.0 ) != Math.PI) || ( Math.atan2(2.0 , Double.NEGATIVE_INFINITY ) != Math.PI )), - "Error : test_atan2 failed - 4"); + "test_atan2 - 4"); harness.check(!(( Math.atan2(-0.0, -10.0 ) != -Math.PI) || ( Math.atan2(-2.0 , Double.NEGATIVE_INFINITY ) != -Math.PI )), - "Error : test_atan2 failed - 5"); + "test_atan2 - 5"); harness.check(!(( Math.atan2(10.0, 0.0 ) != Math.PI/2.0) || ( Math.atan2(Double.POSITIVE_INFINITY , 3.0) != Math.PI /2.0)), - "Error : test_atan2 failed - 6"); + "test_atan2 - 6"); harness.check(!(( Math.atan2(-10.0, 0.0 ) != -Math.PI/2.0) || ( Math.atan2(Double.NEGATIVE_INFINITY , 3.0) != -Math.PI /2.0)), - "Error : test_atan2 failed - 7"); + "test_atan2 - 7"); harness.check(!(( Math.atan2(Double.POSITIVE_INFINITY, Double.POSITIVE_INFINITY ) != Math.PI/4.0)), - "Error : test_atan2 failed - 8"); + "test_atan2 - 8"); harness.check(!(( Math.atan2(Double.POSITIVE_INFINITY, Double.NEGATIVE_INFINITY ) != Math.PI*3.0/4.0)), - "Error : test_atan2 failed - 9"); + "test_atan2 - 9"); harness.check(!(( Math.atan2(Double.NEGATIVE_INFINITY, Double.POSITIVE_INFINITY ) != -Math.PI/4.0)), - "Error : test_atan2 failed - 10"); + "test_atan2 - 10"); harness.check(!(( Math.atan2(Double.NEGATIVE_INFINITY, Double.NEGATIVE_INFINITY ) != -Math.PI*3.0/4.0)), - "Error : test_atan2 failed - 11"); + "test_atan2 - 11"); } public void test_exp() { harness.check(!( !(new Double(Math.exp( Double.NaN ))).isNaN() ), - "Error : test_exp failed - 1"); + "test_exp - 1"); harness.check(!( !(new Double(Math.exp( Double.POSITIVE_INFINITY))).isInfinite() ), - "Error : test_exp failed - 2"); + "test_exp - 2"); harness.check(!( Math.exp( Double.NEGATIVE_INFINITY) != 0.0 ), - "Error : test_exp failed - 3"); + "test_exp - 3"); } public void test_log() { harness.check(!( !(new Double(Math.log( Double.NaN ))).isNaN() ), - "Error : test_log failed - 1"); + "test_log - 1"); harness.check(!( !(new Double(Math.log( -1.0 ))).isNaN() ), - "Error : test_log failed - 2"); + "test_log - 2"); harness.check(!( !(new Double(Math.log( Double.POSITIVE_INFINITY ))).isInfinite() ), - "Error : test_log failed - 3"); + "test_log - 3"); } public void test_sqrt() { harness.check(!( !(new Double(Math.sqrt( Double.NaN ))).isNaN() || !(new Double(Math.sqrt( -10.0 ))).isNaN()), - "Error : test_sqrt failed - 1"); + "test_sqrt - 1"); harness.check(!( !(new Double(Math.sqrt( Double.NaN ))).isNaN() || !(new Double(Math.sqrt( -10.0 ))).isNaN()), - "Error : test_sqrt failed - 2"); + "test_sqrt - 2"); harness.check(!( !(new Double(Math.sqrt( Double.POSITIVE_INFINITY))).isInfinite()), - "Error : test_sqrt failed - 3"); + "test_sqrt - 3"); harness.check(!( Math.sqrt( -0.0) != -0.0 || Math.sqrt( 0.0) != 0.0 ), - "Error : test_sqrt failed - 4"); + "test_sqrt - 4"); harness.check(!( Math.sqrt( -0.0) != -0.0 || Math.sqrt( 0.0) != 0.0 ), - "Error : test_sqrt failed - 5"); + "test_sqrt - 5"); double sq = Math.sqrt(4.0); harness.check(!(!( sq >= 1.9999 && sq <= 2.111 )), - "Error : test_sqrt failed - 6"); + "test_sqrt - 6"); } public void test_pow() { harness.check(!( Math.pow(1.0 , 0.0 ) != 1.0 ), - "Error : test_pow failed - 1"); + "test_pow - 1"); harness.check(!( Math.pow(2.0 , -0.0 ) != 1.0 ), - "Error : test_pow failed - 2"); + "test_pow - 2"); harness.check(!( Math.pow(123.0 , 1.0 ) != 123.0 ), - "Error : test_pow failed - 3"); + "test_pow - 3"); harness.check(!( !(new Double(Math.pow( 10.0, Double.NaN ))).isNaN()), - "Error : test_pow failed - 4"); + "test_pow - 4"); harness.check(!( !(new Double(Math.pow( Double.NaN, 1.0 ))).isNaN()), - "Error : test_pow failed - 5"); + "test_pow - 5"); harness.check(!( !(new Double(Math.pow( 2.0, Double.POSITIVE_INFINITY ))).isInfinite()), - "Error : test_pow failed - 6"); + "test_pow - 6"); harness.check(!( !(new Double(Math.pow( 0.5, Double.NEGATIVE_INFINITY ))).isInfinite()), - "Error : test_pow failed - 7"); + "test_pow - 7"); harness.check(!( Math.pow( 1.5, Double.NEGATIVE_INFINITY ) != 0.0 || Math.pow( 0.5, Double.POSITIVE_INFINITY ) != 0.0), - "Error : test_pow failed - 8"); + "test_pow - 8"); harness.check(!( !(new Double(Math.pow( 1.0, Double.POSITIVE_INFINITY ))).isNaN()), - "Error : test_pow failed - 9"); + "test_pow - 9"); harness.check(!( Math.pow( 0.0, 1.0) != 0.0 || Math.pow( Double.POSITIVE_INFINITY , -1.0 ) != 0.0), - "Error : test_pow failed - 10"); + "test_pow - 10"); harness.check(!( !(new Double(Math.pow( 0.0, -1.0 ))).isInfinite() || !(new Double(Math.pow( Double.POSITIVE_INFINITY, 1.0 ))).isInfinite() ), - "Error : test_pow failed - 11"); + "test_pow - 11"); harness.check(!( Math.pow( -0.0, 5.0) != -0.0 || Math.pow( Double.NEGATIVE_INFINITY , -7.0 ) != -0.0), - "Error : test_pow failed - 12"); + "test_pow - 12"); harness.check(!( Math.pow( -2.0, 6.0) != Math.pow(2.0,6.0)), - "Error : test_pow failed - 13"); + "test_pow - 13"); harness.check(!( Math.pow( -2.0, 5.0) != -Math.pow(2.0,5.0)), - "Error : test_pow failed - 14"); + "test_pow - 14"); } public void test_IEEEremainder() { harness.check(!( !(new Double(Math.IEEEremainder( Double.NaN, 1.0 ))).isNaN()), - "Error : test_IEEEremainder failed - 1"); + "test_IEEEremainder - 1"); harness.check(!( !(new Double(Math.IEEEremainder( 1.0,Double.NaN))).isNaN()), - "Error : test_IEEEremainder failed - 2"); + "test_IEEEremainder - 2"); harness.check(!( !(new Double(Math.IEEEremainder( Double.POSITIVE_INFINITY , 2.0))).isNaN()), - "Error : test_IEEEremainder failed - 3"); + "test_IEEEremainder - 3"); harness.check(!( !(new Double(Math.IEEEremainder( 2.0,0.0))).isNaN() ), - "Error : test_IEEEremainder failed - 4"); + "test_IEEEremainder - 4"); harness.check(!( Math.IEEEremainder( 3.0, Double.POSITIVE_INFINITY ) != 3.0 ), - "Error : test_IEEEremainder failed - 5"); + "test_IEEEremainder - 5"); } public void test_ceil() { harness.check(!( Math.ceil(5.0) != 5.0 ), - "Error : test_ceil failed - 1"); + "test_ceil - 1"); harness.check(!( Math.ceil(0.0) != 0.0 || Math.ceil(-0.0) != -0.0 ), - "Error : test_ceil failed - 2"); + "test_ceil - 2"); harness.check(!( !(new Double(Math.ceil(Double.POSITIVE_INFINITY))).isInfinite() || !(new Double(Math.ceil(Double.NaN))).isNaN()), - "Error : test_ceil failed - 3"); + "test_ceil - 3"); harness.check(!( Math.ceil(-0.5) != -0.0 ), - "Error : test_ceil failed - 4"); + "test_ceil - 4"); harness.check(!( Math.ceil( 2.5 ) != 3.0 ), - "Error : test_ceil failed - 5"); + "test_ceil - 5"); } @@ -285,268 +285,268 @@ public void test_floor() { harness.check(!( Math.floor(5.0) != 5.0 ), - "Error : test_floor failed - 1"); + "test_floor - 1"); harness.check(!( Math.floor(2.5) != 2.0 ), - "Error : test_floor failed - 2"); + "test_floor - 2"); harness.check(!( !(new Double(Math.floor(Double.POSITIVE_INFINITY))).isInfinite() || !(new Double(Math.floor(Double.NaN))).isNaN()), - "Error : test_floor failed - 3"); + "test_floor - 3"); harness.check(!( Math.floor(0.0) != 0.0 || Math.floor(-0.0) != -0.0 ), - "Error : test_floor failed - 4"); + "test_floor - 4"); } public void test_rint() { harness.check(!( Math.rint( 2.3 ) != 2.0 ), - "Error : test_rint failed - 1"); + "test_rint - 1"); harness.check(!( Math.rint( 2.7 ) != 3.0 ), - "Error : test_rint failed - 2"); + "test_rint - 2"); harness.check(!(Math.rint( 2.5) != 2.0 ), - "Error : test_rint failed - 3"); + "test_rint - 3"); harness.check(!( Math.rint( 2.0) != 2.0 ), - "Error : test_rint failed - 4"); + "test_rint - 4"); harness.check(!( Math.rint( 2.0) != 2.0 ), - "Error : test_rint failed - 5"); + "test_rint - 5"); harness.check(!( !(new Double(Math.rint(Double.POSITIVE_INFINITY))).isInfinite() || !(new Double(Math.rint(Double.NaN))).isNaN()), - "Error : test_rint failed - 6"); + "test_rint - 6"); harness.check(!( Math.rint(0.0) != 0.0 || Math.rint(-0.0) != -0.0 ), - "Error : test_rint failed - 7"); + "test_rint - 7"); } public void test_round() { harness.check(!( Math.round( 3.4 ) != 3 ), - "Error : test_round failed - 1"); + "test_round - 1"); harness.check(!( Math.round( 9.55 ) != 10 ), - "Error : test_round failed - 2"); + "test_round - 2"); harness.check(!( Math.round(Double.NaN) != 0 ), - "Error : test_round failed - 3"); + "test_round - 3"); float f1 = Integer.MIN_VALUE; f1 -= 5; harness.check(!( Math.round(f1) != Integer.MIN_VALUE || Math.round(Float.NEGATIVE_INFINITY) != Integer.MIN_VALUE ), - "Error : test_round failed - 4"); + "test_round - 4"); f1 = Integer.MAX_VALUE; f1 += 5; harness.check(!( Math.round(f1) != Integer.MAX_VALUE || Math.round(Float.POSITIVE_INFINITY) != Integer.MAX_VALUE ), - "Error : test_round failed - 5"); + "test_round - 5"); double d1 = Long.MIN_VALUE; d1 -= 5; harness.check(!( Math.round(d1) != Long.MIN_VALUE || Math.round(Double.NEGATIVE_INFINITY) != Long.MIN_VALUE ), - "Error : test_round failed - 6"); + "test_round - 6"); d1 = Long.MAX_VALUE; d1 += 5; harness.check(!( Math.round(d1) != Long.MAX_VALUE || Math.round(Double.POSITIVE_INFINITY) != Long.MAX_VALUE ), - "Error : test_round failed - 7"); + "test_round - 7"); harness.check(!( Math.round( 3.4f ) != 3 ), - "Error : test_round failed - 8"); + "test_round - 8"); harness.check(!( Math.round( 9.55f ) != 10 ), - "Error : test_round failed - 9"); + "test_round - 9"); harness.check(!( Math.round(Float.NaN) != 0 ), - "Error : test_round failed - 10"); + "test_round - 10"); } public void test_random() { harness.check(!( Math.random() < 0.0 || Math.random() > 1.0 ), - "Error : test_random failed - 1"); + "test_random - 1"); } public void test_abs() { harness.check(!( Math.abs( 10 ) != 10 ), - "Error : test_abs failed - 1"); + "test_abs - 1"); harness.check(!( Math.abs( -23 ) != 23 ), - "Error : test_abs failed - 2"); + "test_abs - 2"); harness.check(!( Math.abs( Integer.MIN_VALUE ) != Integer.MIN_VALUE ), - "Error : test_abs failed - 3" ); + "test_abs - 3" ); harness.check(!( Math.abs(-0) != 0 ), - "Error : test_abs failed - 4" ); + "test_abs - 4" ); harness.check(!( Math.abs( 1000L ) != 1000 ), - "Error : test_abs failed - 5"); + "test_abs - 5"); harness.check(!( Math.abs( -2334242L ) != 2334242 ), - "Error : test_abs failed - 6"); + "test_abs - 6"); harness.check(!( Math.abs( Long.MIN_VALUE ) != Long.MIN_VALUE ), - "Error : test_abs failed - 7" ); + "test_abs - 7" ); harness.check(!( Math.abs( 0.0f ) != 0.0f || Math.abs(-0.0f) != 0.0f ), - "Error : test_abs failed - 8" ); + "test_abs - 8" ); harness.check(!( !(new Float(Math.abs( Float.POSITIVE_INFINITY ))).isInfinite() ), - "Error : test_abs failed - 9" ); + "test_abs - 9" ); harness.check(!( !(new Float(Math.abs( Float.NaN ))).isNaN() ), - "Error : test_abs failed - 10" ); + "test_abs - 10" ); harness.check(!( Math.abs( 23.34f ) != 23.34f ), - "Error : test_abs failed - 11" ); + "test_abs - 11" ); harness.check(!( Math.abs( 0.0 ) != 0.0 || Math.abs(-0.0) != 0.0 ), - "Error : test_abs failed - 12" ); + "test_abs - 12" ); harness.check(!( !(new Double(Math.abs( Double.POSITIVE_INFINITY ))).isInfinite() ), - "Error : test_abs failed - 13" ); + "test_abs - 13" ); harness.check(!( !(new Double(Math.abs( Double.NaN ))).isNaN() ), - "Error : test_abs failed - 14" ); + "test_abs - 14" ); harness.check(!( Math.abs( 23.34 ) != 23.34 ), - "Error : test_abs failed - 15" ); + "test_abs - 15" ); } public void test_min() { harness.check(!( Math.min( 100 , 12 ) != 12 ), - "Error : test_min failed - 1" ); + "test_min - 1" ); harness.check(!( Math.min( Integer.MIN_VALUE , Integer.MIN_VALUE + 1 ) != Integer.MIN_VALUE ), - "Error : test_min failed - 2" ); + "test_min - 2" ); harness.check(!( Math.min( Integer.MAX_VALUE , Integer.MAX_VALUE -1 ) != Integer.MAX_VALUE -1 ), - "Error : test_min failed - 3" ); + "test_min - 3" ); harness.check(!( Math.min( 10 , 10 ) != 10 ), - "Error : test_min failed - 4" ); + "test_min - 4" ); harness.check(!( Math.min( 0 , -0 ) != -0 ), - "Error : test_min failed - 5" ); + "test_min - 5" ); harness.check(!( Math.min( 100L , 12L ) != 12L ), - "Error : test_min failed - 6" ); + "test_min - 6" ); harness.check(!( Math.min( Long.MIN_VALUE , Long.MIN_VALUE + 1 ) != Long.MIN_VALUE ), - "Error : test_min failed - 7" ); + "test_min - 7" ); harness.check(!( Math.min( Long.MAX_VALUE , Long.MAX_VALUE -1 ) != Long.MAX_VALUE -1 ), - "Error : test_min failed - 8" ); + "test_min - 8" ); harness.check(!( Math.min( 10L , 10L ) != 10L ), - "Error : test_min failed - 9" ); + "test_min - 9" ); harness.check(!( Math.min( 0L , -0L ) != -0L ), - "Error : test_min failed - 10" ); + "test_min - 10" ); harness.check(!( Math.min( 23.4f , 12.3f ) != 12.3f ), - "Error : test_min failed - 11" ); + "test_min - 11" ); harness.check(!( !(new Float(Math.min( Float.NaN , 1.0f ))).isNaN() ), - "Error : test_min failed - 12" ); + "test_min - 12" ); harness.check(!( Math.min( 10.0f , 10.0f ) != 10.0f ), - "Error : test_min failed - 13" ); + "test_min - 13" ); harness.check(!( Math.min( 0.0f , -0.0f ) != -0.0f ), - "Error : test_min failed - 14" ); + "test_min - 14" ); harness.check(!( Math.min( 23.4 , 12.3 ) != 12.3 ), - "Error : test_min failed - 15" ); + "test_min - 15" ); harness.check(!( !(new Double(Math.min( Double.NaN , 1.0 ))).isNaN() ), - "Error : test_min failed - 16" ); + "test_min - 16" ); harness.check(!( Math.min( 10.0 , 10.0 ) != 10.0 ), - "Error : test_min failed - 17" ); + "test_min - 17" ); harness.check(!( Math.min( 0.0 , -0.0 ) != -0.0 ), - "Error : test_min failed - 18" ); + "test_min - 18" ); } public void test_max() { harness.check(!( Math.max( 100 , 12 ) != 100 ), - "Error : test_max failed - 1" ); + "test_max - 1" ); harness.check(!( Math.max( Integer.MAX_VALUE , Integer.MAX_VALUE - 1 ) != Integer.MAX_VALUE ), - "Error : test_max failed - 2" ); + "test_max - 2" ); harness.check(!( Math.max( Integer.MIN_VALUE , Integer.MIN_VALUE + 1 ) != Integer.MIN_VALUE +1 ), - "Error : test_max failed - 3" ); + "test_max - 3" ); harness.check(!( Math.max( 10 , 10 ) != 10 ), - "Error : test_max failed - 4" ); + "test_max - 4" ); harness.check(!( Math.max( 0 , -0 ) != 0 ), - "Error : test_max failed - 5" ); + "test_max - 5" ); harness.check(!( Math.max( 100L , 12L ) != 100L ), - "Error : test_max failed - 6" ); + "test_max - 6" ); harness.check(!( Math.max( Long.MAX_VALUE , Long.MAX_VALUE - 1 ) != Long.MAX_VALUE ), - "Error : test_max failed - 7" ); + "test_max - 7" ); harness.check(!( Math.max( Long.MIN_VALUE , Long.MIN_VALUE +1 ) != Long.MIN_VALUE + 1 ), - "Error : test_max failed - 8" ); + "test_max - 8" ); harness.check(!( Math.max( 10L , 10L ) != 10L ), - "Error : test_max failed - 9" ); + "test_max - 9" ); harness.check(!( Math.max( 0L , -0L ) != 0L ), - "Error : test_max failed - 10" ); + "test_max - 10" ); harness.check(!( Math.max( 23.4f , 12.3f ) != 23.4f ), - "Error : test_max failed - 11" ); + "test_max - 11" ); harness.check(!( !(new Float(Math.max( Float.NaN , 1.0f ))).isNaN() ), - "Error : test_max failed - 12" ); + "test_max - 12" ); harness.check(!( Math.max( 10.0f , 10.0f ) != 10.0f ), - "Error : test_max failed - 13" ); + "test_max - 13" ); harness.check(!( Math.max( 0.0f , -0.0f ) != 0.0f ), - "Error : test_max failed - 14" ); + "test_max - 14" ); harness.check(!( Math.max( 23.4 , 12.3 ) != 23.4 ), - "Error : test_max failed - 15" ); + "test_max - 15" ); harness.check(!( !(new Double(Math.max( Double.NaN , 1.0 ))).isNaN() ), - "Error : test_max failed - 16" ); + "test_max - 16" ); harness.check(!( Math.max( 10.0 , 10.0 ) != 10.0 ), - "Error : test_max failed - 17" ); + "test_max - 17" ); harness.check(!( Math.max( 0.0 , -0.0 ) != 0.0 ), - "Error : test_max failed - 18" ); + "test_max - 18" ); } Index: ./gnu/testlet/java/lang/Short/ShortTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Short/ShortTest.java,v retrieving revision 1.3 diff -u -u -r1.3 ShortTest.java --- ./gnu/testlet/java/lang/Short/ShortTest.java 21 Feb 2005 15:52:48 -0000 1.3 +++ ./gnu/testlet/java/lang/Short/ShortTest.java 22 Jan 2006 21:14:49 -0000 @@ -32,25 +32,25 @@ { harness.check(!( Short.MIN_VALUE != -32768 || Short.MAX_VALUE != 32767 ), - "Error: test_Basics failed - 1" ); + "test_Basics - 1" ); Short i1 = new Short((short)100); harness.check(!( i1.shortValue() != 100 ), - "Error: test_Basics failed - 2" ); + "test_Basics - 2" ); try { harness.check(!( (new Short("234")).shortValue() != 234 ), - "Error: test_Basics failed - 3" ); + "test_Basics - 3" ); } catch ( NumberFormatException e ) { - harness.fail("Error: test_Basics failed - 3" ); + harness.fail("test_Basics - 3" ); } try { harness.check(!( (new Short("-FF")).shortValue() != -255 ), - "Error: test_Basics failed - 4" ); + "test_Basics - 4" ); } catch ( NumberFormatException e ) { @@ -58,31 +58,31 @@ try { new Short("babu"); - harness.fail("Error: test_Basics failed - 5" ); + harness.fail("test_Basics - 5" ); } catch ( NumberFormatException e ) { } harness.check(!( Short.decode( "123").shortValue() != 123 ), - "Error: test_Basics failed - 6" ); + "test_Basics - 6" ); harness.check(!( Short.decode( "32767").shortValue() != 32767 ), - "Error: test_Basics failed - 7" ); + "test_Basics - 7" ); } public void test_toString() { harness.check(!( !( new Short((short)123)).toString().equals("123")), - "Error: test_toString failed - 1" ); + "test_toString - 1" ); harness.check(!( !( new Short((short)-44)).toString().equals("-44")), - "Error: test_toString failed - 2" ); + "test_toString - 2" ); harness.check(!( !Short.toString((short) 234 ).equals ("234" )), - "Error: test_toString failed - 3" ); + "test_toString - 3" ); harness.check(!( !Short.toString((short) -34 ).equals ("-34" )), - "Error: test_toString failed - 4" ); + "test_toString - 4" ); harness.check(!( !Short.toString((short) -34 ).equals ("-34" )), - "Error: test_toString failed - 5" ); + "test_toString - 5" ); } @@ -92,16 +92,16 @@ Short i2 = new Short((short)-23); harness.check(!( !i1.equals( new Short((short)23))), - "Error: test_equals failed - 1" ); + "test_equals - 1" ); harness.check(!( !i2.equals( new Short((short)-23))), - "Error: test_equals failed - 2" ); + "test_equals - 2" ); harness.check(!( i1.equals( i2 )), - "Error: test_equals failed - 3" ); + "test_equals - 3" ); harness.check(!( i1.equals(null)), - "Error: test_equals failed - 4" ); + "test_equals - 4" ); } public void test_hashCode( ) @@ -110,7 +110,7 @@ Short b2 = new Short((short)-3439); harness.check(!( b1.hashCode() != 3439 || b2.hashCode() != -3439 ), - "Error: test_hashCode returned wrong results" ); + "test_hashCode" ); } public void test_intValue( ) @@ -119,10 +119,10 @@ Short b2 = new Short((short)-32767); harness.check(!( b1.intValue() != 32767 ), - "Error: test_intValue returned wrong results - 1" ); + "test_intValue - 1" ); harness.check(!( b2.intValue() != -32767 ), - "Error: test_intValue returned wrong results - 2" ); + "test_intValue - 2" ); } public void test_longValue( ) @@ -131,10 +131,10 @@ Short b2 = new Short((short)-3767); harness.check(!( b1.longValue() != (long)3767 ), - "Error: test_longValue returned wrong results - 1" ); + "test_longValue - 1" ); harness.check(!( b2.longValue() != -3767 ), - "Error: test_longValue returned wrong results - 2" ); + "test_longValue - 2" ); } public void test_floatValue( ) { @@ -142,10 +142,10 @@ Short b2 = new Short((short)-3276); harness.check(!( b1.floatValue() != 3276.0f ), - "Error: test_floatValue returned wrong results - 1" ); + "test_floatValue - 1" ); harness.check(!( b2.floatValue() != -3276.0f ), - "Error: test_floatValue returned wrong results - 2" ); + "test_floatValue - 2" ); } public void test_doubleValue( ) { @@ -153,10 +153,10 @@ Short b2 = new Short((short)30); harness.check(!( b1.doubleValue() != 0.0 ), - "Error: test_doubleValue returned wrong results - 1" ); + "test_doubleValue - 1" ); harness.check(!( b2.doubleValue() != 30.0 ), - "Error: test_doubleValue returned wrong results - 2" ); + "test_doubleValue - 2" ); } public void test_shortbyteValue( ) @@ -165,52 +165,52 @@ Short b2 = new Short((short)300); harness.check(!( b1.byteValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 1" ); + "test_shortbyteValue - 1" ); harness.check(!( b2.byteValue() != (byte)300 ), - "Error: test_shortbyteValue returned wrong results - 2" ); + "test_shortbyteValue - 2" ); harness.check(!( b1.shortValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 3" ); + "test_shortbyteValue - 3" ); harness.check(!( b2.shortValue() != (short)300 ), - "Error: test_shortbyteValue returned wrong results - 4" ); + "test_shortbyteValue - 4" ); harness.check(!( ((Number)b1).shortValue() != 0 ), - "Error: test_shortbyteValue returned wrong results - 5" ); + "test_shortbyteValue - 5" ); harness.check(!( ((Number)b2).byteValue() != (byte)300 ), - "Error: test_shortbyteValue returned wrong results - 6" ); + "test_shortbyteValue - 6" ); } public void test_parseShort() { harness.check(!( Short.parseShort("473") != Short.parseShort("473" , 10 )), - "Error: test_parseInt returned wrong results - 1" ); + "test_parseInt - 1" ); harness.check(!( Short.parseShort("0" , 10 ) != 0 ), - "Error: test_parseInt returned wrong results - 2" ); + "test_parseInt - 2" ); harness.check(!( Short.parseShort("473" , 10 ) != 473 ), - "Error: test_parseInt returned wrong results - 3" ); + "test_parseInt - 3" ); harness.check(!( Short.parseShort("-0" , 10 ) != 0 ), - "Error: test_parseInt returned wrong results - 4" ); + "test_parseInt - 4" ); harness.check(!( Short.parseShort("-FF" , 16 ) != -255 ), - "Error: test_parseInt returned wrong results - 5" ); + "test_parseInt - 5" ); harness.check(!( Short.parseShort("1100110" , 2 ) != 102 ), - "Error: test_parseInt returned wrong results - 6" ); + "test_parseInt - 6" ); try { Short.parseShort("99" , 8 ); - harness.fail("Error: test_parseInt returned wrong results - 10" ); + harness.fail("test_parseInt - 10" ); }catch ( NumberFormatException e ){} try { Short.parseShort("kona" , 10 ); - harness.fail("Error: test_parseInt returned wrong results - 11" ); + harness.fail("test_parseInt - 11" ); }catch ( NumberFormatException e ){} } public void test_valueOf( ) { harness.check(!( Short.valueOf("21234").intValue() != Short.parseShort("21234")), - "Error: test_valueOf returned wrong results - 1" ); + "test_valueOf - 1" ); } public void testall() Index: ./gnu/testlet/java/lang/String/StringTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/String/StringTest.java,v retrieving revision 1.5 diff -u -u -r1.5 StringTest.java --- ./gnu/testlet/java/lang/String/StringTest.java 21 Feb 2005 15:52:48 -0000 1.5 +++ ./gnu/testlet/java/lang/String/StringTest.java 22 Jan 2006 21:14:49 -0000 @@ -32,40 +32,40 @@ { String str1 = new String(); harness.check(!( str1.length() != 0 ), - "Error : test_Basics failed - 1"); + "test_Basics - 1"); harness.check(!( !str1.toString().equals("")), - "Error : test_Basics failed - 2"); + "test_Basics - 2"); String str2 = new String("testing" ); harness.check(!( str2.length() != 7 ), - "Error : test_Basics failed - 3"); + "test_Basics - 3"); harness.check(!( !str2.toString().equals("testing")), - "Error : test_Basics failed - 4"); + "test_Basics - 4"); try { String str = null; String str3 = new String(str); - harness.fail("Error : test_Basics failed - 5"); + harness.fail("test_Basics - 5"); } catch ( NullPointerException e ){} String str4 = new String( new StringBuffer("hi there")); harness.check(!( str4.length () != 8 ), - "Error : test_Basics failed - 6"); + "test_Basics - 6"); harness.check(!( !str4.toString().equals("hi there")), - "Error : test_Basics failed - 7"); + "test_Basics - 7"); char cdata[] = { 'h' , 'e' , 'l' , 'l' , 'o' }; String str5 = new String( cdata ); harness.check(!( str5.length () != 5 ), - "Error : test_Basics failed - 8"); + "test_Basics - 8"); harness.check(!( !str5.toString().equals("hello")), - "Error : test_Basics failed - 9"); + "test_Basics - 9"); try { String str6 = new String( cdata , 0 , 10 ); - harness.fail("Error : test_Basics failed - 10"); + harness.fail("test_Basics - 10"); }catch ( IndexOutOfBoundsException e ) {} @@ -73,18 +73,18 @@ try { byte [] barr = null; String str7 = new String( barr , 0 , 10 ); - harness.fail("Error : test_Basics failed - 11"); + harness.fail("test_Basics - 11"); }catch ( NullPointerException e ) {} String str8 = new String( cdata , 0 , 4 ); harness.check(!( !str8.equals("hell")), - "Error : test_Basics failed - 12"); + "test_Basics - 12"); try { String str10 = new String( null , 10 ); - harness.fail("Error : test_Basics failed - 13"); + harness.fail("test_Basics - 13"); }catch ( NullPointerException e ) {} @@ -97,18 +97,18 @@ byte b = (byte)(ch & 0x00ff ); harness.check(!( i != 10 || b != 'a' ), - "Error : test_Basics failed - 14"); + "test_Basics - 14"); byte bnull [] = null; try { String str11 = new String( bnull , 10 , 0 , 5); - harness.fail("Error : test_Basics failed - 15"); + harness.fail("test_Basics - 15"); }catch ( NullPointerException e ){} try { String str12 = new String( bdata , 10 , -1 , 3); - harness.fail("Error : test_Basics failed - 16"); + harness.fail("test_Basics - 16"); }catch ( IndexOutOfBoundsException e ){} @@ -117,30 +117,30 @@ b = (byte)(ch & 0x00ff ); harness.check(!( i != 10 || b != 'a' ), - "Error : test_Basics failed - 17"); + "test_Basics - 17"); String str14 = new String( bdata); harness.check(!( !str14.equals("dancing")), - "Error : test_Basics failed - 18"); + "test_Basics - 18"); // EJWcr00461 byte arr[]={(byte)'a'}; String str15 = new String(arr,0x1234,0,1); if (!str15.equals("\u3461")) { - harness.fail("Error : test_Basics failed - 19"); + harness.fail("test_Basics - 19"); } // EJWcr00462 char carr[] = {'h','e','l','l','o'}; try { String str16 = new String(carr, Integer.MAX_VALUE, 1); - harness.fail("Error : test_Basics failed - 20"); + harness.fail("test_Basics - 20"); } catch (IndexOutOfBoundsException e) { } byte arr2[]={(byte)'a', (byte)'b', (byte)'c', (byte)'d', (byte)'e'}; try { String str17 = new String(arr2,0x1234,Integer.MAX_VALUE,1); - harness.fail("Error : test_Basics failed - 21"); + harness.fail("test_Basics - 21"); } catch (IndexOutOfBoundsException e) { } @@ -154,13 +154,13 @@ String str1 = "218943289"; harness.check(!( !str1.toString().equals("218943289")), - "Error : test_toString failed - 1"); + "test_toString - 1"); harness.check(!( str1 != "218943289" ), - "Error : test_toString failed - 2"); + "test_toString - 2"); harness.check(!( !str1.equals(str1.toString())), - "Error : test_toString failed - 3"); + "test_toString - 3"); } public void test_equals() @@ -168,19 +168,19 @@ String str2 = new String("Nectar"); harness.check(!( str2.equals( null )), - "Error : test_equals failed - 1"); + "test_equals - 1"); harness.check(!( !str2.equals("Nectar")), - "Error : test_equals failed - 2"); + "test_equals - 2"); harness.check(!( str2.equals("")), - "Error : test_equals failed - 3"); + "test_equals - 3"); harness.check(!( str2.equals("nectar")), - "Error : test_equals failed - 4"); + "test_equals - 4"); harness.check(!( !"".equals("")), - "Error : test_equals failed - 5"); + "test_equals - 5"); } @@ -193,33 +193,33 @@ int acthash1 = str1.hashCode(); harness.check(!( hash1 != acthash1 ), - "Error : test_hashCode failed - 1"); + "test_hashCode - 1"); } public void test_length() { harness.check(!( "".length() != 0 ), - "Error : test_length failed - 1"); + "test_length - 1"); harness.check(!( "pentium".length() != 7 ), - "Error : test_length failed - 2"); + "test_length - 2"); } public void test_charAt() { harness.check(!( "abcd".charAt(0) != 'a' || "abcd".charAt(1) != 'b' || "abcd".charAt(2) != 'c' || "abcd".charAt(3) != 'd' ), - "Error : test_charAt failed - 1"); + "test_charAt - 1"); try { char ch = "abcd".charAt(4); - harness.fail("Error : test_charAt failed - 2"); + harness.fail("test_charAt - 2"); } catch ( IndexOutOfBoundsException e ){} try { char ch = "abcd".charAt(-1); - harness.fail("Error : test_charAt failed - 3"); + harness.fail("test_charAt - 3"); } catch ( IndexOutOfBoundsException e ){} } @@ -230,52 +230,52 @@ try { str.getChars(0 , 3 , null , 1 ); - harness.fail("Error : test_getChars failed - 1"); + harness.fail("test_getChars - 1"); }catch ( NullPointerException e ){} char dst[] = new char[5]; try { str.getChars(-1 , 3 , dst , 1 ); - harness.fail("Error : test_getChars failed - 2"); + harness.fail("test_getChars - 2"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(4 , 3 , dst , 1 ); - harness.fail("Error : test_getChars failed - 3"); + harness.fail("test_getChars - 3"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 15 , dst , 1 ); - harness.fail("Error : test_getChars failed - 4"); + harness.fail("test_getChars - 4"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 5 , dst , -1 ); - harness.fail("Error : test_getChars failed - 5"); + harness.fail("test_getChars - 5"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 10 , dst , 1 ); - harness.fail("Error : test_getChars failed - 6"); + harness.fail("test_getChars - 6"); }catch ( IndexOutOfBoundsException e ){} str.getChars(0,5,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != 'b' || dst[2] != 'c' || dst[3] != 'd' || dst[4] != 'e' ), - "Error : test_getChars failed - 7"); + "test_getChars - 7"); dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = ' '; str.getChars(0,0,dst, 0 ); harness.check(!( dst[0] != ' ' || dst[1] != ' ' || dst[2] != ' ' || dst[3] != ' ' || dst[4] != ' ' ), - "Error : test_getChars failed - 9"); + "test_getChars - 9"); dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = ' '; str.getChars(0,1,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != ' ' || dst[2] != ' ' || dst[3] != ' ' || dst[4] != ' ' ), - "Error : test_getChars failed - 10"); + "test_getChars - 10"); } @@ -285,46 +285,46 @@ try { str.getBytes(0 , 3 , null , 1 ); - harness.fail("Error : test_getBytes failed - 1"); + harness.fail("test_getBytes - 1"); }catch ( NullPointerException e ){} byte dst[] = new byte[5]; try { str.getBytes(-1 , 3 , dst , 1 ); - harness.fail("Error : test_getBytes failed - 2"); + harness.fail("test_getBytes - 2"); }catch ( IndexOutOfBoundsException e ){} try { str.getBytes(4 , 3 , dst , 1 ); - harness.fail("Error : test_getBytes failed - 3"); + harness.fail("test_getBytes - 3"); }catch ( IndexOutOfBoundsException e ){} try { str.getBytes(1 , 15 , dst , 1 ); - harness.fail("Error : test_getBytes failed - 4"); + harness.fail("test_getBytes - 4"); }catch ( IndexOutOfBoundsException e ){} try { str.getBytes(1 , 5 , dst , -1 ); - harness.fail("Error : test_getBytes failed - 5"); + harness.fail("test_getBytes - 5"); }catch ( IndexOutOfBoundsException e ){} try { str.getBytes(1 , 10 , dst , 1 ); - harness.fail("Error : test_getBytes failed - 6"); + harness.fail("test_getBytes - 6"); }catch ( IndexOutOfBoundsException e ){} str.getBytes(0,5,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != 'b' || dst[2] != 'c' || dst[3] != 'd' || dst[4] != 'e' ), - "Error : test_getBytes failed - 7"); + "test_getBytes - 7"); byte [] dst1 = new byte[40]; dst1 = str.getBytes(); harness.check(!( dst1[0] != 'a' || dst1[1] != 'b' || dst1[2] != 'c' || dst1[3] != 'd' || dst1[4] != 'e' ), - "Error : test_getBytes failed - 8"); + "test_getBytes - 8"); } public void test_toCharArray() @@ -334,27 +334,27 @@ harness.check(!( charr[0] != 'a' || charr[1] != 'b' || charr[2] != 'c' || charr[3] != 'd' || charr[4] != 'e' ), - "Error : test_toCharArray failed - 1"); + "test_toCharArray - 1"); char [] charr1 = "".toCharArray(); harness.check(!( charr1.length > 0 ), - "Error : test_toCharArray failed - 2"); + "test_toCharArray - 2"); } public void test_equalsIgnoreCase() { harness.check(!( "hi".equalsIgnoreCase(null)), - "Error : test_equalsIgnoreCase failed - 1"); + "test_equalsIgnoreCase - 1"); harness.check(!( !"hi".equalsIgnoreCase("HI")), - "Error : test_equalsIgnoreCase failed - 2"); + "test_equalsIgnoreCase - 2"); harness.check(!( "hi".equalsIgnoreCase("pq")), - "Error : test_equalsIgnoreCase failed - 3"); + "test_equalsIgnoreCase - 3"); harness.check(!( "hi".equalsIgnoreCase("HI ")), - "Error : test_equalsIgnoreCase failed - 4"); + "test_equalsIgnoreCase - 4"); } @@ -362,311 +362,311 @@ { try { int res = "abc".compareTo(null); - harness.fail("Error : test_compareTo failed - 1"); + harness.fail("test_compareTo - 1"); } catch ( NullPointerException e ){} harness.check(!( "abc".compareTo("bcdef") >= 0 ), - "Error : test_compareTo failed - 2"); + "test_compareTo - 2"); harness.check(!( "abc".compareTo("abc") != 0 ), - "Error : test_compareTo failed - 3"); + "test_compareTo - 3"); harness.check(!( "abc".compareTo("aabc") <= 0 ), - "Error : test_compareTo failed - 4"); + "test_compareTo - 4"); harness.check(!( "abcd".compareTo("abc") <= 0 ), - "Error : test_compareTo failed - 5"); + "test_compareTo - 5"); harness.check(!( "".compareTo("abc") >= 0 ), - "Error : test_compareTo failed - 6"); + "test_compareTo - 6"); } public void test_regionMatches() { try { boolean res = "abc".regionMatches(0 , null , 0 , 2); - harness.fail("Error : test_regionMatches failed - 1"); + harness.fail("test_regionMatches - 1"); } catch ( NullPointerException e ){} harness.check(!( "abcd".regionMatches(-1 , "abcd" , 0 , 2 )), - "Error : test_regionMatches failed - 2"); + "test_regionMatches - 2"); harness.check(!( "abcd".regionMatches(0 , "abcd" , - 1 , 2 )), - "Error : test_regionMatches failed - 3"); + "test_regionMatches - 3"); harness.check(!( "abcd".regionMatches(0 , "abcd" , 0 , 10 )), - "Error : test_regionMatches failed - 4"); + "test_regionMatches - 4"); harness.check(!( "abcd".regionMatches(0 , "ab" , 0 , 3 )), - "Error : test_regionMatches failed - 5"); + "test_regionMatches - 5"); harness.check(!( !"abcd".regionMatches(1 , "abc" , 1 , 2 )), - "Error : test_regionMatches failed - 6"); + "test_regionMatches - 6"); harness.check(!( !"abcd".regionMatches(1 , "abc" , 1 , 0 )), - "Error : test_regionMatches failed - 7"); + "test_regionMatches - 7"); harness.check(!( "abcd".regionMatches(1 , "ABC" , 1 , 2 )), - "Error : test_regionMatches failed - 8"); + "test_regionMatches - 8"); try { boolean res = "abc".regionMatches(true , 0 , null , 0 , 2); - harness.fail("Error : test_regionMatches failed - 11"); + harness.fail("test_regionMatches - 11"); } catch ( NullPointerException e ){} harness.check(!( "abcd".regionMatches(true , -1 , "abcd" , 0 , 2 )), - "Error : test_regionMatches failed - 12"); + "test_regionMatches - 12"); harness.check(!( "abcd".regionMatches(true , 0 , "abcd" , - 1 , 2 )), - "Error : test_regionMatches failed - 13"); + "test_regionMatches - 13"); harness.check(!( "abcd".regionMatches(true , 0 , "abcd" , 0 , 10 )), - "Error : test_regionMatches failed - 14"); + "test_regionMatches - 14"); harness.check(!( "abcd".regionMatches(true , 0 , "ab" , 0 , 3 )), - "Error : test_regionMatches failed - 15"); + "test_regionMatches - 15"); harness.check(!( !"abcd".regionMatches(true , 1 , "abc" , 1 , 2 )), - "Error : test_regionMatches failed - 16"); + "test_regionMatches - 16"); harness.check(!( !"abcd".regionMatches(true , 1 , "abc" , 1 , 0 )), - "Error : test_regionMatches failed - 17"); + "test_regionMatches - 17"); harness.check(!( !"abcd".regionMatches(true , 1 , "ABC" , 1 , 2 )), - "Error : test_regionMatches failed - 18"); + "test_regionMatches - 18"); harness.check(!( "abcd".regionMatches(false , 1 , "ABC" , 1 , 2 )), - "Error : test_regionMatches failed - 19"); + "test_regionMatches - 19"); } public void test_startsWith() { harness.check(!( !"abcdef".startsWith( "abc")), - "Error : test_startsWith failed - 1"); + "test_startsWith - 1"); try { boolean b = "abcdef".startsWith( null ); - harness.fail("Error : test_startsWith failed - 2"); + harness.fail("test_startsWith - 2"); } catch ( NullPointerException e ){} harness.check(!( "abcdef".startsWith( "ABC")), - "Error : test_startsWith failed - 3"); + "test_startsWith - 3"); harness.check(!( !"abcdef".startsWith( "")), - "Error : test_startsWith failed - 4"); + "test_startsWith - 4"); harness.check(!( "abc".startsWith( "abcd")), - "Error : test_startsWith failed - 5"); + "test_startsWith - 5"); harness.check(!( !"abcdef".startsWith( "abc" , 0 )), - "Error : test_startsWith failed - 6"); + "test_startsWith - 6"); try { boolean b = "abcdef".startsWith( null ,0); - harness.fail("Error : test_startsWith failed - 7"); + harness.fail("test_startsWith - 7"); } catch ( NullPointerException e ){} harness.check(!( "abcdef".startsWith( "ABC", 2)), - "Error : test_startsWith failed - 8"); + "test_startsWith - 8"); harness.check(!( !"abcdef".startsWith( "", 0 )), - "Error : test_startsWith failed - 9"); + "test_startsWith - 9"); harness.check(!( "abc".startsWith( "abcd" , 3)), - "Error : test_startsWith failed - 10"); + "test_startsWith - 10"); harness.check(!( "abc".startsWith( "abc" , 10)), - "Error : test_startsWith failed - 11"); + "test_startsWith - 11"); } public void test_endsWith() { harness.check(!( !"abcdef".endsWith( "def")), - "Error : test_endsWith failed - 1"); + "test_endsWith - 1"); try { boolean b = "abcdef".endsWith( null ); - harness.fail("Error : test_endsWith failed - 2"); + harness.fail("test_endsWith - 2"); } catch ( NullPointerException e ){} harness.check(!( "abcdef".endsWith( "DEF")), - "Error : test_endsWith failed - 3"); + "test_endsWith - 3"); harness.check(!( !"abcdef".endsWith( "")), - "Error : test_endsWith failed - 4"); + "test_endsWith - 4"); harness.check(!( "bcde".endsWith( "abcd")), - "Error : test_endsWith failed - 5"); + "test_endsWith - 5"); } public void test_indexOf() { harness.check(!( "a".indexOf('a') != 0 ), - "Error : test_indexOf failed - 1"); + "test_indexOf - 1"); harness.check(!( "aabc".indexOf('c') != 3 ), - "Error : test_indexOf failed - 2"); + "test_indexOf - 2"); harness.check(!( "a".indexOf('c') != -1 ), - "Error : test_indexOf failed - 3"); + "test_indexOf - 3"); harness.check(!( "".indexOf('a') != -1 ), - "Error : test_indexOf failed - 4"); + "test_indexOf - 4"); harness.check(!( "abcde".indexOf('b', 3) != -1 ), - "Error : test_indexOf failed - 5"); + "test_indexOf - 5"); harness.check(!( "abcde".indexOf('b', 0) != 1 ), - "Error : test_indexOf failed - 6"); + "test_indexOf - 6"); harness.check(!( "abcdee".indexOf('e', 3) != 4 ), - "Error : test_indexOf failed - 7"); + "test_indexOf - 7"); harness.check(!( "abcdee".indexOf('e', 5) != 5 ), - "Error : test_indexOf failed - 8"); + "test_indexOf - 8"); harness.check(!( "abcdee".indexOf('e', -5) != 4 ), - "Error : test_indexOf failed - 9"); + "test_indexOf - 9"); harness.check(!( "abcdee".indexOf('e', 15) != -1 ), - "Error : test_indexOf failed - 10"); + "test_indexOf - 10"); harness.check(!( "abcdee".indexOf("babu") != -1 ), - "Error : test_indexOf failed - 11"); + "test_indexOf - 11"); try { int x = "abcdee".indexOf(null); - harness.fail("Error : test_indexOf failed - 12"); + harness.fail("test_indexOf - 12"); }catch ( NullPointerException e ){} harness.check(!( "abcdee".indexOf("") != 0 ), - "Error : test_indexOf failed - 13"); + "test_indexOf - 13"); harness.check(!( "abcdee".indexOf("ee") != 4 ), - "Error : test_indexOf failed - 14"); + "test_indexOf - 14"); harness.check(!( "abcbcbc".indexOf("cbc") != 2 ), - "Error : test_indexOf failed - 15"); + "test_indexOf - 15"); harness.check(!( "abcdee".indexOf("babu", 3) != -1 ), - "Error : test_indexOf failed - 16"); + "test_indexOf - 16"); try { int x = "abcdee".indexOf(null,0); - harness.fail("Error : test_indexOf failed - 17"); + harness.fail("test_indexOf - 17"); }catch ( NullPointerException e ){} harness.check(!( "abcdee".indexOf("", 0) != 0 ), - "Error : test_indexOf failed - 18"); + "test_indexOf - 18"); harness.check(!( "abcdee".indexOf("ee", 4) != 4 ), - "Error : test_indexOf failed - 19"); + "test_indexOf - 19"); harness.check(!( "abcbcbc".indexOf("cbc",4 ) != 4 ), - "Error : test_indexOf failed - 20"); + "test_indexOf - 20"); // EJWcr00463 if ( "hello \u5236 world".indexOf('\u5236') != 6 ) { - harness.fail("Error : test_indexOf failed - 21"); + harness.fail("test_indexOf - 21"); } if ( "hello \u0645 world".indexOf('\u0645') != 6 ) { - harness.fail("Error : test_indexOf failed - 22"); + harness.fail("test_indexOf - 22"); } if ( "hello \u07ff world".indexOf('\u07ff') != 6 ) { - harness.fail("Error : test_indexOf failed - 23"); + harness.fail("test_indexOf - 23"); } } public void test_lastIndexOf() { harness.check(!( "a".lastIndexOf('a') != 0 ), - "Error : test_lastIndexOf failed - 1"); + "test_lastIndexOf - 1"); harness.check(!( "aabc".lastIndexOf('c') != 3 ), - "Error : test_lastIndexOf failed - 2"); + "test_lastIndexOf - 2"); harness.check(!( "a".lastIndexOf('c') != -1 ), - "Error : test_lastIndexOf failed - 3"); + "test_lastIndexOf - 3"); harness.check(!( "".lastIndexOf('a') != -1 ), - "Error : test_lastIndexOf failed - 4"); + "test_lastIndexOf - 4"); harness.check(!( "abcde".lastIndexOf('b', 0) != -1 ), - "Error : test_lastIndexOf failed - 5"); + "test_lastIndexOf - 5"); harness.check(!( "abcde".lastIndexOf('b', 4) != 1 ), - "Error : test_lastIndexOf failed - 6"); + "test_lastIndexOf - 6"); harness.check(!( "abcdee".lastIndexOf('e', 7) != 5 ), - "Error : test_lastIndexOf failed - 7"); + "test_lastIndexOf - 7"); harness.check(!( "abcdee".lastIndexOf('e', 5) != 5 ), - "Error : test_lastIndexOf failed - 8"); + "test_lastIndexOf - 8"); harness.check(!( "abcdee".lastIndexOf('e', -5) != -1 ), - "Error : test_lastIndexOf failed - 9"); + "test_lastIndexOf - 9"); harness.check(!( "abcdee".lastIndexOf('e', 15) != 5 ), - "Error : test_lastIndexOf failed - 10"); + "test_lastIndexOf - 10"); harness.check(!( "abcdee".lastIndexOf("babu") != -1 ), - "Error : test_lastIndexOf failed - 11"); + "test_lastIndexOf - 11"); try { int x = "abcdee".lastIndexOf(null); - harness.fail("Error : test_lastIndexOf failed - 12"); + harness.fail("test_lastIndexOf - 12"); }catch ( NullPointerException e ){} harness.check(!( "abcdee".lastIndexOf("") != 6 ), - "Error : test_lastIndexOf failed - 13"); + "test_lastIndexOf - 13"); harness.check(!( "abcdee".lastIndexOf("ee") != 4 ), - "Error : test_lastIndexOf failed - 14"); + "test_lastIndexOf - 14"); harness.check(!( "abcbcbc".lastIndexOf("cbc") != 4 ), - "Error : test_lastIndexOf failed - 15"); + "test_lastIndexOf - 15"); harness.check(!( "abcdee".lastIndexOf("babu", 3) != -1 ), - "Error : test_lastIndexOf failed - 16"); + "test_lastIndexOf - 16"); try { int x = "abcdee".lastIndexOf(null,0); - harness.fail("Error : test_lastIndexOf failed - 17"); + harness.fail("test_lastIndexOf - 17"); }catch ( NullPointerException e ){} harness.check(!( "abcdee".lastIndexOf("", 0) != 0 ), - "Error : test_lastIndexOf failed - 18"); + "test_lastIndexOf - 18"); harness.check(!( "abcdee".lastIndexOf("ee", 4) != 4 ), - "Error : test_lastIndexOf failed - 19"); + "test_lastIndexOf - 19"); harness.check(!( "abcbcbc".lastIndexOf("cbc",3 ) != 2 ), - "Error : test_lastIndexOf failed - 20"); + "test_lastIndexOf - 20"); } public void test_substring() { harness.check(!( !"unhappy".substring(2).equals("happy")), - "Error : test_substring failed - 1"); + "test_substring - 1"); harness.check(!( !"Harbison".substring(3).equals("bison")), - "Error : test_substring failed - 2"); + "test_substring - 2"); harness.check(!( !"emptiness".substring(9).equals("")), - "Error : test_substring failed - 3"); + "test_substring - 3"); try { String str = "hi there".substring(-1); - harness.fail("Error : test_substring failed - 4"); + harness.fail("test_substring - 4"); }catch( IndexOutOfBoundsException e ){} try { String str = "hi there".substring(10); - harness.fail("Error : test_substring failed - 5"); + harness.fail("test_substring - 5"); }catch( IndexOutOfBoundsException e ){} harness.check(!( !"hamburger".substring(4,8).equals("urge")), - "Error : test_substring failed - 6"); + "test_substring - 6"); harness.check(!( !"smiles".substring(1,5).equals("mile")), - "Error : test_substring failed - 7"); + "test_substring - 7"); harness.check(!( !"emptiness".substring(2,2).equals("")), - "Error : test_substring failed - 8"); + "test_substring - 8"); try { String str = "hi there".substring(-1, 3); - harness.fail("Error : test_substring failed - 9"); + harness.fail("test_substring - 9"); }catch( IndexOutOfBoundsException e ){} try { String str = "hi there".substring(0, 10); - harness.fail("Error : test_substring failed - 10"); + harness.fail("test_substring - 10"); }catch( IndexOutOfBoundsException e ){} try { String str = "hi there".substring(7, 6); - harness.fail("Error : test_substring failed - 11"); + harness.fail("test_substring - 11"); }catch( IndexOutOfBoundsException e ){} @@ -676,31 +676,31 @@ { try { String str = "help".concat(null); - harness.fail("Error : test_concat failed - 1"); + harness.fail("test_concat - 1"); }catch ( NullPointerException e){} harness.check(!( !"help".concat("me").equals("helpme")), - "Error : test_concat failed - 2"); + "test_concat - 2"); harness.check(!( ! "to".concat("get").concat("her").equals("together")), - "Error : test_concat failed - 3"); + "test_concat - 3"); harness.check(!( "hi".concat("") != "hi"), - "Error : test_concat failed - 4"); + "test_concat - 4"); String str1 = "".concat("there"); harness.check(!( !str1.equals("there")), - "Error : test_concat failed - 5"); + "test_concat - 5"); // EJWcr00467 String str2 = new String(); try { str2 = str2.concat("hello"); if (!str2.equals("hello")) { - harness.fail("Error : test_concat failed - 7"); + harness.fail("test_concat - 7"); } } catch (Exception e) { - harness.fail("Error : test_concat failed - 6"); + harness.fail("test_concat - 6"); } } @@ -709,28 +709,28 @@ { harness.check(!( !"mesquite in your cellar".replace('e' , 'o' ).equals( "mosquito in your collar" )), - "Error : test_replace failed - 1"); + "test_replace - 1"); harness.check(!( !"the war of baronets".replace('r' , 'y' ).equals( "the way of bayonets" )), - "Error : test_replace failed - 2"); + "test_replace - 2"); harness.check(!( !"sparring with a purple porpoise".replace('p' , 't' ).equals( "starring with a turtle tortoise" )), - "Error : test_replace failed - 3"); + "test_replace - 3"); harness.check(!( !"JonL".replace('q' , 'x' ).equals("JonL" )), - "Error : test_replace failed - 4"); + "test_replace - 4"); harness.check(!( !"ppppppppppppp".replace('p' , 'p' ).equals("ppppppppppppp")), - "Error : test_replace failed - 5"); + "test_replace - 5"); harness.check(!( !"ppppppppppppp".replace('p' , '1' ).equals("1111111111111")), - "Error : test_replace failed - 6"); + "test_replace - 6"); harness.check(!( !"hp".replace('c' , 'd' ).equals("hp")), - "Error : test_replace failed - 7"); + "test_replace - 7"); harness.check(!( !"vmhere".replace('a' , 'd' ).equals("vmhere")), - "Error : test_replace failed - 8"); + "test_replace - 8"); } @@ -738,41 +738,41 @@ public void test_toLowerCase() { harness.check(!( !"".toLowerCase().equals("")), - "Error : test_toLowerCase failed - 1"); + "test_toLowerCase - 1"); harness.check(!( !"French Fries".toLowerCase().equals("french fries")), - "Error : test_toLowerCase failed - 2"); + "test_toLowerCase - 2"); harness.check(!( !"SMALL-VM".toLowerCase().equals("small-vm")), - "Error : test_toLowerCase failed - 3"); + "test_toLowerCase - 3"); } public void test_toUpperCase() { harness.check(!( !"".toUpperCase().equals("")), - "Error : test_toUpperCase failed - 1"); + "test_toUpperCase - 1"); harness.check(!( !"French Fries".toUpperCase().equals("FRENCH FRIES")), - "Error : test_toUpperCase failed - 2"); + "test_toUpperCase - 2"); harness.check(!( !"SMALL-VM".toUpperCase().equals("SMALL-VM")), - "Error : test_toUpperCase failed - 3"); + "test_toUpperCase - 3"); harness.check(!( !"small-jvm".toUpperCase().equals("SMALL-JVM")), - "Error : test_toUpperCase failed - 4"); + "test_toUpperCase - 4"); } public void test_valueOf() { harness.check(!( !String.valueOf((Object)null).equals("null")), - "Error : test_valueOf failed - 1"); + "test_valueOf - 1"); Object obj = new Object(); harness.check(!( !String.valueOf(obj).equals(obj.toString())), - "Error : test_valueOf failed - 2"); + "test_valueOf - 2"); try { @@ -782,60 +782,60 @@ char [] data = { 'h' , 'e' , 'l' , 'l' , 'o' }; harness.check(!( !String.valueOf( data ).equals("hello")), - "Error : test_valueOf failed - 3"); + "test_valueOf - 3"); harness.check(!( !String.copyValueOf( data ).equals("hello")), - "Error : test_valueOf failed - 3a"); + "test_valueOf - 3a"); try { String str = String.valueOf(data , -1 , 4 ); - harness.fail("Error : test_valueOf failed - 4"); + harness.fail("test_valueOf - 4"); }catch ( IndexOutOfBoundsException e ){} try { String str = String.valueOf(data , 1 , 5 ); - harness.fail("Error : test_valueOf failed - 5"); + harness.fail("test_valueOf - 5"); }catch ( IndexOutOfBoundsException e ){} try { String str = String.valueOf(data , 1 , -5 ); - harness.fail("Error : test_valueOf failed - 6"); + harness.fail("test_valueOf - 6"); }catch ( IndexOutOfBoundsException e ){} try { String str = String.valueOf(null , 1 , 3 ); - harness.fail("Error : test_valueOf failed - 7"); + harness.fail("test_valueOf - 7"); }catch ( NullPointerException e ){} harness.check(!( !String.valueOf(data , 2 , 2 ).equals("ll")), - "Error : test_valueOf failed - 8"); + "test_valueOf - 8"); harness.check(!( !String.copyValueOf(data , 2 , 2 ).equals("ll")), - "Error : test_valueOf failed - 8a"); + "test_valueOf - 8a"); harness.check(!( !String.valueOf(true).equals("true")), - "Error : test_valueOf failed - 9"); + "test_valueOf - 9"); harness.check(!( !String.valueOf(false).equals("false")), - "Error : test_valueOf failed - 10"); + "test_valueOf - 10"); harness.check(!( !String.valueOf('c').equals("c")), - "Error : test_valueOf failed - 11"); + "test_valueOf - 11"); harness.check(!( !String.valueOf(' ').equals(" ")), - "Error : test_valueOf failed - 12"); + "test_valueOf - 12"); harness.check(!( !String.valueOf(234).equals("234")), - "Error : test_valueOf failed - 13"); + "test_valueOf - 13"); harness.check(!( !String.valueOf(234L).equals("234")), - "Error : test_valueOf failed - 14"); + "test_valueOf - 14"); harness.check(!( !String.valueOf(23.45f).equals("23.45")), - "Error : test_valueOf failed - 15"); + "test_valueOf - 15"); harness.check(!( !String.valueOf(23.4).equals("23.4")), - "Error : test_valueOf failed - 16"); + "test_valueOf - 16"); } public void test_intern() @@ -843,24 +843,24 @@ String hp = "hp"; String nullstr = ""; harness.check(!( "hp".intern() != hp.intern()), - "Error : test_intern failed - 1"); + "test_intern - 1"); harness.check(!( "pqr".intern() == hp.intern()), - "Error : test_intern failed - 2"); + "test_intern - 2"); harness.check(!( "".intern() != nullstr.intern()), - "Error : test_intern failed - 3"); + "test_intern - 3"); harness.check(!( "".intern() == hp.intern()), - "Error : test_intern failed - 4"); + "test_intern - 4"); hp = ""; harness.check(!( "".intern() != hp.intern()), - "Error : test_intern failed - 5"); + "test_intern - 5"); StringBuffer buff= new StringBuffer(); buff.append('a'); buff.append('b'); harness.check(!( "ab".intern() != buff.toString().intern()), - "Error : test_intern failed - 6"); + "test_intern - 6"); StringBuffer buff1 = new StringBuffer(); harness.check(!( "".intern() != buff1.toString().intern()), - "Error : test_intern failed - 7"); + "test_intern - 7"); } public void test_trim() Index: ./gnu/testlet/java/lang/StringBuffer/StringBufferTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/StringBuffer/StringBufferTest.java,v retrieving revision 1.6 diff -u -u -r1.6 StringBufferTest.java --- ./gnu/testlet/java/lang/StringBuffer/StringBufferTest.java 21 Feb 2005 15:52:49 -0000 1.6 +++ ./gnu/testlet/java/lang/StringBuffer/StringBufferTest.java 22 Jan 2006 21:14:50 -0000 @@ -32,20 +32,20 @@ { try { StringBuffer str0 = new StringBuffer(-10); - harness.fail("Error : test_Basics failed - 0"); + harness.fail("test_Basics - 0"); }catch ( NegativeArraySizeException e ){} StringBuffer str1 = new StringBuffer(); harness.check(!( str1.length() != 0 || str1.capacity() != 16 ), - "Error : test_Basics failed - 1"); + "test_Basics - 1"); harness.check(!( !str1.toString().equals("")), - "Error : test_Basics failed - 2"); + "test_Basics - 2"); StringBuffer str2 = new StringBuffer( "testing" ); harness.check(!( str2.length() != 7 ), - "Error : test_Basics failed - 3"); + "test_Basics - 3"); harness.check(!( !str2.toString().equals("testing")), - "Error : test_Basics failed - 4"); + "test_Basics - 4"); try { @@ -60,7 +60,7 @@ thaht reason, this test is commented out here: it's not a failure. - harness.fail("Error : test_Basics failed - 5"); + harness.fail("test_Basics - 5"); */ } @@ -68,17 +68,17 @@ StringBuffer str4 = new StringBuffer("hi there"); harness.check(!( str4.length () != 8 || str4.capacity () != 24 ), - "Error : test_Basics failed - 6"); + "test_Basics - 6"); harness.check(!( !str4.toString().equals("hi there")), - "Error : test_Basics failed - 7"); + "test_Basics - 7"); StringBuffer strbuf = new StringBuffer(0); harness.check(!( ! strbuf.append("hiii").toString().equals("hiii")), - "Error : test_Basics failed - 8"); + "test_Basics - 8"); strbuf = new StringBuffer(10); harness.check(!( strbuf.capacity() != 10 ), - "Error : test_Basics failed - 9"); + "test_Basics - 9"); } @@ -88,11 +88,11 @@ StringBuffer str1 = new StringBuffer("218943289"); harness.check(!( !str1.toString().equals("218943289")), - "Error : test_toString failed - 1"); + "test_toString - 1"); str1 = new StringBuffer(); harness.check(!( !str1.toString().equals("")), - "Error : test_toString failed - 2"); + "test_toString - 2"); } public void test_length() @@ -101,10 +101,10 @@ StringBuffer buf2 = new StringBuffer("pentium"); harness.check(!( buf1.length() != 0 ), - "Error : test_length failed - 1"); + "test_length - 1"); harness.check(!( buf2.length() != 7 ), - "Error : test_length failed - 2"); + "test_length - 2"); } public void test_capacity() @@ -113,18 +113,18 @@ StringBuffer buf2 = new StringBuffer("pentiumpentiumpentium"); harness.check(!( buf1.capacity() != 16 ), - "Error : test_capacity failed - 1"); + "test_capacity - 1"); int cap = buf2.capacity(); harness.check(!( cap != 37 ), - "Error : test_capacity failed - 2"); + "test_capacity - 2"); buf1.ensureCapacity( 17); // CYGNUS: This is a test for JDK 1.2 conformance harness.check(!( buf1.capacity() != 34 ), - "Error : test_capacity failed - 3"); + "test_capacity - 3"); } public void test_setLength() @@ -133,17 +133,17 @@ try { strbuf.setLength( -10); - harness.fail("Error : test_setLength failed - 1"); + harness.fail("test_setLength - 1"); } catch ( IndexOutOfBoundsException e ){} strbuf.setLength( 4 ); harness.check(!(strbuf.length() != 4 ), - "Error : test_setLength failed - 2"); + "test_setLength - 2"); harness.check(!( strbuf.charAt(0 ) != 'b' || strbuf.charAt(1 ) != 'a' || strbuf.charAt(2 ) != '\u0000' || strbuf.charAt(3 ) != '\u0000' ), - "Error : test_setLength failed - 3"); + "test_setLength - 3"); } public void test_charAt() @@ -153,17 +153,17 @@ (new StringBuffer("abcd")).charAt(2) != 'c' || (new StringBuffer("abcd")).charAt(3) != 'd' ), - "Error : test_charAt failed - 1"); + "test_charAt - 1"); try { char ch = (new StringBuffer("abcd")).charAt(4); - harness.fail("Error : test_charAt failed - 2"); + harness.fail("test_charAt - 2"); } catch ( IndexOutOfBoundsException e ){} try { char ch = (new StringBuffer("abcd")).charAt(-1); - harness.fail("Error : test_charAt failed - 3"); + harness.fail("test_charAt - 3"); } catch ( IndexOutOfBoundsException e ){} } @@ -174,53 +174,53 @@ try { str.getChars(0 , 3 , null , 1 ); - harness.fail("Error : test_getChars failed - 1"); + harness.fail("test_getChars - 1"); }catch ( NullPointerException e ){} char dst[] = new char[5]; try { str.getChars(-1 , 3 , dst , 1 ); - harness.fail("Error : test_getChars failed - 2"); + harness.fail("test_getChars - 2"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(4 , 3 , dst , 3 ); // CYGNUS: This is a test for JDK 1.2 conformance - harness.fail("Error : test_getChars failed - 3"); + harness.fail("test_getChars - 3"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 15 , dst , 1 ); - harness.fail("Error : test_getChars failed - 4"); + harness.fail("test_getChars - 4"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 5 , dst , -1 ); - harness.fail("Error : test_getChars failed - 5"); + harness.fail("test_getChars - 5"); }catch ( IndexOutOfBoundsException e ){} try { str.getChars(1 , 10 , dst , 1 ); - harness.fail("Error : test_getChars failed - 6"); + harness.fail("test_getChars - 6"); }catch ( IndexOutOfBoundsException e ){} str.getChars(0,5,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != 'b' || dst[2] != 'c' || dst[3] != 'd' || dst[4] != 'e' ), - "Error : test_getChars failed - 7"); + "test_getChars - 7"); dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = ' '; str.getChars(0,0,dst, 0 ); harness.check(!( dst[0] != ' ' || dst[1] != ' ' || dst[2] != ' ' || dst[3] != ' ' || dst[4] != ' ' ), - "Error : test_getChars failed - 9"); + "test_getChars - 9"); dst[0] = dst[1] = dst[2] = dst[3] = dst[4] = ' '; str.getChars(0,1,dst, 0 ); harness.check(!( dst[0] != 'a' || dst[1] != ' ' || dst[2] != ' ' || dst[3] != ' ' || dst[4] != ' ' ), - "Error : test_getChars failed - 10"); + "test_getChars - 10"); dst = new char[25]; str.getChars(3,14,dst,12); @@ -233,53 +233,53 @@ StringBuffer str = new StringBuffer(); Object nullobj = null; harness.check(!( !str.append( nullobj ).toString().equals("null")), - "Error : test_append failed - 1"); + "test_append - 1"); harness.check(!( !str.append( new Integer(100) ).toString().equals("null100")), - "Error : test_append failed - 2"); + "test_append - 2"); StringBuffer str1 = new StringBuffer("hi"); str1 = str1.append( " there" ); str1 = str1.append( " buddy"); harness.check(!( !str1.toString().equals("hi there buddy")), - "Error : test_append failed - 2"); + "test_append - 2"); StringBuffer str2 = new StringBuffer(); str2 = str2.append("sdljfksdjfklsdjflksdjflkjsdlkfjlsdkjflksdjfklsd"); harness.check(!( !str2.toString().equals( "sdljfksdjfklsdjflksdjflkjsdlkfjlsdkjflksdjfklsd")), - "Error : test_append failed - 3"); + "test_append - 3"); char carr[] = null; StringBuffer str3 = new StringBuffer(); try { str3 = str3.append( carr ); - harness.fail("Error : test_append failed - 4"); + harness.fail("test_append - 4"); } catch ( NullPointerException e ){} char carr1[] = {'h','i','t','h','e','r'}; StringBuffer str4 = new StringBuffer("!"); harness.check(!( !str4.append( carr1 ).toString().equals("!hither")), - "Error : test_append failed - 5"); + "test_append - 5"); try { str3 = str3.append( carr , 0 , 3); - harness.fail("Error : test_append failed - 6"); + harness.fail("test_append - 6"); } catch ( NullPointerException e ){} str3 = new StringBuffer(); try { str3 = str3.append( carr1 , -1 , 3); - harness.fail("Error : test_append failed - 6"); + harness.fail("test_append - 6"); } catch ( IndexOutOfBoundsException e ){} try { str3 = str3.append ( carr1 , 0 , -3); - harness.fail("Error : test_append failed - 6"); + harness.fail("test_append - 6"); } catch ( IndexOutOfBoundsException e ){} @@ -287,35 +287,35 @@ StringBuffer str5 = new StringBuffer("!"); str5 = str5.append(carr1 , 2 , 3 ); harness.check(!( !str5.toString().equals("!the")), - "Error : test_append failed - 7"); + "test_append - 7"); str5 = new StringBuffer(); str5 = str5.append( true ); harness.check(!( !str5.toString().equals("true")), - "Error : test_append failed - 8"); + "test_append - 8"); str5 = str5.append( false ); harness.check(!( !str5.toString().equals("truefalse")), - "Error : test_append failed - 9"); + "test_append - 9"); str5 = str5.append( 20); harness.check(!( !str5.toString().equals("truefalse20")), - "Error : test_append failed - 10"); + "test_append - 10"); str5 = new StringBuffer(); str5 = str5.append( 2034L ); harness.check(!( !str5.toString().equals("2034")), - "Error : test_append failed - 11"); + "test_append - 11"); str5 = new StringBuffer(); str5 = str5.append( 34.45f ); harness.check(!( !str5.toString().equals("34.45")), - "Error : test_append failed - 12"); + "test_append - 12"); str5 = new StringBuffer(); str5 = str5.append( 34.46 ); harness.check(!( !str5.toString().equals("34.46")), - "Error : test_append failed - 13"); + "test_append - 13"); } public void test_insert() @@ -324,92 +324,92 @@ Object obj = null; buf = buf.insert(5 , obj); harness.check(!( !buf.toString().equals("12345null67")), - "Error : test_insert failed - 1"); + "test_insert - 1"); try { buf = buf.insert(-1 , new Object()); - harness.fail("Error : test_insert failed - 2"); + harness.fail("test_insert - 2"); }catch ( IndexOutOfBoundsException e ){} buf = new StringBuffer("1234567"); try { buf = buf.insert(8 , new Object() ); - harness.fail("Error : test_insert failed - 3"); + harness.fail("test_insert - 3"); }catch ( IndexOutOfBoundsException e ){} buf = new StringBuffer("1234567"); buf = buf.insert(4 , "inserted" ); harness.check(!( !buf.toString().equals("1234inserted567")), - "Error : test_insert failed - 4"); + "test_insert - 4"); buf = new StringBuffer("1234567"); char cdata[] = null; try { buf = buf.insert(4 , cdata ); - harness.fail("Error : test_insert failed - 5"); + harness.fail("test_insert - 5"); }catch ( NullPointerException e ) {} cdata = new char[2]; try { buf = buf.insert(-1 , cdata ); - harness.fail("Error : test_insert failed - 6"); + harness.fail("test_insert - 6"); }catch ( IndexOutOfBoundsException e ){} try { buf = buf.insert(8 , cdata ); - harness.fail("Error : test_insert failed - 7"); + harness.fail("test_insert - 7"); }catch ( IndexOutOfBoundsException e ){} buf = new StringBuffer("1234567"); char cdata1[] = {'h','e','l','l','o'}; buf = buf.insert(4 , cdata1 ); harness.check(!( !buf.toString().equals("1234hello567")), - "Error : test_insert failed - 8"); + "test_insert - 8"); buf = new StringBuffer("1234567"); buf = buf.insert(0 , true ); harness.check(!( !buf.toString().equals("true1234567")), - "Error : test_insert failed - 9"); + "test_insert - 9"); buf = new StringBuffer("1234567"); buf = buf.insert(7 , false ); harness.check(!( !buf.toString().equals("1234567false")), - "Error : test_insert failed - 10"); + "test_insert - 10"); buf = new StringBuffer("1234567"); buf = buf.insert(0 , 'c' ); harness.check(!( !buf.toString().equals("c1234567")), - "Error : test_insert failed - 11"); + "test_insert - 11"); buf = new StringBuffer("1234567"); buf = buf.insert(7 , 'b' ); harness.check(!( !buf.toString().equals("1234567b")), - "Error : test_insert failed - 12"); + "test_insert - 12"); buf = new StringBuffer("1234567"); buf = buf.insert(7 , 999 ); harness.check(!( !buf.toString().equals("1234567999")), - "Error : test_insert failed - 13"); + "test_insert - 13"); buf = new StringBuffer("1234567"); buf = buf.insert(0, 99.9f ); harness.check(!( !buf.toString().equals("99.91234567")), - "Error : test_insert failed - 14"); + "test_insert - 14"); buf = new StringBuffer("1234567"); buf = buf.insert(3, 34.46 ); harness.check(!( !buf.toString().equals("12334.464567")), - "Error : test_insert failed - 15 " + "test_insert - 15 " + buf.toString()); buf = new StringBuffer("1234567"); buf = buf.insert(3, (long)1230 ); harness.check(!( !buf.toString().equals("12312304567")), - "Error : test_insert failed - 16 " + "test_insert - 16 " + buf.toString()); } @@ -418,23 +418,23 @@ { StringBuffer buff = new StringBuffer(); harness.check(!( !buff.reverse().toString().equals("")), - "Error : test_reverse failed - 1"); + "test_reverse - 1"); buff = new StringBuffer("babu"); harness.check(!( !buff.reverse().toString().equals("ubab")), - "Error : test_reverse failed - 2"); + "test_reverse - 2"); buff = new StringBuffer("malayalam"); harness.check(!( !buff.reverse().toString().equals("malayalam")), - "Error : test_reverse failed - 3"); + "test_reverse - 3"); buff = new StringBuffer("cnbcbnc"); harness.check(!( !buff.reverse().toString().equals("cnbcbnc")), - "Error : test_reverse failed - 4"); + "test_reverse - 4"); buff = new StringBuffer("vinod"); harness.check(!( !buff.reverse().toString().equals("doniv")), - "Error : test_reverse failed - 5"); + "test_reverse - 5"); } public void testall() From david.gilbert@object-refinery.com Mon Jan 23 17:12:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 23 Jan 2006 17:12:00 -0000 Subject: FYI: javax.swing.text.Segment - new tests Message-ID: <43D5100E.3080508@object-refinery.com> I committed these new tests: 2006-01-23 David Gilbert * gnu/testlet/javax/swing/text/Segment/clone.java: New test, * gnu/testlet/javax/swing/text/Segment/constructors.java: Likewise, * gnu/testlet/javax/swing/text/Segment/current.java: Likewise, * gnu/testlet/javax/swing/text/Segment/first.java: Likewise, * gnu/testlet/javax/swing/text/Segment/getBeginIndex.java: Likewise, * gnu/testlet/javax/swing/text/Segment/getEndIndex.java: Likewise, * gnu/testlet/javax/swing/text/Segment/getIndex.java: Likewise, * gnu/testlet/javax/swing/text/Segment/isPartialReturn.java: Likewise, * gnu/testlet/javax/swing/text/Segment/last.java: Likewise, * gnu/testlet/javax/swing/text/Segment/next.java: Likewise, * gnu/testlet/javax/swing/text/Segment/previous.java: Likewise, * gnu/testlet/javax/swing/text/Segment/setIndex.java: Likewise, * gnu/testlet/javax/swing/text/Segment/setPartialReturn.java: Likewise, * gnu/testlet/javax/swing/text/Segment/toString.java: Likewise. Regards Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From abalkiss@redhat.com Mon Jan 23 18:36:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Mon, 23 Jan 2006 18:36:00 -0000 Subject: FYI: changes to all the ElementBuffer tests Message-ID: <1138041387.2865.4.camel@tony.toronto.redhat.com> Committed large changes to the DefaultStyledDocument.ElementBuffer tests. Now, each of these tests does the following: - subclasses DefaultStyledDocument - subclasses ElementBuffer - overrides createLeafElement and createBranchElement to test if the correct Elements are being created - overrides DefaultStyledDocument.insertUpdate to test if the DocumentEvents are coming in correctly - overrides ElementBuffer.insertUpdate to test if the ElementSpecs created by DefaultStyledDocument.insertUpdate are correct Before each of the tests were doing a smaller subset of these tests, but now they each do them all. 2006-01-23 Anthony Balkissoon * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure1.java: Added more detailed tests. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure2.java: Removed this test because it is a duplicate of ElementStructure1.java. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure3.java: Added more detailed tests. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure4.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure5.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure6.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure7.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument1.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument2.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument3.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument4.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument5.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument6.java: Likewise. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: BeefUpElementBufferTests.diff Type: text/x-patch Size: 187329 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Jan 24 13:46:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 24 Jan 2006 13:46:00 -0000 Subject: FYI: javax.swing.text.StringContent.java - new tests Message-ID: <43D62FD3.4080703@object-refinery.com> I committed these new tests (along with some header updates in the existing test classes): 2006-01-24 David Gilbert * gnu/testlet/javax/swing/text/StringContent/BadLocationExceptionTest.java: Updated header and imports, * gnu/testlet/javax/swing/text/StringContent/constructors.java: New tests, * gnu/testlet/javax/swing/text/StringContent/createPosition.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/getChars.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/getString.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/insertString.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/insertUndo.java: Updated header and imports, * gnu/testlet/javax/swing/text/StringContent/length.java: New tests, * gnu/testlet/javax/swing/text/StringContent/remove.java: New tests, * gnu/testlet/javax/swing/text/StringContent/removeUndo.java: Updated header and imports, * gnu/testlet/javax/swing/text/StringContent/stickyPosition.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/StringContentTest.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Tue Jan 24 15:19:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 24 Jan 2006 15:19:00 -0000 Subject: FYI: SocketPermission serialization tests Message-ID: <20060124151921.GC5123@redhat.com> Hi, This test puts java.net.SocketPermission's serialization through its paces. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1369 diff -u -r1.1369 ChangeLog --- ChangeLog 24 Jan 2006 13:44:45 -0000 1.1369 +++ ChangeLog 24 Jan 2006 15:16:25 -0000 @@ -1,3 +1,7 @@ +2006-01-24 Gary Benson + + * gnu/testlet/java/net/SocketPermission/serialization.java: New test. + 2006-01-24 David Gilbert * gnu/testlet/javax/swing/text/StringContent/BadLocationExceptionTest.java: Updated header and imports, Index: gnu/testlet/java/net/SocketPermission/serialization.java =================================================================== RCS file: gnu/testlet/java/net/SocketPermission/serialization.java diff -N gnu/testlet/java/net/SocketPermission/serialization.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/SocketPermission/serialization.java 24 Jan 2006 15:16:25 -0000 @@ -0,0 +1,102 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.SocketPermission; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.ObjectInput; +import java.io.ObjectInputStream; +import java.io.ObjectOutput; +import java.io.ObjectOutputStream; +import java.net.SocketPermission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +public class serialization implements Testlet +{ + private String[] hosts = new String[] { + "", + "localhost", + "example.com", + "*.com", + "209.132.177.50", + "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", + "[3ffe:2a00:100:7031::1]", + "[::192.9.5.5]", + }; + + private String[] ports = new String[] { + "", + ":", + ":80", + ":-80", + ":80-", + ":70-90", + ":800000", + ":700000-900000", + }; + + public void test(TestHarness harness) + { + harness.checkPoint("serialization checking"); + + for (int i = 0; i < hosts.length; i++) { + for (int j = 0; j < ports.length; j++) { + for (int k = 1; k < 1 << actions.length; k++) { + SocketPermission p1 = new SocketPermission( + hosts[i] + ports[j], makeActions(k)); + SocketPermission p2 = null; + try { + ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + ObjectOutput out = new ObjectOutputStream(buffer); + out.writeObject(p1); + out.close(); + + ObjectInput in = new ObjectInputStream( + new ByteArrayInputStream(buffer.toByteArray())); + p2 = (SocketPermission) in.readObject(); + in.close(); + } + catch (Exception e) { + harness.debug(e); + } + harness.check(p1.equals(p2)); + } + } + } + } + + // stuff for actions checking + private static String[] actions = {"accept", "connect", "listen", "resolve"}; + private static String makeActions(int mask) + { + String result = ""; + for (int i = 0; i < actions.length; i++) { + if ((mask & (1 << i)) != 0) { + if (result.length() > 0) + result += ","; + result += actions[i]; + } + } + return result; + } +} From david.gilbert@object-refinery.com Tue Jan 24 16:43:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 24 Jan 2006 16:43:00 -0000 Subject: FYI: GapContent tests Message-ID: <43D656C3.7020005@object-refinery.com> I committed this patch: 2006-01-24 David Gilbert * gnu/testlet/javax/swing/text/GapContent/constructors.java: New tests, * gnu/testlet/javax/swing/text/GapContent/createPosition.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/getChars.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/getString.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/insertString.java (test): Call testGeneral(TestHarness), (testGeneral): New method, * gnu/testlet/javax/swing/text/GapContent/length.java: New tests, * gnu/testlet/javax/swing/text/GapContent/MyGapContent.java: New support class, * gnu/testlet/javax/swing/text/GapContent/remove.java: New tests. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Tue Jan 24 17:23:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 24 Jan 2006 17:23:00 -0000 Subject: FYI: GapContent.insertString - corrected test Message-ID: <43D66299.9060605@object-refinery.com> After looking at the GNU Classpath implementation of this method (which was failing the test I committed earlier today) I decided that the test is partially incorrect and, in fact, Sun's JDK has a bug. I've corrected the test and reported a bug to Sun: 2006-01-24 David Gilbert * gnu/testlet/javax/swing/text/GapContent/insertString.java (testGeneral): Corrected test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jan 25 18:17:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 25 Jan 2006 18:17:00 -0000 Subject: FYI: javax.swing.text.PlainDocument - new tests Message-ID: <43D7C0CC.2010005@object-refinery.com> I committed these new tests: 2006-01-25 David Gilbert * gnu/testlet/javax/swing/text/PlainDocument/createPosition.java: New tests, * gnu/testlet/javax/swing/text/PlainDocument/getLength.java: Likewise, * gnu/testlet/javax/swing/text/PlainDocument/getRootElements.java: Likewise, * gnu/testlet/javax/swing/text/PlainDocument/getText.java: Likewise, * gnu/testlet/javax/swing/text/PlainDocument/insertString.java (test): Call new test methods, (testArguments): New method, (testPositions): Likewise, * gnu/testlet/javax/swing/text/PlainDocument/remove.java: New tests. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From mark@klomp.org Thu Jan 26 13:20:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Thu, 26 Jan 2006 13:20:00 -0000 Subject: New BigDecimal.compareTo tests Message-ID: <1138281638.5669.28.camel@localhost.localdomain> Hi, Here are some new tests for BigDecimal.compareTo(). 2006-01-26 Mark Wielaard * gnu/testlet/java/math/BigDecimal/compareTo.java: New tests. I have committed this. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: compareTo.java Type: text/x-java Size: 4272 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From gbenson@redhat.com Thu Jan 26 17:38:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 26 Jan 2006 17:38:00 -0000 Subject: FYI: ClassLoader throwpoint tests Message-ID: <20060126173815.GC5499@redhat.com> Hi all, I just added throwpoint checks for java.lang.ClassLoader. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1375 diff -u -r1.1375 ChangeLog --- ChangeLog 26 Jan 2006 13:18:38 -0000 1.1375 +++ ChangeLog 26 Jan 2006 17:31:21 -0000 @@ -1,3 +1,7 @@ +2006-01-26 Gary Benson + + * gnu/testlet/java/lang/ClassLoader/security.java: New test. + 2006-01-26 Mark Wielaard * gnu/testlet/java/math/BigDecimal/compareTo.java: New tests. Index: gnu/testlet/java/lang/ClassLoader/security.java =================================================================== RCS file: gnu/testlet/java/lang/ClassLoader/security.java diff -N gnu/testlet/java/lang/ClassLoader/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/ClassLoader/security.java 26 Jan 2006 17:31:21 -0000 @@ -0,0 +1,152 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.ClassLoader; + +import java.io.File; +import java.lang.reflect.Method; +import java.net.URL; +import java.net.URLClassLoader; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + // we need a different classloader for some of the checks to occur. + Class testClass = new URLClassLoader(new URL[] { + new File(harness.getSourceDirectory()).toURL()}, null).loadClass( + getClass().getName()); + + ClassLoader ourLoader = getClass().getClassLoader(); + harness.check(ourLoader != testClass.getClassLoader()); + + Method getSystemClassLoaderTest = testClass.getMethod( + "testGetSystemClassLoader", new Class[] {}); + + Method getParentTest = testClass.getMethod( + "testGetParent", new Class[] {ClassLoader.class}); + + // Make sure everything's fully resolved, or we'll be loading + // classes during tests and the extra checks will make us fail. + new TestClassLoader(); + + Permission[] createClassLoader = new Permission[] { + new RuntimePermission("createClassLoader")}; + + Permission[] getClassLoader = new Permission[] { + new RuntimePermission("getClassLoader")}; + + Permission[] noPerms = new Permission[] {}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // security: java.lang.ClassLoader-ClassLoader() + harness.checkPoint("Constructor (no-args)"); + try { + sm.prepareChecks(createClassLoader, noPerms); + new TestClassLoader(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.ClassLoader-ClassLoader(ClassLoader) + harness.checkPoint("Constructor (one-arg)"); + try { + sm.prepareChecks(createClassLoader, noPerms); + new TestClassLoader(ourLoader); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.ClassLoader-getSystemClassLoader + harness.checkPoint("getSystemClassLoader"); + try { + sm.prepareChecks(getClassLoader, noPerms); + getSystemClassLoaderTest.invoke(null, new Object[] {}); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.ClassLoader-getParent + harness.checkPoint("getParent"); + try { + sm.prepareChecks(getClassLoader, noPerms); + getParentTest.invoke(null, new Object[] {ourLoader}); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + // Stuff for the createClassLoader tests + private static class TestClassLoader extends ClassLoader + { + public TestClassLoader() + { + super(); + } + + public TestClassLoader(ClassLoader parent) + { + super(parent); + } + } + + // Stuff for the getClassLoader tests + public static void testGetSystemClassLoader() + { + ClassLoader.getSystemClassLoader(); + } + + public static void testGetParent(ClassLoader loader) + { + loader.getParent(); + } +} From gbenson@redhat.com Fri Jan 27 11:58:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 27 Jan 2006 11:58:00 -0000 Subject: FYI: Test security manager new feature Message-ID: <20060127115839.GD5116@redhat.com> Hi all, This commit adds a new way to run throwpoint checks to the test security manager. You can now make it throw an exception when the expected permission is checked, which allows you to test things you don't actually want to do, such as exiting the VM. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1377 diff -u -r1.1377 ChangeLog --- ChangeLog 26 Jan 2006 19:29:36 -0000 1.1377 +++ ChangeLog 27 Jan 2006 11:54:49 -0000 @@ -1,3 +1,9 @@ +2006-01-27 Gary Benson + + * gnu/testlet/TestSecurityManager2.java: Added the ability to + abort tests when the permission is checked, to allow us to test + things that we don't actually want doing. + 2006-01-27 Raif S. Naffah * gnu/testlet/javax/crypto/jce/TestOfPR25981.java: New test. Index: gnu/testlet/TestSecurityManager2.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/TestSecurityManager2.java,v retrieving revision 1.4 diff -u -r1.4 TestSecurityManager2.java --- gnu/testlet/TestSecurityManager2.java 16 Jan 2006 11:17:41 -0000 1.4 +++ gnu/testlet/TestSecurityManager2.java 27 Jan 2006 11:54:49 -0000 @@ -35,6 +35,10 @@ new PropertyPermission("*", "read")}; private boolean[] checked = new boolean[0]; + private boolean throwOnSuccess = false; + + public static final String successMessage = "Test complete, aborting"; + private final TestHarness harness; public TestSecurityManager2(TestHarness harness) { @@ -56,6 +60,7 @@ public void uninstall() { + throwOnSuccess = false; mayCheck = new Permission[]{new RuntimePermission("setSecurityManager")}; System.setSecurityManager(oldManager); } @@ -75,9 +80,18 @@ } public void prepareChecks(Permission[] mustCheck, Permission[] mayCheck) { + prepareChecks(mustCheck, mayCheck, false); + } + + public void prepareChecks(Permission[] mustCheck, + Permission[] mayCheck, + boolean throwOnSuccess) { this.mayCheck = mayCheck; this.mustCheck = mustCheck; this.checked = new boolean[mustCheck.length]; + this.throwOnSuccess = throwOnSuccess; + if (throwOnSuccess && mustCheck.length != 1) + throw new IllegalArgumentException(); } public void checkAllChecked(TestHarness harness) { @@ -111,6 +125,9 @@ } } + if (matched && throwOnSuccess) + throw new SecurityException(successMessage); + expectedPerms.append(" May check:"); if (!matched) { for (int i = 0; i < mayCheck.length; i++) { From gbenson@redhat.com Fri Jan 27 13:15:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 27 Jan 2006 13:15:00 -0000 Subject: FYI: java.lang.Runtime throwpoint tests Message-ID: <20060127131550.GE5116@redhat.com> Hi again, My last commit added throwpoint checks for java.lang.Runtime. They don't work yet, due to a missing doPrivileged somewhere. That'll be my next fix ;) Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1378 diff -u -r1.1378 ChangeLog --- ChangeLog 27 Jan 2006 11:55:32 -0000 1.1378 +++ ChangeLog 27 Jan 2006 13:11:34 -0000 @@ -1,3 +1,7 @@ +2006-01-27 Gary Benson + + * gnu/testlet/java/lang/Runtime/security.java: New test. + 2006-01-27 Gary Benson * gnu/testlet/TestSecurityManager2.java: Added the ability to Index: gnu/testlet/java/lang/Runtime/security.java =================================================================== RCS file: gnu/testlet/java/lang/Runtime/security.java diff -N gnu/testlet/java/lang/Runtime/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/Runtime/security.java 27 Jan 2006 13:11:34 -0000 @@ -0,0 +1,237 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.Runtime; + +import java.io.File; +import java.io.FilePermission; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + Runtime runtime = Runtime.getRuntime(); + + String sCommand = "/bin/true"; + harness.check(new File(sCommand).isFile()); + String[] aCommand = new String[] {sCommand}; + + Thread thread = new Thread(); + + String library_name = "blah"; + String library_path = "/path/to/libnothing.so"; + + Permission[] executeCommand = new Permission[] { + new FilePermission(sCommand, "execute")}; + + Permission[] exitVM = new Permission[] { + new RuntimePermission("exitVM")}; + + Permission[] shutdownHooks = new Permission[] { + new RuntimePermission("shutdownHooks")}; + + Permission[] loadLibrary_name = new Permission[] { + new RuntimePermission("loadLibrary." + library_name)}; + Permission[] loadLibrary_path = new Permission[] { + new RuntimePermission("loadLibrary." + library_path)}; + + Permission[] noPerms = new Permission[] {}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // security: java.lang.Runtime-exec(String) + harness.checkPoint("exec(String)"); + try { + sm.prepareChecks(executeCommand, noPerms); + runtime.exec(sCommand).waitFor(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.Runtime-exec(String, String[]) + harness.checkPoint("exec(String, String[])"); + try { + sm.prepareChecks(executeCommand, noPerms); + runtime.exec(sCommand, null).waitFor(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.Runtime-exec(String, String[], File) + harness.checkPoint("exec(String, String[], File)"); + try { + sm.prepareChecks(executeCommand, noPerms); + runtime.exec(sCommand, null, null).waitFor(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.Runtime-exec(String[]) + harness.checkPoint("exec(String[])"); + try { + sm.prepareChecks(executeCommand, noPerms); + runtime.exec(aCommand).waitFor(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.Runtime-exec(String[], String[]) + harness.checkPoint("exec(String[], String[])"); + try { + sm.prepareChecks(executeCommand, noPerms); + runtime.exec(aCommand, null).waitFor(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.Runtime-exec(String[], String[], File) + harness.checkPoint("exec(String[], String[], File)"); + try { + sm.prepareChecks(executeCommand, noPerms); + runtime.exec(aCommand, null, null).waitFor(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.Runtime-exit + harness.checkPoint("exit"); + try { + sm.prepareChecks(exitVM, noPerms, true); + runtime.exit(0); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // security: java.lang.Runtime-runFinalizersOnExit + harness.checkPoint("runFinalizersOnExit"); + try { + sm.prepareChecks(exitVM, noPerms); + Runtime.runFinalizersOnExit(false); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.Runtime-addShutdownHook + harness.checkPoint("addShutdownHook"); + try { + sm.prepareChecks(shutdownHooks, noPerms); + runtime.addShutdownHook(thread); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.Runtime-removeShutdownHook + harness.checkPoint("removeShutdownHook"); + try { + sm.prepareChecks(shutdownHooks, noPerms); + runtime.removeShutdownHook(thread); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.Runtime-load + harness.checkPoint("load"); + try { + sm.prepareChecks(loadLibrary_name, noPerms, true); + runtime.load(library_name); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // security: java.lang.Runtime-loadLibrary + harness.checkPoint("loadLibrary"); + try { + sm.prepareChecks(loadLibrary_path, noPerms, true); + runtime.loadLibrary(library_path); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From gbenson@redhat.com Fri Jan 27 15:25:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 27 Jan 2006 15:25:00 -0000 Subject: FYI: java.lang.Runtime exec() throwpoint tests fix Message-ID: <20060127152533.GH5116@redhat.com> Hi again, My latest commit fixes the various exec() tests in java.lang.Runtime. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1379 diff -u -r1.1379 ChangeLog --- ChangeLog 27 Jan 2006 13:12:23 -0000 1.1379 +++ ChangeLog 27 Jan 2006 15:19:19 -0000 @@ -1,3 +1,7 @@ +2006-01-27 Gary Benson + + * gnu/testlet/java/lang/Runtime/security.java: Ignore the + modifyThread check that Classpath's reference VMProcess calls. + 2006-01-27 Gary Benson 2006-01-27 Gary Benson Index: gnu/testlet/java/lang/Runtime/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Runtime/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/lang/Runtime/security.java 27 Jan 2006 13:12:23 -0000 1.1 +++ gnu/testlet/java/lang/Runtime/security.java 27 Jan 2006 15:19:19 -0000 @@ -48,6 +48,8 @@ Permission[] executeCommand = new Permission[] { new FilePermission(sCommand, "execute")}; + Permission[] modifyThread = new Permission[] { + new RuntimePermission("modifyThread")}; Permission[] exitVM = new Permission[] { new RuntimePermission("exitVM")}; @@ -69,7 +71,7 @@ // security: java.lang.Runtime-exec(String) harness.checkPoint("exec(String)"); try { - sm.prepareChecks(executeCommand, noPerms); + sm.prepareChecks(executeCommand, modifyThread); runtime.exec(sCommand).waitFor(); sm.checkAllChecked(harness); } @@ -81,7 +83,7 @@ // security: java.lang.Runtime-exec(String, String[]) harness.checkPoint("exec(String, String[])"); try { - sm.prepareChecks(executeCommand, noPerms); + sm.prepareChecks(executeCommand, modifyThread); runtime.exec(sCommand, null).waitFor(); sm.checkAllChecked(harness); } @@ -93,7 +95,7 @@ // security: java.lang.Runtime-exec(String, String[], File) harness.checkPoint("exec(String, String[], File)"); try { - sm.prepareChecks(executeCommand, noPerms); + sm.prepareChecks(executeCommand, modifyThread); runtime.exec(sCommand, null, null).waitFor(); sm.checkAllChecked(harness); } @@ -105,7 +107,7 @@ // security: java.lang.Runtime-exec(String[]) harness.checkPoint("exec(String[])"); try { - sm.prepareChecks(executeCommand, noPerms); + sm.prepareChecks(executeCommand, modifyThread); runtime.exec(aCommand).waitFor(); sm.checkAllChecked(harness); } @@ -117,7 +119,7 @@ // security: java.lang.Runtime-exec(String[], String[]) harness.checkPoint("exec(String[], String[])"); try { - sm.prepareChecks(executeCommand, noPerms); + sm.prepareChecks(executeCommand, modifyThread); runtime.exec(aCommand, null).waitFor(); sm.checkAllChecked(harness); } @@ -129,7 +131,7 @@ // security: java.lang.Runtime-exec(String[], String[], File) harness.checkPoint("exec(String[], String[], File)"); try { - sm.prepareChecks(executeCommand, noPerms); + sm.prepareChecks(executeCommand, modifyThread); runtime.exec(aCommand, null, null).waitFor(); sm.checkAllChecked(harness); } From roman.kennke@aicas.com Sat Jan 28 21:41:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Sat, 28 Jan 2006 21:41:00 -0000 Subject: FYI: New ViewportLayout test Message-ID: Here comes a new test for ViewportLayout.layoutContainer() that checks a problem with the ViewportLayout. 2006-01-28 Roman Kennke * gnu/testlet/javax/swing/ViewportLayout/layoutContainer.java (testMinimumViewSize): New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1692 bytes Desc: not available URL: From david.gilbert@object-refinery.com Sat Jan 28 22:32:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Sat, 28 Jan 2006 22:32:00 -0000 Subject: FYI: javax.swing.UIManager test fixes Message-ID: <43DBF1A0.4030701@object-refinery.com> A couple of tests were failing because they assumed the UIManager was in a clean state, whereas in fact it can be updated by tests run previously. This patch is committed: 2006-01-28 David Gilbert * gnu/testlet/javax/swing/UIManager/addPropertyChangeListener.java (test): Don't assume there are zero listeners at start of test, * gnu/testlet/javax/swing/UIManager/getPropertyChangeListeners.java (test): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Sat Jan 28 22:41:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Sat, 28 Jan 2006 22:41:00 -0000 Subject: FYI: AccessibleJListChild.getFont Message-ID: <43DBF3DA.4090709@object-refinery.com> I fixed what looks like a copy and paste error that was causing this test to fail: 2006-01-28 David Gilbert * gnu/testlet/javax/swing/JList/AccessibleJList/AccessibleJListChild/getFont.java (test): Changed getBackground() --> getFont(). Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Sat Jan 28 23:06:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Sat, 28 Jan 2006 23:06:00 -0000 Subject: FYI: javax.swing.event.SwingPropertyChangeSupport - small test fixes Message-ID: <43DBF985.8000903@object-refinery.com> I committed this patch - the 1.5.0 API docs state the behaviour for null arguments: 2006-01-28 David Gilbert * gnu/testlet/javax/swing/event/SwingPropertyChangeSupport/hasListeners.java (test): Corrected test for null argument, * gnu/testlet/javax/swing/event/SwingPropertyChangeSupport/removePropertyChangeListener.java (test2): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman.kennke@aicas.com Sun Jan 29 15:55:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Sun, 29 Jan 2006 15:55:00 -0000 Subject: FYI: New ScrollPaneLayout test Message-ID: Hi there, I committed the attached testlet, which tests the method ScrollPaneLayout.minimumLayoutSize(). 2006-01-29 Roman Kennke * gnu/testlet/javax/swing/ScrollPaneLayout/minimumLayoutSize.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 9752 bytes Desc: not available URL: From mark@klomp.org Sun Jan 29 23:06:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 29 Jan 2006 23:06:00 -0000 Subject: Patch: setting Double.MAX_VALUE as Double into double primitive setter through Method.invoke In-Reply-To: <43CEB76A.8090804@pcedev.com> References: <43CE94D1.6030504@pcedev.com> <43CEB76A.8090804@pcedev.com> Message-ID: <1138576018.5671.127.camel@localhost.localdomain> Hi Olivier, On Wed, 2006-01-18 at 22:47 +0100, Olivier Jolly wrote: > 2006-01-18 Olivier Jolly > * gnu/testlet/java/lang/Double/DoubleSetterTest.java: new test which > makes sure that unwrapping of new Double(Double.MAX_VALUE) in > Method.invoke works correctly Thanks, I committed this to CVS. Seems only cacao fails one of these. FAIL: gnu.testlet.java.lang.Double.DoubleSetterTest: Error: test_max return wrong results (number 4) Other runtimes seem to get this right. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From mark@klomp.org Sun Jan 29 23:13:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 29 Jan 2006 23:13:00 -0000 Subject: Patch: misleading output "PASS: Error: ..." In-Reply-To: <20060123135358.GB29683@localhost.localdomain> References: <20060123135358.GB29683@localhost.localdomain> Message-ID: <1138576384.5671.130.camel@localhost.localdomain> On Mon, 2006-01-23 at 14:53 +0100, Edwin Steiner wrote: > 2006-01-23 Edwin Steiner > > * gnu/testlet/java/lang/Byte/ByteTest.java, > gnu/testlet/java/lang/Character/CharacterTest.java, > gnu/testlet/java/lang/Double/DoubleTest.java, > gnu/testlet/java/lang/Float/FloatTest.java, > gnu/testlet/java/lang/Integer/IntegerTest.java, > gnu/testlet/java/lang/Long/LongTest.java, > gnu/testlet/java/lang/Math/MathTest.java, > gnu/testlet/java/lang/Short/ShortTest.java, > gnu/testlet/java/lang/String/StringTest.java, > gnu/testlet/java/lang/StringBuffer/StringBufferTest.java: > Cleaned up test names containing "Error", "failed", or > "returned wrong results". Thanks for the cleanup Edwin. Committed to CVS now. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From mark@klomp.org Sun Jan 29 23:18:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 29 Jan 2006 23:18:00 -0000 Subject: FYI: Cleanup DoubleSetterTest message Message-ID: <1138576709.5671.134.camel@localhost.localdomain> Hi, Looking at Edwin's patch I realized we just introduced another confusing message in the new DoubleSetterTest from Olivier. This removes the "Error:" message for this test. 2005-01-29 Mark Wielaard * gnu/testlet/java/lang/Double/DoubleSetterTest.java: Cleaned up test name containing "Error". Committed, Mark diff -u -r1.1 DoubleSetterTest.java --- gnu/testlet/java/lang/Double/DoubleSetterTest.java 29 Jan 2006 23:06:22 -0000 1.1 +++ gnu/testlet/java/lang/Double/DoubleSetterTest.java 29 Jan 2006 23:14:12 -0000 @@ -39,7 +39,7 @@ public void test_max() { // Check directly the MAX_VALUE against NaN - harness.check(!Double.isNaN(Double.MAX_VALUE), "Error: test_max return wrong results"); + harness.check(!Double.isNaN(Double.MAX_VALUE)); harness.check(!Double.isNaN(new Double(Double.MAX_VALUE).doubleValue())); // Check the MAX_VALUE against NaN via a direct method setter -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From roman.kennke@aicas.com Mon Jan 30 12:43:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 30 Jan 2006 12:43:00 -0000 Subject: FYI: New JLayeredPane test Message-ID: I committed this new test for JLayeredPane.addImpl. 2006-01-30 Roman Kennke * gnu/testlet/javax/swing/JLayeredPane/addImp.java New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2374 bytes Desc: not available URL: From roman.kennke@aicas.com Mon Jan 30 13:04:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 30 Jan 2006 13:04:00 -0000 Subject: FYI: Another JLayeredPane test Message-ID: This improves my previous test for JLayeredPane.addImpl a little. 2006-01-30 Roman Kennke * gnu/testlet/javax/swing/JLayeredPane/addImp.java (testAddDifferentLayers): New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1225 bytes Desc: not available URL: From roman.kennke@aicas.com Mon Jan 30 13:39:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 30 Jan 2006 13:39:00 -0000 Subject: FYI: New BasicListUI test Message-ID: Hi, I added the attached testcase for BasicListUI. 2006-01-30 Roman Kennke * gnu/testlet/javax/swing/plaf/basic/BasicListUI/updateLayoutStateNeeded.java: New test /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2919 bytes Desc: not available URL: From roman.kennke@aicas.com Mon Jan 30 14:00:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 30 Jan 2006 14:00:00 -0000 Subject: FYI: New ViewportLayout test Message-ID: I committed the attached new testcase for ViewportLayout.minimumLayoutSize(). 2006-01-30 Roman Kennke * gnu/testlet/javax/swing/ViewportLayout/minimumLayoutSize.java: New test /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1973 bytes Desc: not available URL: From gbenson@redhat.com Mon Jan 30 15:18:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Mon, 30 Jan 2006 15:18:00 -0000 Subject: FYI: java.lang.System throwpoint tests Message-ID: <20060130151813.GC8396@redhat.com> Hi all, My last commit added throwpoint checks for java.lang.System. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1399 diff -u -r1.1399 ChangeLog --- ChangeLog 30 Jan 2006 13:59:38 -0000 1.1399 +++ ChangeLog 30 Jan 2006 14:33:13 -0000 @@ -1,3 +1,7 @@ +2006-01-30 Gary Benson + + * gnu/testlet/java/lang/System/security.java: New test. + 2006-01-30 Roman Kennke * gnu/testlet/javax/swing/ViewportLayout/minimumLayoutSize.java: Index: gnu/testlet/java/lang/System/security.java =================================================================== RCS file: gnu/testlet/java/lang/System/security.java diff -N gnu/testlet/java/lang/System/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/System/security.java 30 Jan 2006 14:33:13 -0000 @@ -0,0 +1,267 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.System; + +import java.security.Permission; +import java.util.Properties; +import java.util.PropertyPermission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + String library_name = "blah"; + String library_path = "/path/to/libnothing.so"; + + Properties properties = System.getProperties(); + + String a_property = "java.vm.name"; + String not_a_property = "java.monkey.flump"; + harness.check(properties.containsKey(a_property)); + harness.check(!properties.containsKey(not_a_property)); + + Permission[] exitVM = new Permission[] { + new RuntimePermission("exitVM")}; + + Permission[] loadLibrary_name = new Permission[] { + new RuntimePermission("loadLibrary." + library_name)}; + Permission[] loadLibrary_path = new Permission[] { + new RuntimePermission("loadLibrary." + library_path)}; + + Permission[] readWriteAllProperties = new Permission[] { + new PropertyPermission("*", "read,write")}; + + Permission[] readProperty = new Permission[] { + new PropertyPermission(a_property, "read")}; + Permission[] readNonProperty = new Permission[] { + new PropertyPermission(not_a_property, "read")}; + + Permission[] setIO = new Permission[] { + new RuntimePermission("setIO")}; + + Permission[] writeProperty = new Permission[] { + new PropertyPermission(a_property, "write")}; + Permission[] writeNonProperty = new Permission[] { + new PropertyPermission(not_a_property, "write")}; + + Permission[] setSecurityManager = new Permission[] { + new RuntimePermission("setSecurityManager")}; + + Permission[] noPerms = new Permission[] {}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // security: java.lang.System-exit + harness.checkPoint("exit"); + try { + sm.prepareChecks(exitVM, noPerms, true); + System.exit(0); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // security: java.lang.System-runFinalizersOnExit + harness.checkPoint("runFinalizersOnExit"); + try { + sm.prepareChecks(exitVM, noPerms); + System.runFinalizersOnExit(false); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.System-load + harness.checkPoint("load"); + try { + sm.prepareChecks(loadLibrary_name, noPerms, true); + System.load(library_name); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // security: java.lang.System-loadLibrary + harness.checkPoint("loadLibrary"); + try { + sm.prepareChecks(loadLibrary_path, noPerms, true); + System.loadLibrary(library_path); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // security: java.lang.System-getProperties + harness.checkPoint("getProperties"); + try { + sm.prepareChecks(readWriteAllProperties, noPerms); + System.getProperties(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.System-setProperties + harness.checkPoint("setProperties"); + try { + sm.prepareChecks(readWriteAllProperties, noPerms); + System.setProperties(properties); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.System-getProperty + harness.checkPoint("getProperty"); + try { + sm.prepareChecks(readProperty, noPerms); + System.getProperty(a_property); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(readNonProperty, noPerms); + System.getProperty(not_a_property); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.System-setIn + harness.checkPoint("setIn"); + try { + sm.prepareChecks(setIO, noPerms); + System.setIn(System.in); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.System-setOut + harness.checkPoint("setOut"); + try { + sm.prepareChecks(setIO, noPerms); + System.setOut(System.out); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.System-setErr + harness.checkPoint("setErr"); + try { + sm.prepareChecks(setIO, noPerms); + System.setErr(System.err); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.System-setProperty + harness.checkPoint("setProperty"); + try { + sm.prepareChecks(writeProperty, noPerms); + System.setProperty(a_property, properties.getProperty(a_property)); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(writeNonProperty, noPerms); + System.setProperty(not_a_property, "hello mum"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // security: java.lang.System-setSecurityManager + harness.checkPoint("setSecurityManager"); + try { + sm.prepareChecks(setSecurityManager, noPerms); + System.setSecurityManager(sm); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From gbenson@redhat.com Mon Jan 30 15:38:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Mon, 30 Jan 2006 15:38:00 -0000 Subject: FYI: More java.lang.System throwpoint tests Message-ID: <20060130153837.GD8396@redhat.com> Hi again, My last commit added more throwpoint checks for java.lang.System. One I missed, the rest weren't on the list of methods and the permissions they require but I found them in the javadoc while looking up the one I missed. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1400 diff -u -r1.1400 ChangeLog --- ChangeLog 30 Jan 2006 14:34:13 -0000 1.1400 +++ ChangeLog 30 Jan 2006 15:34:51 -0000 @@ -1,3 +1,7 @@ +2006-01-30 Gary Benson + + * gnu/testlet/java/lang/System/security.java: More new tests. + 2006-01-30 Gary Benson * gnu/testlet/java/lang/System/security.java: New test. 2006-01-30 Roman Kennke Index: gnu/testlet/java/lang/System/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/System/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/lang/System/security.java 30 Jan 2006 14:34:13 -0000 1.1 +++ gnu/testlet/java/lang/System/security.java 30 Jan 2006 15:34:51 -0000 @@ -38,6 +38,11 @@ String library_name = "blah"; String library_path = "/path/to/libnothing.so"; + String a_variable = "PATH"; + String not_a_variable = "PITH"; + harness.check(System.getenv(a_variable) != null); + harness.check(System.getenv(not_a_variable) == null); + Properties properties = System.getProperties(); String a_property = "java.vm.name"; @@ -53,6 +58,11 @@ Permission[] loadLibrary_path = new Permission[] { new RuntimePermission("loadLibrary." + library_path)}; + Permission[] readVariable = new Permission[] { + new RuntimePermission("getenv." + a_variable)}; + Permission[] readNonVariable = new Permission[] { + new RuntimePermission("getenv." + not_a_variable)}; + Permission[] readWriteAllProperties = new Permission[] { new PropertyPermission("*", "read,write")}; @@ -141,6 +151,29 @@ } } + // security: TODO: java.lang.System-getenv() + + // security: java.lang.System-getenv(String) + harness.checkPoint("getenv(String)"); + try { + sm.prepareChecks(readVariable, noPerms); + System.getenv(a_variable); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(readNonVariable, noPerms); + System.getenv(not_a_variable); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + // security: java.lang.System-getProperties harness.checkPoint("getProperties"); try { @@ -165,8 +198,8 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-getProperty - harness.checkPoint("getProperty"); + // security: java.lang.System-getProperty(String) + harness.checkPoint("getProperty(String)"); try { sm.prepareChecks(readProperty, noPerms); System.getProperty(a_property); @@ -186,6 +219,27 @@ harness.check(false, "unexpected check"); } + // security: java.lang.System-getProperty(String, String) + harness.checkPoint("getProperty(String, String)"); + try { + sm.prepareChecks(readProperty, noPerms); + System.getProperty(a_property, "quadrant"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(readNonProperty, noPerms); + System.getProperty(not_a_property, "blade"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + // security: java.lang.System-setIn harness.checkPoint("setIn"); try { @@ -243,6 +297,8 @@ harness.check(false, "unexpected check"); } + // security: TODO: java.lang.System-clearProperty + // security: java.lang.System-setSecurityManager harness.checkPoint("setSecurityManager"); try { From roman@kennke.org Mon Jan 30 21:10:00 2006 From: roman@kennke.org (Roman Kennke) Date: Mon, 30 Jan 2006 21:10:00 -0000 Subject: FYI: New RootLayout test Message-ID: <1138655418.9701.1.camel@localhost.localdomain> I committed the attached test for JRootPane.RootLayout. 2006-01-30 Roman Kennke * gnu/testlet/javax/swing/JRootPane/RootLayout/preferredLayoutSize.java: New test /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2692 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From roman@kennke.org Mon Jan 30 21:22:00 2006 From: roman@kennke.org (Roman Kennke) Date: Mon, 30 Jan 2006 21:22:00 -0000 Subject: FYI: New RootLayout test In-Reply-To: <1138655418.9701.1.camel@localhost.localdomain> References: <1138655418.9701.1.camel@localhost.localdomain> Message-ID: <1138656144.9701.9.camel@localhost.localdomain> I fixed up the copyright header and docs for my last committed test. 2006-01-30 Roman Kennke * gnu/testlet/javax/swing/JRootPane/RootLayout/preferredLayoutSize.java: Fixed copyright header and docs. /Roman Am Montag, den 30.01.2006, 22:10 +0100 schrieb Roman Kennke: > I committed the attached test for JRootPane.RootLayout. > > 2006-01-30 Roman Kennke > > * > gnu/testlet/javax/swing/JRootPane/RootLayout/preferredLayoutSize.java: > New test > > /Roman > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1445 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From roman@kennke.org Mon Jan 30 21:27:00 2006 From: roman@kennke.org (Roman Kennke) Date: Mon, 30 Jan 2006 21:27:00 -0000 Subject: FYI: New Container.getPreferredSize test Message-ID: <1138656467.9701.12.camel@localhost.localdomain> I committed the attached patch that tests an interesting detail in Container.getPreferredSize(). In particular this tests if Container.getPreferredSize() should call invalidateLayout() on a LayoutManager before asking for it's preferredLayoutSize() when the Container is invalid. This would make sense, but it seems that this is not done. 2006-01-30 Roman Kennke * gnu/testlet/java/awt/Container/getPreferredSize.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3990 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From david.gilbert@object-refinery.com Tue Jan 31 15:00:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 31 Jan 2006 15:00:00 -0000 Subject: FYI: AbstractButton.setRolloverEnabled() Message-ID: <43DF7B9D.3000203@object-refinery.com> This patch (committed) sets a known theme for the look-and-feel at the start of the test, to ensure that the expected results are actually obtained (the test was broken when running with the OceanTheme installed): 2006-01-31 David Gilbert * gnu/testlet/javax/swing/AbstractButton.java (test): Set the look and feel theme to DefaultMetalTheme. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Tue Jan 31 15:09:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 31 Jan 2006 15:09:00 -0000 Subject: FYI: Test security manager refactoring Message-ID: <20060131150922.GD10048@redhat.com> Hi all, With my last commit I added new TestSecurityManager2.prepareChecks methods that have no mayCheck parameter. Using these methods is equivalent to calling the equivalent old method with an empty mayCheck array. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1406 diff -u -r1.1406 ChangeLog --- ChangeLog 31 Jan 2006 14:58:07 -0000 1.1406 +++ ChangeLog 31 Jan 2006 15:00:24 -0000 @@ -1,3 +1,20 @@ +2006-01-31 Gary Benson + + * gnu/testlet/TestSecurityManager2.java: Added prepareChecks + methods with no mayCheck parameter to avoid having to create + and pass empty arrays all the time. + + * gnu/testlet/java/io/File/security.java: Use the above. + * gnu/testlet/java/io/FileInputStream/security.java: Likewise. + * gnu/testlet/java/io/FileOutputStream/security.java: Likewise. + * gnu/testlet/java/io/ObjectInputStream/security.java: Likewise. + * gnu/testlet/java/io/ObjectOutputStream/security.java: Likewise. + * gnu/testlet/java/lang/Class/security.java: Likewise. + * gnu/testlet/java/lang/ClassLoader/security.java: Likewise. + * gnu/testlet/java/lang/Runtime/security.java: Likewise. + * gnu/testlet/java/lang/SecurityManager/thread.java: Likewise. + * gnu/testlet/java/lang/System/security.java: Likewise. + 2006-01-31 David Gilbert * gnu/testlet/javax/swing/AbstractButton.java @@ -31,7 +48,7 @@ * gnu/testlet/java/lang/System/security.java: New test. -2006-01-30 Roman Kennke +2006-01-30 Roman Kennkte * gnu/testlet/javax/swing/ViewportLayout/minimumLayoutSize.java: New test Index: gnu/testlet/TestSecurityManager2.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/TestSecurityManager2.java,v retrieving revision 1.5 diff -u -r1.5 TestSecurityManager2.java --- gnu/testlet/TestSecurityManager2.java 27 Jan 2006 11:55:32 -0000 1.5 +++ gnu/testlet/TestSecurityManager2.java 31 Jan 2006 15:00:24 -0000 @@ -27,7 +27,9 @@ { private SecurityManager oldManager; - private Permission[] mustCheck = new Permission[0]; + private Permission[] noChecks = new Permission[0]; + + private Permission[] mustCheck = noChecks; // On some JDKs, setting the security manager triggers some network // initialization that reads system properties ... private Permission[] mayCheck = @@ -79,10 +81,18 @@ checkPermission(perm, null); } + public void prepareChecks(Permission[] mustCheck) { + prepareChecks(mustCheck, noChecks); + } + public void prepareChecks(Permission[] mustCheck, Permission[] mayCheck) { prepareChecks(mustCheck, mayCheck, false); } + public void prepareChecks(Permission[] mustCheck, boolean throwOnSuccess) { + prepareChecks(mustCheck, noChecks, throwOnSuccess); + } + public void prepareChecks(Permission[] mustCheck, Permission[] mayCheck, boolean throwOnSuccess) { Index: gnu/testlet/java/io/File/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/File/security.java,v retrieving revision 1.9 diff -u -r1.9 security.java --- gnu/testlet/java/io/File/security.java 1 Dec 2005 12:40:35 -0000 1.9 +++ gnu/testlet/java/io/File/security.java 31 Jan 2006 15:00:25 -0000 @@ -65,8 +65,6 @@ Permission tmpdir2DeletePerm = new FilePermission(tmpdir2.toString(), "delete"); - Permission tmpfileReadPerm = - new FilePermission(tmpfile.toString(), "read"); Permission tmpfileWritePerm = new FilePermission(tmpfile.toString(), "write"); Permission tmpfileDeletePerm = Index: gnu/testlet/java/io/FileInputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/FileInputStream/security.java,v retrieving revision 1.3 diff -u -r1.3 security.java --- gnu/testlet/java/io/FileInputStream/security.java 5 Dec 2005 15:54:53 -0000 1.3 +++ gnu/testlet/java/io/FileInputStream/security.java 31 Jan 2006 15:00:25 -0000 @@ -48,7 +48,7 @@ // security: java.io.FileInputStream-FileInputStream(File) harness.checkPoint("File constructor"); try { - sm.prepareChecks(new Permission[] {perm}, new Permission[] {}); + sm.prepareChecks(new Permission[] {perm}); new FileInputStream(file); sm.checkAllChecked(harness); } @@ -60,7 +60,7 @@ // security: java.io.FileInputStream-FileInputStream(String) harness.checkPoint("String constructor"); try { - sm.prepareChecks(new Permission[] {perm}, new Permission[] {}); + sm.prepareChecks(new Permission[] {perm}); new FileInputStream(path); sm.checkAllChecked(harness); } @@ -72,7 +72,7 @@ // security: java.io.FileInputStream-FileInputStream(FileDescriptor) harness.checkPoint("FileDescriptor constructor"); try { - sm.prepareChecks(new Permission[] {fdPerm}, new Permission[] {}); + sm.prepareChecks(new Permission[] {fdPerm}); new FileInputStream(FileDescriptor.in); sm.checkAllChecked(harness); } Index: gnu/testlet/java/io/FileOutputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/FileOutputStream/security.java,v retrieving revision 1.4 diff -u -r1.4 security.java --- gnu/testlet/java/io/FileOutputStream/security.java 5 Dec 2005 15:54:53 -0000 1.4 +++ gnu/testlet/java/io/FileOutputStream/security.java 31 Jan 2006 15:00:25 -0000 @@ -104,7 +104,7 @@ // security: java.io.FileOutputStream-FileOutputStream(FileDescriptor) harness.checkPoint("FileDescriptor constructor"); try { - sm.prepareChecks(new Permission[] {fdPerm}, new Permission[] {}); + sm.prepareChecks(new Permission[] {fdPerm}); new FileOutputStream(FileDescriptor.out); sm.checkAllChecked(harness); } Index: gnu/testlet/java/io/ObjectInputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/ObjectInputStream/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/io/ObjectInputStream/security.java 4 Jan 2006 12:39:05 -0000 1.1 +++ gnu/testlet/java/io/ObjectInputStream/security.java 31 Jan 2006 15:00:25 -0000 @@ -51,7 +51,7 @@ // security: java.io.ObjectInputStream-ObjectInputStream harness.checkPoint("constructor"); try { - sm.prepareChecks(enableSubclassImplementation, noPerms); + sm.prepareChecks(enableSubclassImplementation); new TestObjectInputStream(); sm.checkAllChecked(harness); } @@ -63,7 +63,7 @@ // security: java.io.ObjectInputStream-enableResolveObject harness.checkPoint("enableResolveObject"); try { - sm.prepareChecks(noPerms, noPerms); + sm.prepareChecks(noPerms); teststream.testEnableResolveObject(false); sm.checkAllChecked(harness); } @@ -72,7 +72,7 @@ harness.check(false, "unexpected check"); } try { - sm.prepareChecks(enableSubstitution, noPerms); + sm.prepareChecks(enableSubstitution); teststream.testEnableResolveObject(true); sm.checkAllChecked(harness); } Index: gnu/testlet/java/io/ObjectOutputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/ObjectOutputStream/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/io/ObjectOutputStream/security.java 4 Jan 2006 12:39:05 -0000 1.1 +++ gnu/testlet/java/io/ObjectOutputStream/security.java 31 Jan 2006 15:00:25 -0000 @@ -51,7 +51,7 @@ // security: java.io.ObjectOutputStream-ObjectOutputStream harness.checkPoint("constructor"); try { - sm.prepareChecks(enableSubclassImplementation, noPerms); + sm.prepareChecks(enableSubclassImplementation); new TestObjectOutputStream(); sm.checkAllChecked(harness); } @@ -63,7 +63,7 @@ // security: java.io.ObjectOutputStream-enableReplaceObject harness.checkPoint("enableReplaceObject"); try { - sm.prepareChecks(noPerms, noPerms); + sm.prepareChecks(noPerms); teststream.testEnableReplaceObject(false); sm.checkAllChecked(harness); } @@ -72,7 +72,7 @@ harness.check(false, "unexpected check"); } try { - sm.prepareChecks(enableSubstitution, noPerms); + sm.prepareChecks(enableSubstitution); teststream.testEnableReplaceObject(true); sm.checkAllChecked(harness); } Index: gnu/testlet/java/lang/Class/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Class/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/lang/Class/security.java 12 Dec 2005 10:03:30 -0000 1.1 +++ gnu/testlet/java/lang/Class/security.java 31 Jan 2006 15:00:25 -0000 @@ -74,8 +74,6 @@ Permission[] getProtectionDomain = new Permission[] { new RuntimePermission("getProtectionDomain")}; - Permission[] noPerms = new Permission[] {}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); try { sm.install(); @@ -83,7 +81,7 @@ // security: java.lang.Class-forName harness.checkPoint("forName"); try { - sm.prepareChecks(getClassLoader, noPerms); + sm.prepareChecks(getClassLoader); Class.forName("java.lang.Class", false, null); sm.checkAllChecked(harness); } @@ -95,7 +93,7 @@ // security: java.lang.Class-getClassLoader harness.checkPoint("getClassLoader"); try { - sm.prepareChecks(getClassLoader, noPerms); + sm.prepareChecks(getClassLoader); testClass.getClassLoader(); sm.checkAllChecked(harness); } @@ -105,13 +103,12 @@ } // getDeclaredMember checks - getMemberChecks(harness, sm, testClass, - true, accessDeclaredMembers, noPerms); + getMemberChecks(harness, sm, testClass, true, accessDeclaredMembers); // security: java.lang.Class-getProtectionDomain harness.checkPoint("getProtectionDomain"); try { - sm.prepareChecks(getProtectionDomain, noPerms); + sm.prepareChecks(getProtectionDomain); testClass.getProtectionDomain(); sm.checkAllChecked(harness); } @@ -120,7 +117,7 @@ harness.check(false, "unexpected check"); } try { - sm.prepareChecks(getProtectionDomain, noPerms); + sm.prepareChecks(getProtectionDomain); getClass().getProtectionDomain(); sm.checkAllChecked(harness); } @@ -139,8 +136,7 @@ sm.install(); // getMember checks - getMemberChecks(harness, sm, testClass, - false, accessPublicMembers, noPerms); + getMemberChecks(harness, sm, testClass, false, accessPublicMembers); } finally { sm.uninstall(); @@ -158,7 +154,7 @@ private void getMemberChecks(TestHarness harness, TestSecurityManager2 sm, Class testClass, boolean declared, - Permission[] mustCheck, Permission[] mayCheck) + Permission[] mustCheck) { int level; @@ -169,7 +165,7 @@ else harness.checkPoint("getClasses"); try { - sm.prepareChecks(mustCheck, mayCheck); + sm.prepareChecks(mustCheck); if (declared) testClass.getDeclaredClasses(); else @@ -188,7 +184,7 @@ else harness.checkPoint("getFields"); try { - sm.prepareChecks(mustCheck, mayCheck); + sm.prepareChecks(mustCheck); if (declared) testClass.getDeclaredFields(); else @@ -207,7 +203,7 @@ else harness.checkPoint("getMethods"); try { - sm.prepareChecks(mustCheck, mayCheck); + sm.prepareChecks(mustCheck); if (declared) testClass.getDeclaredMethods(); else @@ -226,7 +222,7 @@ else harness.checkPoint("getConstructors"); try { - sm.prepareChecks(mustCheck, mayCheck); + sm.prepareChecks(mustCheck); if (declared) testClass.getDeclaredConstructors(); else @@ -251,7 +247,7 @@ try { for (int i = 0; i < modifiers.length; i++) { for (int j = 0; j < 5; j++) { - sm.prepareChecks(mustCheck, mayCheck); + sm.prepareChecks(mustCheck); boolean exists; try { String name = modifiers[i] + "field" + j; @@ -284,7 +280,7 @@ for (int i = 0; i < modifiers.length; i++) { for (int j = 0; j < 5; j++) { for (int k = 0; k < methodtypes.length; k++) { - sm.prepareChecks(mustCheck, mayCheck); + sm.prepareChecks(mustCheck); boolean exists; try { String name = modifiers[i] + "method" + j; @@ -320,7 +316,7 @@ } try { for (int i = 0; i < constructortypes.length; i++) { - sm.prepareChecks(mustCheck, mayCheck); + sm.prepareChecks(mustCheck); boolean exists; try { if (declared) Index: gnu/testlet/java/lang/ClassLoader/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/ClassLoader/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/lang/ClassLoader/security.java 26 Jan 2006 17:32:39 -0000 1.1 +++ gnu/testlet/java/lang/ClassLoader/security.java 31 Jan 2006 15:00:25 -0000 @@ -61,8 +61,6 @@ Permission[] getClassLoader = new Permission[] { new RuntimePermission("getClassLoader")}; - Permission[] noPerms = new Permission[] {}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); try { sm.install(); @@ -70,7 +68,7 @@ // security: java.lang.ClassLoader-ClassLoader() harness.checkPoint("Constructor (no-args)"); try { - sm.prepareChecks(createClassLoader, noPerms); + sm.prepareChecks(createClassLoader); new TestClassLoader(); sm.checkAllChecked(harness); } @@ -82,7 +80,7 @@ // security: java.lang.ClassLoader-ClassLoader(ClassLoader) harness.checkPoint("Constructor (one-arg)"); try { - sm.prepareChecks(createClassLoader, noPerms); + sm.prepareChecks(createClassLoader); new TestClassLoader(ourLoader); sm.checkAllChecked(harness); } @@ -94,7 +92,7 @@ // security: java.lang.ClassLoader-getSystemClassLoader harness.checkPoint("getSystemClassLoader"); try { - sm.prepareChecks(getClassLoader, noPerms); + sm.prepareChecks(getClassLoader); getSystemClassLoaderTest.invoke(null, new Object[] {}); sm.checkAllChecked(harness); } @@ -106,7 +104,7 @@ // security: java.lang.ClassLoader-getParent harness.checkPoint("getParent"); try { - sm.prepareChecks(getClassLoader, noPerms); + sm.prepareChecks(getClassLoader); getParentTest.invoke(null, new Object[] {ourLoader}); sm.checkAllChecked(harness); } Index: gnu/testlet/java/lang/Runtime/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Runtime/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/lang/Runtime/security.java 27 Jan 2006 15:22:50 -0000 1.2 +++ gnu/testlet/java/lang/Runtime/security.java 31 Jan 2006 15:00:25 -0000 @@ -62,8 +62,6 @@ Permission[] loadLibrary_path = new Permission[] { new RuntimePermission("loadLibrary." + library_path)}; - Permission[] noPerms = new Permission[] {}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); try { sm.install(); @@ -143,7 +141,7 @@ // security: java.lang.Runtime-exit harness.checkPoint("exit"); try { - sm.prepareChecks(exitVM, noPerms, true); + sm.prepareChecks(exitVM, true); runtime.exit(0); harness.check(false, "shouldn't be reached"); } @@ -160,7 +158,7 @@ // security: java.lang.Runtime-runFinalizersOnExit harness.checkPoint("runFinalizersOnExit"); try { - sm.prepareChecks(exitVM, noPerms); + sm.prepareChecks(exitVM); Runtime.runFinalizersOnExit(false); sm.checkAllChecked(harness); } @@ -172,7 +170,7 @@ // security: java.lang.Runtime-addShutdownHook harness.checkPoint("addShutdownHook"); try { - sm.prepareChecks(shutdownHooks, noPerms); + sm.prepareChecks(shutdownHooks); runtime.addShutdownHook(thread); sm.checkAllChecked(harness); } @@ -184,7 +182,7 @@ // security: java.lang.Runtime-removeShutdownHook harness.checkPoint("removeShutdownHook"); try { - sm.prepareChecks(shutdownHooks, noPerms); + sm.prepareChecks(shutdownHooks); runtime.removeShutdownHook(thread); sm.checkAllChecked(harness); } @@ -196,7 +194,7 @@ // security: java.lang.Runtime-load harness.checkPoint("load"); try { - sm.prepareChecks(loadLibrary_name, noPerms, true); + sm.prepareChecks(loadLibrary_name, true); runtime.load(library_name); harness.check(false, "shouldn't be reached"); } @@ -213,7 +211,7 @@ // security: java.lang.Runtime-loadLibrary harness.checkPoint("loadLibrary"); try { - sm.prepareChecks(loadLibrary_path, noPerms, true); + sm.prepareChecks(loadLibrary_path, true); runtime.loadLibrary(library_path); harness.check(false, "shouldn't be reached"); } Index: gnu/testlet/java/lang/SecurityManager/thread.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/SecurityManager/thread.java,v retrieving revision 1.1 diff -u -r1.1 thread.java --- gnu/testlet/java/lang/SecurityManager/thread.java 17 Nov 2005 16:40:25 -0000 1.1 +++ gnu/testlet/java/lang/SecurityManager/thread.java 31 Jan 2006 15:00:25 -0000 @@ -55,12 +55,12 @@ TestSecurityManager2 sm = new TestSecurityManager2(harness); sm.prepareChecks(new Permission[] { - new RuntimePermission("modifyThread")}, new Permission[] {}); + new RuntimePermission("modifyThread")}); sm.checkAccess(thread); sm.checkAllChecked(harness); sm.prepareChecks(new Permission[] { - new RuntimePermission("modifyThreadGroup")}, new Permission[] {}); + new RuntimePermission("modifyThreadGroup")}); sm.checkAccess(group); sm.checkAllChecked(harness); } Index: gnu/testlet/java/lang/System/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/System/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/lang/System/security.java 30 Jan 2006 15:35:27 -0000 1.2 +++ gnu/testlet/java/lang/System/security.java 31 Jan 2006 15:00:26 -0000 @@ -82,8 +82,6 @@ Permission[] setSecurityManager = new Permission[] { new RuntimePermission("setSecurityManager")}; - Permission[] noPerms = new Permission[] {}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); try { sm.install(); @@ -91,7 +89,7 @@ // security: java.lang.System-exit harness.checkPoint("exit"); try { - sm.prepareChecks(exitVM, noPerms, true); + sm.prepareChecks(exitVM, true); System.exit(0); harness.check(false, "shouldn't be reached"); } @@ -108,7 +106,7 @@ // security: java.lang.System-runFinalizersOnExit harness.checkPoint("runFinalizersOnExit"); try { - sm.prepareChecks(exitVM, noPerms); + sm.prepareChecks(exitVM); System.runFinalizersOnExit(false); sm.checkAllChecked(harness); } @@ -120,7 +118,7 @@ // security: java.lang.System-load harness.checkPoint("load"); try { - sm.prepareChecks(loadLibrary_name, noPerms, true); + sm.prepareChecks(loadLibrary_name, true); System.load(library_name); harness.check(false, "shouldn't be reached"); } @@ -137,7 +135,7 @@ // security: java.lang.System-loadLibrary harness.checkPoint("loadLibrary"); try { - sm.prepareChecks(loadLibrary_path, noPerms, true); + sm.prepareChecks(loadLibrary_path, true); System.loadLibrary(library_path); harness.check(false, "shouldn't be reached"); } @@ -156,7 +154,7 @@ // security: java.lang.System-getenv(String) harness.checkPoint("getenv(String)"); try { - sm.prepareChecks(readVariable, noPerms); + sm.prepareChecks(readVariable); System.getenv(a_variable); sm.checkAllChecked(harness); } @@ -165,7 +163,7 @@ harness.check(false, "unexpected check"); } try { - sm.prepareChecks(readNonVariable, noPerms); + sm.prepareChecks(readNonVariable); System.getenv(not_a_variable); sm.checkAllChecked(harness); } @@ -177,7 +175,7 @@ // security: java.lang.System-getProperties harness.checkPoint("getProperties"); try { - sm.prepareChecks(readWriteAllProperties, noPerms); + sm.prepareChecks(readWriteAllProperties); System.getProperties(); sm.checkAllChecked(harness); } @@ -189,7 +187,7 @@ // security: java.lang.System-setProperties harness.checkPoint("setProperties"); try { - sm.prepareChecks(readWriteAllProperties, noPerms); + sm.prepareChecks(readWriteAllProperties); System.setProperties(properties); sm.checkAllChecked(harness); } @@ -201,7 +199,7 @@ // security: java.lang.System-getProperty(String) harness.checkPoint("getProperty(String)"); try { - sm.prepareChecks(readProperty, noPerms); + sm.prepareChecks(readProperty); System.getProperty(a_property); sm.checkAllChecked(harness); } @@ -210,7 +208,7 @@ harness.check(false, "unexpected check"); } try { - sm.prepareChecks(readNonProperty, noPerms); + sm.prepareChecks(readNonProperty); System.getProperty(not_a_property); sm.checkAllChecked(harness); } @@ -222,7 +220,7 @@ // security: java.lang.System-getProperty(String, String) harness.checkPoint("getProperty(String, String)"); try { - sm.prepareChecks(readProperty, noPerms); + sm.prepareChecks(readProperty); System.getProperty(a_property, "quadrant"); sm.checkAllChecked(harness); } @@ -231,7 +229,7 @@ harness.check(false, "unexpected check"); } try { - sm.prepareChecks(readNonProperty, noPerms); + sm.prepareChecks(readNonProperty); System.getProperty(not_a_property, "blade"); sm.checkAllChecked(harness); } @@ -243,7 +241,7 @@ // security: java.lang.System-setIn harness.checkPoint("setIn"); try { - sm.prepareChecks(setIO, noPerms); + sm.prepareChecks(setIO); System.setIn(System.in); sm.checkAllChecked(harness); } @@ -255,7 +253,7 @@ // security: java.lang.System-setOut harness.checkPoint("setOut"); try { - sm.prepareChecks(setIO, noPerms); + sm.prepareChecks(setIO); System.setOut(System.out); sm.checkAllChecked(harness); } @@ -267,7 +265,7 @@ // security: java.lang.System-setErr harness.checkPoint("setErr"); try { - sm.prepareChecks(setIO, noPerms); + sm.prepareChecks(setIO); System.setErr(System.err); sm.checkAllChecked(harness); } @@ -279,7 +277,7 @@ // security: java.lang.System-setProperty harness.checkPoint("setProperty"); try { - sm.prepareChecks(writeProperty, noPerms); + sm.prepareChecks(writeProperty); System.setProperty(a_property, properties.getProperty(a_property)); sm.checkAllChecked(harness); } @@ -288,7 +286,7 @@ harness.check(false, "unexpected check"); } try { - sm.prepareChecks(writeNonProperty, noPerms); + sm.prepareChecks(writeNonProperty); System.setProperty(not_a_property, "hello mum"); sm.checkAllChecked(harness); } @@ -302,7 +300,7 @@ // security: java.lang.System-setSecurityManager harness.checkPoint("setSecurityManager"); try { - sm.prepareChecks(setSecurityManager, noPerms); + sm.prepareChecks(setSecurityManager); System.setSecurityManager(sm); sm.checkAllChecked(harness); } From david.gilbert@object-refinery.com Tue Jan 31 16:46:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 31 Jan 2006 16:46:00 -0000 Subject: FYI: MetalRadioButtonUI test fixes Message-ID: <43DF943F.6070909@object-refinery.com> The expected results in the tests for the MetalRadioButtonUI class assumed the MetalLookAndFeel/DefaultMetalTheme is installed. This patch (committed) explicitly sets the laf/theme, because sometimes this isn't the default: 2006-01-31 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getDisabledTextColor.java (test): Set known theme in MetalLookAndFeel, * gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getFocusColor.java: (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalRadioButtonUI/getSelectColor.java: (test): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Tue Jan 31 16:55:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 31 Jan 2006 16:55:00 -0000 Subject: FYI: JComboBox.setEditor() test fix Message-ID: <43DF966C.2090104@object-refinery.com> This patch (committed) restores the MetalLookAndFeel as the installed LAF at the end of the test - this is a sane default for subsequent tests and fixes a problem I am seeing running the test suite against Sun's reference implementation: 2006-01-31 David Gilbert * gnu/testlet/javax/swing/JComboBox/setEditor.java (test): Restore MetalLookAndFeel at the end of the test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Tue Jan 31 17:14:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 31 Jan 2006 17:14:00 -0000 Subject: FYI: BasicComboBoxUI test fixes Message-ID: <43DF9AE3.9060505@object-refinery.com> Some tests for the BasicComboBoxUI class are setting a look-and-feel that interferes with subsequent tests. This patch (committed) sets the look-and-feel to MetalLookAndFeel at the end of each test method: 2006-01-31 David Gilbert * gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/createArrowButton.java (test): Set MetalLookAndFeel at end of test, * gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/createRenderer.java (test): Likewise, * gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getDisplaySize.java (testNotEditable): Likewise, (testEditable): Likewise, * gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/layout.java (test): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman.kennke@aicas.com Tue Jan 31 20:23:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Tue, 31 Jan 2006 20:23:00 -0000 Subject: FYI: BasicRootPaneUI test Message-ID: The attached patch tests if the BasicRootPaneUI should install a background color on JRootPane or not (it should not, but in classpath we do). 2006-01-31 Roman Kennke * gnu/testlet/javax/swing/plaf/basic/BasicRootPaneUI/installDefaults.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2651 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed Feb 1 09:36:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 09:36:00 -0000 Subject: FYI: UIManager.getUI() - minor change Message-ID: <43E0810C.2050605@object-refinery.com> I added some code to set the MetalLookAndFeel at the end of the test - the custom look and feel that is installed can interfere with tests run subsequent to this one: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/UIManager/getUI.java (test): Set MetalLookAndFeel at end of test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 09:48:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 09:48:00 -0000 Subject: FYI: MetalLookAndFeel - small test fixes Message-ID: <43E08402.5070109@object-refinery.com> This patch (committed) fixes a small problem with the tests running on platforms where the OceanTheme is the default - the expected results assumed the DefaultMetalLookAndFeel: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java (test): Set a known theme at the start of the test, * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java (test): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 10:16:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 10:16:00 -0000 Subject: FYI: PaletteCloseIcon.java Message-ID: <43E08AA0.4080108@object-refinery.com> The width and height of this icon changed from (5, 5) to (7, 7) in JDK 1.5, so I've updated the test to cover just the 1.5 case: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/PaletteCloseIcon/getIconHeight.java (test): Change expected result to 7, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/PaletteCloseIcon/getIconWidth.java (test): Likewise, Changed tag to JDK1.5 for both. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 10:30:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 10:30:00 -0000 Subject: FYI: MenuBarBorder/ToolBarBorder test fixes Message-ID: <43E08DB5.6000401@object-refinery.com> The expected results for these tests depend on the MetalLookAndFeel and DefaultMetalTheme being used, so this patch sets that up explicitly: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalBorders/MenuBarBorder/getBorderInsets.java (test1): Use MetalLookAndFeel with DefaultMetalTheme, (test2): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalBorders/ToolBarBorder/getBorderInsets.java (test1): Use MetalLookAndFeel with DefaultMetalTheme, (test2): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman.kennke@aicas.com Wed Feb 1 10:45:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Wed, 01 Feb 2006 10:45:00 -0000 Subject: FYI: New JLayeredPane test Message-ID: I comitted this new test for JLayeredPane.addImpl which Classpath currently fails. It checks the handling of the position argument within a layer for position == 0 (top position in a layer). 2006-02-01 Roman Kennke * gnu/testlet/javax/swing/JLayeredPane/addImpl.java (testAddZeroPosition): New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1365 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed Feb 1 10:57:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 10:57:00 -0000 Subject: FYI: MetalComboBoxEditor tests updated Message-ID: <43E09425.9050906@object-refinery.com> In JDK1.5, the insets for the MetalComboBoxEditor seem to have changed - this patch (committed) updates our tests accordingly: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalComboBoxEditor/constructor.java (test): Set DefaultMetalTheme and use correct insets, * gnu/testlet/javax/swing/plaf/metal/MetalComboBoxEditor/editorBorderInsets.java (test): Likewise, Updated tag to JDK1.5 for both. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman.kennke@aicas.com Wed Feb 1 11:19:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Wed, 01 Feb 2006 11:19:00 -0000 Subject: FYI: Fixed BasicScrollBarUI tests Message-ID: I fixed a couple of BasicScrollBarUI tests to test for the JDK1.5 behaviour. Obviously Sun fixed a bug in JDK1.5. Before, the scrollbar buttons have been created in installDefaults, in JDK1.5 they are created in installComponents (and rightly so). I changed the tag for the affected tests to JDK1.5. 2006-02-01 Roman Kennke * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/installDefaults.java: (testIncrButton): Fixed to test the JDK1.5 behaviour, which is to not install any button in the installDefaults method. (testDecrButton): Fixed to test the JDK1.5 behaviour, which is to not install any button in the installDefaults method. * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/installComponents.java: New test. Checks if the ScrollBar buttons are created here. * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/MyBasicScrollBarUI.java: Added installComponents() method to make protected method visible. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4806 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed Feb 1 13:53:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 13:53:00 -0000 Subject: FYI: MetalFileChooserUI test fixes Message-ID: <43E0BD63.6030407@object-refinery.com> This patch tidies up some of the tests for the MetalFileChooserUI class which were failing when running on JDK 1.5: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalFileChooserUI/getActionMap.java: Removed, * gnu/testlet/javax/swing/plaf/metal/MetalFileChooserUI/getMinimumSize.java (test): Set theme and removed fixed size test, * gnu/testlet/javax/swing/plaf/metal/MetalFileChooserUI/getActionMap.java (test): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman.kennke@aicas.com Wed Feb 1 13:54:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Wed, 01 Feb 2006 13:54:00 -0000 Subject: FYI: New DefaultTableCellRenderer tests Message-ID: The attached testcase exposes two programming mistakes in Classpath's implemenation of the DefaultTableCellRenderer class: - getTableCellRendererComponent must call setValue() in order to set the value, otherwise subclasses won't work correctly. - DefaultTableCellRenderer must not special case JTextFields as values. This is bogus. 2006-02-01 Roman Kennke * gnu/testlet/javax/swing/table/DefaultTableCellRenderer/getTableCellRendererComponent.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3344 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed Feb 1 14:15:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 14:15:00 -0000 Subject: FYI: TitledBorder tests - minor fix Message-ID: <43E0C296.5000000@object-refinery.com> This patch sets a known look and feel and theme, so that the tests pass when running on Sun's JDK 1.5: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/border/TitledBorder/constructors.java (test): Set known look and feel and theme. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 14:24:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 14:24:00 -0000 Subject: FYI: BasicButtonUI.defaultTextIconGap test updated to 1.5 Message-ID: <43E0C493.80604@object-refinery.com> I updated this test to JDK 1.5 as the behaviour seems to have changed: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/basic/BasicButtonUI/defaultTextIconGap.java (test): Updated expected results and test tag to JDK1.5. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 14:31:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 14:31:00 -0000 Subject: FYI: BasicComboBoxUI.getPreferredSize() Message-ID: <43E0C65D.4050901@object-refinery.com> This patch removes some redundant code and updates one expected value to match the (more sensible) behaviour in JDK 1.5: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java (testEditable): Removed System.out.println() and modified expected result for one check. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 14:49:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 14:49:00 -0000 Subject: FYI: BasicScrollBarUI tests Message-ID: <43E0CA6D.1040008@object-refinery.com> These tests set a TestLookAndFeel which can interfere with other tests that are run subsequently, so this patch cleans up by setting the MetalLookAndFeel at the end: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/constructor.java (test): Set MetalLookAndFeel at end of test, * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/getMaximumSize.java (test): Likewise, * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/getMaximumThumbSize.java (test): Likewise, * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/getMinimumSize.java (test): Likewise, * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/getMinimumThumbSize.java (test): Likewise, * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/getPreferredSize.java (test): Likewise, * gnu/testlet/javax/swing/plaf/basic/BasicScrollBarUI/layoutContainer.java (test): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 15:16:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 15:16:00 -0000 Subject: FYI: MetalComboBoxUI test fixes Message-ID: <43E0D0C0.70202@object-refinery.com> This patch brings these tests in line with JDK 1.5, and cleans up any custom look and feel settings at the end of each test: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalComboBoxUI/getDisplaySize.java (testNotEditable): Set theme, (testEditable): Set MetalLookAndFeel at end, * gnu/testlet/javax/swing/plaf/metal/MetalComboBoxUI/getMinimumSize.java (test): Set known look and feel, (testEditable): Updated expected values, (testEditableWithCustomFont): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalComboBoxUI/getPreferredSize.java (testEditable): Updated expected values. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman@kennke.org Wed Feb 1 15:27:00 2006 From: roman@kennke.org (Roman Kennke) Date: Wed, 01 Feb 2006 15:27:00 -0000 Subject: FYI: MetalComboBoxUI test fixes In-Reply-To: <43E0D0C0.70202@object-refinery.com> References: <43E0D0C0.70202@object-refinery.com> Message-ID: <1138807632.9591.22.camel@localhost.localdomain> Hi David, Am Mittwoch, den 01.02.2006, 15:16 +0000 schrieb David Gilbert: > This patch brings these tests in line with JDK 1.5, and cleans up any > custom look and feel settings at the end of each test: thanks for fixing up all those tests for JDK1.5. Awesome work. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From david.gilbert@object-refinery.com Wed Feb 1 15:30:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 15:30:00 -0000 Subject: FYI: MetalFileChooserUI.getPreferredSize() Message-ID: <43E0D408.3090204@object-refinery.com> This patch removes the check for the actual size, I don't know a reliable way to determine what the expected value is: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalFileChooserUI/getPreferredSize.java (test): Removed check for actual size. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 16:42:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 16:42:00 -0000 Subject: FYI: MetalLookAndFeel test updates Message-ID: <43E0E514.1080801@object-refinery.com> This patch updates a couple of tests so that they pass on JDK 1.5: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getAcceleratorForeground.java (test): Set theme then check color against theme, * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/setCurrentTheme.java (test): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 16:47:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 16:47:00 -0000 Subject: FYI: SimpleAttributeSet.containsAttribute() update Message-ID: <43E0E631.5050101@object-refinery.com> This patch adds one more check to this test: 2006-02-01 David Gilbert * gnu/testlet/javax/swing/text/SimpleAttributeSet/containsAttribute.java (test): Added one more check. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 1 17:23:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 01 Feb 2006 17:23:00 -0000 Subject: FYI: MetalComboBoxUI test fixes In-Reply-To: <1138807632.9591.22.camel@localhost.localdomain> References: <43E0D0C0.70202@object-refinery.com> <1138807632.9591.22.camel@localhost.localdomain> Message-ID: <43E0EEA9.6090809@object-refinery.com> Roman Kennke wrote: >Hi David, > >Am Mittwoch, den 01.02.2006, 15:16 +0000 schrieb David Gilbert: > > >>This patch brings these tests in line with JDK 1.5, and cleans up any >>custom look and feel settings at the end of each test: >> >> > >thanks for fixing up all those tests for JDK1.5. Awesome work. > >/Roman > > No problem. I'm about done for now, there still remain a few failures, see this report: http://www.object-refinery.com/classpath/mauve/swing-jdk15/ Some of these I believe are real bugs in the JDK, for example the failure in javax.swing.text.GapContent and the 5 failures in DefaultMutableTreeNode. The JTable failures I wasn't so sure about, the API spec is too incomplete - do you know any other sources of info for this? My next job is to reproduce the above report with GNU Classpath and see what I can fix... Regards, Dave From mark@klomp.org Wed Feb 1 21:41:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Wed, 01 Feb 2006 21:41:00 -0000 Subject: FYI: New regex UnicodeSimpleCategory test Message-ID: <1138830064.8857.1.camel@localhost.localdomain> I added a new regex test for testing simple unicode categories. 2006-02-01 Mark Wielaard * gnu/testlet/java/util/regex/Pattern/UnicodeSimpleCategory.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: UnicodeSimpleCategory.java Type: text/x-java Size: 4408 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From roman.kennke@aicas.com Thu Feb 2 10:50:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Thu, 02 Feb 2006 10:50:00 -0000 Subject: FYI: GapContent test fix Message-ID: In the test for GapContent.insertString() we have tested the insertion of a string at the index after the last character. There was a comment in it saying that it is a bug in the JDK to not throw a BadLocationException. However, AFAICS this is not the case. Suppose you have the following content: ABCDEFG and now call GapContent.insertString(7, "XYZ"), then this will (quite logically IMO) append this: ABCDEFGXYZ There is no need to throw a BadLocationException here. What might have caused confusion here is the fact that the GapContent usually has a trailing \n character, and normal insertion from an AbstractDocument never inserts after the \n, but this is an implementation detail of the document and not GapContent. I checked in the appended patch to fix this problem. 2006-02-02 Roman Kennke * gnu/testlet/javax/swing/text/GapContent/insertString.java (testGeneral): Fixed boundary case to pass with the JDK. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1176 bytes Desc: not available URL: From roman@kennke.org Thu Feb 2 10:58:00 2006 From: roman@kennke.org (Roman Kennke) Date: Thu, 02 Feb 2006 10:58:00 -0000 Subject: FYI: MetalComboBoxUI test fixes In-Reply-To: <20060202115706.GA26313@box7954.elkhouse.de> References: <20060202115706.GA26313@box7954.elkhouse.de> Message-ID: <1138877888.9591.52.camel@localhost.localdomain> Hi David, > >>This patch brings these tests in line with JDK 1.5, and cleans up any > >>custom look and feel settings at the end of each test: > >> > >> > > > >thanks for fixing up all those tests for JDK1.5. Awesome work. > > > >/Roman > > > > > No problem. I'm about done for now, there still remain a few failures, > see this report: > > http://www.object-refinery.com/classpath/mauve/swing-jdk15/ Would it be possible to create such reports on a regular basis? Maybe we could install it on builder.classpath.org or something? > Some of these I believe are real bugs in the JDK, for example the > failure in javax.swing.text.GapContent and the 5 failures in > DefaultMutableTreeNode. I have looked into the GapContent failure and I am quite certain that this is no bug. I have sent a separate email for that one. I will also look at the other failures now. We should really look very hard at such failures, often times this is only a misinterpretation of the specs and the JDK is actually right. > The JTable failures I wasn't so sure about, the > API spec is too incomplete - do you know any other sources of info for this? I normally refer to the OReilly Swing book, both editions (they are quite different in some areas, while the 2nd edition covers 1.4, it seems they cut out lots of the details that can be found in the 1st edition). The Sun press JFC books are also very valueable. Anthony and Lillian lately found that the Swing connection also has loads of interesting articles that complement the API specs: http://java.sun.com/products/jfc/tsc/articles/index.html > My next job is to reproduce the above report with GNU Classpath and see > what I can fix... Great! /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From david.gilbert@object-refinery.com Thu Feb 2 11:09:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 02 Feb 2006 11:09:00 -0000 Subject: FYI: GapContent test fix In-Reply-To: References: Message-ID: <43E1EA00.8000307@object-refinery.com> Hi Roman, The API docs describe the first parameter (where) as: |"where| - the starting position >= 0, < length()" ...and in this particular test I've used length(), so I'd expect the BadLocationException to be thrown. To back this up further, the exact same test on StringContent *does* throw the exception. I didn't hear back from Sun yet on the bug report (apart from the automated response), but I do expect that they'll accept it and fix it eventually. Anyway, I'll let you know when I hear from them. Regards, Dave Roman Kennke wrote: >In the test for GapContent.insertString() we have tested the insertion of >a string at the index after the last character. There was a comment in >it saying that it is a bug in the JDK to not throw a >BadLocationException. However, AFAICS this is not the case. Suppose you >have the following content: > >ABCDEFG > >and now call GapContent.insertString(7, "XYZ"), then this will (quite >logically IMO) append this: > >ABCDEFGXYZ > >There is no need to throw a BadLocationException here. What might have >caused confusion here is the fact that the GapContent usually has a >trailing \n character, and normal insertion from an AbstractDocument >never inserts after the \n, but this is an implementation detail of the >document and not GapContent. > >I checked in the appended patch to fix this problem. > >2006-02-02 Roman Kennke > > * gnu/testlet/javax/swing/text/GapContent/insertString.java > (testGeneral): Fixed boundary case to pass with the JDK. > >/Roman > > >------------------------------------------------------------------------ > >Index: gnu/testlet/javax/swing/text/GapContent/insertString.java >=================================================================== >RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/text/GapContent/insertString.java,v >retrieving revision 1.3 >diff -u -r1.3 insertString.java >--- gnu/testlet/javax/swing/text/GapContent/insertString.java 24 Jan 2006 17:18:56 -0000 1.3 >+++ gnu/testlet/javax/swing/text/GapContent/insertString.java 2 Feb 2006 10:44:05 -0000 >@@ -215,19 +215,17 @@ > } > harness.check(gc.length(), 7); > >- // insert at index of last character + 1 - the API docs say this should >- // raise a BadLocationException, but JDK1.5.0_06 doesn't (I reported this >- // to Sun as a bug in their implementation, will add a bug ID if one is assigned) >- pass = false; >+ // Insert at index of last character + 1. This appends the new string to >+ // the existing string. > try > { > gc.insertString(7, "XYZ"); > } > catch (BadLocationException e) > { >- pass = true; >+ pass = false; > } >- harness.check(pass); >+ harness.check(gc.length(), 10); > > // insert at index of last character + 2 > pass = false; > > From david.gilbert@object-refinery.com Thu Feb 2 11:18:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 02 Feb 2006 11:18:00 -0000 Subject: FYI: MetalComboBoxUI test fixes In-Reply-To: <1138877888.9591.52.camel@localhost.localdomain> References: <20060202115706.GA26313@box7954.elkhouse.de> <1138877888.9591.52.camel@localhost.localdomain> Message-ID: <43E1EC41.3070508@object-refinery.com> Hi Roman, Roman Kennke wrote: >Hi David, > > > >>>>This patch brings these tests in line with JDK 1.5, and cleans up any >>>>custom look and feel settings at the end of each test: >>>> >>>> >>>> >>>> >>>thanks for fixing up all those tests for JDK1.5. Awesome work. >>> >>>/Roman >>> >>> >>> >>> >>No problem. I'm about done for now, there still remain a few failures, >>see this report: >> >>http://www.object-refinery.com/classpath/mauve/swing-jdk15/ >> >> > >Would it be possible to create such reports on a regular basis? Maybe we >could install it on builder.classpath.org or something? > > Yes, I'm working towards that. I'm attempting to create a version of the report that shows the JDK1.5 and GNU Classpath results side by side, split into four sections: (1) Pass on both runtimes; (2) Fail on GNU Classpath, pass on JDK1.5 (we have bugs to fix); (3) Pass on GNU Classpath, fail on JDK1.5 (Sun has bugs to fix - ideally I'd like to get the Sun bug ID tagged on these fails, but we should also double check that the test is not faulty); (4) Fail on both - in this case, we should look closely at the tests; >>Some of these I believe are real bugs in the JDK, for example the >>failure in javax.swing.text.GapContent and the 5 failures in >>DefaultMutableTreeNode. >> >> > >I have looked into the GapContent failure and I am quite certain that >this is no bug. I have sent a separate email for that one. I will also >look at the other failures now. We should really look very hard at such >failures, often times this is only a misinterpretation of the specs and >the JDK is actually right. > > I think the GapContent failure really is a bug in the JDK (I replied to your other e-mail). And I did look hard at the DefaultMutableTreeNode tests and I'm confident the tests match the specs for those 5 failures too. >> The JTable failures I wasn't so sure about, the >>API spec is too incomplete - do you know any other sources of info for this? >> >> > >I normally refer to the OReilly Swing book, both editions (they are >quite different in some areas, while the 2nd edition covers 1.4, it >seems they cut out lots of the details that can be found in the 1st >edition). The Sun press JFC books are also very valueable. Anthony and >Lillian lately found that the Swing connection also has loads of >interesting articles that complement the API specs: > >http://java.sun.com/products/jfc/tsc/articles/index.html > > Thanks. I have the O'Reilly Swing book (must be first edition because it doesn't have anything about 1.4). Regards, Dave From mark@klomp.org Thu Feb 2 13:22:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Thu, 02 Feb 2006 13:22:00 -0000 Subject: FYI: New Collection.toString() test Message-ID: <1138886524.5707.49.camel@localhost.localdomain> Hi, This tests whether Collection toString() methods are robust when they contain the collection themselves. This was reported against classpath: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25769 2006-02-02 Mark Wielaard * gnu/testlet/java/util/AbstractCollection/toString.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: toString.java Type: text/x-java Size: 1981 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From david.gilbert@object-refinery.com Thu Feb 2 15:47:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 02 Feb 2006 15:47:00 -0000 Subject: FYI: GapContent test fix In-Reply-To: <1138879332.9591.57.camel@localhost.localdomain> References: <43E1EA00.8000307@object-refinery.com> <1138879332.9591.57.camel@localhost.localdomain> Message-ID: <43E22999.3010108@object-refinery.com> Roman Kennke wrote: >Hi David, > >Am Donnerstag, den 02.02.2006, 11:16 +0000 schrieb David Gilbert: > > >>Hi Roman, >> >>The API docs describe the first parameter (where) as: >> >>|"where| - the starting position >= 0, < length()" >> >>...and in this particular test I've used length(), so I'd expect the >>BadLocationException to be thrown. To back this up further, the exact >>same test on StringContent *does* throw the exception. I didn't hear >>back from Sun yet on the bug report (apart from the automated response), >>but I do expect that they'll accept it and fix it eventually. >> >> > >Now that is interesting. So I was a little too quick with my fix. It >seemed to make sense to be able to append, but if StringContent behaves >differently, I am not so sure anymore. So you think we should revert my >patch? > >/Roman > > > I think so, but if you're busy it's not so important - I'll revisit it when I hear back from Sun on the bug report. Regards, Dave From olivier.jolly@pcedev.com Thu Feb 2 21:56:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Thu, 02 Feb 2006 21:56:00 -0000 Subject: Proposed test on serialization back references Message-ID: <43E28024.8090704@pcedev.com> Hi, for my first patch that I could commit myself, I prefer to ensure I'm not doing something wrong and to begin with a trivial test (I got a more interesting one with an actual classpath bug and the classpath fix that I will add at the same time when I'll also get the write access on classpath). Thanks for the feedback. 2006-02-02 Olivier Jolly * gnu/testlet/java/io/ObjectInputOutput/LoopSerializationTest.java: New test on back references in serialization, * gnu/testlet/java/io/ObjectInputOutput/SerializableLoopA.java: New helper file, * gnu/testlet/java/io/ObjectInputOutput/SerializableLoopB.java: Likewise. Regards, Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: LoopSerializationTest.java Type: text/x-java Size: 2496 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SerializableLoopA.java Type: text/x-java Size: 1213 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: SerializableLoopB.java Type: text/x-java Size: 1621 bytes Desc: not available URL: From roman@kennke.org Thu Feb 2 22:14:00 2006 From: roman@kennke.org (Roman Kennke) Date: Thu, 02 Feb 2006 22:14:00 -0000 Subject: Proposed test on serialization back references In-Reply-To: <43E28024.8090704@pcedev.com> References: <43E28024.8090704@pcedev.com> Message-ID: <1138918439.9591.80.camel@localhost.localdomain> Hi Oliview, Am Donnerstag, den 02.02.2006, 22:56 +0100 schrieb Olivier Jolly: > Hi, > for my first patch that I could commit myself, I prefer to ensure I'm > not doing something wrong and to begin with a trivial test (I got a more > interesting one with an actual classpath bug and the classpath fix that > I will add at the same time when I'll also get the write access on > classpath). > Thanks for the feedback. This looks good, please go ahead and commit this. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From gbenson@redhat.com Fri Feb 3 10:24:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 03 Feb 2006 10:24:00 -0000 Subject: FYI: Comment fixes Message-ID: <20060203102402.GF5439@redhat.com> Hi all, My last commit changed the name of the marker I've been using to tag throwpoint tests in comments from "security" to "throwpoint". Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1433 diff -u -r1.1433 ChangeLog --- ChangeLog 3 Feb 2006 09:53:43 -0000 1.1433 +++ ChangeLog 3 Feb 2006 10:21:20 -0000 @@ -1,3 +1,17 @@ +2006-02-03 Gary Benson + + * gnu/testlet/java/io/File/security.java: Renamed the marker + that tags throwpoint tests from "security" to "throwpoint". + * gnu/testlet/java/io/FileInputStream/security.java: Likewise. + * gnu/testlet/java/io/FileOutputStream/security.java: Likewise. + * gnu/testlet/java/io/ObjectInputStream/security.java: Likewise. + * gnu/testlet/java/io/ObjectOutputStream/security.java: Likewise. + * gnu/testlet/java/io/RandomAccessFile/security.java: Likewise. + * gnu/testlet/java/lang/Class/security.java: Likewise. + * gnu/testlet/java/lang/ClassLoader/security.java: Likewise. + * gnu/testlet/java/lang/Runtime/security.java: Likewise. + * gnu/testlet/java/lang/System/security.java: Likewise. + 2006-02-03 Raif S. Naffah * gnu/testlet/javax/crypto: Removed. Index: gnu/testlet/java/io/File/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/File/security.java,v retrieving revision 1.10 diff -u -r1.10 security.java --- gnu/testlet/java/io/File/security.java 31 Jan 2006 15:00:54 -0000 1.10 +++ gnu/testlet/java/io/File/security.java 3 Feb 2006 10:21:21 -0000 @@ -91,7 +91,7 @@ try { sm.install(); - // security: java.io.File-canWrite-DIR + // throwpoint: java.io.File-canWrite-DIR harness.checkPoint("dir.canWrite"); try { sm.prepareChecks(new Permission[]{tmpdirWritePerm}, noPerms); @@ -103,7 +103,7 @@ harness.check(false, "dir.canWrite - unexpected exception"); } - // security: java.io.File-canRead-DIR + // throwpoint: java.io.File-canRead-DIR harness.checkPoint("dir.canRead"); try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); @@ -115,7 +115,7 @@ harness.check(false, "dir.canRead - unexpected exception"); } - // security: java.io.File-createNewFile + // throwpoint: java.io.File-createNewFile harness.checkPoint("file.createNewFile"); try { sm.prepareChecks(new Permission[]{tmpfileWritePerm}, noPerms); @@ -127,7 +127,7 @@ harness.check(false, "file.createNewFile - unexpected exception"); } - // security: java.io.File-delete-FILE + // throwpoint: java.io.File-delete-FILE harness.checkPoint("file.delete"); try { sm.prepareChecks(new Permission[]{tmpfileDeletePerm}, noPerms); @@ -139,7 +139,7 @@ harness.check(false, "file.delete - unexpected exception"); } - // security: java.io.File-list(FilenameFilter) + // throwpoint: java.io.File-list(FilenameFilter) harness.checkPoint("dir.list(null)"); try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); @@ -151,7 +151,7 @@ harness.check(false, "dir.list(null) - unexpected exception"); } - // security: java.io.File-list + // throwpoint: java.io.File-list harness.checkPoint("dir.list()"); try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); @@ -163,7 +163,7 @@ harness.check(false, "dir.list() - unexpected exception"); } - // security: java.io.File-listFiles + // throwpoint: java.io.File-listFiles harness.checkPoint("dir.listFiles()"); try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); @@ -175,7 +175,7 @@ harness.check(false, "dir.listFiles() - unexpected exception"); } - // security: java.io.File-listFiles(FilenameFilter) + // throwpoint: java.io.File-listFiles(FilenameFilter) harness.checkPoint("dir.listFiles(FilenameFilter)"); try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); @@ -188,7 +188,7 @@ "dir.listFiles(FilenameFilter) - unexpected exception"); } - // security: java.io.File-listFiles(FileFilter) + // throwpoint: java.io.File-listFiles(FileFilter) harness.checkPoint("dir.listFiles(FileFilter)"); try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); @@ -201,7 +201,7 @@ "dir.listFiles(FileFilter) - unexpected exception"); } - // security: java.io.File-createTempFile(String, String) + // throwpoint: java.io.File-createTempFile(String, String) harness.checkPoint("createTempFile(2-args)"); try { sm.prepareChecks(new Permission[]{tmpallWritePerm}, @@ -214,7 +214,7 @@ harness.check(false, "createTempFile(2-args) - unexpected exception"); } - // security: java.io.File-createTempFile(String, String, File) + // throwpoint: java.io.File-createTempFile(String, String, File) harness.checkPoint("createTempFile(3-args)"); try { sm.prepareChecks(new Permission[]{tmpdirallWritePerm}, noPerms); @@ -226,7 +226,7 @@ harness.check(false, "createTempFile(3-args) - unexpected exception"); } - // security: java.io.File-setReadOnly-DIR + // throwpoint: java.io.File-setReadOnly-DIR harness.checkPoint("dir.setReadOnly"); try { sm.prepareChecks(new Permission[]{tmpdir2WritePerm}, noPerms); @@ -238,7 +238,7 @@ harness.check(false, "dir.setReadOnly - unexpected exception"); } - // security: java.io.File-delete-DIR + // throwpoint: java.io.File-delete-DIR // Make sure we remove the read only temp dir harness.checkPoint("dir.delete"); try { @@ -251,7 +251,7 @@ harness.check(false, "dir.delete - unexpected exception"); } - // security: java.io.File-listRoots + // throwpoint: java.io.File-listRoots harness.checkPoint("listRoots()"); try { sm.prepareChecks(new Permission[]{rootReadPerm}, noPerms); @@ -264,7 +264,7 @@ harness.check(false, "listRoots() - unexpected exception"); } - // security: java.io.File-renameTo + // throwpoint: java.io.File-renameTo harness.checkPoint("file.renameTo"); try { sm.prepareChecks(new Permission[]{tmpfileWritePerm, @@ -278,7 +278,7 @@ harness.check(false, "file.renameTo - unexpected exception"); } - // security: java.io.File-setLastModified-DIR + // throwpoint: java.io.File-setLastModified-DIR harness.checkPoint("dir.setLastModified()"); try { sm.prepareChecks(new Permission[]{tmpdirWritePerm}, noPerms); @@ -290,7 +290,7 @@ harness.check(false, "dir.setLastModified() - unexpected exception"); } - // security: java.io.File-deleteOnExit-DIR + // throwpoint: java.io.File-deleteOnExit-DIR harness.checkPoint("dir.deleteOnExit()"); try { sm.prepareChecks(new Permission[]{tmpdirDeletePerm}, noPerms); @@ -302,18 +302,18 @@ harness.check(false, "dir.deleteOnExit() - unexpected exception"); } - // security: TODO: java.io.File-deleteOnExit-FILE - // security: TODO: java.io.File-exists - // security: TODO: java.io.File-canRead-FILE - // security: TODO: java.io.File-isFile - // security: TODO: java.io.File-isDirectory - // security: TODO: java.io.File-isHidden - // security: TODO: java.io.File-lastModified - // security: TODO: java.io.File-length - // security: TODO: java.io.File-canWrite-FILE - // security: TODO: java.io.File-mkdir - // security: TODO: java.io.File-mkdirs - // security: TODO: java.io.File-setLastModified-FILE + // throwpoint: TODO: java.io.File-deleteOnExit-FILE + // throwpoint: TODO: java.io.File-exists + // throwpoint: TODO: java.io.File-canRead-FILE + // throwpoint: TODO: java.io.File-isFile + // throwpoint: TODO: java.io.File-isDirectory + // throwpoint: TODO: java.io.File-isHidden + // throwpoint: TODO: java.io.File-lastModified + // throwpoint: TODO: java.io.File-length + // throwpoint: TODO: java.io.File-canWrite-FILE + // throwpoint: TODO: java.io.File-mkdir + // throwpoint: TODO: java.io.File-mkdirs + // throwpoint: TODO: java.io.File-setLastModified-FILE } catch (Throwable ex) { harness.debug(ex); Index: gnu/testlet/java/io/FileInputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/FileInputStream/security.java,v retrieving revision 1.4 diff -u -r1.4 security.java --- gnu/testlet/java/io/FileInputStream/security.java 31 Jan 2006 15:00:54 -0000 1.4 +++ gnu/testlet/java/io/FileInputStream/security.java 3 Feb 2006 10:21:21 -0000 @@ -45,7 +45,7 @@ try { sm.install(); - // security: java.io.FileInputStream-FileInputStream(File) + // throwpoint: java.io.FileInputStream-FileInputStream(File) harness.checkPoint("File constructor"); try { sm.prepareChecks(new Permission[] {perm}); @@ -57,7 +57,7 @@ harness.check(false, "Unexpected check"); } - // security: java.io.FileInputStream-FileInputStream(String) + // throwpoint: java.io.FileInputStream-FileInputStream(String) harness.checkPoint("String constructor"); try { sm.prepareChecks(new Permission[] {perm}); @@ -69,7 +69,7 @@ harness.check(false, "Unexpected check"); } - // security: java.io.FileInputStream-FileInputStream(FileDescriptor) + // throwpoint: java.io.FileInputStream-FileInputStream(FileDescriptor) harness.checkPoint("FileDescriptor constructor"); try { sm.prepareChecks(new Permission[] {fdPerm}); Index: gnu/testlet/java/io/FileOutputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/FileOutputStream/security.java,v retrieving revision 1.5 diff -u -r1.5 security.java --- gnu/testlet/java/io/FileOutputStream/security.java 31 Jan 2006 15:00:55 -0000 1.5 +++ gnu/testlet/java/io/FileOutputStream/security.java 3 Feb 2006 10:21:21 -0000 @@ -49,7 +49,7 @@ try { sm.install(); - // security: java.io.FileOutputStream-FileOutputStream(File) + // throwpoint: java.io.FileOutputStream-FileOutputStream(File) harness.checkPoint("File constructor"); try { sm.prepareChecks(new Permission[] {wperm}, new Permission[] {rperm}); @@ -61,7 +61,7 @@ harness.check(false, "Unexpected check"); } - // security: java.io.FileOutputStream-FileOutputStream(File, boolean) + // throwpoint: java.io.FileOutputStream-FileOutputStream(File, boolean) harness.checkPoint("File, boolean constructor"); for (int i = 0; i <= 1; i++) { try { @@ -75,7 +75,7 @@ } } - // security: java.io.FileOutputStream-FileOutputStream(String) + // throwpoint: java.io.FileOutputStream-FileOutputStream(String) harness.checkPoint("String constructor"); try { sm.prepareChecks(new Permission[] {wperm}, new Permission[] {rperm}); @@ -87,7 +87,7 @@ harness.check(false, "Unexpected check"); } - // security: java.io.FileOutputStream-FileOutputStream(String, boolean) + // throwpoint: java.io.FileOutputStream-FileOutputStream(String, boolean) harness.checkPoint("String, boolean constructor"); for (int i = 0; i <= 1; i++) { try { @@ -101,7 +101,7 @@ } } - // security: java.io.FileOutputStream-FileOutputStream(FileDescriptor) + // throwpoint: java.io.FileOutputStream-FileOutputStream(FileDescriptor) harness.checkPoint("FileDescriptor constructor"); try { sm.prepareChecks(new Permission[] {fdPerm}); Index: gnu/testlet/java/io/ObjectInputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/ObjectInputStream/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/io/ObjectInputStream/security.java 31 Jan 2006 15:00:55 -0000 1.2 +++ gnu/testlet/java/io/ObjectInputStream/security.java 3 Feb 2006 10:21:21 -0000 @@ -48,7 +48,7 @@ try { sm.install(); - // security: java.io.ObjectInputStream-ObjectInputStream + // throwpoint: java.io.ObjectInputStream-ObjectInputStream harness.checkPoint("constructor"); try { sm.prepareChecks(enableSubclassImplementation); @@ -60,7 +60,7 @@ harness.check(false, "unexpected check"); } - // security: java.io.ObjectInputStream-enableResolveObject + // throwpoint: java.io.ObjectInputStream-enableResolveObject harness.checkPoint("enableResolveObject"); try { sm.prepareChecks(noPerms); Index: gnu/testlet/java/io/ObjectOutputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/ObjectOutputStream/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/io/ObjectOutputStream/security.java 31 Jan 2006 15:00:55 -0000 1.2 +++ gnu/testlet/java/io/ObjectOutputStream/security.java 3 Feb 2006 10:21:21 -0000 @@ -48,7 +48,7 @@ try { sm.install(); - // security: java.io.ObjectOutputStream-ObjectOutputStream + // throwpoint: java.io.ObjectOutputStream-ObjectOutputStream harness.checkPoint("constructor"); try { sm.prepareChecks(enableSubclassImplementation); @@ -60,7 +60,7 @@ harness.check(false, "unexpected check"); } - // security: java.io.ObjectOutputStream-enableReplaceObject + // throwpoint: java.io.ObjectOutputStream-enableReplaceObject harness.checkPoint("enableReplaceObject"); try { sm.prepareChecks(noPerms); Index: gnu/testlet/java/io/RandomAccessFile/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/RandomAccessFile/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/io/RandomAccessFile/security.java 5 Dec 2005 15:28:11 -0000 1.1 +++ gnu/testlet/java/io/RandomAccessFile/security.java 3 Feb 2006 10:21:21 -0000 @@ -76,7 +76,7 @@ RandomAccessFile raf; - // security: java.io.RandomAccessFile-RandomAccessFile(File, String) + // throwpoint: java.io.RandomAccessFile-RandomAccessFile(File, String) harness.checkPoint("File constructor, mode = \"" + mode + "\""); try { sm.prepareChecks(mustCheck, mayCheck); @@ -90,7 +90,7 @@ harness.check(false, "unexpected check"); } - // security: java.io.RandomAccessFile-RandomAccessFile(String, String) + // throwpoint: java.io.RandomAccessFile-RandomAccessFile(String, String) harness.checkPoint("String constructor, mode = \"" + mode + "\""); try { sm.prepareChecks(mustCheck, mayCheck); Index: gnu/testlet/java/lang/Class/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Class/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/lang/Class/security.java 31 Jan 2006 15:00:55 -0000 1.2 +++ gnu/testlet/java/lang/Class/security.java 3 Feb 2006 10:21:21 -0000 @@ -78,7 +78,7 @@ try { sm.install(); - // security: java.lang.Class-forName + // throwpoint: java.lang.Class-forName harness.checkPoint("forName"); try { sm.prepareChecks(getClassLoader); @@ -90,7 +90,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Class-getClassLoader + // throwpoint: java.lang.Class-getClassLoader harness.checkPoint("getClassLoader"); try { sm.prepareChecks(getClassLoader); @@ -105,7 +105,7 @@ // getDeclaredMember checks getMemberChecks(harness, sm, testClass, true, accessDeclaredMembers); - // security: java.lang.Class-getProtectionDomain + // throwpoint: java.lang.Class-getProtectionDomain harness.checkPoint("getProtectionDomain"); try { sm.prepareChecks(getProtectionDomain); @@ -158,8 +158,8 @@ { int level; - // security: java.lang.Class-getClasses - // security: java.lang.Class-getDeclaredClasses + // throwpoint: java.lang.Class-getClasses + // throwpoint: java.lang.Class-getDeclaredClasses if (declared) harness.checkPoint("getDeclaredClasses"); else @@ -177,8 +177,8 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Class-getFields - // security: java.lang.Class-getDeclaredFields + // throwpoint: java.lang.Class-getFields + // throwpoint: java.lang.Class-getDeclaredFields if (declared) harness.checkPoint("getDeclaredFields"); else @@ -196,8 +196,8 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Class-getMethods - // security: java.lang.Class-getDeclaredMethods + // throwpoint: java.lang.Class-getMethods + // throwpoint: java.lang.Class-getDeclaredMethods if (declared) harness.checkPoint("getDeclaredMethods"); else @@ -215,8 +215,8 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Class-getConstructors - // security: java.lang.Class-getDeclaredConstructors + // throwpoint: java.lang.Class-getConstructors + // throwpoint: java.lang.Class-getDeclaredConstructors if (declared) harness.checkPoint("getDeclaredConstructors"); else @@ -234,8 +234,8 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Class-getField - // security: java.lang.Class-getDeclaredField + // throwpoint: java.lang.Class-getField + // throwpoint: java.lang.Class-getDeclaredField if (declared) { harness.checkPoint("getDeclaredField"); level = 0; @@ -270,8 +270,8 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Class-getMethod - // security: java.lang.Class-getDeclaredMethod + // throwpoint: java.lang.Class-getMethod + // throwpoint: java.lang.Class-getDeclaredMethod if (declared) harness.checkPoint("getDeclaredMethod"); else @@ -304,8 +304,8 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Class-getConstructor - // security: java.lang.Class-getDeclaredConstructor + // throwpoint: java.lang.Class-getConstructor + // throwpoint: java.lang.Class-getDeclaredConstructor if (declared) { harness.checkPoint("getDeclaredConstructor"); level = 0; Index: gnu/testlet/java/lang/ClassLoader/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/ClassLoader/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/lang/ClassLoader/security.java 31 Jan 2006 15:00:55 -0000 1.2 +++ gnu/testlet/java/lang/ClassLoader/security.java 3 Feb 2006 10:21:21 -0000 @@ -65,7 +65,7 @@ try { sm.install(); - // security: java.lang.ClassLoader-ClassLoader() + // throwpoint: java.lang.ClassLoader-ClassLoader() harness.checkPoint("Constructor (no-args)"); try { sm.prepareChecks(createClassLoader); @@ -77,7 +77,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.ClassLoader-ClassLoader(ClassLoader) + // throwpoint: java.lang.ClassLoader-ClassLoader(ClassLoader) harness.checkPoint("Constructor (one-arg)"); try { sm.prepareChecks(createClassLoader); @@ -89,7 +89,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.ClassLoader-getSystemClassLoader + // throwpoint: java.lang.ClassLoader-getSystemClassLoader harness.checkPoint("getSystemClassLoader"); try { sm.prepareChecks(getClassLoader); @@ -101,7 +101,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.ClassLoader-getParent + // throwpoint: java.lang.ClassLoader-getParent harness.checkPoint("getParent"); try { sm.prepareChecks(getClassLoader); Index: gnu/testlet/java/lang/Runtime/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Runtime/security.java,v retrieving revision 1.3 diff -u -r1.3 security.java --- gnu/testlet/java/lang/Runtime/security.java 31 Jan 2006 15:00:55 -0000 1.3 +++ gnu/testlet/java/lang/Runtime/security.java 3 Feb 2006 10:21:21 -0000 @@ -66,7 +66,7 @@ try { sm.install(); - // security: java.lang.Runtime-exec(String) + // throwpoint: java.lang.Runtime-exec(String) harness.checkPoint("exec(String)"); try { sm.prepareChecks(executeCommand, modifyThread); @@ -78,7 +78,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Runtime-exec(String, String[]) + // throwpoint: java.lang.Runtime-exec(String, String[]) harness.checkPoint("exec(String, String[])"); try { sm.prepareChecks(executeCommand, modifyThread); @@ -90,7 +90,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Runtime-exec(String, String[], File) + // throwpoint: java.lang.Runtime-exec(String, String[], File) harness.checkPoint("exec(String, String[], File)"); try { sm.prepareChecks(executeCommand, modifyThread); @@ -102,7 +102,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Runtime-exec(String[]) + // throwpoint: java.lang.Runtime-exec(String[]) harness.checkPoint("exec(String[])"); try { sm.prepareChecks(executeCommand, modifyThread); @@ -114,7 +114,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Runtime-exec(String[], String[]) + // throwpoint: java.lang.Runtime-exec(String[], String[]) harness.checkPoint("exec(String[], String[])"); try { sm.prepareChecks(executeCommand, modifyThread); @@ -126,7 +126,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Runtime-exec(String[], String[], File) + // throwpoint: java.lang.Runtime-exec(String[], String[], File) harness.checkPoint("exec(String[], String[], File)"); try { sm.prepareChecks(executeCommand, modifyThread); @@ -138,7 +138,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Runtime-exit + // throwpoint: java.lang.Runtime-exit harness.checkPoint("exit"); try { sm.prepareChecks(exitVM, true); @@ -155,7 +155,7 @@ } } - // security: java.lang.Runtime-runFinalizersOnExit + // throwpoint: java.lang.Runtime-runFinalizersOnExit harness.checkPoint("runFinalizersOnExit"); try { sm.prepareChecks(exitVM); @@ -167,7 +167,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Runtime-addShutdownHook + // throwpoint: java.lang.Runtime-addShutdownHook harness.checkPoint("addShutdownHook"); try { sm.prepareChecks(shutdownHooks); @@ -179,7 +179,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Runtime-removeShutdownHook + // throwpoint: java.lang.Runtime-removeShutdownHook harness.checkPoint("removeShutdownHook"); try { sm.prepareChecks(shutdownHooks); @@ -191,7 +191,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.Runtime-load + // throwpoint: java.lang.Runtime-load harness.checkPoint("load"); try { sm.prepareChecks(loadLibrary_name, true); @@ -208,7 +208,7 @@ } } - // security: java.lang.Runtime-loadLibrary + // throwpoint: java.lang.Runtime-loadLibrary harness.checkPoint("loadLibrary"); try { sm.prepareChecks(loadLibrary_path, true); Index: gnu/testlet/java/lang/System/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/System/security.java,v retrieving revision 1.3 diff -u -r1.3 security.java --- gnu/testlet/java/lang/System/security.java 31 Jan 2006 15:00:55 -0000 1.3 +++ gnu/testlet/java/lang/System/security.java 3 Feb 2006 10:21:21 -0000 @@ -86,7 +86,7 @@ try { sm.install(); - // security: java.lang.System-exit + // throwpoint: java.lang.System-exit harness.checkPoint("exit"); try { sm.prepareChecks(exitVM, true); @@ -103,7 +103,7 @@ } } - // security: java.lang.System-runFinalizersOnExit + // throwpoint: java.lang.System-runFinalizersOnExit harness.checkPoint("runFinalizersOnExit"); try { sm.prepareChecks(exitVM); @@ -115,7 +115,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-load + // throwpoint: java.lang.System-load harness.checkPoint("load"); try { sm.prepareChecks(loadLibrary_name, true); @@ -132,7 +132,7 @@ } } - // security: java.lang.System-loadLibrary + // throwpoint: java.lang.System-loadLibrary harness.checkPoint("loadLibrary"); try { sm.prepareChecks(loadLibrary_path, true); @@ -149,9 +149,9 @@ } } - // security: TODO: java.lang.System-getenv() + // throwpoint: TODO: java.lang.System-getenv() - // security: java.lang.System-getenv(String) + // throwpoint: java.lang.System-getenv(String) harness.checkPoint("getenv(String)"); try { sm.prepareChecks(readVariable); @@ -172,7 +172,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-getProperties + // throwpoint: java.lang.System-getProperties harness.checkPoint("getProperties"); try { sm.prepareChecks(readWriteAllProperties); @@ -184,7 +184,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-setProperties + // throwpoint: java.lang.System-setProperties harness.checkPoint("setProperties"); try { sm.prepareChecks(readWriteAllProperties); @@ -196,7 +196,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-getProperty(String) + // throwpoint: java.lang.System-getProperty(String) harness.checkPoint("getProperty(String)"); try { sm.prepareChecks(readProperty); @@ -217,7 +217,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-getProperty(String, String) + // throwpoint: java.lang.System-getProperty(String, String) harness.checkPoint("getProperty(String, String)"); try { sm.prepareChecks(readProperty); @@ -238,7 +238,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-setIn + // throwpoint: java.lang.System-setIn harness.checkPoint("setIn"); try { sm.prepareChecks(setIO); @@ -250,7 +250,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-setOut + // throwpoint: java.lang.System-setOut harness.checkPoint("setOut"); try { sm.prepareChecks(setIO); @@ -262,7 +262,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-setErr + // throwpoint: java.lang.System-setErr harness.checkPoint("setErr"); try { sm.prepareChecks(setIO); @@ -274,7 +274,7 @@ harness.check(false, "unexpected check"); } - // security: java.lang.System-setProperty + // throwpoint: java.lang.System-setProperty harness.checkPoint("setProperty"); try { sm.prepareChecks(writeProperty); @@ -295,9 +295,9 @@ harness.check(false, "unexpected check"); } - // security: TODO: java.lang.System-clearProperty + // throwpoint: TODO: java.lang.System-clearProperty - // security: java.lang.System-setSecurityManager + // throwpoint: java.lang.System-setSecurityManager harness.checkPoint("setSecurityManager"); try { sm.prepareChecks(setSecurityManager); From olivier.jolly@pcedev.com Fri Feb 3 19:09:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Fri, 03 Feb 2006 19:09:00 -0000 Subject: FYI: Test on serialization back references Message-ID: <43E3AA44.2050000@pcedev.com> Hi, this test ensures that basic back references in serialized forms are working. 2006-02-03 Olivier Jolly * gnu/testlet/java/io/ObjectInputOutput/LoopSerializationTest.java: New test on back references in serialization, * gnu/testlet/java/io/ObjectInputOutput/SerializableLoopA.java: New helper file, * gnu/testlet/java/io/ObjectInputOutput/SerializableLoopB.java: Likewise. Cheers Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: loopSerialization.patch Type: text/x-patch Size: 6823 bytes Desc: not available URL: From roman.kennke@aicas.com Sat Feb 4 11:00:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Sat, 04 Feb 2006 11:00:00 -0000 Subject: FYI: New JLayeredPane tests Message-ID: This adds 2 new tests for JLayeredPane, one of which Classpath is currently failing. 2006-02-02 Roman Kennke * gnu/testlet/javax/swing/JLayeredPane/setPosition.java, * gnu/testlet/javax/swing/JLayeredPane/moveToFront.java: New tests. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 5236 bytes Desc: not available URL: From WBaer@gmx.de Sat Feb 4 14:07:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Sat, 04 Feb 2006 14:07:00 -0000 Subject: FYI: New tests for HttpURLConnection Message-ID: <43E4B5F1.8050002@gmx.de> Hi, working on cups exposed some more api incompabilities in our HttpURLConnection implementation. So most of these new tests fail currently and I will try to follow up with patches on classpath-patches for approval. One existing test is removed as the used HTTP server doesn't send the tested header key anymore and therefore this test wrongly fails. 2006-02-04 Wolfgang Baer * gnu/testlet/java/net/HttpURLConnection: New directory. * gnu/testlet/java/net/HttpURLConnection/fileNotFound.java, * gnu/testlet/java/net/HttpURLConnection/nullPointerException.java, * gnu/testlet/java/net/HttpURLConnection/illegalStateException.java, * gnu/testlet/java/net/HttpURLConnection/getRequestProperty.java, * gnu/testlet/java/net/HttpURLConnection/getOutputStream.java: New tests. * gnu/testlet/java/net/URLConnection/URLConnectionTest.java: (test_getHeaderField): Removed failing wrong test. Regards, Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: URLConnectionPatch.patch Type: text/x-patch Size: 1193 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: fileNotFound.java Type: text/x-java Size: 1590 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: getOutputStream.java Type: text/x-java Size: 2629 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: getRequestProperty.java Type: text/x-java Size: 1533 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: illegalStateException.java Type: text/x-java Size: 4361 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nullPointerException.java Type: text/x-java Size: 2020 bytes Desc: not available URL: From WBaer@gmx.de Sat Feb 4 14:16:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Sat, 04 Feb 2006 14:16:00 -0000 Subject: FYI: New tests for HttpURLConnection In-Reply-To: <43E4B5F1.8050002@gmx.de> References: <43E4B5F1.8050002@gmx.de> Message-ID: <43E4B7F3.803@gmx.de> Hi, the attached files had some debug stuff in. Attached now the new files which will be committed. Sorry. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: fileNotFound.java Type: text/x-java Size: 1745 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: getOutputStream.java Type: text/x-java Size: 2646 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: getRequestProperty.java Type: text/x-java Size: 1580 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: illegalStateException.java Type: text/x-java Size: 4397 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: nullPointerException.java Type: text/x-java Size: 2037 bytes Desc: not available URL: From WBaer@gmx.de Sun Feb 5 10:18:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Sun, 05 Feb 2006 10:18:00 -0000 Subject: FYI: Added futher test to HTTPURLConnection.fileNotFound test Message-ID: <43E5D1BF.9000902@gmx.de> Hi, I extended the testcase to cover also the needed behaviour for getInputStream and getErrorStream calls. 2006-02-05 Wolfgang Baer * gnu/testlet/java/net/HttpURLConnection/fileNotFound.java: (test): Added tests for calling getInputStream, getErrorStream. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: fileNotFound.patch Type: text/x-patch Size: 1865 bytes Desc: not available URL: From mark@klomp.org Sun Feb 5 16:01:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 05 Feb 2006 16:01:00 -0000 Subject: FYI: New ClassLoader.loadClass() tests Message-ID: <1139150757.4571.6.camel@localhost.localdomain> Hi, These tests were inspired by the following gcj bug report: 2006-02-05 Mark Wielaard * gnu/testlet/java/lang/ClassLoader/loadClass.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: loadClass.java Type: text/x-java Size: 4097 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From mark@klomp.org Sun Feb 5 21:22:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 05 Feb 2006 21:22:00 -0000 Subject: FYI: DefaultListCellRenderer.getListCellRendererComponent() test Message-ID: <1139174546.4571.10.camel@localhost.localdomain> Hi, Here is a simple test for DefaultListCellRenderer.getListCellRendererComponent() to make sure a Component that returns a valid Dimension when getPreferredSize() is called for some random cell values. 2006-02-05 Mark Wielaard * gnu/testlet/javax/swing/DefaultListCellRenderer/ getListCellRendererComponent.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: getListCellRendererComponent.java Type: text/x-java Size: 1855 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From WBaer@gmx.de Mon Feb 6 08:08:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Mon, 06 Feb 2006 08:08:00 -0000 Subject: FYI: Fixed SocketTest to test for ConnectException Message-ID: <43E704C1.1020806@gmx.de> Hi all, I adapted the SocketTest to test for ConnectException if connection fails instead of the general IOException. Fix is checked into classpath. 2006-02-06 Wolfgang Baer * gnu/testlet/java/net/Socket/SocketTest.java (test_Basics): Specialized Exceptions to be thrown to ConnectException if connection fails. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: SocketTest.patch Type: text/x-patch Size: 1664 bytes Desc: not available URL: From langel@redhat.com Mon Feb 6 15:14:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 06 Feb 2006 15:14:00 -0000 Subject: Patch: DefaultStyledDocument tests Message-ID: <1139238866.4460.13.camel@tow.toronto.redhat.com> 2006-02-06 Lillian Angel * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure1.java: Removed strict checks. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure3.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure4.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure5.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure6.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure7.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument1.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument4.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument5.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument6.java: Likewise. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 85876 bytes Desc: not available URL: From roman.kennke@aicas.com Tue Feb 7 14:21:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Tue, 07 Feb 2006 14:21:00 -0000 Subject: FYI: New FlowView test Message-ID: Here comes a test for javax.swing.text.FlowView. 2006-02-07 Roman Kennke * gnu/testlet/javax/swing/text/FlowView/TestFlowView.java: New helper class. * gnu/testlet/javax/swing/text/FlowView/getFlowAxis: New test class. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4076 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed Feb 8 16:50:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 08 Feb 2006 16:50:00 -0000 Subject: FYI: SpinnerNumberModel/SpinnerDateModel new tests Message-ID: <43EA215D.7040006@object-refinery.com> I added these new tests: 2006-02-08 David Gilbert * gnu/testlet/javax/swing/SpinnerDateModel/constructors.java: New file, * gnu/testlet/javax/swing/SpinnerDateModel/getNextValue.java: Likewise, * gnu/testlet/javax/swing/SpinnerDateModel/getPreviousValue.java: Likewise, * gnu/testlet/javax/swing/SpinnerDateModel/setEnd.java: Likewise, * gnu/testlet/javax/swing/SpinnerDateModel/setStart.java: Likewise, * gnu/testlet/javax/swing/SpinnerDateModel/setValue.java: Likewise, * gnu/testlet/javax/swing/SpinnerNumberModel/constructors.java: Likewise, * gnu/testlet/javax/swing/SpinnerNumberModel/getNextValue.java: Likewise, * gnu/testlet/javax/swing/SpinnerNumberModel/getPreviousValue.java: Likewise, * gnu/testlet/javax/swing/SpinnerNumberModel/setMaximum.java: Likewise, * gnu/testlet/javax/swing/SpinnerNumberModel/setMinimum.java: Likewise, * gnu/testlet/javax/swing/SpinnerNumberModel/setStepSize.java: Likewise, * gnu/testlet/javax/swing/SpinnerNumberModel/setValue.java: Likewise. There are some failures with GNU Classpath CVS, I have a patch to fix those that I'll submit soon. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From tromey@redhat.com Wed Feb 8 17:32:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Wed, 08 Feb 2006 17:32:00 -0000 Subject: Patch: FYI: add missing Uses Message-ID: I'm checking this in. We were missing a 'Uses' comment. Tom Index: ChangeLog from Tom Tromey * gnu/testlet/java/io/ObjectInputOutput/LoopSerializationTest.java: Added Uses. Index: gnu/testlet/java/io/ObjectInputOutput/LoopSerializationTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/ObjectInputOutput/LoopSerializationTest.java,v retrieving revision 1.1 diff -u -r1.1 LoopSerializationTest.java --- gnu/testlet/java/io/ObjectInputOutput/LoopSerializationTest.java 3 Feb 2006 19:06:01 -0000 1.1 +++ gnu/testlet/java/io/ObjectInputOutput/LoopSerializationTest.java 8 Feb 2006 17:31:19 -0000 @@ -20,6 +20,7 @@ */ // Tags: JDK1.2 +// Uses: SerializableLoopA SerializableLoopB package gnu.testlet.java.io.ObjectInputOutput; From tromey@redhat.com Thu Feb 9 01:58:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Thu, 09 Feb 2006 01:58:00 -0000 Subject: FYI: New tests for HttpURLConnection In-Reply-To: <43E4B5F1.8050002@gmx.de> References: <43E4B5F1.8050002@gmx.de> Message-ID: >>>>> "Wolfgang" == Wolfgang Baer writes: Wolfgang> One existing test is removed as the used HTTP server doesn't Wolfgang> send the tested header key anymore and therefore this test Wolfgang> wrongly fails. David Daney had the interesting idea that we could have a mini http server inside of Mauve, which we could then use to test all the http modes we care about. Specifically what he had suggested was encoding the desired response into the request, so we could check 404s, redirects, chunking, etc. Just in case you're really motivated to hack in this area ... :-) Tom From WBaer@gmx.de Thu Feb 9 07:48:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Thu, 09 Feb 2006 07:48:00 -0000 Subject: FYI: New tests for HttpURLConnection In-Reply-To: References: <43E4B5F1.8050002@gmx.de> Message-ID: <43EAF479.8090400@gmx.de> Tom Tromey wrote: >>>>>>"Wolfgang" == Wolfgang Baer writes: > > > Wolfgang> One existing test is removed as the used HTTP server doesn't > Wolfgang> send the tested header key anymore and therefore this test > Wolfgang> wrongly fails. > > David Daney had the interesting idea that we could have a mini http > server inside of Mauve, which we could then use to test all the http > modes we care about. Specifically what he had suggested was encoding > the desired response into the request, so we could check 404s, > redirects, chunking, etc. Thats definitly the way to go. > > Just in case you're really motivated to hack in this area ... :-) Not at this time. I just tried to get the bugs fixed I found during working on the IPP backend for printing and which prevented me from hacking. Maybe after printing is finished :-) Wolfgang From roman.kennke@aicas.com Thu Feb 9 11:59:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Thu, 09 Feb 2006 11:59:00 -0000 Subject: FYI: New View tests Message-ID: I added a couple of tests for javax.swing.text.View. 2006-02-09 Roman Kennke * gnu/testlet/javax/swing/text/View/TestView.java: New helper class. * gnu/testlet/javax/swing/text/View/getAlignment.java, * gnu/testlet/javax/swing/text/View/getMaximumSpan.java, * gnu/testlet/javax/swing/text/View/getMinimumSpan.java, * gnu/testlet/javax/swing/text/View/getResizeWeight.java: New tests. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 13450 bytes Desc: not available URL: From olivier.jolly@pcedev.com Fri Feb 10 22:10:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Fri, 10 Feb 2006 22:10:00 -0000 Subject: FYI: serialization related tests Message-ID: <43ED0F43.80508@pcedev.com> Hi, There are a couple of tests which exposes serialization related bugs in the current version of classpath and the fixes of which will be commited very soon. The HierarchyTest is a simple case of the bug declared there : http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14144 Olivier 2006-02-10 Olivier Jolly * gnu/testlet/java/io/ObjectInputOutput/HierarchyTest.java: New test on abstract constructor calls in deserialization. * gnu/testlet/java/io/ObjectInputOutput/ProxySerializationTest.java: New test on proxy serialization. -------------- next part -------------- A non-text attachment was scrubbed... Name: serialization_test.patch Type: text/x-patch Size: 7974 bytes Desc: not available URL: From WBaer@gmx.de Sat Feb 11 12:35:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Sat, 11 Feb 2006 12:35:00 -0000 Subject: FYI: New CardLayout tests Message-ID: <43EDDADA.1070503@gmx.de> Hi, these are two CardLayout tests testing the correct Exception throwing if methods are called with wrong arguments (we fail some tests - patch will be posted to cp-patches) 2006-02-11 Wolfgang Baer * gnu/testlet/java/awt/CardLayout: New directory * gnu/testlet/java/awt/CardLayout/first.java: New test. * gnu/testlet/java/awt/CardLayout/show.java: New test. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: first.java Type: text/x-java Size: 2469 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: show.java Type: text/x-java Size: 3124 bytes Desc: not available URL: From olivier.jolly@pcedev.com Sat Feb 11 18:01:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Sat, 11 Feb 2006 18:01:00 -0000 Subject: FYI: proxy behaviour test with interception Message-ID: <43EE266D.9010402@pcedev.com> Hi, I've added a test which affects only certain jvm implementation (cacao 0.94+ to mention it) in the handling of java.lang.reflect.Proxy. The toString method should be forwarded in the InvocationHandler and not be handled as Proxy.toString. Olivier 2006-02-11 Olivier Jolly * gnu/testlet/java/lang/reflect/Proxy/ToString.java: New test on toString method forwarding to the InvocationHandler. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: proxy_to_string.diff URL: From olivier.jolly@pcedev.com Sat Feb 11 19:37:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Sat, 11 Feb 2006 19:37:00 -0000 Subject: FYI: exception handling in proxies Message-ID: <43EE3CE3.7020409@pcedev.com> Hi, while I'm working on Proxies, I'm adding a test which ensures that exceptions are handled correctly (what isn't the case yet in cacao 0.94). 2006-02-11 Olivier Jolly * gnu/testlet/java/lang/reflect/Proxy/ExceptionRaising.java: New test on exception handling with proxies. Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: exception_raising.patch Type: text/x-patch Size: 5325 bytes Desc: not available URL: From WBaer@gmx.de Sun Feb 12 12:38:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Sun, 12 Feb 2006 12:38:00 -0000 Subject: FYI: Additional DocFlavor mimetype parsing tests Message-ID: <43EF2D02.3080806@gmx.de> Hi, changelog says all. We fail these tests currently, patch is pending. 2006-02-12 Wolfgang Baer * gnu/testlet/javax/print/DocFlavor/parseMimeType.java: Added additional tests to check for correct mimetype syntax. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: Mauve_DocFlavor.patch Type: text/x-patch Size: 5841 bytes Desc: not available URL: From mark@klomp.org Sun Feb 12 13:04:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 12 Feb 2006 13:04:00 -0000 Subject: FYI: TextAction/augmentList() order doesn't matter Message-ID: <1139749454.4546.73.camel@localhost.localdomain> Hi, The order of the elements returned by TextAction.augmentList() doesn't seem to matter. This patch makes it so: 2006-02-12 Mark Wielaard * gnu/testlet/javax/swing/text/TextAction/augmentList.java: Order of elements doesn't matter, as long as all elements are present. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: TextAction-augmentList.patch Type: text/x-patch Size: 1267 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From mark@klomp.org Sun Feb 12 13:48:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 12 Feb 2006 13:48:00 -0000 Subject: [Fwd: Re: [cp-testresults] FAIL: regressions for mauve-jamvm on Fri Feb 3 19:02:27 UTC 2006] Message-ID: <1139752136.4546.78.camel@localhost.localdomain> Sent to wrong list. Apologies. -------------- next part -------------- An embedded message was scrubbed... From: Mark Wielaard Subject: Re: [cp-testresults] FAIL: regressions for mauve-jamvm on Fri Feb 3 19:02:27 UTC 2006 Date: Sun, 12 Feb 2006 14:33:22 +0100 Size: 3990 URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From olivier.jolly@pcedev.com Sun Feb 12 22:50:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Sun, 12 Feb 2006 22:50:00 -0000 Subject: FYI: fixed test tag in ProxySerializationTest Message-ID: <43EFBBC2.5080406@pcedev.com> Hi, sorry but I misspelled the test tag in a recent commit, here is the fix. 2006-02-12 Olivier Jolly * gnu/testlet/java/io/ObjectInputOutput/ProxySerializationTest.java: Fixed test tag. Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: proxy_serialization_tag.patch Type: text/x-patch Size: 616 bytes Desc: not available URL: From david.gilbert@object-refinery.com Mon Feb 13 13:43:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 13 Feb 2006 13:43:00 -0000 Subject: FYI: MetalBorders - small test updates Message-ID: <43F08CE2.4010205@object-refinery.com> While fixing the failures for these tests, I added an additional check to confirm that the changes are correct - patch committed (and one to follow for GNU Classpath): 2006-02-13 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalBorders/ButtonBorder/getBorderInsets.java (test1): Added check for return value, (test2): Set component in test for null Insets argument, * gnu/testlet/javax/swing/plaf/metal/MetalBorders/Flush3DBorder/getBorderInsets.java: Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalBorders/InternalFrameBorder/getBorderInsets.java: Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalBorders/MenuItemBorder/getBorderInsets.java: Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalBorders/PaletteBorder/getBorderInsets.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman.kennke@aicas.com Mon Feb 13 15:17:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 13 Feb 2006 15:17:00 -0000 Subject: FYI: Component.repaint() test Message-ID: This tests the Component.repaint() methods and how they call each other. 2006-02-13 Roman Kennke * gnu/testlet/java/awt/Component/repaint.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4069 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Feb 14 14:07:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 14 Feb 2006 14:07:00 -0000 Subject: FYI: JComponent.getListeners() - new check Message-ID: <43F1BA4B.1020100@object-refinery.com> This patch (committed) adds another check for the getListeners() method, specifically for the retrieval of PropertyChangeListeners. The check passes when run on JDK1.5 but currently fails for GNU Classpath: 2006-02-14 David Gilbert * gnu/testlet/javax/swing/JComponent/getListeners.java (MyPropertyChangeListener): New class, (test): Added check for PropertyChangeListener. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From langel@redhat.com Tue Feb 14 14:49:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 14 Feb 2006 14:49:00 -0000 Subject: Patch: New BorderLayout test Message-ID: <1139928571.20976.23.camel@tow.toronto.redhat.com> 2006-02-14 Lillian Angel * gnu/testlet/java/awt/BorderLayout/layoutContainer.java (test0): New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1882 bytes Desc: not available URL: From mark@klomp.org Tue Feb 14 16:18:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 14 Feb 2006 16:18:00 -0000 Subject: FYI: Some Frame MenuBar tests Message-ID: <1139933911.7728.35.camel@localhost.localdomain> Hi, Here are some tests for setting, getting, removing MenuBars from Frames. 2006-02-14 Mark Wielaard * gnu/testlet/java/awt/Frame/menubar.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: menubar.java Type: text/x-java Size: 1588 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From olivier.jolly@pcedev.com Tue Feb 14 19:51:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Tue, 14 Feb 2006 19:51:00 -0000 Subject: RFC: update in batch_run Message-ID: <43F234BD.9050904@pcedev.com> Hi, for those who are using mauve in an IDE which keeps .class up to date with .java (like Eclipse), a batch_run launch cleans everything and recompile everything, which is quite long. So I added the ability to set the environnement variable COMPILER to "none", which assumes that all .class are already present. If accepted, the batch_run wrapper in eclipse could be changed to benefit of this optimisation. Thx for the feedback Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: compiler_none.patch Type: text/x-patch Size: 1792 bytes Desc: not available URL: From tromey@redhat.com Tue Feb 14 20:12:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Tue, 14 Feb 2006 20:12:00 -0000 Subject: RFC: update in batch_run In-Reply-To: <43F234BD.9050904@pcedev.com> References: <43F234BD.9050904@pcedev.com> Message-ID: >>>>> "Olivier" == Olivier Jolly writes: Olivier> So I added the ability to set the environnement variable Olivier> COMPILER to "none", which assumes that all .class are already Olivier> present. Looks pretty good to me. Just one nit. Olivier> If accepted, the batch_run wrapper in eclipse could be changed to Olivier> benefit of this optimisation. Sounds good. Olivier> +if test -z "$NATIVE" -a "x$COMPILER" != "xnone"; then It is a little more defensive to use &&: if test -z foo && test blah != blah; then Maybe my old autoconf habits are showing... there were weird parsing problems with -a in some versions of test, back in ancient times. Tom From mark@klomp.org Tue Feb 14 20:51:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 14 Feb 2006 20:51:00 -0000 Subject: FYI: new Menu and MenuBar tests Message-ID: <1139950230.4545.4.camel@localhost.localdomain> Hi, Here are two more tests like the Frame test I added earlier: 2006-02-14 Mark Wielaard * gnu/testlet/java/awt/Menu/addItem.java: New test. * gnu/testlet/java/awt/MenuBar/addMenu.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: addItem.java Type: text/x-java Size: 3035 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: addMenu.java Type: text/x-java Size: 2043 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From olivier.jolly@pcedev.com Tue Feb 14 21:15:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Tue, 14 Feb 2006 21:15:00 -0000 Subject: RFC: update in batch_run In-Reply-To: References: <43F234BD.9050904@pcedev.com> Message-ID: <43F2485B.3090100@pcedev.com> Tom Tromey a ??crit : >>>>>>"Olivier" == Olivier Jolly writes: >>>>>> >>>>>> > >Olivier> So I added the ability to set the environnement variable >Olivier> COMPILER to "none", which assumes that all .class are already >Olivier> present. > >Looks pretty good to me. Just one nit. > >Olivier> If accepted, the batch_run wrapper in eclipse could be changed to >Olivier> benefit of this optimisation. > >Sounds good. > >Olivier> +if test -z "$NATIVE" -a "x$COMPILER" != "xnone"; then > >It is a little more defensive to use &&: > > if test -z foo && test blah != blah; then > >Maybe my old autoconf habits are showing... there were weird parsing >problems with -a in some versions of test, back in ancient times. > > > ok, no problem, I commited it with this change taken in account. 2006-02-14 Olivier Jolly * batch_run (COMPILER): Added "none" as possible value to skip compilation. >Tom > > Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: compiler_none.patch Type: text/x-patch Size: 1797 bytes Desc: not available URL: From olivier.jolly@pcedev.com Tue Feb 14 21:47:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Tue, 14 Feb 2006 21:47:00 -0000 Subject: FYI: added explicit constructor to avoid interpretation of its visibility Message-ID: <43F24FDA.4040509@pcedev.com> Hi, as explained on the classpath ml, there is an interpretation of the JLS which makes different compilers produce different visibility for the constructor of a private inner classe without explicit constructor (namely private with jikes, and non private with ecj). To avoid this ambiguity, I added this constructor explicitely. 2006-02-14 Olivier Jolly * gnu/testlet/java/io/ObjectInputOutput/HierarchyTest.java (HierarchyTest.Base): Added explicit constructor to avoid interpretation of its visibility. I wonder whether this kind of test should be added in jacks. Cheers, Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: hierarchy_base_explicit_constructor.patch Type: text/x-patch Size: 1361 bytes Desc: not available URL: From ericblake@comcast.net Wed Feb 15 01:02:00 2006 From: ericblake@comcast.net (Eric Blake) Date: Wed, 15 Feb 2006 01:02:00 -0000 Subject: FYI: added explicit constructor to avoid interpretation of its visibility Message-ID: <021520060102.22338.43F27DA400003F120000574222058891160A050E040D0C079D0A@comcast.net> > Hi, > as explained on the classpath ml, there is an interpretation of the > JLS which makes different compilers produce different visibility for the > constructor of a private inner classe without explicit constructor > (namely private with jikes, and non private with ecj). To avoid this > ambiguity, I added this constructor explicitely. > > > I wonder whether this kind of test should be added in jacks. Jacks already tests this. ecj is buggy - the JLS requires default constructors to have the same visibility as their enclosing class, so private inner classes default to private constructors. Furthermore, calling a private constructor from the outer class requires a default-visibility bridge constructor, so it is always a good idea to explicitly declare constructors of private inner classes in order to avoid having to use the bridge constructor. -- Eric Blake From david.gilbert@object-refinery.com Wed Feb 15 10:52:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 15 Feb 2006 10:52:00 -0000 Subject: FYI: SpinnerNumberModel - extra checks Message-ID: <43F307F3.7020901@object-refinery.com> I added these checks which reveal a bug (NullPointerException) in our SpinnerNumberModel implementation, which I'll fix in Classpath shortly: 2006-02-15 David Gilbert * gnu/testlet/javax/swing/SpinnerNumberModel/getNextValue.java (test): Add checks for model without bounds, * gnu/testlet/javax/swing/SpinnerNumberModel/getPreviousValue.java (test): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 15 11:10:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 15 Feb 2006 11:10:00 -0000 Subject: FYI: SpinnerDateModel - additional checks Message-ID: <43F30C38.3070006@object-refinery.com> This patch adds the same checks for SpinnerDateModel that I added earlier today for SpinnerNumberModel: 2006-02-15 David Gilbert * gnu/testlet/javax/swing/SpinnerDateModel/getNextValue.java (test): Add checks for model without bounds, * gnu/testlet/javax/swing/SpinnerDateModel/getPreviousValue.java (test): Likewise. Our implementation of SpinnerDateModel already passes these new checks... Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 15 14:42:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 15 Feb 2006 14:42:00 -0000 Subject: FYI: JSpinner tests Message-ID: <43F33F19.6030809@object-refinery.com> I committed the following tests for the JSpinner class: 2006-02-15 David Gilbert * gnu/testlet/javax/swing/JSpinner/addChangeListener.java: New test, * gnu/testlet/javax/swing/JSpinner/constructors.java: Likewise, * gnu/testlet/javax/swing/JSpinner/createEditor.java: Likewise, * gnu/testlet/javax/swing/JSpinner/getChangeListeners.java: Likewise, * gnu/testlet/javax/swing/JSpinner/getEditor.java: Likewise, * gnu/testlet/javax/swing/JSpinner/getModel.java: Likewise, * gnu/testlet/javax/swing/JSpinner/getNextValue.java: Likewise, * gnu/testlet/javax/swing/JSpinner/getPreviousValue.java: Likewise, * gnu/testlet/javax/swing/JSpinner/getUIClassID.java: Likewise, * gnu/testlet/javax/swing/JSpinner/MyJSpinner.java: New support class, * gnu/testlet/javax/swing/JSpinner/removeChangeListener.java: New test, * gnu/testlet/javax/swing/JSpinner/setEditor.java: Likewise, * gnu/testlet/javax/swing/JSpinner/setModel.java: Likewise. I have a version of JSpinner that passes all these tests, and will get it into GNU Classpath CVS soon. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 15 14:50:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 15 Feb 2006 14:50:00 -0000 Subject: FYI: JSpinner.DefaultEditor - new tests Message-ID: <43F340FB.9030008@object-refinery.com> I committed the following new tests for the JSpinner.DefaultEditor class: 2006-02-15 David Gilbert * gnu/testlet/javax/swing/JSpinner/DefaultEditor/constructor.java: New test, * gnu/testlet/javax/swing/JSpinner/DefaultEditor/minimumLayoutSize.java: Likewise, * gnu/testlet/javax/swing/JSpinner/DefaultEditor/MyDefaultEditor.java: New support class, * gnu/testlet/javax/swing/JSpinner/DefaultEditor/preferredLayoutSize.java: New test, * gnu/testlet/javax/swing/JSpinner/DefaultEditor/propertyChange.java: Likewise, * gnu/testlet/javax/swing/JSpinner/DefaultEditor/stateChanged.java: Likewise. Regards, Dave From david.gilbert@object-refinery.com Wed Feb 15 14:59:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 15 Feb 2006 14:59:00 -0000 Subject: FYI: JSpinner.DateEditor - new tests Message-ID: <43F34304.2050209@object-refinery.com> I committed these new tests: 2006-02-15 David Gilbert * gnu/testlet/javax/swing/JSpinner/DateEditor/constructors.java: New test, * gnu/testlet/javax/swing/JSpinner/DateEditor/getFormat.java: Likewise, * gnu/testlet/javax/swing/JSpinner/DateEditor/getModel.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 15 15:05:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 15 Feb 2006 15:05:00 -0000 Subject: FYI: JSpinner.ListEditor - new tests Message-ID: <43F34487.4050405@object-refinery.com> I committed these new tests: 2006-02-15 David Gilbert * gnu/testlet/javax/swing/JSpinner/ListEditor/constructor.java: New test, * gnu/testlet/javax/swing/JSpinner/ListEditor/getModel.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Feb 15 15:13:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 15 Feb 2006 15:13:00 -0000 Subject: FYI: JSpinner.NumberEditor - new tests Message-ID: <43F34662.3080308@object-refinery.com> I committed the following new tests: 2006-02-15 David Gilbert * gnu/testlet/javax/swing/JSpinner/NumberEditor/constructors.java: New test, * gnu/testlet/javax/swing/JSpinner/NumberEditor/getFormat.java: Likewise, * gnu/testlet/javax/swing/JSpinner/NumberEditor/getModel.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From tromey@redhat.com Wed Feb 15 17:37:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Wed, 15 Feb 2006 17:37:00 -0000 Subject: FYI: added explicit constructor to avoid interpretation of its visibility In-Reply-To: <021520060102.22338.43F27DA400003F120000574222058891160A050E040D0C079D0A@comcast.net> References: <021520060102.22338.43F27DA400003F120000574222058891160A050E040D0C079D0A@comcast.net> Message-ID: >>>>> "Eric" == Eric Blake writes: Eric> Jacks already tests this. ecj is buggy - the JLS requires default Eric> constructors to have the same visibility as their enclosing class, Eric> so private inner classes default to private constructors. Yeah, I agree. FWIW this is Eclipse PR 117758. Tom From gbenson@redhat.com Thu Feb 16 10:33:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 16 Feb 2006 10:33:00 -0000 Subject: FYI: Test security manager new feature Message-ID: <20060216103318.GC4898@redhat.com> Hi all, A while ago I added a bit to the test security manager to make it throw an exception when the expected permission is checked (to allow testing access checks on things you don't actually want to happen). This commit allows that bit of logic to test multiple access checks. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1477 diff -u -r1.1477 ChangeLog --- ChangeLog 15 Feb 2006 15:12:45 -0000 1.1477 +++ ChangeLog 16 Feb 2006 10:28:27 -0000 @@ -1,3 +1,9 @@ +2006-01-27 Gary Benson + + * gnu/testlet/TestSecurityManager2.java: Added the ability to + test for multiple permisson checks when in the mode that aborts + the test after the permissions have been checked. + 2006-02-15 David Gilbert * gnu/testlet/javax/swing/JSpinner/NumberEditor/constructors.java: New test, Index: gnu/testlet/TestSecurityManager2.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/TestSecurityManager2.java,v retrieving revision 1.6 diff -u -r1.6 TestSecurityManager2.java --- gnu/testlet/TestSecurityManager2.java 31 Jan 2006 15:00:54 -0000 1.6 +++ gnu/testlet/TestSecurityManager2.java 16 Feb 2006 10:28:27 -0000 @@ -100,8 +100,6 @@ this.mustCheck = mustCheck; this.checked = new boolean[mustCheck.length]; this.throwOnSuccess = throwOnSuccess; - if (throwOnSuccess && mustCheck.length != 1) - throw new IllegalArgumentException(); } public void checkAllChecked(TestHarness harness) { @@ -135,9 +133,16 @@ } } - if (matched && throwOnSuccess) - throw new SecurityException(successMessage); - + if (throwOnSuccess) { + boolean allChecked = true; + for (int i = 0; i < checked.length; i++) { + if (!checked[i]) + allChecked = false; + } + if (allChecked) + throw new SecurityException(successMessage); + } + expectedPerms.append(" May check:"); if (!matched) { for (int i = 0; i < mayCheck.length; i++) { From gbenson@redhat.com Thu Feb 16 11:18:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 16 Feb 2006 11:18:00 -0000 Subject: FYI: java.lang.Thread throwpoint tests Message-ID: <20060216111810.GD4898@redhat.com> Hi again, This commit adds throwpoint checks for java.lang.Thread. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1479 diff -u -r1.1479 ChangeLog --- ChangeLog 16 Feb 2006 11:04:20 -0000 1.1479 +++ ChangeLog 16 Feb 2006 11:14:30 -0000 @@ -1,3 +1,7 @@ +2006-02-16 Gary Benson + + * gnu/testlet/java/lang/Thread/security.java: New test. + 2006-02-16 Gary Benson * gnu/testlet/TestSecurityManager2.java: Added the ability to Index: gnu/testlet/java/lang/Thread/security.java =================================================================== RCS file: gnu/testlet/java/lang/Thread/security.java diff -N gnu/testlet/java/lang/Thread/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/Thread/security.java 16 Feb 2006 11:14:30 -0000 @@ -0,0 +1,317 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.Thread; + +import java.io.File; +import java.lang.reflect.Method; +import java.net.URL; +import java.net.URLClassLoader; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + Thread testThread = new Thread(); + + // we need a different classloader for some of the checks to occur. + Class testClass = new URLClassLoader(new URL[] { + new File(harness.getSourceDirectory()).toURL()}, null).loadClass( + getClass().getName()); + harness.check(getClass().getClassLoader() != testClass.getClassLoader()); + + Method getContextClassLoaderTest = testClass.getMethod( + "testGetContextClassLoader", new Class[] {Thread.class}); + + Thread currentThread = Thread.currentThread(); + Throwable threadDeath = new ThreadDeath(); + Throwable notThreadDeath = new ClassNotFoundException(); + + ThreadGroup group = new ThreadGroup("test group"); + Runnable runnable = new Runnable() + { + public void run() + { + } + }; + + Permission[] getClassLoader = new Permission[] { + new RuntimePermission("getClassLoader")}; + + Permission[] setContextClassLoader = new Permission[] { + new RuntimePermission("setContextClassLoader")}; + + Permission[] modifyThread = new Permission[] { + new RuntimePermission("modifyThread")}; + + Permission[] stopThread = new Permission[] { + new RuntimePermission("modifyThread"), + new RuntimePermission("stopThread")}; + + Permission[] modifyThreadGroup = new Permission[] { + new RuntimePermission("modifyThreadGroup")}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // throwpoint: java.lang.Thread-getContextClassLoader + harness.checkPoint("getContextClassLoader"); + try { + sm.prepareChecks(getClassLoader); + getContextClassLoaderTest.invoke(null, new Object[] {testThread}); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-setContextClassLoader + harness.checkPoint("setContextClassLoader"); + try { + ClassLoader loader = testThread.getContextClassLoader(); + sm.prepareChecks(setContextClassLoader); + testThread.setContextClassLoader(loader); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-checkAccess + harness.checkPoint("checkAccess"); + try { + sm.prepareChecks(modifyThread); + testThread.checkAccess(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-interrupt + harness.checkPoint("interrupt"); + try { + sm.prepareChecks(modifyThread); + testThread.interrupt(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-suspend + harness.checkPoint("suspend"); + try { + sm.prepareChecks(modifyThread); + testThread.suspend(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-resume + harness.checkPoint("resume"); + try { + sm.prepareChecks(modifyThread); + testThread.resume(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-setPriority + harness.checkPoint("setPriority"); + try { + int priority = testThread.getPriority(); + sm.prepareChecks(modifyThread); + testThread.setPriority(priority); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-setName + harness.checkPoint("setName"); + try { + sm.prepareChecks(modifyThread); + testThread.setName("a test thread"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-setDaemon + harness.checkPoint("setDaemon"); + try { + sm.prepareChecks(modifyThread); + testThread.setDaemon(false); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-stop() + harness.checkPoint("stop()"); + try { + sm.prepareChecks(stopThread); + testThread.stop(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + try { + sm.prepareChecks(modifyThread, true); + currentThread.stop(); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.lang.Thread-stop(Throwable) + harness.checkPoint("stop(Throwable)"); + try { + sm.prepareChecks(stopThread); + testThread.stop(threadDeath); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + try { + sm.prepareChecks(stopThread); + testThread.stop(notThreadDeath); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + try { + sm.prepareChecks(modifyThread, true); + currentThread.stop(threadDeath); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + try { + sm.prepareChecks(stopThread, true); + currentThread.stop(notThreadDeath); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.lang.Thread-Thread(ThreadGroup, Runnable) + // throwpoint: java.lang.Thread-Thread(ThreadGroup, Runnable, String) + // throwpoint: java.lang.Thread-Thread(ThreadGroup, Runnable, String, long) + // throwpoint: java.lang.Thread-Thread(ThreadGroup, String) + harness.checkPoint("ThreadGroup constructors"); + for (int i = 1; i <= 4; i++) { + try { + sm.prepareChecks(modifyThreadGroup); + switch (i) { + case 1: + new Thread(group, runnable); + break; + case 2: + new Thread(group, runnable, "test thread"); + break; + case 3: + new Thread(group, runnable, "test thread", 1024); + break; + case 4: + new Thread(group, "test thread"); + break; + } + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + // Stuff for the getContextClassLoader tests + public static void testGetContextClassLoader(Thread t) + { + t.getContextClassLoader(); + } +} From gbenson@redhat.com Fri Feb 17 13:13:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 17 Feb 2006 13:13:00 -0000 Subject: FYI: Add a missing java.lang.Thread throwpoint test Message-ID: <20060217131259.GB5142@redhat.com> Hi all, This commit adds a throwpoint check that I missed when I did the other java.lang.Thread ones. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1480 diff -u -r1.1480 ChangeLog --- ChangeLog 16 Feb 2006 11:15:05 -0000 1.1480 +++ ChangeLog 17 Feb 2006 13:10:11 -0000 @@ -1,3 +1,7 @@ +2006-02-17 Gary Benson + + * gnu/testlet/java/lang/Thread/security.java: One more test. + 2006-02-16 Gary Benson * gnu/testlet/java/lang/Thread/security.java: New test. Index: gnu/testlet/java/lang/Thread/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Thread/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/lang/Thread/security.java 16 Feb 2006 11:15:05 -0000 1.1 +++ gnu/testlet/java/lang/Thread/security.java 17 Feb 2006 13:10:11 -0000 @@ -189,6 +189,18 @@ harness.debug(ex); harness.check(false, "unexpected check"); } + + // throwpoint: java.lang.Thread-enumerate + harness.checkPoint("enumerate"); + try { + sm.prepareChecks(modifyThreadGroup); + Thread.enumerate(new Thread[0]); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } // throwpoint: java.lang.Thread-stop() harness.checkPoint("stop()"); From mark@klomp.org Sun Feb 19 14:27:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 19 Feb 2006 14:27:00 -0000 Subject: FYI: batch_run, runner and choose-classes fixlets Message-ID: <1140359250.4791.3.camel@localhost.localdomain> Hi, The batch_run, runner and choose-classes wouldn't automatically search for the new gnu and org hierarchies (mainly crypto and corba tests) and didn't export some variables that the BinaryCompatibility tests expected. This fixes that so that the autobuilder on builder.classpath.org should pick up these tests automatically now. 2006-02-19 Mark Wielaard * batch_run (KEYS): Add GNU and GNU-CRYPTO (COMPILER): Export either GCJ or JAVAC. * choose-classes: Also search gnu and org hierarchies. * runner (RUNTIME): Export RUNTIME as JAVA. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: batch_choose_run.patch Type: text/x-patch Size: 2606 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From olivier.jolly@pcedev.com Sun Feb 19 21:28:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Sun, 19 Feb 2006 21:28:00 -0000 Subject: FYI: New test on special method handling on proxy Message-ID: <43F8E2FC.10306@pcedev.com> Hi, I added a test to ensure that in the case of redefinition of toString, hashCode or equals (ie all public non final methods of Object) in an interface, the method created in the Proxy still have Object.class as declaring class and not the interface itself. 2006-02-19 Olivier Jolly * gnu/testlet/java/lang/reflect/Proxy/DeclaringClass.java: New file. * gnu/testlet/java/lang/reflect/Proxy/ProxyUtils.java: New file. The fix is arriving shortly in classpath. Cheers Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: proxy_declaring.patch Type: text/x-patch Size: 9702 bytes Desc: not available URL: From theBohemian@gmx.net Mon Feb 20 01:11:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Mon, 20 Feb 2006 01:11:00 -0000 Subject: FYI: javax.swing.text.GapContent.remove - added test Message-ID: <43F917E6.9020006@gmx.net> Hi, I added another case to the testclass above which demonstrates a problem in Classpath' GapContent implementation. 2006-02-20 Robert Schuster * gnu/testlet/javax/swing/text/GapContent/remove.java: (testGeneral): Added test. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-gapcontent-remove.diff Type: text/x-patch Size: 1333 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From theBohemian@gmx.net Mon Feb 20 11:30:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Mon, 20 Feb 2006 11:30:00 -0000 Subject: FYI: PlainDocument remove - new test Message-ID: <43F9A794.5020306@gmx.net> Hi, this adds a new test for PlainDocument remove. It was the basis for my fix for PR 26354. 2006-02-20 Robert Schuster * gnu/testlet/javax/swing/text/GapContent/remove.java: (testGeneral): Added test. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-plaindocument-remove.diff Type: text/x-patch Size: 2059 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From gbenson@redhat.com Mon Feb 20 12:34:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Mon, 20 Feb 2006 12:34:00 -0000 Subject: FYI: java.lang.ThreadGroup throwpoint tests Message-ID: <20060220123408.GF5477@redhat.com> Hi all, This commit adds throwpoint checks for java.lang.ThreadGroup. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1487 diff -u -r1.1487 ChangeLog --- ChangeLog 20 Feb 2006 11:30:23 -0000 1.1487 +++ ChangeLog 20 Feb 2006 11:55:23 -0000 @@ -1,3 +1,7 @@ +2006-02-20 Gary Benson + + * gnu/testlet/java/lang/ThreadGroup/security.java: New test. + 2006-02-20 Robert Schuster * gnu/testlet/javax/swing/text/PlainDocument/remove.java: Index: gnu/testlet/java/lang/ThreadGroup/security.java =================================================================== RCS file: gnu/testlet/java/lang/ThreadGroup/security.java diff -N gnu/testlet/java/lang/ThreadGroup/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/ThreadGroup/security.java 20 Feb 2006 11:55:23 -0000 @@ -0,0 +1,249 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.ThreadGroup; + +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + ThreadGroup testGroup = Thread.currentThread().getThreadGroup(); + if (testGroup.getParent() == null) + testGroup = new ThreadGroup(testGroup, "test group"); + harness.check(testGroup.getParent() != null); + + Permission[] modifyThreadGroup = new Permission[] { + new RuntimePermission("modifyThreadGroup")}; + + Permission[] modifyThread = new Permission[] { + new RuntimePermission("modifyThread")}; + + Permission[] stopThread = new Permission[] { + new RuntimePermission("modifyThread"), + new RuntimePermission("stopThread")}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // throwpoint: java.lang.ThreadGroup-ThreadGroup(String) + harness.checkPoint("ThreadGroup(String)"); + try { + sm.prepareChecks(modifyThreadGroup); + new ThreadGroup("test"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-ThreadGroup(ThreadGroup, String) + harness.checkPoint("ThreadGroup(ThreadGroup, String)"); + try { + sm.prepareChecks(modifyThreadGroup); + new ThreadGroup(testGroup, "test"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-checkAccess + harness.checkPoint("checkAccess"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.checkAccess(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-enumerate(Thread[]) + harness.checkPoint("enumerate(Thread[])"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.enumerate(new Thread[0]); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-enumerate(Thread[], boolean) + harness.checkPoint("enumerate(Thread[], boolean)"); + for (int i = 0; i <= 1; i++) { + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.enumerate(new Thread[0], i == 1); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.lang.ThreadGroup-enumerate(ThreadGroup[]) + harness.checkPoint("enumerate(ThreadGroup[])"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.enumerate(new ThreadGroup[0]); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-enumerate(ThreadGroup[], boolean) + harness.checkPoint("enumerate(ThreadGroup[], boolean)"); + for (int i = 0; i <= 1; i++) { + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.enumerate(new ThreadGroup[0], i == 1); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.lang.ThreadGroup-getParent + harness.checkPoint("getParent"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.getParent(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-setDaemon + harness.checkPoint("setDaemon"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.setDaemon(false); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-setMaxPriority + harness.checkPoint("setMaxPriority"); + try { + int priority = testGroup.getMaxPriority(); + sm.prepareChecks(modifyThreadGroup); + testGroup.setMaxPriority(priority); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-suspend + harness.checkPoint("suspend"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.suspend(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-resume + harness.checkPoint("resume"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.resume(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-destroy + harness.checkPoint("destroy"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.destroy(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-interrupt + harness.checkPoint("interrupt"); + try { + sm.prepareChecks(modifyThreadGroup, modifyThread); + testGroup.interrupt(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-stop + harness.checkPoint("stop"); + try { + sm.prepareChecks(modifyThreadGroup, stopThread); + testGroup.stop(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From david.gilbert@object-refinery.com Tue Feb 21 09:26:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 21 Feb 2006 09:26:00 -0000 Subject: FYI: JSpinner.ListEditor.getModel() test fixed Message-ID: <43FADD0A.3000201@object-refinery.com> Thanks to Raif for pointing out this error, somehow I managed to commit the wrong file. The attached patch is committed: 2006-02-21 David Gilbert * gnu/testlet/javax/swing/JSpinner/ListEditor/getModel.java: Replaced with correct file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman.kennke@aicas.com Tue Feb 21 20:58:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Tue, 21 Feb 2006 20:58:00 -0000 Subject: FYI: New ElementBuffer test Message-ID: I added a new test for the ElementBuffer class which demonstrates a misbehaviour in Classpath's implementation. 2006-02-21 Roman Kennke * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/insert.java: (testNewlines): New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4555 bytes Desc: not available URL: From langel@redhat.com Tue Feb 21 23:52:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 21 Feb 2006 23:52:00 -0000 Subject: Patch: New Lightweight tests Message-ID: <1140565958.22215.52.camel@tow.toronto.redhat.com> I added new tests for Lightweight Containers. 2006-02-21 Lillian Angel * gnu/testlet/TestHarness.java (checkColor): New method used to compare colors. (checkRectangleOuterColors): New method used to compare the colors of a rectangle's corners to the colors of the pixels surrounding the corners. (checkRectangleCornerColors): New method used to compare the colors of the pixels at the corners of a rectangle, to a given color. * gnu/testlet/java/awt/Container/LightweightContainer.java: New Test. * gnu/testlet/java/awt/Frame/size1.java (checkColor): Removed. (test): Changed to use new methods in TestHarness. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: text/x-patch Size: 12562 bytes Desc: not available URL: From langel@redhat.com Tue Feb 21 23:55:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 21 Feb 2006 23:55:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <1140565958.22215.52.camel@tow.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> Message-ID: <1140566120.22215.54.camel@tow.toronto.redhat.com> On Tue, 2006-02-21 at 18:52 -0500, Lillian Angel wrote: > I added new tests for Lightweight Containers. I forgot to mention, I added some new methods to TestHarness. These methods are helpful for testing locations on the screen when using Lightweight/Heavyweight widgets. It made sense to add these to TestHarness, since they are used in Frame and Container. > 2006-02-21 Lillian Angel > > * gnu/testlet/TestHarness.java > (checkColor): New method used to compare colors. > (checkRectangleOuterColors): New method used to compare the > colors of a rectangle's corners to the colors of the pixels > surrounding the corners. > (checkRectangleCornerColors): New method used to compare > the colors of the pixels at the corners of a rectangle, to > a given color. > * gnu/testlet/java/awt/Container/LightweightContainer.java: > New Test. > * gnu/testlet/java/awt/Frame/size1.java > (checkColor): Removed. > (test): Changed to use new methods in TestHarness. > From roman@kennke.org Wed Feb 22 08:12:00 2006 From: roman@kennke.org (Roman Kennke) Date: Wed, 22 Feb 2006 08:12:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <1140565958.22215.52.camel@tow.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> Message-ID: <1140595904.9646.8.camel@localhost.localdomain> Hi Lillian, I have some comments regarding the TestHarness change: + + /** + * Compares two colors. + * + * @param a - + * Color to compare + * @param b - + * Color to compare + * @param match - + * True if colors should be equivalent. + */ + public void checkColor(Color a, Color b, boolean match) + { + if (match) + check(a.getRed() == b.getRed() && a.getGreen() == b.getGreen() + && a.getBlue() == b.getBlue()); + else + check(!(a.getRed() == b.getRed() && a.getGreen() == b.getGreen() + && a.getBlue() == b.getBlue())); + } I don't understand the point here. Why not use check(color1, color2)? This would use equals() which also compares the rgb values (or whatever the color value is made up of). The match parameter is also hard to understand, it effectivle negates the result? check(! color1.equals(color2)) ? /** + * This method checks the pixel colors of a Rectangle's corners + * + * @param r - + * The Robot to use to get the pixel colors. I don't know if we have rules for this in Mauve, but in Classpath we would have a period after corners and the @param comment written without the '-', without the capital T and without period. For API comments we basically adopted Sun's rules: http://java.sun.com/j2se/javadoc/writingdoccomments/index.html Anyway, this is only a very minor nitpick, and I don't know what the rules are in Mauve anyway or if we even have some, I only say it here so you keep it in mind in future classpath hacking :-) Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From david.gilbert@object-refinery.com Wed Feb 22 10:04:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 22 Feb 2006 10:04:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <1140566120.22215.54.camel@tow.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <1140566120.22215.54.camel@tow.toronto.redhat.com> Message-ID: <43FC373E.9010904@object-refinery.com> Hi Lillian, I wonder if these methods should really be added to TestHarness, they seem a little too "specialised" to me (especially the rectangle corner color tests), and it would be nice to keep TestHarness as simple as possible. Maybe you could create a utility class in gnu.testlet.java.awt.* that contains static methods that perform these checks? Then you could share that between your Frame and Container tests. Regards, Dave Lillian Angel wrote: >On Tue, 2006-02-21 at 18:52 -0500, Lillian Angel wrote: > > >>I added new tests for Lightweight Containers. >> >> > >I forgot to mention, I added some new methods to TestHarness. These >methods are helpful for testing locations on the screen when using >Lightweight/Heavyweight widgets. It made sense to add these to >TestHarness, since they are used in Frame and Container. > > > >>2006-02-21 Lillian Angel >> >> * gnu/testlet/TestHarness.java >> (checkColor): New method used to compare colors. >> (checkRectangleOuterColors): New method used to compare the >> colors of a rectangle's corners to the colors of the pixels >> surrounding the corners. >> (checkRectangleCornerColors): New method used to compare >> the colors of the pixels at the corners of a rectangle, to >> a given color. >> * gnu/testlet/java/awt/Container/LightweightContainer.java: >> New Test. >> * gnu/testlet/java/awt/Frame/size1.java >> (checkColor): Removed. >> (test): Changed to use new methods in TestHarness. >> >> >> From david.gilbert@object-refinery.com Wed Feb 22 10:28:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 22 Feb 2006 10:28:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <1140565958.22215.52.camel@tow.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> Message-ID: <43FC3D06.4060209@object-refinery.com> Hi Lillian, Lillian Angel wrote: > >Index: gnu/testlet/java/awt/Container/LightweightContainer.java >=================================================================== > > > >+ harness.checkRectangleOuterColors(r, bounds2, Color.red, true); >+ harness.checkRectangleCornerColors(r, bounds2, Color.red, false); >+ >+ r.delay(3000); >+ } > > Do you know what the delay is for? Is there some other way to write the test so that the delay isn't required? It's just that it would be nice if the Mauve test run doesn't take longer than it has to - otherwise hackers will stop running it. Regards, Dave From langel@redhat.com Wed Feb 22 14:48:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 22 Feb 2006 14:48:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <43FC373E.9010904@object-refinery.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <1140566120.22215.54.camel@tow.toronto.redhat.com> <43FC373E.9010904@object-refinery.com> Message-ID: <1140619717.22215.65.camel@tow.toronto.redhat.com> On Wed, 2006-02-22 at 10:04 +0000, David Gilbert wrote: > Hi Lillian, > > I wonder if these methods should really be added to TestHarness, they > seem a little too "specialised" to me (especially the rectangle corner > color tests), and it would be nice to keep TestHarness as simple as > possible. Tom asked me to add these, because they will be used in the future. As of now, they are used in two different tests. > Maybe you could create a utility class in > gnu.testlet.java.awt.* that contains static methods that perform these > checks? Then you could share that between your Frame and Container tests. > Yes, I could do that. I'll speak to Tom and see what he prefers Lillian > Regards, > > Dave > > Lillian Angel wrote: > > >On Tue, 2006-02-21 at 18:52 -0500, Lillian Angel wrote: > > > > > >>I added new tests for Lightweight Containers. > >> > >> > > > >I forgot to mention, I added some new methods to TestHarness. These > >methods are helpful for testing locations on the screen when using > >Lightweight/Heavyweight widgets. It made sense to add these to > >TestHarness, since they are used in Frame and Container. > > > > > > > >>2006-02-21 Lillian Angel > >> > >> * gnu/testlet/TestHarness.java > >> (checkColor): New method used to compare colors. > >> (checkRectangleOuterColors): New method used to compare the > >> colors of a rectangle's corners to the colors of the pixels > >> surrounding the corners. > >> (checkRectangleCornerColors): New method used to compare > >> the colors of the pixels at the corners of a rectangle, to > >> a given color. > >> * gnu/testlet/java/awt/Container/LightweightContainer.java: > >> New Test. > >> * gnu/testlet/java/awt/Frame/size1.java > >> (checkColor): Removed. > >> (test): Changed to use new methods in TestHarness. > >> > >> > >> From langel@redhat.com Wed Feb 22 14:49:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 22 Feb 2006 14:49:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <1140595904.9646.8.camel@localhost.localdomain> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <1140595904.9646.8.camel@localhost.localdomain> Message-ID: <1140619749.22215.67.camel@tow.toronto.redhat.com> On Wed, 2006-02-22 at 09:11 +0100, Roman Kennke wrote: > Hi Lillian, > > I have some comments regarding the TestHarness change: > > + > + /** > + * Compares two colors. > + * > + * @param a - > + * Color to compare > + * @param b - > + * Color to compare > + * @param match - > + * True if colors should be equivalent. > + */ > + public void checkColor(Color a, Color b, boolean match) > + { > + if (match) > + check(a.getRed() == b.getRed() && a.getGreen() == b.getGreen() > + && a.getBlue() == b.getBlue()); > + else > + check(!(a.getRed() == b.getRed() && a.getGreen() == b.getGreen() > + && a.getBlue() == b.getBlue())); > + } > > I don't understand the point here. Why not use check(color1, color2)? > This would use equals() which also compares the rgb values (or whatever > the color value is made up of). The match parameter is also hard to > understand, it effectivle negates the result? check(! > color1.equals(color2)) ? See the reply I sent to David. > > /** > + * This method checks the pixel colors of a Rectangle's corners > + * > + * @param r - > + * The Robot to use to get the pixel colors. > > I don't know if we have rules for this in Mauve, but in Classpath we > would have a period after corners and the @param comment written without > the '-', without the capital T and without period. For API comments we > basically adopted Sun's rules: > > http://java.sun.com/j2se/javadoc/writingdoccomments/index.html > > Anyway, this is only a very minor nitpick, and I don't know what the > rules are in Mauve anyway or if we even have some, I only say it here so > you keep it in mind in future classpath hacking :-) > > Roman > From langel@redhat.com Wed Feb 22 14:51:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 22 Feb 2006 14:51:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <43FC3D06.4060209@object-refinery.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> Message-ID: <1140619899.22215.69.camel@tow.toronto.redhat.com> On Wed, 2006-02-22 at 10:29 +0000, David Gilbert wrote: > Hi Lillian, > > Lillian Angel wrote: > > > > >Index: gnu/testlet/java/awt/Container/LightweightContainer.java > >=================================================================== > > > > > > > > >+ harness.checkRectangleOuterColors(r, bounds2, Color.red, true); > >+ harness.checkRectangleCornerColors(r, bounds2, Color.red, false); > >+ > >+ r.delay(3000); > >+ } > > > > > Do you know what the delay is for? Is there some other way to write the > test so that the delay isn't required? It's just that it would be nice > if the Mauve test run doesn't take longer than it has to - otherwise > hackers will stop running it. It seemed that there were some race conditions when running these tests. These delays were added to avoid them. Lillian From konqueror@gmx.de Wed Feb 22 15:09:00 2006 From: konqueror@gmx.de (Michael Koch) Date: Wed, 22 Feb 2006 15:09:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <1140619899.22215.69.camel@tow.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> <1140619899.22215.69.camel@tow.toronto.redhat.com> Message-ID: <20060222161423.GB5188@asterix.konqueror.de> On Wed, Feb 22, 2006 at 09:51:39AM -0500, Lillian Angel wrote: > > >+ harness.checkRectangleOuterColors(r, bounds2, Color.red, true); > > >+ harness.checkRectangleCornerColors(r, bounds2, Color.red, false); > > >+ > > >+ r.delay(3000); > > >+ } > > > > > > > > Do you know what the delay is for? Is there some other way to write the > > test so that the delay isn't required? It's just that it would be nice > > if the Mauve test run doesn't take longer than it has to - otherwise > > hackers will stop running it. > > It seemed that there were some race conditions when running these tests. > These delays were added to avoid them. Then please document this in the testcase. Cheers, Michael -- Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html Join the community at http://planet.classpath.org/ From langel@redhat.com Wed Feb 22 15:12:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 22 Feb 2006 15:12:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <20060222161423.GB5188@asterix.konqueror.de> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> <1140619899.22215.69.camel@tow.toronto.redhat.com> <20060222161423.GB5188@asterix.konqueror.de> Message-ID: <1140621161.22215.71.camel@tow.toronto.redhat.com> On Wed, 2006-02-22 at 17:14 +0100, Michael Koch wrote: > On Wed, Feb 22, 2006 at 09:51:39AM -0500, Lillian Angel wrote: > > > >+ harness.checkRectangleOuterColors(r, bounds2, Color.red, true); > > > >+ harness.checkRectangleCornerColors(r, bounds2, Color.red, false); > > > >+ > > > >+ r.delay(3000); > > > >+ } > > > > > > > > > > > Do you know what the delay is for? Is there some other way to write the > > > test so that the delay isn't required? It's just that it would be nice > > > if the Mauve test run doesn't take longer than it has to - otherwise > > > hackers will stop running it. > > > > It seemed that there were some race conditions when running these tests. > > These delays were added to avoid them. > > Then please document this in the testcase. Sorry, my mistake. I will add it to the Frame and Container tests. Lillian. From langel@redhat.com Wed Feb 22 15:55:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 22 Feb 2006 15:55:00 -0000 Subject: FYI: New Lightweight tests In-Reply-To: <1140621161.22215.71.camel@tow.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> <1140619899.22215.69.camel@tow.toronto.redhat.com> <20060222161423.GB5188@asterix.konqueror.de> <1140621161.22215.71.camel@tow.toronto.redhat.com> Message-ID: <1140623737.22215.81.camel@tow.toronto.redhat.com> Documentation is fixed. 2006-02-21 Lillian Angel * gnu/testlet/TestHarness.java (checkColor): Fixed API documentation. (checkRectangleOuterColors): Likewise. * gnu/testlet/java/awt/Container/LightweightContainer.java (testWindow): Added documentation. (testLoc): Likewise. * gnu/testlet/java/awt/Frame/size1.java (test): Added documentation. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: text/x-patch Size: 3651 bytes Desc: not available URL: From fitzsim@redhat.com Wed Feb 22 17:12:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Wed, 22 Feb 2006 17:12:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <43FC373E.9010904@object-refinery.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <1140566120.22215.54.camel@tow.toronto.redhat.com> <43FC373E.9010904@object-refinery.com> Message-ID: <1140628341.1404.192.camel@tortoise.toronto.redhat.com> On Wed, 2006-02-22 at 10:04 +0000, David Gilbert wrote: > Hi Lillian, > > I wonder if these methods should really be added to TestHarness, they > seem a little too "specialised" to me (especially the rectangle corner > color tests), and it would be nice to keep TestHarness as simple as > possible. Maybe you could create a utility class in > gnu.testlet.java.awt.* that contains static methods that perform these > checks? Then you could share that between your Frame and Container tests. Yes, it's probably cleaner to have a utility class in gnu.testlet.java.awt. Tom > > Regards, > > Dave > > Lillian Angel wrote: > > >On Tue, 2006-02-21 at 18:52 -0500, Lillian Angel wrote: > > > > > >>I added new tests for Lightweight Containers. > >> > >> > > > >I forgot to mention, I added some new methods to TestHarness. These > >methods are helpful for testing locations on the screen when using > >Lightweight/Heavyweight widgets. It made sense to add these to > >TestHarness, since they are used in Frame and Container. > > > > > > > >>2006-02-21 Lillian Angel > >> > >> * gnu/testlet/TestHarness.java > >> (checkColor): New method used to compare colors. > >> (checkRectangleOuterColors): New method used to compare the > >> colors of a rectangle's corners to the colors of the pixels > >> surrounding the corners. > >> (checkRectangleCornerColors): New method used to compare > >> the colors of the pixels at the corners of a rectangle, to > >> a given color. > >> * gnu/testlet/java/awt/Container/LightweightContainer.java: > >> New Test. > >> * gnu/testlet/java/awt/Frame/size1.java > >> (checkColor): Removed. > >> (test): Changed to use new methods in TestHarness. > >> > >> > >> From fitzsim@redhat.com Wed Feb 22 17:25:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Wed, 22 Feb 2006 17:25:00 -0000 Subject: Patch: New Lightweight tests In-Reply-To: <43FC3D06.4060209@object-refinery.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> Message-ID: <1140629152.1404.204.camel@tortoise.toronto.redhat.com> On Wed, 2006-02-22 at 10:29 +0000, David Gilbert wrote: > Hi Lillian, > > Lillian Angel wrote: > > > > >Index: gnu/testlet/java/awt/Container/LightweightContainer.java > >=================================================================== > > > > > > > > >+ harness.checkRectangleOuterColors(r, bounds2, Color.red, true); > >+ harness.checkRectangleCornerColors(r, bounds2, Color.red, false); > >+ > >+ r.delay(3000); > >+ } > > > > > Do you know what the delay is for? Is there some other way to write the > test so that the delay isn't required? It's just that it would be nice > if the Mauve test run doesn't take longer than it has to - otherwise > hackers will stop running it. The three second delays are to help the human tester see the result, though we should probably enable or disable them based on if Mauve is running in headless mode. The new AWT utility class that we add could check the SHOW_GUI_TESTS environment variable and cache its value. We require: + r.waitForIdle(); + r.delay(300); after showing a frame, before checking pixels in it so that GTK has had time to draw it. I think this is documented in one of the other AWT tests. Tom From langel@redhat.com Wed Feb 22 17:47:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 22 Feb 2006 17:47:00 -0000 Subject: FYI: New Lightweight tests In-Reply-To: <1140629152.1404.204.camel@tortoise.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> <1140629152.1404.204.camel@tortoise.toronto.redhat.com> Message-ID: <1140630448.22215.87.camel@tow.toronto.redhat.com> - I added a utility class to gnu/testlet/java/awt/ to take care of the location tests using colors. - I fixed up the other classes to use this new Class. - I also added a new test to LightweightContainer. This test represents the testcase that initially found the problem with lightweight containers. - I added more comments for the delays. 2006-02-22 Lillian Angel * gnu/testlet/TestHarness.java (checkColor): Removed. (checkRectangleOuterColors): Removed. (checkRectangleCornerColors): Removed. * gnu/testlet/java/awt/Container/LightweightContainer.java (testLoc): Added comment, changed to use LocationTests. (testWindow): Likewise. (testLoc1): Added new test. (test): Added call to testLoc1. * gnu/testlet/java/awt/Frame/size1.java (test): Added comment, changed to use LocationTests. * gnu/testlet/java/awt/LocationTests.java: New class. On Wed, 2006-02-22 at 12:25 -0500, Thomas Fitzsimmons wrote: > On Wed, 2006-02-22 at 10:29 +0000, David Gilbert wrote: > > Hi Lillian, > > > > Lillian Angel wrote: > > > > > > > >Index: gnu/testlet/java/awt/Container/LightweightContainer.java > > >=================================================================== > > > > > > > > > > > > > >+ harness.checkRectangleOuterColors(r, bounds2, Color.red, true); > > >+ harness.checkRectangleCornerColors(r, bounds2, Color.red, false); > > >+ > > >+ r.delay(3000); > > >+ } > > > > > > > > Do you know what the delay is for? Is there some other way to write the > > test so that the delay isn't required? It's just that it would be nice > > if the Mauve test run doesn't take longer than it has to - otherwise > > hackers will stop running it. > > The three second delays are to help the human tester see the result, > though we should probably enable or disable them based on if Mauve is > running in headless mode. The new AWT utility class that we add could > check the SHOW_GUI_TESTS environment variable and cache its value. > > We require: > > + r.waitForIdle(); > + r.delay(300); > > after showing a frame, before checking pixels in it so that GTK has had > time to draw it. I think this is documented in one of the other AWT > tests. > > Tom > > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: text/x-patch Size: 14036 bytes Desc: not available URL: From langel@redhat.com Wed Feb 22 18:18:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 22 Feb 2006 18:18:00 -0000 Subject: FYI: New Lightweight tests In-Reply-To: <1140630448.22215.87.camel@tow.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> <1140629152.1404.204.camel@tortoise.toronto.redhat.com> <1140630448.22215.87.camel@tow.toronto.redhat.com> Message-ID: <1140632320.22215.92.camel@tow.toronto.redhat.com> I fixed up testLoc1 so it fails with Classpath (without my AWT patch). I also adjusted some of the delays to be longer. It was causing race conditions with my new test. 2006-02-22 Lillian Angel * gnu/testlet/java/awt/Container/LightweightContainer.java (testLoc1): Fixed up tests so it fails without pending lightweight patch. On Wed, 2006-02-22 at 12:47 -0500, Lillian Angel wrote: > - I added a utility class to gnu/testlet/java/awt/ to take care of the > location tests using colors. > - I fixed up the other classes to use this new Class. > - I also added a new test to LightweightContainer. This test represents > the testcase that initially found the problem with lightweight > containers. > - I added more comments for the delays. > > 2006-02-22 Lillian Angel > > * gnu/testlet/TestHarness.java > (checkColor): Removed. > (checkRectangleOuterColors): Removed. > (checkRectangleCornerColors): Removed. > * gnu/testlet/java/awt/Container/LightweightContainer.java > (testLoc): Added comment, changed to use LocationTests. > (testWindow): Likewise. > (testLoc1): Added new test. > (test): Added call to testLoc1. > * gnu/testlet/java/awt/Frame/size1.java > (test): Added comment, changed to use LocationTests. > * gnu/testlet/java/awt/LocationTests.java: New class. > > > On Wed, 2006-02-22 at 12:25 -0500, Thomas Fitzsimmons wrote: > > On Wed, 2006-02-22 at 10:29 +0000, David Gilbert wrote: > > > Hi Lillian, > > > > > > Lillian Angel wrote: > > > > > > > > > > >Index: gnu/testlet/java/awt/Container/LightweightContainer.java > > > >=================================================================== > > > > > > > > > > > > > > > > > > >+ harness.checkRectangleOuterColors(r, bounds2, Color.red, true); > > > >+ harness.checkRectangleCornerColors(r, bounds2, Color.red, false); > > > >+ > > > >+ r.delay(3000); > > > >+ } > > > > > > > > > > > Do you know what the delay is for? Is there some other way to write the > > > test so that the delay isn't required? It's just that it would be nice > > > if the Mauve test run doesn't take longer than it has to - otherwise > > > hackers will stop running it. > > > > The three second delays are to help the human tester see the result, > > though we should probably enable or disable them based on if Mauve is > > running in headless mode. The new AWT utility class that we add could > > check the SHOW_GUI_TESTS environment variable and cache its value. > > > > We require: > > > > + r.waitForIdle(); > > + r.delay(300); > > > > after showing a frame, before checking pixels in it so that GTK has had > > time to draw it. I think this is documented in one of the other AWT > > tests. > > > > Tom > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: text/x-patch Size: 2127 bytes Desc: not available URL: From WBaer@gmx.de Thu Feb 23 12:57:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Thu, 23 Feb 2006 12:57:00 -0000 Subject: FYI: Additional mimetype parsing tests for DocFlavor Message-ID: <43FDB201.7040909@gmx.de> Hi, I added some more tests to the mimetype parsing test. 2006-02-23 Wolfgang Baer * gnu/testlet/javax/print/DocFlavor/parseMimeType.java (test): Additional tests for special characters. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: DocFlavorMimetype.patch Type: text/x-patch Size: 1969 bytes Desc: not available URL: From WBaer@gmx.de Thu Feb 23 15:16:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Thu, 23 Feb 2006 15:16:00 -0000 Subject: FYI: New test for DocFlavor Message-ID: <43FDD284.3020905@gmx.de> Hi, this new test shows the the *_HOST predefined DocFlavor's are initialized with the hostencoding charset. 2006-02-23 Wolfgang Baer * gnu/testlet/javax/print/DocFlavor/hostEncoding.java: New test. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: hostEncoding.java Type: text/x-java Size: 1566 bytes Desc: not available URL: From langel@redhat.com Thu Feb 23 20:40:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 23 Feb 2006 20:40:00 -0000 Subject: Patch: LightweightContainer fix Message-ID: <1140727216.3312.31.camel@tow.toronto.redhat.com> 2006-02-23 Lillian Angel * gnu/testlet/java/awt/Container/LightweightContainer.java (testLoc1): Made test more complicated to use GridBagLayout. Fixed to fail without reshape patch. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: text/x-patch Size: 2836 bytes Desc: not available URL: From fitzsim@redhat.com Fri Feb 24 02:02:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Fri, 24 Feb 2006 02:02:00 -0000 Subject: FYI: New Lightweight tests In-Reply-To: <1140632320.22215.92.camel@tow.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> <1140629152.1404.204.camel@tortoise.toronto.redhat.com> <1140630448.22215.87.camel@tow.toronto.redhat.com> <1140632320.22215.92.camel@tow.toronto.redhat.com> Message-ID: <1140746555.25046.52.camel@tortoise.toronto.redhat.com> Hi, On Wed, 2006-02-22 at 13:18 -0500, Lillian Angel wrote: > I fixed up testLoc1 I don't see testLoc1 in gnu/testlet/java/awt/Container/LightweightContainer.java. > so it fails with Classpath (without my AWT patch). > I also adjusted some of the delays to be longer. It was causing race > conditions with my new test. > > 2006-02-22 Lillian Angel > > * gnu/testlet/java/awt/Container/LightweightContainer.java > (testLoc1): Fixed up tests so it fails without pending > lightweight patch. Did you mean testLoc2? The first check in testLoc2 fails on Sun and on JamVM with or without the lightweight patch. This location seems wrong: int x = LW.getX() + f.getInsets().left + p.x - 1; int y = pan.getY() + f.getInsets().top + p.y; since the bottom panel is inset from the left panel. Also, I think this test should be simplified. The test is: A Frame containing a lighweight container. The lightweight container contains a heavyweight child. The lightweight container is moved but not resized (so that the heavyweight's position changes relative to the frame but not relative to its parent). So the test should be: - show a Frame with a null layout and a green background, with lightweight child at a given size and location. inside that lightweight child, add a blue heavyweight panel - wait for a second - call Component.move on the lightweight child - check for the blue heavyweight panel's position relative to the frame Without our patch, the panel will not move and so will end up in the wrong location relative to the frame. With our patch it will move along with the lightweight container and end up in the right position. Tom From langel@redhat.com Fri Feb 24 14:49:00 2006 From: langel@redhat.com (Lillian Angel) Date: Fri, 24 Feb 2006 14:49:00 -0000 Subject: FYI: New Lightweight tests In-Reply-To: <1140746555.25046.52.camel@tortoise.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> <1140629152.1404.204.camel@tortoise.toronto.redhat.com> <1140630448.22215.87.camel@tow.toronto.redhat.com> <1140632320.22215.92.camel@tow.toronto.redhat.com> <1140746555.25046.52.camel@tortoise.toronto.redhat.com> Message-ID: <1140792545.3312.42.camel@tow.toronto.redhat.com> > Did you mean testLoc2? The first check in testLoc2 fails on Sun and on > JamVM with or without the lightweight patch. This location seems wrong: > > int x = LW.getX() + f.getInsets().left + p.x - 1; > int y = pan.getY() + f.getInsets().top + p.y; > > since the bottom panel is inset from the left panel. > Oops, yes. Odd, it does pass on Sun for me.. could be some sort of race condition. > Also, I think this test should be simplified. The test is: > > A Frame containing a lighweight container. The lightweight container > contains a heavyweight child. The lightweight container is moved but > not resized (so that the heavyweight's position changes relative to the > frame but not relative to its parent). So the test should be: > > - show a Frame with a null layout and a green background, with > lightweight child at a given size and location. inside that lightweight > child, add a blue heavyweight panel > > - wait for a second > > - call Component.move on the lightweight child > > - check for the blue heavyweight panel's position relative to the frame > > Without our patch, the panel will not move and so will end up in the > wrong location relative to the frame. With our patch it will move along > with the lightweight container and end up in the right position. I will fix this. I agree it needs to be simplified. Thanks, Lillian From langel@redhat.com Fri Feb 24 15:17:00 2006 From: langel@redhat.com (Lillian Angel) Date: Fri, 24 Feb 2006 15:17:00 -0000 Subject: FYI: New Lightweight tests In-Reply-To: <1140792545.3312.42.camel@tow.toronto.redhat.com> References: <1140565958.22215.52.camel@tow.toronto.redhat.com> <43FC3D06.4060209@object-refinery.com> <1140629152.1404.204.camel@tortoise.toronto.redhat.com> <1140630448.22215.87.camel@tow.toronto.redhat.com> <1140632320.22215.92.camel@tow.toronto.redhat.com> <1140746555.25046.52.camel@tortoise.toronto.redhat.com> <1140792545.3312.42.camel@tow.toronto.redhat.com> Message-ID: <1140794264.3312.47.camel@tow.toronto.redhat.com> > > Also, I think this test should be simplified. The test is: > > > > A Frame containing a lighweight container. The lightweight container > > contains a heavyweight child. The lightweight container is moved but > > not resized (so that the heavyweight's position changes relative to the > > frame but not relative to its parent). So the test should be: > > > > - show a Frame with a null layout and a green background, with > > lightweight child at a given size and location. inside that lightweight > > child, add a blue heavyweight panel > > > > - wait for a second > > > > - call Component.move on the lightweight child > > > > - check for the blue heavyweight panel's position relative to the frame > > > > Without our patch, the panel will not move and so will end up in the > > wrong location relative to the frame. With our patch it will move along > > with the lightweight container and end up in the right position. > Fixed. But it appears that our patch is not correct still! 2006-02-24 Lillian Angel * gnu/testlet/java/awt/Container/LightweightContainer.java (testLoc2): Simplified test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: text/x-patch Size: 2975 bytes Desc: not available URL: From david.gilbert@object-refinery.com Mon Feb 27 13:53:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 27 Feb 2006 13:53:00 -0000 Subject: FYI: SwingUtilities.java tests... Message-ID: <4403046A.4090207@object-refinery.com> I strengthened a couple of tests in SwingUtilities - the original tests were correct, but not strong enough to detect that the methods were returning new rectangles rather than updating the incoming rectangle. Roman noticed this and fixed it in GNU Classpath - I'm just updating these tests for completeness: 2006-02-27 David Gilbert * gnu/testlet/javax/swing/SwingUtilities/computeIntersection.java (test): Don't set dest to method return value, * gnu/testlet/javax/swing/SwingUtilities/computeUnion.java (test): Likewise. Regards, Dave Gilbert -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman@kennke.org Mon Feb 27 13:57:00 2006 From: roman@kennke.org (Roman Kennke) Date: Mon, 27 Feb 2006 13:57:00 -0000 Subject: FYI: SwingUtilities.java tests... In-Reply-To: <4403046A.4090207@object-refinery.com> References: <4403046A.4090207@object-refinery.com> Message-ID: <1141048663.8382.7.camel@localhost.localdomain> Hi David, Am Montag, den 27.02.2006, 13:53 +0000 schrieb David Gilbert: > I strengthened a couple of tests in SwingUtilities - the original tests were > correct, but not strong enough to detect that the methods were returning new > rectangles rather than updating the incoming rectangle. Roman noticed this and > fixed it in GNU Classpath - I'm just updating these tests for completeness: THANKS! /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From ddaney@avtrex.com Mon Feb 27 22:09:00 2006 From: ddaney@avtrex.com (David Daney) Date: Mon, 27 Feb 2006 22:09:00 -0000 Subject: FYI: New test -- java/net/URLConnection/getRequestProperties Message-ID: <4403789F.5090207@avtrex.com> Sun's JDK 1.4.2 passes, classpath fails. This is PR classpath/25851 David Daney Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1503 diff -c -p -r1.1503 ChangeLog *** ChangeLog 27 Feb 2006 13:48:33 -0000 1.1503 --- ChangeLog 27 Feb 2006 22:04:46 -0000 *************** *** 1,3 **** --- 1,8 ---- + 2006-02-27 David Daney + + * gnu/testlet/java/net/URLConnection/getRequestProperties.java: New + test. + 2006-02-27 David Gilbert * gnu/testlet/javax/swing/SwingUtilities/computeIntersection.java Index: gnu/testlet/java/net/URLConnection/getRequestProperties.java =================================================================== RCS file: gnu/testlet/java/net/URLConnection/getRequestProperties.java diff -N gnu/testlet/java/net/URLConnection/getRequestProperties.java *** /dev/null 1 Jan 1970 00:00:00 -0000 --- gnu/testlet/java/net/URLConnection/getRequestProperties.java 27 Feb 2006 22:04:47 -0000 *************** *** 0 **** --- 1,72 ---- + // Tags: JDK1.4 + + // Copyright (C) 2006 Free Software Foundation, Inc. + // Contributed by David Daney (ddaney@avtrex.com) + + // This file is part of Mauve. + + // Mauve is free software; you can redistribute it and/or modify + // it under the terms of the GNU General Public License as published by + // the Free Software Foundation; either version 2, or (at your option) + // any later version. + + // Mauve is distributed in the hope that it will be useful, + // but WITHOUT ANY WARRANTY; without even the implied warranty of + // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + // GNU General Public License for more details. + + // You should have received a copy of the GNU General Public License + // along with Mauve; see the file COPYING. If not, write to + // the Free Software Foundation, 51 Franklin Street, Fifth Floor, + // Boston, MA 02110-1301 USA + + package gnu.testlet.java.net.URLConnection; + + import gnu.testlet.Testlet; + import gnu.testlet.TestHarness; + + + import java.io.IOException; + import java.net.URL; + import java.net.URLConnection; + import java.util.Map; + import java.util.List; + + public class getRequestProperties implements Testlet + { + public void test (TestHarness harness) + { + try + { + harness.checkPoint("getRequestProperties"); + URL url = new URL("http://foo.bar/blah/blah"); + URLConnection c = url.openConnection(); + + c.addRequestProperty("mauve", "p1"); + c.addRequestProperty("mauve", "p2"); + + Map m = c.getRequestProperties(); + + List l = (List)m.get("mauve"); + + harness.check(l.contains("p1")); + harness.check(l.contains("p2")); + + } + catch (ClassCastException cce) + { + harness.debug(cce); + harness.fail("ClassCastException"); + } + catch (IOException ioe) + { + harness.debug(ioe); + harness.fail("IOException"); + } + catch (Exception e) + { + harness.debug(e); + harness.fail("Unexpected Exception"); + } + } + } From roman.kennke@aicas.com Tue Feb 28 15:12:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Tue, 28 Feb 2006 15:12:00 -0000 Subject: FYI: SwingUtilities.layoutCompoundLabel test fix Message-ID: The SwingUtilities.layoutCompoundLabel test tests for some absolute size values, where it must take the font metrics differences into account. I fixed this. 2006-02-28 Roman Kennke * gnu/testlet/javax/swing/SwingUtilities/layoutCompoundLabel.java: (test): Fixed some tests the take font metrics differences into account. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1898 bytes Desc: not available URL: From roman.kennke@aicas.com Tue Feb 28 16:08:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Tue, 28 Feb 2006 16:08:00 -0000 Subject: FYI: New Leaf/Branch Element tests Message-ID: I added new tests for the Branch/LeafElements getStartOffset() methods. 2006-02-28 Roman Kennke * gnu/testlet/javax/swing/AbstractDocument/BranchElement/getStartOffset.java: New test. * gnu/testlet/javax/swing/AbstractDocument/LeafElement/getStartOffset.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 7180 bytes Desc: not available URL: From tromey@redhat.com Tue Feb 28 18:31:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Tue, 28 Feb 2006 18:31:00 -0000 Subject: Patch: FYI: add another newInstance test Message-ID: Twisti said on irc that the xalan problem is caused by something in newInstance. I added a quick test case for this ... but the test already passes on jamvm, gij, and the JDK. So perhaps I'm misunderstanding what the bug is actually supposed to be. Twisti, any comments? Tom 2006-02-28 Tom Tromey * gnu/testlet/java/lang/Class/newInstance.java (test6): New class. (test): Updated comment. Run test6 test. Index: gnu/testlet/java/lang/Class/newInstance.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Class/newInstance.java,v retrieving revision 1.5 diff -u -r1.5 newInstance.java --- gnu/testlet/java/lang/Class/newInstance.java 22 Dec 2005 12:46:02 -0000 1.5 +++ gnu/testlet/java/lang/Class/newInstance.java 28 Feb 2006 18:27:45 -0000 @@ -23,6 +23,8 @@ package gnu.testlet.java.lang.Class; +import java.io.IOException; + import gnu.testlet.Testlet; import gnu.testlet.TestHarness; @@ -135,6 +137,29 @@ } } + public static class test6 + { + public test6() throws IOException + { + throw new IOException("hi bob"); + } + + static void check(TestHarness harness) + { + boolean ok = false; + try + { + test6.class.newInstance(); + } + catch (Throwable t) + { + harness.debug(t); + ok = t instanceof IOException; + } + harness.check(ok); + } + } + public void test(TestHarness harness) { test1.check(harness); @@ -150,9 +175,11 @@ // Just see to it that the following is legal. new test5(); // If new test5() is legal, why should test5.class.newInstance() - // throw IllegalAccessException? But the runtime access control - // is somewhat different from the compile time access control. - // So it may be OK that Sun's JDK throws IllegalAccessException here. + // throw IllegalAccessException? The reason that it is different is + // that 'new test5()' will call a compiler-generated accessor + // constructor. This accessor has package-private access and an + // extra argument (to differentiate it from the user-written + // constructor). checkFail(harness, test5.class); checkSuccess(harness, test1.inner.class); @@ -169,6 +196,8 @@ harness.debug(x); harness.fail("test configuration failure"); } + + test6.check(harness); } static void checkSuccess(TestHarness harness, Class c) From tromey@redhat.com Tue Feb 28 19:12:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Tue, 28 Feb 2006 19:12:00 -0000 Subject: Patch: FYI: update eclipse builder Message-ID: I'm checking this in. This changes the eclipse 'configure' builder so that it only runs if configure, Makefile.in, or gnu/testlet/config.java.in changes. This lets the MauveTestlet runner work more nicely -- now it avoids that pesky re-running of configure. (If you were at FOSDEM you saw this in the demo...) Tom 2006-02-28 Tom Tromey * .project, .externalToolBuilders/ConfigureMauve.launch: Updated configure builder. Index: .project =================================================================== RCS file: /cvs/mauve/mauve/.project,v retrieving revision 1.1 diff -u -r1.1 .project --- .project 18 Aug 2005 01:59:02 -0000 1.1 +++ .project 28 Feb 2006 18:44:17 -0000 @@ -7,7 +7,7 @@ org.eclipse.ui.externaltools.ExternalToolBuilder - full,incremental, + auto,full,incremental, LaunchConfigHandle Index: .externalToolBuilders/ConfigureMauve.launch =================================================================== RCS file: /cvs/mauve/mauve/.externalToolBuilders/ConfigureMauve.launch,v retrieving revision 1.1 diff -u -r1.1 ConfigureMauve.launch --- .externalToolBuilders/ConfigureMauve.launch 18 Aug 2005 01:59:03 -0000 1.1 +++ .externalToolBuilders/ConfigureMauve.launch 28 Feb 2006 18:44:17 -0000 @@ -1,2 +1,12 @@ - - \ No newline at end of file + + + + + + + + + + + + From olivier.jolly@pcedev.com Tue Feb 28 21:06:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Tue, 28 Feb 2006 21:06:00 -0000 Subject: FYI: Directory as resource tests Message-ID: <4404BB31.1020107@pcedev.com> I'm going to check in a test which ensures that plain files as well as directories can be loaded with getResource. For now, classpath doesn't suceed where sun jdk does. Olivier 2006-02-28 Olivier Jolly * gnu/testlet/java/lang/ClassLoader/Resources.java: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: get_resource.patch Type: text/x-patch Size: 2552 bytes Desc: not available URL: From ddaney@avtrex.com Tue Feb 28 23:53:00 2006 From: ddaney@avtrex.com (David Daney) Date: Tue, 28 Feb 2006 23:53:00 -0000 Subject: FYI: New URL test. Message-ID: <4404E290.50203@avtrex.com> I just committed this: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: url.d URL: From twisti@complang.tuwien.ac.at Thu Mar 2 09:04:00 2006 From: twisti@complang.tuwien.ac.at (Christian Thalinger) Date: Thu, 02 Mar 2006 09:04:00 -0000 Subject: Patch: FYI: add another newInstance test In-Reply-To: References: Message-ID: <1141290248.18841.22.camel@localhost.localdomain> On Tue, 2006-02-28 at 11:26 -0700, Tom Tromey wrote: > I added a quick test case for this ... but the test already passes on > jamvm, gij, and the JDK. > > So perhaps I'm misunderstanding what the bug is actually supposed to > be. Twisti, any comments? The bug is/was actually in ResourceBundle.tryBundle. We didn't catch enough exceptions. Jeroen's patch fixed it and xalan does work now. Probably we should add an according ResourceBundle test to mauve. TWISTI From WBaer@gmx.de Thu Mar 2 18:42:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Thu, 02 Mar 2006 18:42:00 -0000 Subject: FYI: Added test to gnu/testlet/java/net/URLConnection/Jar.java Message-ID: <44073D8D.8050305@gmx.de> Hi, this patch adds one more specialised test to show that the FileNotFoundException is thrown in the connect method. The other test is only reworked to be in its own try/catch. We are currently failing both tests. Patch pending. 2006-03-02 Wolfgang Baer * gnu/testlet/java/net/URLConnection/Jar.java (test): Added one more specialised test. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: Jar_Mauve.patch Type: text/x-patch Size: 2948 bytes Desc: not available URL: From WBaer@gmx.de Thu Mar 2 21:26:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Thu, 02 Mar 2006 21:26:00 -0000 Subject: RFC: HTTPTestServer (was: Re: FYI: New tests for HttpURLConnection) In-Reply-To: <43EAF479.8090400@gmx.de> References: <43E4B5F1.8050002@gmx.de> <43EAF479.8090400@gmx.de> Message-ID: <44076403.5080207@gmx.de> Hi, Wolfgang Baer wrote: > Tom Tromey wrote: >>David Daney had the interesting idea that we could have a mini http >>server inside of Mauve, which we could then use to test all the http >>modes we care about. Specifically what he had suggested was encoding >>the desired response into the request, so we could check 404s, >>redirects, chunking, etc. > > > Thats definitly the way to go. > >>Just in case you're really motivated to hack in this area ... :-) > > > Not at this time. I just tried to get the bugs fixed I found during > working on the IPP backend for printing and which prevented me from > hacking. Well, as I wanted to test Davids Headers rewrite patch I needed to do a first hack of a TestHttpServer. Here we go: The TestHttpServer has methods to set the Headers and the Body it should return upon request. Furthermore it provides an interface which can be implemented to test the serverside received headers and body. As I am not experienced in this networking area this might be a hack. However a hack which is working so far :-) I also wrote two tests to show the usage. responseCodeTest - test for all error codes the correct handling for getInputStream and getErrorStream. responseHeadersTest - tests everything with response headers. 2006-03-02 Wolfgang Baer * gnu/testlet/java/net/HttpURLConnection/TestHttpServer.java: New file. * gnu/testlet/java/net/HttpURLConnection/responseCodeTest.java: New test using TestHttpServer.java. * gnu/testlet/java/net/HttpURLConnection/responseHeadersTest.java: Likewise. Comments or OK to commit ? BTW, whats the best port to use for the TestHttpServer ? Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: TestHttpServer.java Type: text/x-java Size: 6776 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: responseCodeTest.java Type: text/x-java Size: 3809 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: responseHeadersTest.java Type: text/x-java Size: 7648 bytes Desc: not available URL: From ddaney@avtrex.com Thu Mar 2 23:49:00 2006 From: ddaney@avtrex.com (David Daney) Date: Thu, 02 Mar 2006 23:49:00 -0000 Subject: RFC: HTTPTestServer In-Reply-To: <44076403.5080207@gmx.de> References: <43E4B5F1.8050002@gmx.de> <43EAF479.8090400@gmx.de> <44076403.5080207@gmx.de> Message-ID: <44078472.4010802@avtrex.com> Wolfgang Baer wrote: > Hi, > > Wolfgang Baer wrote: > >>Tom Tromey wrote: >> >>>David Daney had the interesting idea that we could have a mini http >>>server inside of Mauve, which we could then use to test all the http >>>modes we care about. Specifically what he had suggested was encoding >>>the desired response into the request, so we could check 404s, >>>redirects, chunking, etc. >> >> >>Thats definitly the way to go. >> >> >>>Just in case you're really motivated to hack in this area ... :-) >> >> >>Not at this time. I just tried to get the bugs fixed I found during >>working on the IPP backend for printing and which prevented me from >>hacking. > > > Well, as I wanted to test Davids Headers rewrite patch I needed to do > a first hack of a TestHttpServer. > > Here we go: > > The TestHttpServer has methods to set the Headers and the Body it > should return upon request. Furthermore it provides an interface > which can be implemented to test the serverside received headers and body. > > As I am not experienced in this networking area this might be a hack. > However a hack which is working so far :-) > > I also wrote two tests to show the usage. > > responseCodeTest - test for all error codes the correct handling for > getInputStream and getErrorStream. > responseHeadersTest - tests everything with response headers. > > 2006-03-02 Wolfgang Baer > > * gnu/testlet/java/net/HttpURLConnection/TestHttpServer.java: New file. > * gnu/testlet/java/net/HttpURLConnection/responseCodeTest.java: > New test using TestHttpServer.java. > * gnu/testlet/java/net/HttpURLConnection/responseHeadersTest.java: > Likewise. > > > Comments or OK to commit ? I am of a mixed mind on that. Here in mauve, no formal permission is needed to commit. At the highest level this is what I had in mind, but I had pictured it in my mind as being implemented slightly differently. I was thinking about something similar to a servlet engine, where the capabilities of the server could be changed by writing different plug-in classes for it. You have a limited set of capabilities hard coded in the server, so the server has to change if we want to do something that it does not support. Also it has no support for multiple connections or multiple requests on a keep-alive connection. Not withstanding all of that, I think it is an excellent start to a very much needed capability. Just because it is not exactly what I would have done does not mean that it is not good and useful. My call: You decide. Commit it in as is, or keep hacking and commit later. Thanks, David Daney From mark@klomp.org Sat Mar 4 09:47:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sat, 04 Mar 2006 09:47:00 -0000 Subject: New test for EditorPane.setText() Message-ID: <1141465625.5720.5.camel@localhost.localdomain> Hi, This adds a simple test for JEditorPane.setText(). It showed a bug in the GNU Classpath implementation of this method. 2006-03-04 Mark Wielaard * gnu/testlet/javax/swing/JEditorPane/setText.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: setText.java Type: text/x-java Size: 1622 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From theBohemian@gmx.net Sat Mar 4 16:09:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Sat, 04 Mar 2006 16:09:00 -0000 Subject: FYI: PlainDocument.insertString test - cleanups and more tests Message-ID: <4409BBD1.40106@gmx.net> Hi, I cleaned up the insertString tests a bit: A nasty exception in Classpath prevented that further tests could be executed. I made the test case more robust against that problem. Furthermore I added more tests for the insertString method: Stuff I had trouble with when trying in beanshell. They all pass on the JDK but Classpath gives us 12 errors now. 2006-03-04 Robert Schuster * gnu/testlet/javax/swing/text/PlainDocument/insertString.java: (testModifications): New test method. (testNewLine): Added checkpoint name. (testFilterNewLine): Added checkpoint name. (testArguments): Changed catch-clause to Exception, added instanceof for previous exception type. (prepare): Added new helper method. (checkElement): Added new helper method. (insert): Added new helper method. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-plaindocument-insertstring.diff Type: text/x-patch Size: 6149 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From tromey@redhat.com Sun Mar 5 17:49:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Sun, 05 Mar 2006 17:49:00 -0000 Subject: Patch: FYI: new reflection tests Message-ID: I'm checking this in. This adds a couple tests for some bugs I noticed in Classpath. Tom 2006-03-05 Tom Tromey * gnu/testlet/java/lang/reflect/Constructor/toString.java: New file. * gnu/testlet/java/lang/reflect/Field/toString.java: New file. Index: gnu/testlet/java/lang/reflect/Constructor/toString.java =================================================================== RCS file: gnu/testlet/java/lang/reflect/Constructor/toString.java diff -N gnu/testlet/java/lang/reflect/Constructor/toString.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/reflect/Constructor/toString.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,62 @@ +/* toString.java -- Test Constructor.toString + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.1 + +package gnu.testlet.java.lang.reflect.Constructor; + +import java.lang.reflect.Constructor; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class toString implements Testlet { + + public toString() { } + + public toString(int x) { } + + protected toString(Object[] x) { } + + public String getName(TestHarness harness, Class k, Class[] argTypes) { + try { + Constructor c = k.getDeclaredConstructor(argTypes); + return c.toString(); + } catch (NoSuchMethodException _) { + harness.debug(_); + return ""; + } + } + + public void test(TestHarness harness) { + Class k = toString.class; + + String n1 = getName(harness, k, null); + harness.check(n1, "public gnu.testlet.java.lang.reflect.Constructor.toString()"); + + String n2 = getName(harness, k, new Class[] {int.class}); + harness.check(n2, "public gnu.testlet.java.lang.reflect.Constructor.toString(int)"); + + String n3 = getName(harness, k, new Class[] {Object[].class}); + harness.check(n3, "protected gnu.testlet.java.lang.reflect.Constructor.toString(java.lang.Object[])"); + } + +} Index: gnu/testlet/java/lang/reflect/Field/toString.java =================================================================== RCS file: gnu/testlet/java/lang/reflect/Field/toString.java diff -N gnu/testlet/java/lang/reflect/Field/toString.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/reflect/Field/toString.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,58 @@ +/* toString.java -- Test Field.toString + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.1 + +package gnu.testlet.java.lang.reflect.Field; + +import java.lang.reflect.Field; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class toString implements Testlet { + + public static final int x = 5; + public String[] args; + + public String getFieldName(TestHarness harness, Class k, String name) { + try { + Field field = k.getDeclaredField(name); + return field.toString(); + } catch (NoSuchFieldException _) { + harness.debug(_); + return ""; + } + } + + public void test(TestHarness harness) { + Class k = toString.class; + + String n1 = getFieldName(harness, k, "x"); + harness.check(n1, + "public static final int gnu.testlet.java.lang.reflect.Field.toString.x"); + + String n2 = getFieldName(harness, k, "args"); + harness.check(n2, + "public java.lang.String[] gnu.testlet.java.lang.reflect.Field.toString.args"); + } + +} From theBohemian@gmx.net Mon Mar 6 01:05:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Mon, 06 Mar 2006 01:05:00 -0000 Subject: FYI: another plaindocument.insertstring test Message-ID: <440B8A78.8050601@gmx.net> Hi, found another interesting testcase for PlainDocument.insertString which exposed a bug in Classpath' implementation. 2006-03-05 Robert Schuster * gnu/testlet/javax/swing/text/PlainDocument/insertString.java: (testModifications): Added another test. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-plaindocument-insertstring2.diff Type: text/x-patch Size: 1196 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From david.gilbert@object-refinery.com Mon Mar 6 17:05:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 06 Mar 2006 17:05:00 -0000 Subject: Running Mauve tests with JUnit Message-ID: <440C6BB8.90002@object-refinery.com> Hi All, A while back there was some discussion about converting Mauve tests to run under JUnit. I did some experimentation and have put together the following patch that shows one approach to making this work. I created a new JUnitRunnable class which makes it possible to run a Mauve testlet under JUnit (as well as continuing to support the standard Mauve runners). It requires that the existing testlets be modified to 'extend JUnitRunnable' (or, where this isn't possible, an alternative JUnitWrapper class can be used, see AttributeSetTests.java for an example). The patch includes conversion of the tests in the javax.swing.text.* package so you can at least try it out - if this patch is approved, I also have done the conversion of all the Swing tests (roughly 25% of Mauve I think). Here is a link to the patch, it's probably over the size limit for the mailing list (the ChangeLog entry is at the end of this e-mail): http://www.object-refinery.com/classpath/diff.txt I'm actually indifferent about whether or not this patch is accepted, I find Mauve slightly easier to work with relative to JUnit for the type of tests we write for GNU Classpath and plan to continue writing tests in the Mauve format. Anyway, here's the pros and cons that I can think of, please feel free to add to the list: Pros: - JUnit is integrated with Eclipse, so it can be used to run Mauve tests easily for developers that work in Eclipse; - most Java developers are familiar with JUnit, so Mauve may reach a wider audience; - other tools can work with JUnit (although I haven't used any of them - does anyone know of a JUnit runner that can produce comparisons of two runs? I'm interested in (a) regression reports (e.g. CVS vs last release) and (b) comparison reports (GNU Classpath vs Sun JDK1.5)); Cons: - a lot of work to modify the remaining tests in Mauve; - one extra step to make Mauve tests that run with both JUnit and Mauve test runners - it's pretty easy, but still a mental step that new contributors to Mauve will have to learn; - there is a possibility that some developers will write new tests against JUnit only, so we'll lose the ability to run all tests with the Mauve runners (which I think provide better detail on failures); Oh, and someone mentioned that the JUnit licence is not GPL compatible, so I compiled the tests against the GPLed code here: http://cvs.sourceforge.net/viewcvs.py/freenet/Contrib/junit/ I had to add a no-arg constructor for the TestCase class, then the tests compiled OK. And I can use the SimpleTestRunner to run a single test (this could do with some more work though). Please comment! Regards, Dave P.S. Here is the ChangeLog entry: 2006-03-06 David Gilbert * gnu/testlet/JUnitRunnable.java: New file, * gnu/testlet/JUnitTestHarness.java: Likewise, * gnu/testlet/JUnitTestWrapper.java: Likewise, * gnu/testlet/JUnitWrapper.java: Likewise, * gnu/testlet/javax/swing/text/PackageTestSuite.java: Likewise, * gnu/testlet/javax/swing/text/AbstractDocument/AbstractDocumentTest.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/AbstractDocument/AbstractDocumentTests.java: New file, * gnu/testlet/javax/swing/text/AbstractDocument/ElementChange.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/AbstractDocument/ElementChange2.java: Likewise, * gnu/testlet/javax/swing/text/AbstractDocument/BranchElement/BranchElementTest.java: Updated header, * gnu/testlet/javax/swing/text/AbstractDocument/BranchElement/BranchElementTests.java: New file, * gnu/testlet/javax/swing/text/AbstractDocument/BranchElement/getElementIndexNullPointer.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/AttributeSet/AttributeSetTests.java: New file, * gnu/testlet/javax/swing/text/BoxView/BoxViewTests.java: Likewise, * gnu/testlet/javax/swing/text/BoxView/spans.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/DefaultEditorKit/DefaultEditorKitTests.java: New file, * gnu/testlet/javax/swing/text/DefaultEditorKit/getActions.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/DefaultFormatter/DefaultFormatterTests.java: New file, * gnu/testlet/javax/swing/text/DefaultFormatter/getValueClass.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/DefaultStyledDocument/DefaultStyledDocumentTests.java: New file, * gnu/testlet/javax/swing/text/DefaultStyledDocument/insertString.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementBufferTests.java: New file, * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/insert.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/ElementIterator/ElementIteratorTest.java: Likewise, * gnu/testlet/javax/swing/text/ElementIterator/ElementIteratorTests.java: New file, * gnu/testlet/javax/swing/text/FlowView/FlowViewTests.java: New file, * gnu/testlet/javax/swing/text/FlowView/getFlowAxis.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/GapContent/GapContentTest.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/GapContentTests.java: New file, * gnu/testlet/javax/swing/text/GapContent/PositionTest.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/GapContent/constructors.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/createPosition.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/getChars.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/getString.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/insertString.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/length.java: Likewise, * gnu/testlet/javax/swing/text/GapContent/remove.java: Likewise, * gnu/testlet/javax/swing/text/InternationalFormatter/InternationalFormatterTest.java: Likewise, * gnu/testlet/javax/swing/text/InternationalFormatter/InternationalFormatterTests.java: New file, * gnu/testlet/javax/swing/text/MaskFormatter/MaskFormatterTest.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/MaskFormatter/MaskFormatterTests.java: New file, * gnu/testlet/javax/swing/text/PlainDocument/PlainDocumentTest.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/PlainDocument/PlainDocumentTests.java: New file, * gnu/testlet/javax/swing/text/PlainDocument/createPosition.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/PlainDocument/getLength.java: Likewise, * gnu/testlet/javax/swing/text/PlainDocument/getRootElements.java: Likewise, * gnu/testlet/javax/swing/text/PlainDocument/getText.java: Likewise, * gnu/testlet/javax/swing/text/PlainDocument/insertString.java: Likewise, * gnu/testlet/javax/swing/text/PlainDocument/multipleLeafs.java: Likewise, * gnu/testlet/javax/swing/text/PlainDocument/remove.java: Likewise, * gnu/testlet/javax/swing/text/PlainDocument/removeJoinesLines.java: Likewise, * gnu/testlet/javax/swing/text/Segment/SegmentTests.java: New file, * gnu/testlet/javax/swing/text/Segment/clone.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/Segment/constructors.java: Likewise, * gnu/testlet/javax/swing/text/Segment/first.java: Likewise, * gnu/testlet/javax/swing/text/Segment/getBeginIndex.java: Likewise, * gnu/testlet/javax/swing/text/Segment/getEndIndex.java: Likewise, * gnu/testlet/javax/swing/text/Segment/getIndex.java: Likewise, * gnu/testlet/javax/swing/text/Segment/isPartialReturn.java: Likewise, * gnu/testlet/javax/swing/text/Segment/last.java: Likewise, * gnu/testlet/javax/swing/text/Segment/next.java: Likewise, * gnu/testlet/javax/swing/text/Segment/previous.java: Likewise, * gnu/testlet/javax/swing/text/Segment/setIndex.java: Likewise, * gnu/testlet/javax/swing/text/Segment/setPartialReturn.java: Likewise, * gnu/testlet/javax/swing/text/Segment/toString(), Likewise, * gnu/testlet/javax/swing/text/SimpleAttributeSet/SimpleAttributeSetTests.java: New file, * gnu/testlet/javax/swing/text/StringContent/BadLocationExceptionTest.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/StringContent/StringContentTest.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/StringContentTests.java: New file, * gnu/testlet/javax/swing/text/StringContent/constructors.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/StringContent/createPosition.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/getChars.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/getString.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/insertString.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/insertUndo.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/length.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/remove.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/removeUndo.java: Likewise, * gnu/testlet/javax/swing/text/StringContent/stickyPosition.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/StyleConstantsTests.java: New file, * gnu/testlet/javax/swing/text/StyleConstants/constants.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/StyleConstants/getAlignment.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getBackground.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getBidiLevel.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getComponent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getFirstLineIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getFontFamily.java: Liekwise, * gnu/testlet/javax/swing/text/StyleConstants/getFontSize.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getForeground.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getIcon.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getLeftIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getLineSpacing.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getRightIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getSpaceAbove.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getSpaceBelow.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/getTabSet.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isBold.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isItalic.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isStrikeThrough.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isSubscript.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isSuperscript.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/isUnderline.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setAlignment.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setBackground.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setBidiLevel.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setBold.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setComponent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setFirstLineIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setFontFamily.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setFontSize.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setForeground.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setIcon.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setItalic.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setLeftIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setLineSpacing.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setRightIndent.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setSpaceAbove.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setSpaceBelow.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setStrikeThrough.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setSubscript.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setSuperscript.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setTabSet.java: Likewise, * gnu/testlet/javax/swing/text/StyleConstants/setUnderline.java: Likewise, * gnu/testlet/javax/swing/text/StyleContext/NamedStyleInit.java: Likewise, * gnu/testlet/javax/swing/text/StyleContext/NamedStyleSetResolveParent.java: Likewise, * gnu/testlet/javax/swing/text/StyleContext/StyleContextTests.java: New file, * gnu/testlet/javax/swing/text/StyleContext/addAttribute.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/StyleContext/addStyle.java: Likewise, * gnu/testlet/javax/swing/text/StyledEditorKit/StyledEditorKitTests.java: New file, * gnu/testlet/javax/swing/text/StyledEditorKit/createInputAttributesTest.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/TextAction/TextActionTests.java: New file, * gnu/testlet/javax/swing/text/TextAction/augmentList.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/View/ViewTests.java: New file, * gnu/testlet/javax/swing/text/View/getAlignment.java: Now extends JUnitRunnable, * gnu/testlet/javax/swing/text/View/getMaximumSpan.java: Likewise, * gnu/testlet/javax/swing/text/View/getMinimumSpan.java: Likewise, * gnu/testlet/javax/swing/text/View/getResizeWeight.java: Likewise. From WBaer@gmx.de Mon Mar 6 18:46:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Mon, 06 Mar 2006 18:46:00 -0000 Subject: RFC: HTTPTestServer In-Reply-To: <44078472.4010802@avtrex.com> References: <43E4B5F1.8050002@gmx.de> <43EAF479.8090400@gmx.de> <44076403.5080207@gmx.de> <44078472.4010802@avtrex.com> Message-ID: <440C8496.1060801@gmx.de> Hi David, David Daney wrote: [...] > > Not withstanding all of that, I think it is an excellent start to a very > much needed capability. Just because it is not exactly what I would > have done does not mean that it is not good and useful. > > My call: You decide. Commit it in as is, or keep hacking and commit > later. I will commit it now to have the tests available. However you are certainly right that its nothing extensible and could be improved a lot. But I currently have no time to do this further. If anyone in the future comes up with something modular I will happily convert the tests to use that. Committed as follows: 2006-03-06 Wolfgang Baer * gnu/testlet/java/net/HttpURLConnection/TestHttpServer.java: New file. * gnu/testlet/java/net/HttpURLConnection/responseCodeTest.java: New test using TestHttpServer.java. * gnu/testlet/java/net/HttpURLConnection/responseHeadersTest.java: Likewise. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: TestHttpServer.java Type: text/x-java Size: 6776 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: responseCodeTest.java Type: text/x-java Size: 3940 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: responseHeadersTest.java Type: text/x-java Size: 9894 bytes Desc: not available URL: From WBaer@gmx.de Mon Mar 6 18:53:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Mon, 06 Mar 2006 18:53:00 -0000 Subject: FYI: New test for request properties in HttpURLConnection Message-ID: <440C8643.3080803@gmx.de> Hi, there are new tests for request properties. We are currently failing some of them. Patch is pending. 2006-03-06 Wolfgang Baer * gnu/testlet/java/net/HttpURLConnection/requestPropertiesTest.java: New tests Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: requestPropertiesTest.java Type: text/x-java Size: 5525 bytes Desc: not available URL: From WBaer@gmx.de Mon Mar 6 20:07:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Mon, 06 Mar 2006 20:07:00 -0000 Subject: FYI: getHeaderFields test fixlet and new tests Message-ID: <440C978A.9010608@gmx.de> Hi, I committed the following patch to correct an minor issue with http tests and extended the tests for the other protocols. We pass all tests. 2006-03-06 Wolfgang Baer * gnu/testlet/java/net/URLConnection/getHeaderFields.java: (check): Use checkPoint instead of test names. Fix header key = String test to use second header entry to work on http. (test): Extend the basic test to all protocol implementations. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: getHeaderFields.patch Type: text/x-patch Size: 3213 bytes Desc: not available URL: From langel@redhat.com Mon Mar 6 21:54:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 06 Mar 2006 21:54:00 -0000 Subject: Patch: TestPanelRepaint new class Message-ID: <1141682081.3084.109.camel@tow.toronto.redhat.com> This class tests that update is not called on Panels when a ComponentEvent is encountered. 2006-03-06 Lillian Angel * gnu/testlet/java/awt/Container/TestPanelRepaint.java: New Class. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: text/x-patch Size: 2712 bytes Desc: not available URL: From fitzsim@redhat.com Mon Mar 6 22:16:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Mon, 06 Mar 2006 22:16:00 -0000 Subject: Patch: TestPanelRepaint new class In-Reply-To: <1141682081.3084.109.camel@tow.toronto.redhat.com> References: <1141682081.3084.109.camel@tow.toronto.redhat.com> Message-ID: <1141683398.24383.5.camel@tortoise.toronto.redhat.com> On Mon, 2006-03-06 at 16:54 -0500, Lillian Angel wrote: > This class tests that update is not called on Panels when a > ComponentEvent is encountered. > > 2006-03-06 Lillian Angel > > * gnu/testlet/java/awt/Container/TestPanelRepaint.java: > New Class. Looks good except that this should go in gnu/testlet/java/awt/Panel instead. Tom From langel@redhat.com Mon Mar 6 22:30:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 06 Mar 2006 22:30:00 -0000 Subject: Patch: TestPanelRepaint new class In-Reply-To: <1141683398.24383.5.camel@tortoise.toronto.redhat.com> References: <1141682081.3084.109.camel@tow.toronto.redhat.com> <1141683398.24383.5.camel@tortoise.toronto.redhat.com> Message-ID: <1141684187.3084.112.camel@tow.toronto.redhat.com> > Looks good except that this should go in gnu/testlet/java/awt/Panel > instead. Moved. I made the mistake because we were testing to see if Container's update/paint was called. 2006-03-06 Lillian Angel * gnu/testlet/java/awt/Container/TestPanelRepaint.java: Removed Class. * gnu/testlet/java/awt/Panel: New Directory. * gnu/testlet/java/awt/Panel/TestPanelRepaint: New Class. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: text/x-patch Size: 5333 bytes Desc: not available URL: From tromey@redhat.com Tue Mar 7 00:52:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Tue, 07 Mar 2006 00:52:00 -0000 Subject: Patch: FYI: add ulp tests Message-ID: I'm checking this in. This adds some new tests for Math.ulp. I'll check in the implementation of these methods shortly. Tom 2006-03-06 Tom Tromey * gnu/testlet/java/lang/Math/ulp.java: New file. Index: gnu/testlet/java/lang/Math/ulp.java =================================================================== RCS file: gnu/testlet/java/lang/Math/ulp.java diff -N gnu/testlet/java/lang/Math/ulp.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/Math/ulp.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,44 @@ +/* ulp.java -- Test the ulp method + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.5 + +package gnu.testlet.java.lang.Math; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class ulp implements Testlet { + + public void test(TestHarness harness) { + harness.check(Math.ulp(0.0), Double.MIN_VALUE); + harness.check(Math.ulp(Double.NaN), Double.NaN); + harness.check(Math.ulp(Double.MAX_VALUE), Math.pow(2.0, 971)); + harness.check(Math.ulp(Double.NEGATIVE_INFINITY), Double.POSITIVE_INFINITY); + harness.check(Math.ulp(Double.MIN_VALUE), Double.MIN_VALUE); + + harness.check(Math.ulp(0.0f), Float.MIN_VALUE); + harness.check(Math.ulp(Float.NaN), Float.NaN); + harness.check(Math.ulp(Float.MAX_VALUE), Math.pow(2.0, 104)); + harness.check(Math.ulp(Float.NEGATIVE_INFINITY), Float.POSITIVE_INFINITY); + harness.check(Math.ulp(Float.MIN_VALUE), Float.MIN_VALUE); + } +} From A.Hughes@dcs.shef.ac.uk Tue Mar 7 08:35:00 2006 From: A.Hughes@dcs.shef.ac.uk (Andrew John Hughes) Date: Tue, 07 Mar 2006 08:35:00 -0000 Subject: Patch: FYI: add ulp tests In-Reply-To: References: Message-ID: <1141720513.17077.37.camel@pi.dcs.shef.ac.uk> On Mon, 2006-03-06 at 17:46 -0700, Tom Tromey wrote: > I'm checking this in. > > This adds some new tests for Math.ulp. I'll check in the > implementation of these methods shortly. > > Tom > > 2006-03-06 Tom Tromey > > * gnu/testlet/java/lang/Math/ulp.java: New file. > > Index: gnu/testlet/java/lang/Math/ulp.java > =================================================================== > RCS file: gnu/testlet/java/lang/Math/ulp.java > diff -N gnu/testlet/java/lang/Math/ulp.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ gnu/testlet/java/lang/Math/ulp.java 1 Jan 1970 00:00:00 -0000 > @@ -0,0 +1,44 @@ > +/* ulp.java -- Test the ulp method > + Copyright (C) 2006 Red Hat, Inc. > +This file is part of Mauve. > + > +Mauve is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2, or (at your option) > +any later version. > + > +Mauve is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with Mauve; see the file COPYING. If not, write to the > +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +*/ > + > +// Tags: JDK1.5 > + > +package gnu.testlet.java.lang.Math; > + > +import gnu.testlet.TestHarness; > +import gnu.testlet.Testlet; > + > +public class ulp implements Testlet { > + > + public void test(TestHarness harness) { > + harness.check(Math.ulp(0.0), Double.MIN_VALUE); > + harness.check(Math.ulp(Double.NaN), Double.NaN); > + harness.check(Math.ulp(Double.MAX_VALUE), Math.pow(2.0, 971)); > + harness.check(Math.ulp(Double.NEGATIVE_INFINITY), Double.POSITIVE_INFINITY); > + harness.check(Math.ulp(Double.MIN_VALUE), Double.MIN_VALUE); > + > + harness.check(Math.ulp(0.0f), Float.MIN_VALUE); > + harness.check(Math.ulp(Float.NaN), Float.NaN); > + harness.check(Math.ulp(Float.MAX_VALUE), Math.pow(2.0, 104)); > + harness.check(Math.ulp(Float.NEGATIVE_INFINITY), Float.POSITIVE_INFINITY); > + harness.check(Math.ulp(Float.MIN_VALUE), Float.MIN_VALUE); > + } > +} Great -- I wasn't sure how to handle ulp. BTW, do you know how we handle the StrictMath variants of these methods? They seem to be coded in Java; presumably they are translations of the fdlibm methods, as the same algorithms have to be used. Thanks, -- Andrew :-) Department of Computer Science University of Sheffield Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html Support OpenDocument instead. http://opendocumentfellowship.org Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman The views expressed above are representative of my own personal opinions, and not necessarily those of the University of Sheffield. From david.gilbert@object-refinery.com Tue Mar 7 11:16:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 07 Mar 2006 11:16:00 -0000 Subject: FYI: DefaultMutableTreeNode tests Message-ID: <440D6F82.40205@object-refinery.com> I committed this patch which updates a couple of existing tests and adds many new tests for the methods in DefaultMutableTreeNode. A patch for GNU Classpath to fix the failing tests is on the way. 2006-03-07 David Gilbert * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/add.java (test): Reworked and added ancestor tests, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/clone.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/constructors.java (check): Removed, (test): Split into three calls, (testConstructor1): New method, (testConstructor2): Likewise, (testConstructor3): Likewise, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getIndex.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getParent.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/insert.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/isNodeAncestor.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/isNodeChild.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/isNodeDescendant.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/remove.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/removeAllChildren.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/setAllowsChildren.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/toString.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From tromey@redhat.com Tue Mar 7 14:47:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Tue, 07 Mar 2006 14:47:00 -0000 Subject: Patch: FYI: add ulp tests In-Reply-To: <1141720513.17077.37.camel@pi.dcs.shef.ac.uk> References: <1141720513.17077.37.camel@pi.dcs.shef.ac.uk> Message-ID: >>>>> "Andrew" == Andrew John Hughes writes: Andrew> Great -- I wasn't sure how to handle ulp. BTW, do you know how we Andrew> handle the StrictMath variants of these methods? They seem to be coded Andrew> in Java; presumably they are translations of the fdlibm methods, as the Andrew> same algorithms have to be used. Yeah, Eric Blake translated the fdlibm code into Java back when he wrote StrictMath. I forget the rationale for this but I'm sure it is in the archives. Tom From david.gilbert@object-refinery.com Tue Mar 7 15:42:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 07 Mar 2006 15:42:00 -0000 Subject: FYI: More tests for DefaultMutableTreeNode Message-ID: <440DADBA.30603@object-refinery.com> I committed this patch to add some new tests for the DefaultMutableTreeNode class. A patch for GNU Classpath to fix the failing tests will follow. 2006-03-07 David Gilbert * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/DefaultMutableTreeNodeTest.java: Updated header, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getChildAfter.java (test): Reworked, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getChildBefore.java (test): Likewise, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getFirstChild.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getFirstLeaf.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getLastChild.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getLastLeaf.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getNextLeaf.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getNextSibling.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getPreviousLeaf.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getPreviousSibling.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/getSiblingCount.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/isLeaf.java: New file, * gnu/testlet/javax/swing/tree/DefaultMutableTreeNode/isNodeSibling.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From olivier.jolly@pcedev.com Tue Mar 7 20:42:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Tue, 07 Mar 2006 20:42:00 -0000 Subject: FYI: URLClassLoader test fixed and addition Message-ID: <440DF04C.10404@pcedev.com> Hi, the retrieval of resource isn't very well defined in the API so I added some more tests in the related testlet, based on a patch proposition by Robin Green (http://sourceware.org/ml/mauve-patches/2004/msg00118.html) and extended with ".." tests and invalid directories. It has just been checked in. Now this testlet works fine with the SUN jre and jamvm with a classpath patch which is on its way to the classpath ML (which deals with ".."). Cacao still behaves a bit differently but it should be fixed quickly. Cheers +Olivier 2006-03-07 Olivier Jolly * gnu/testlet/java/net/URLClassLoader/getResourceBase.java (check): Added canonalization of tested filenames. * gnu/testlet/java/net/URLCLassLoader/getResource.java (test, setup): Added more special situations checks with ".." and invalid directories. Fixed and documented existing checks dealing with directories. Based on Robin Green's patch. -------------- next part -------------- A non-text attachment was scrubbed... Name: get_resource_invalid_directories.patch Type: text/x-patch Size: 6116 bytes Desc: not available URL: From konqueror@gmx.de Wed Mar 8 08:13:00 2006 From: konqueror@gmx.de (Michael Koch) Date: Wed, 08 Mar 2006 08:13:00 -0000 Subject: [Patch] InetSocketAddress.createUnresolved() Message-ID: <20060308091830.GA17820@asterix.konqueror.de> Hello all, I just commited the attached patch to add a testcase for InetSocketAddress.createUnresolved() which I added to classpath soem minutes ago. Cheers, Michael 2006-03-08 Michael Koch * gnu/testlet/java/net/InetSocketAddress/createUnresolved.java: New testcase. -------------- next part -------------- Index: gnu/testlet/java/net/InetSocketAddress/createUnresolved.java =================================================================== RCS file: gnu/testlet/java/net/InetSocketAddress/createUnresolved.java diff -N gnu/testlet/java/net/InetSocketAddress/createUnresolved.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/InetSocketAddress/createUnresolved.java 8 Mar 2006 08:11:25 -0000 @@ -0,0 +1,78 @@ +// Tags: JDK1.5 + +/* + Copyright (C) 2006 Michael Koch + + This file is part of Mauve. + + Mauve is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + Mauve is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Mauve; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +package gnu.testlet.java.net.InetSocketAddress; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +import java.net.*; + +public class createUnresolved implements Testlet +{ + public void test (TestHarness harness) + { + boolean ok = false; + + try + { + InetSocketAddress.createUnresolved(null, 2000); + } + catch (IllegalArgumentException e) + { + ok = true; + } + + harness.check(ok); + + ok = false; + + try + { + InetSocketAddress.createUnresolved("www.classpath.org", -1); + } + catch (IllegalArgumentException e) + { + ok = true; + } + + harness.check(ok); + + ok = false; + + try + { + InetSocketAddress.createUnresolved("www.classpath.org", 65536); + } + catch (IllegalArgumentException e) + { + ok = true; + } + + harness.check(ok); + + InetSocketAddress sa = InetSocketAddress.createUnresolved("www.classpath.org", 80); + + harness.check(sa.isUnresolved()); + } +} From david.gilbert@object-refinery.com Wed Mar 8 10:40:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 08 Mar 2006 10:40:00 -0000 Subject: Running Mauve tests with JUnit In-Reply-To: <440C6BB8.90002@object-refinery.com> References: <440C6BB8.90002@object-refinery.com> Message-ID: <440EB4B7.1020709@object-refinery.com> I didn't get any feedback about this...anyone think it is a good/bad idea? Regards, Dave David Gilbert wrote: > Hi All, > > A while back there was some discussion about converting Mauve tests to > run under JUnit. I did some experimentation and have put together the > following patch that shows one approach to making this work. I > created a new JUnitRunnable class which makes it possible to run a > Mauve testlet under JUnit (as well as continuing to support the > standard Mauve runners). It requires that the existing testlets be > modified to 'extend JUnitRunnable' (or, where this isn't possible, an > alternative JUnitWrapper class can be used, see AttributeSetTests.java > for an example). The patch includes conversion of the tests in the > javax.swing.text.* package so you can at least try it out - if this > patch is approved, I also have done the conversion of all the Swing > tests (roughly 25% of Mauve I think). > > Here is a link to the patch, it's probably over the size limit for the > mailing list (the ChangeLog entry is at the end of this e-mail): > > http://www.object-refinery.com/classpath/diff.txt > > I'm actually indifferent about whether or not this patch is accepted, > I find Mauve slightly easier to work with relative to JUnit for the > type of tests we write for GNU Classpath and plan to continue writing > tests in the Mauve format. Anyway, here's the pros and cons that I > can think of, please feel free to add to the list: > > Pros: > - JUnit is integrated with Eclipse, so it can be used to run Mauve > tests easily for developers that work in Eclipse; > - most Java developers are familiar with JUnit, so Mauve may reach a > wider audience; > - other tools can work with JUnit (although I haven't used any of them > - does anyone know of a JUnit runner that can produce comparisons of > two runs? I'm interested in (a) regression reports (e.g. CVS vs last > release) and (b) comparison reports (GNU Classpath vs Sun JDK1.5)); > > Cons: > - a lot of work to modify the remaining tests in Mauve; > - one extra step to make Mauve tests that run with both JUnit and > Mauve test runners - it's pretty easy, but still a mental step that > new contributors to Mauve will have to learn; > - there is a possibility that some developers will write new tests > against JUnit only, so we'll lose the ability to run all tests with > the Mauve runners (which I think provide better detail on failures); > > Oh, and someone mentioned that the JUnit licence is not GPL > compatible, so I compiled the tests against the GPLed code here: > > http://cvs.sourceforge.net/viewcvs.py/freenet/Contrib/junit/ > > I had to add a no-arg constructor for the TestCase class, then the > tests compiled OK. And I can use the SimpleTestRunner to run a single > test (this could do with some more work though). > > Please comment! > > Regards, > > Dave > > P.S. Here is the ChangeLog entry: > > 2006-03-06 David Gilbert > > * gnu/testlet/JUnitRunnable.java: New file, > * gnu/testlet/JUnitTestHarness.java: Likewise, > * gnu/testlet/JUnitTestWrapper.java: Likewise, > * gnu/testlet/JUnitWrapper.java: Likewise, > * gnu/testlet/javax/swing/text/PackageTestSuite.java: Likewise, > * > gnu/testlet/javax/swing/text/AbstractDocument/AbstractDocumentTest.java: > Now extends JUnitRunnable, > * > gnu/testlet/javax/swing/text/AbstractDocument/AbstractDocumentTests.java: > New file, > * gnu/testlet/javax/swing/text/AbstractDocument/ElementChange.java: > Now extends JUnitRunnable, > * > gnu/testlet/javax/swing/text/AbstractDocument/ElementChange2.java: > Likewise, > * > gnu/testlet/javax/swing/text/AbstractDocument/BranchElement/BranchElementTest.java: > Updated header, > * > gnu/testlet/javax/swing/text/AbstractDocument/BranchElement/BranchElementTests.java: > New file, > * > gnu/testlet/javax/swing/text/AbstractDocument/BranchElement/getElementIndexNullPointer.java: > Now extends JUnitRunnable, > * gnu/testlet/javax/swing/text/AttributeSet/AttributeSetTests.java: > New file, > * gnu/testlet/javax/swing/text/BoxView/BoxViewTests.java: Likewise, > * gnu/testlet/javax/swing/text/BoxView/spans.java: Now extends > JUnitRunnable, > * > gnu/testlet/javax/swing/text/DefaultEditorKit/DefaultEditorKitTests.java: > New file, > * gnu/testlet/javax/swing/text/DefaultEditorKit/getActions.java: > Now extends JUnitRunnable, > * > gnu/testlet/javax/swing/text/DefaultFormatter/DefaultFormatterTests.java: > New file, > * gnu/testlet/javax/swing/text/DefaultFormatter/getValueClass.java: > Now extends JUnitRunnable, > * > gnu/testlet/javax/swing/text/DefaultStyledDocument/DefaultStyledDocumentTests.java: > New file, > * > gnu/testlet/javax/swing/text/DefaultStyledDocument/insertString.java: > Now extends JUnitRunnable, > * > gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementBufferTests.java: > New file, > * > gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/insert.java: > Now extends JUnitRunnable, > * > gnu/testlet/javax/swing/text/ElementIterator/ElementIteratorTest.java: > Likewise, > * > gnu/testlet/javax/swing/text/ElementIterator/ElementIteratorTests.java: > New file, > * gnu/testlet/javax/swing/text/FlowView/FlowViewTests.java: New file, > * gnu/testlet/javax/swing/text/FlowView/getFlowAxis.java: Now > extends JUnitRunnable, > * gnu/testlet/javax/swing/text/GapContent/GapContentTest.java: > Likewise, > * gnu/testlet/javax/swing/text/GapContent/GapContentTests.java: New > file, > * gnu/testlet/javax/swing/text/GapContent/PositionTest.java: Now > extends JUnitRunnable, > * gnu/testlet/javax/swing/text/GapContent/constructors.java: Likewise, > * gnu/testlet/javax/swing/text/GapContent/createPosition.java: > Likewise, > * gnu/testlet/javax/swing/text/GapContent/getChars.java: Likewise, > * gnu/testlet/javax/swing/text/GapContent/getString.java: Likewise, > * gnu/testlet/javax/swing/text/GapContent/insertString.java: Likewise, > * gnu/testlet/javax/swing/text/GapContent/length.java: Likewise, > * gnu/testlet/javax/swing/text/GapContent/remove.java: Likewise, > * > gnu/testlet/javax/swing/text/InternationalFormatter/InternationalFormatterTest.java: > Likewise, > * > gnu/testlet/javax/swing/text/InternationalFormatter/InternationalFormatterTests.java: > New file, > * > gnu/testlet/javax/swing/text/MaskFormatter/MaskFormatterTest.java: Now > extends JUnitRunnable, > * > gnu/testlet/javax/swing/text/MaskFormatter/MaskFormatterTests.java: > New file, > * > gnu/testlet/javax/swing/text/PlainDocument/PlainDocumentTest.java: Now > extends JUnitRunnable, > * > gnu/testlet/javax/swing/text/PlainDocument/PlainDocumentTests.java: > New file, > * gnu/testlet/javax/swing/text/PlainDocument/createPosition.java: > Now extends JUnitRunnable, > * gnu/testlet/javax/swing/text/PlainDocument/getLength.java: Likewise, > * gnu/testlet/javax/swing/text/PlainDocument/getRootElements.java: > Likewise, > * gnu/testlet/javax/swing/text/PlainDocument/getText.java: Likewise, > * gnu/testlet/javax/swing/text/PlainDocument/insertString.java: > Likewise, > * gnu/testlet/javax/swing/text/PlainDocument/multipleLeafs.java: > Likewise, > * gnu/testlet/javax/swing/text/PlainDocument/remove.java: Likewise, > * > gnu/testlet/javax/swing/text/PlainDocument/removeJoinesLines.java: > Likewise, > * gnu/testlet/javax/swing/text/Segment/SegmentTests.java: New file, > * gnu/testlet/javax/swing/text/Segment/clone.java: Now extends > JUnitRunnable, > * gnu/testlet/javax/swing/text/Segment/constructors.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/first.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/getBeginIndex.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/getEndIndex.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/getIndex.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/isPartialReturn.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/last.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/next.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/previous.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/setIndex.java: Likewise, > * gnu/testlet/javax/swing/text/Segment/setPartialReturn.java: > Likewise, > * gnu/testlet/javax/swing/text/Segment/toString(), Likewise, > * > gnu/testlet/javax/swing/text/SimpleAttributeSet/SimpleAttributeSetTests.java: > New file, > * > gnu/testlet/javax/swing/text/StringContent/BadLocationExceptionTest.java: > Now extends JUnitRunnable, > * > gnu/testlet/javax/swing/text/StringContent/StringContentTest.java: > Likewise, > * > gnu/testlet/javax/swing/text/StringContent/StringContentTests.java: > New file, > * gnu/testlet/javax/swing/text/StringContent/constructors.java: Now > extends JUnitRunnable, > * gnu/testlet/javax/swing/text/StringContent/createPosition.java: > Likewise, > * gnu/testlet/javax/swing/text/StringContent/getChars.java: Likewise, > * gnu/testlet/javax/swing/text/StringContent/getString.java: Likewise, > * gnu/testlet/javax/swing/text/StringContent/insertString.java: > Likewise, > * gnu/testlet/javax/swing/text/StringContent/insertUndo.java: > Likewise, > * gnu/testlet/javax/swing/text/StringContent/length.java: Likewise, > * gnu/testlet/javax/swing/text/StringContent/remove.java: Likewise, > * gnu/testlet/javax/swing/text/StringContent/removeUndo.java: > Likewise, > * gnu/testlet/javax/swing/text/StringContent/stickyPosition.java: > Likewise, > * > gnu/testlet/javax/swing/text/StyleConstants/StyleConstantsTests.java: > New file, > * gnu/testlet/javax/swing/text/StyleConstants/constants.java: Now > extends JUnitRunnable, > * gnu/testlet/javax/swing/text/StyleConstants/getAlignment.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getBackground.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getBidiLevel.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getComponent.java: > Likewise, > * > gnu/testlet/javax/swing/text/StyleConstants/getFirstLineIndent.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getFontFamily.java: > Liekwise, > * gnu/testlet/javax/swing/text/StyleConstants/getFontSize.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getForeground.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getIcon.java: Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getLeftIndent.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getLineSpacing.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getRightIndent.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getSpaceAbove.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getSpaceBelow.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/getTabSet.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/isBold.java: Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/isItalic.java: Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/isStrikeThrough.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/isSubscript.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/isSuperscript.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/isUnderline.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setAlignment.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setBackground.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setBidiLevel.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setBold.java: Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setComponent.java: > Likewise, > * > gnu/testlet/javax/swing/text/StyleConstants/setFirstLineIndent.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setFontFamily.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setFontSize.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setForeground.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setIcon.java: Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setItalic.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setLeftIndent.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setLineSpacing.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setRightIndent.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setSpaceAbove.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setSpaceBelow.java: > Likewise, > * > gnu/testlet/javax/swing/text/StyleConstants/setStrikeThrough.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setSubscript.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setSuperscript.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setTabSet.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleConstants/setUnderline.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleContext/NamedStyleInit.java: > Likewise, > * > gnu/testlet/javax/swing/text/StyleContext/NamedStyleSetResolveParent.java: > Likewise, > * gnu/testlet/javax/swing/text/StyleContext/StyleContextTests.java: > New file, > * gnu/testlet/javax/swing/text/StyleContext/addAttribute.java: Now > extends JUnitRunnable, > * gnu/testlet/javax/swing/text/StyleContext/addStyle.java: Likewise, > * > gnu/testlet/javax/swing/text/StyledEditorKit/StyledEditorKitTests.java: > New file, > * > gnu/testlet/javax/swing/text/StyledEditorKit/createInputAttributesTest.java: > Now extends JUnitRunnable, > * gnu/testlet/javax/swing/text/TextAction/TextActionTests.java: New > file, > * gnu/testlet/javax/swing/text/TextAction/augmentList.java: Now > extends JUnitRunnable, > * gnu/testlet/javax/swing/text/View/ViewTests.java: New file, > * gnu/testlet/javax/swing/text/View/getAlignment.java: Now extends > JUnitRunnable, > * gnu/testlet/javax/swing/text/View/getMaximumSpan.java: Likewise, > * gnu/testlet/javax/swing/text/View/getMinimumSpan.java: Likewise, > * gnu/testlet/javax/swing/text/View/getResizeWeight.java: Likewise. > > From konqueror@gmx.de Wed Mar 8 11:08:00 2006 From: konqueror@gmx.de (Michael Koch) Date: Wed, 08 Mar 2006 11:08:00 -0000 Subject: Running Mauve tests with JUnit In-Reply-To: <440EB4B7.1020709@object-refinery.com> References: <440C6BB8.90002@object-refinery.com> <440EB4B7.1020709@object-refinery.com> Message-ID: <20060308121256.GN18158@asterix.konqueror.de> On Wed, Mar 08, 2006 at 10:40:55AM +0000, David Gilbert wrote: > I didn't get any feedback about this...anyone think it is a good/bad idea? I think this is a good idea. JUnit is widely known and supported well by IDEs. Please go ahead. Cheers, Michael -- Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html Join the community at http://planet.classpath.org/ From david.gilbert@object-refinery.com Wed Mar 8 13:21:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 08 Mar 2006 13:21:00 -0000 Subject: Running Mauve tests with JUnit In-Reply-To: <20060308120721.GA7569@pogo.kaffe.org> References: <440C6BB8.90002@object-refinery.com> <440EB4B7.1020709@object-refinery.com> <20060308120721.GA7569@pogo.kaffe.org> Message-ID: <440EDA60.10802@object-refinery.com> Hi Dalibor, I had meant to keep this on the Mauve lists, but I'll reply to the Classpath list also... Dalibor Topic wrote: >On Wed, Mar 08, 2006 at 10:40:55AM +0000, David Gilbert wrote: > > >>I didn't get any feedback about this...anyone think it is a good/bad idea? >> >> >excellent idea in my opinion. Have you looked at graydon's junit mauve >bridge at >http://sources.redhat.com/ml/mauve-discuss/2003-q4/msg00003.html ? > > > I hadn't seen Graydon's bridge class, thanks for the link (and I should do more research next time). Looking over it, it has the advantage that it doesn't require any existing Mauve testlets to be modified (and we have a lot of testlets), but the disadvantage that it doesn't buy you much in terms of integration with IDEs (you still have to generate the test list ['classes'] file, for instance, which is the major stumbling block that people seem to have when trying to run Mauve). By modifying the Mauve testlets in the way that I proposed, you can (for example) run a single test in Eclipse just by selecting the source file and clicking 'Run as --> JUnit test'. I figured that was the sort of thing people were expecting. JUnit does seem to me to be less flexible in terms of selecting subsets of tests, and it's approach of reporting a pass/fail for each test method (only) makes it, in my opinion, less suitable for the type of testing we are doing on GNU Classpath. But I was careful in the "conversion" to retain the Mauve testlets so that we can continue running the tests in the traditional (Mauve) way. >If we do something like that. I'd like to see the junit code from >freenet merged in, to keep it simple to run mauve without external >dependencies. > > Agreed. I didn't have much trouble getting the tests to compile against the freenet code (a basic GPLed implementation of the JUnit API for those that don't know what it is) but didn't get any meaningful output from running the tests against it yet. I don't think that will be too hard to resolve. Regards, Dave From robilad@kaffe.org Wed Mar 8 19:07:00 2006 From: robilad@kaffe.org (Dalibor Topic) Date: Wed, 08 Mar 2006 19:07:00 -0000 Subject: Running Mauve tests with JUnit In-Reply-To: <440EDA60.10802@object-refinery.com> References: <440C6BB8.90002@object-refinery.com> <440EB4B7.1020709@object-refinery.com> <20060308120721.GA7569@pogo.kaffe.org> <440EDA60.10802@object-refinery.com> Message-ID: <1141848446.4929.16.camel@localhost> On Wed, 2006-03-08 at 13:21 +0000, David Gilbert wrote: > Hi Dalibor, > > I had meant to keep this on the Mauve lists, but I'll reply to the > Classpath list also... > Sorry about the cross-posting :/ I've taken the classpath list out again. > I hadn't seen Graydon's bridge class, thanks for the link (and I should > do more research next time). Looking over it, it has the advantage that > it doesn't require any existing Mauve testlets to be modified (and we > have a lot of testlets), but the disadvantage that it doesn't buy you > much in terms of integration with IDEs (you still have to generate the > test list ['classes'] file, for instance, which is the major stumbling > block that people seem to have when trying to run Mauve). OK, thanks for the explanation. I wasn't familiar with Graydon's code either, just remembered it was sitting in my mail box. > By modifying the Mauve testlets in the way that I proposed, you can (for > example) run a single test in Eclipse just by selecting the source file > and clicking 'Run as --> JUnit test'. I figured that was the sort of > thing people were expecting. That sounds very cool. Would it be possible to make that work without having to modify the existing tests, by (just trowing random ideas here) using a proxy to delegate to the junit Test runner, and having Testlet implement both the junit.Test interface and the Testlet interface? (I assume that a Junit test is recognized by an IDE by looking whether a class implements the junit.Test interface? Or do IDEs look for a class extending TestCase/TestSuite? I don't use IDEs much, so I hope the questions are not too stupid.) > Agreed. I didn't have much trouble getting the tests to compile against > the freenet code (a basic GPLed implementation of the JUnit API for > those that don't know what it is) but didn't get any meaningful output > from running the tests against it yet. I don't think that will be too > hard to resolve. Great, thanks for looking at that code. Sounds like it should be good enough for the basic needs. cheers, dalibor topic From mark@klomp.org Thu Mar 9 14:51:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Thu, 09 Mar 2006 14:51:00 -0000 Subject: Patch: FYI: add ulp tests In-Reply-To: References: <1141720513.17077.37.camel@pi.dcs.shef.ac.uk> Message-ID: <1141915872.4550.77.camel@localhost.localdomain> Hi, On Tue, 2006-03-07 at 07:41 -0700, Tom Tromey wrote: > >>>>> "Andrew" == Andrew John Hughes writes: > > Andrew> Great -- I wasn't sure how to handle ulp. BTW, do you know how we > Andrew> handle the StrictMath variants of these methods? They seem to be coded > Andrew> in Java; presumably they are translations of the fdlibm methods, as the > Andrew> same algorithms have to be used. > > Yeah, Eric Blake translated the fdlibm code into Java back when he > wrote StrictMath. I forget the rationale for this but I'm sure it is > in the archives. Eric's original design ideas (and ideas for alternate interpretations) are described in: http://lists.nongnu.org/archive/html/classpath/2002-02/msg00178.html (Read the whole thread for the whole story) Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From fitzsim@redhat.com Fri Mar 10 06:13:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Fri, 10 Mar 2006 06:13:00 -0000 Subject: FYI: TestJPEGHuffmanTable Message-ID: <1141971531.3736.6.camel@rh-ibm-t41> Hi, I committed this new test. Tom 2006-03-10 Thomas Fitzsimmons * gnu/testlet/javax/imageio/plugins/jpeg/TestJPEGHuffmanTable.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-jpeg-huffman-table.patch Type: text/x-patch Size: 8241 bytes Desc: not available URL: From fitzsim@redhat.com Fri Mar 10 14:49:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Fri, 10 Mar 2006 14:49:00 -0000 Subject: FYI: TestPaintGraphics Message-ID: <1142002133.12375.1.camel@tortoise.toronto.redhat.com> Hi, I committed this new test. Tom 2006-03-10 Thomas Fitzsimmons * gnu/testlet/java/awt/Graphics/TestPaintGraphics.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-test-paint-graphics.patch Type: text/x-patch Size: 2207 bytes Desc: not available URL: From twisti@complang.tuwien.ac.at Fri Mar 10 15:11:00 2006 From: twisti@complang.tuwien.ac.at (Christian Thalinger) Date: Fri, 10 Mar 2006 15:11:00 -0000 Subject: Patch: RFC: gnu.testlet.java.beans.Introspector not-a-test Message-ID: <20060310151107.GC31060@localhost.localdomain> Hi! There are some classes which are checked by tgolem, which are actually no tests. Ok to commit? TWISTI 2006-03-10 Christian Thalinger * gnu/testlet/java/beans/Introspector/A.java: Added not-a-test tag. * gnu/testlet/java/beans/Introspector/B.java: Likewise. * gnu/testlet/java/beans/Introspector/C.java: Likewise. Index: gnu/testlet/java/beans/Introspector/A.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/beans/Introspector/A.java,v retrieving revision 1.1 diff -u -3 -p -r1.1 A.java --- gnu/testlet/java/beans/Introspector/A.java 13 Nov 2002 13:31:51 -0000 1.1 +++ gnu/testlet/java/beans/Introspector/A.java 10 Mar 2006 15:06:58 -0000 @@ -1,3 +1,5 @@ +//Tags: not-a-test + package gnu.testlet.java.beans.Introspector; public abstract class A Index: gnu/testlet/java/beans/Introspector/B.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/beans/Introspector/B.java,v retrieving revision 1.1 diff -u -3 -p -r1.1 B.java --- gnu/testlet/java/beans/Introspector/B.java 13 Nov 2002 13:31:51 -0000 1.1 +++ gnu/testlet/java/beans/Introspector/B.java 10 Mar 2006 15:06:58 -0000 @@ -1,3 +1,5 @@ +//Tags: not-a-test + package gnu.testlet.java.beans.Introspector; public class B extends A Index: gnu/testlet/java/beans/Introspector/C.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/beans/Introspector/C.java,v retrieving revision 1.1 diff -u -3 -p -r1.1 C.java --- gnu/testlet/java/beans/Introspector/C.java 13 Nov 2002 13:31:51 -0000 1.1 +++ gnu/testlet/java/beans/Introspector/C.java 10 Mar 2006 15:06:58 -0000 @@ -1,3 +1,5 @@ +//Tags: not-a-test + package gnu.testlet.java.beans.Introspector; public class C extends B From mark@klomp.org Fri Mar 10 15:14:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Fri, 10 Mar 2006 15:14:00 -0000 Subject: Patch: RFC: gnu.testlet.java.beans.Introspector not-a-test In-Reply-To: <20060310151107.GC31060@localhost.localdomain> References: <20060310151107.GC31060@localhost.localdomain> Message-ID: <1142003649.4551.99.camel@localhost.localdomain> Hi Christian, On Fri, 2006-03-10 at 16:11 +0100, Christian Thalinger wrote: > There are some classes which are checked by tgolem, which are actually > no tests. > > 2006-03-10 Christian Thalinger > > * gnu/testlet/java/beans/Introspector/A.java: Added not-a-test > tag. > * gnu/testlet/java/beans/Introspector/B.java: Likewise. > * gnu/testlet/java/beans/Introspector/C.java: Likewise. > > Ok to commit? Yes. Thanks, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From fitzsim@redhat.com Fri Mar 10 15:17:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Fri, 10 Mar 2006 15:17:00 -0000 Subject: FYI: TestPaintGraphics In-Reply-To: <1142002133.12375.1.camel@tortoise.toronto.redhat.com> References: <1142002133.12375.1.camel@tortoise.toronto.redhat.com> Message-ID: <1142003851.12375.4.camel@tortoise.toronto.redhat.com> On Fri, 2006-03-10 at 09:48 -0500, Thomas Fitzsimmons wrote: > Hi, > > I committed this new test. And this fix. Tom 2006-03-10 Thomas Fitzsimmons * gnu/testlet/java/awt/Graphics/TestPaintGraphics.java: Fix test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-test-paint-graphics-fix.patch Type: text/x-patch Size: 970 bytes Desc: URL: From langel@redhat.com Fri Mar 10 18:47:00 2006 From: langel@redhat.com (Lillian Angel) Date: Fri, 10 Mar 2006 18:47:00 -0000 Subject: Patch: New AWT widget painting tests Message-ID: <1142016426.2422.2.camel@tow.toronto.redhat.com> Tests to make sure that these AWT widgets are painted on top of a background image, not behind. 2006-03-10 Lillian Angel * gnu/testlet/java/awt/Button/PaintTest.java: New Test. * gnu/testlet/java/awt/Canvas/PaintTest.java: New Test. * gnu/testlet/java/awt/Checkbox/PaintTest.java: New Test. * gnu/testlet/java/awt/Label/PaintTest.java: New Test. * gnu/testlet/java/awt/List/ScrollbarPaintTest.java: New Test. * gnu/testlet/java/awt/ScrollPane/ScrollbarPaintTest.java: New Test. * gnu/testlet/java/awt/Scrollbar/ScrollbarPaintTest.java: New Test. * gnu/testlet/java/awt/TextArea/ScrollbarPaintTest.java: New Test. * gnu/testlet/java/awt/TextField/PaintTest.java: New Test. * gnu/testlet/java/awt/Choice/PaintTest.java: New Test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 28562 bytes Desc: not available URL: From david.gilbert@object-refinery.com Sat Mar 11 07:05:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Sat, 11 Mar 2006 07:05:00 -0000 Subject: FYI: TreeSelectionEvent tests Message-ID: <4412773D.4050502@object-refinery.com> This patch (committed) adds some new tests for the TreeSelectionEvent class: 2006-03-11 David Gilbert * gnu/testlet/javax/swing/event/TreeSelectionEvent/cloneWithSource.java: New file, * gnu/testlet/javax/swing/event/TreeSelectionEvent/constructors.java: Likewise, * gnu/testlet/javax/swing/event/TreeSelectionEvent/isAddedPath.java: Likewise. With GNU Classpath, there were 2 failures in isAddedPath(TreePath) - I have committed a fix in Classpath CVS already. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From olivier.jolly@pcedev.com Sat Mar 11 18:50:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Sat, 11 Mar 2006 18:50:00 -0000 Subject: runFinalization in Classloader.initialize doesn't run on cacao Message-ID: <44131BEE.4080103@pcedev.com> Hi, while wandering around with Classloaders, I found that the teslet gnu.testlet.java.lang.Classloader.initialize wasn't running with Cacao. It seems that in the beginning of the test method, it creates an anonymous Classloader and then call System.gc() and System.runFinalization() and expects the finalizer to be ran to set a singleton like variable holder. While this is ok in jamvm and sun jre 1.5.0, cacao doesn't run the finalizer since runFinalization only gives a hint and not a mandatory order, so it is compliant. My question is whether I'm missing something and this way of doing brings something in this test or it could be rewritten in a simpler way, more compliant with the various jvm. Thanks in advance Cheers +Olivier From jeroen@sumatra.nl Sat Mar 11 19:07:00 2006 From: jeroen@sumatra.nl (Jeroen Frijters) Date: Sat, 11 Mar 2006 19:07:00 -0000 Subject: runFinalization in Classloader.initialize doesn't run on cacao Message-ID: Olivier Jolly wrote: > while wandering around with Classloaders, I found that the teslet > gnu.testlet.java.lang.Classloader.initialize wasn't running > with Cacao. > It seems that in the beginning of the test method, it creates an > anonymous Classloader and then call System.gc() and > System.runFinalization() and expects the finalizer to be ran to set a > singleton like variable holder. > While this is ok in jamvm and sun jre 1.5.0, cacao doesn't run the > finalizer since runFinalization only gives a hint and not a mandatory > order, so it is compliant. > My question is whether I'm missing something and this way of doing > brings something in this test or it could be rewritten in a > simpler way, more compliant with the various jvm. I'm obviously not aware of an easier (or more robust) way to do this, or I would have used it. However, this is a very important test (from a security pov), so it has to be in. If Cacao can't or won't support System.runFinalization(), I suggest skipping this test. Regards, Jeroen From tromey@redhat.com Sat Mar 11 19:31:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Sat, 11 Mar 2006 19:31:00 -0000 Subject: Patch: FYI: PR 24461 test case Message-ID: I'm checking this in. This is the regression test for PR 24461. Tom 2006-03-11 Tom Tromey * gnu/testlet/java/util/zip/GZIPInputStream/PR24461.java: New file. Index: gnu/testlet/java/util/zip/GZIPInputStream/PR24461.java =================================================================== RCS file: gnu/testlet/java/util/zip/GZIPInputStream/PR24461.java diff -N gnu/testlet/java/util/zip/GZIPInputStream/PR24461.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/util/zip/GZIPInputStream/PR24461.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,66 @@ +/* PR24461.java -- Regression test for PR 24461 + Copyright (C) 2006 jrandom +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.1 + +package gnu.testlet.java.util.zip.GZIPInputStream; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.util.Random; +import java.util.zip.GZIPInputStream; +import java.util.zip.GZIPOutputStream; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class PR24461 implements Testlet { + public void test(TestHarness harness) { + boolean canBeOk = false; + boolean ok = false; + try { + ByteArrayOutputStream full = new ByteArrayOutputStream(1024); + GZIPOutputStream gzout = new GZIPOutputStream(full); + byte buf[] = new byte[1024]; + new Random().nextBytes(buf); + gzout.write(buf); + gzout.close(); + byte gzdata[] = full.toByteArray(); + + // now only read the first 128 bytes of that data + ByteArrayInputStream truncated = new ByteArrayInputStream(gzdata, 0, 128); + GZIPInputStream gzin = new GZIPInputStream(truncated); + byte read[] = new byte[1024]; + int cur = 0; + canBeOk = true; + while ( (cur = gzin.read(read, cur, read.length-cur)) != -1) + ; //noop + } catch (IOException ioe) { + // We expect an IOException while reading the truncated stream. + // The bug was that we were seeing a NullPointerException. + ok = canBeOk; + } catch (Exception e) { + harness.debug(e); + } + harness.check(ok); + } +} From edwin.steiner@gmx.net Sat Mar 11 20:27:00 2006 From: edwin.steiner@gmx.net (Edwin Steiner) Date: Sat, 11 Mar 2006 20:27:00 -0000 Subject: PATCH: fix gnu/testlet/java/lang/Class/security for very lazy VMs Message-ID: <20060311202904.GA17052@localhost.localdomain> Hello! The following patch fixes the gnu/testlet/java/lang/Class/security testlet for very lazy VMs like cacao. The problem was that these lines: // Make sure everything's fully resolved, or we'll be loading // classes during tests and the extra checks will make us fail. testClass.getDeclaredClasses(); testClass.getDeclaredMethods(); do not resolve enough because they only request non-inherited methods. When running this test, cacao causes a problem when resolving the parameters of the inherited method gnu.testlet.Testlet.test(Lgnu/testlet/TestHarness;)V cacao loads gnu/testlet/TestHarness only then. (Note that "testClass" in this testlet has a different class loader (on purpose, it seems), so this class has to be loaded from the classfile. Adding getClasses and getMethods solves this issue. -Edwin 2006-03-11 Edwin Steiner * gnu/testlet/java/lang/Class/security.java (test): Call getClasses() and getMethods() during preparation, so no classes have to be loaded (causing extra checks). Index: gnu/testlet/java/lang/Class/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Class/security.java,v retrieving revision 1.3 diff -u -p -r1.3 security.java --- gnu/testlet/java/lang/Class/security.java 3 Feb 2006 10:21:46 -0000 1.3 +++ gnu/testlet/java/lang/Class/security.java 11 Mar 2006 20:22:53 -0000 @@ -49,6 +49,8 @@ public class security implements Testlet // classes during tests and the extra checks will make us fail. testClass.getDeclaredClasses(); testClass.getDeclaredMethods(); + testClass.getClasses(); + testClass.getMethods(); // we need to restrict access to some packages for some of the // checks to occur. From olivier.jolly@pcedev.com Sat Mar 11 21:26:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Sat, 11 Mar 2006 21:26:00 -0000 Subject: runFinalization in Classloader.initialize doesn't run on cacao In-Reply-To: References: Message-ID: <44134075.80902@pcedev.com> Jeroen Frijters a ??crit : >Olivier Jolly wrote: > > >> while wandering around with Classloaders, I found that the teslet >>gnu.testlet.java.lang.Classloader.initialize wasn't running >>with Cacao. >>It seems that in the beginning of the test method, it creates an >>anonymous Classloader and then call System.gc() and >>System.runFinalization() and expects the finalizer to be ran to set a >>singleton like variable holder. >> While this is ok in jamvm and sun jre 1.5.0, cacao doesn't run the >>finalizer since runFinalization only gives a hint and not a mandatory >>order, so it is compliant. >> My question is whether I'm missing something and this way of doing >>brings something in this test or it could be rewritten in a >>simpler way, more compliant with the various jvm. >> >> > >I'm obviously not aware of an easier (or more robust) way to do this, or >I would have used it. However, this is a very important test (from a >security pov), so it has to be in. If Cacao can't or won't support >System.runFinalization(), I suggest skipping this test. > > > Ok, I feared something like this. However, the way this test is written seems very obscure (to me at least). Could you advise me why is the class loader created with an exception thrown in the constructor and then the reference to the semi-created instance is retrieved in the finalizer. And then I wonder why it then raises SecurityException instead of ClassFormatError. I reread about the finalizer semantic and the ClassLoader api without finding a clue. Thanks a lot in advance >Regards, >Jeroen > > > Olivier From jeroen@sumatra.nl Sat Mar 11 21:58:00 2006 From: jeroen@sumatra.nl (Jeroen Frijters) Date: Sat, 11 Mar 2006 21:58:00 -0000 Subject: runFinalization in Classloader.initialize doesn't run on cacao Message-ID: Olivier Jolly wrote: > Ok, I feared something like this. However, the way this test > is written seems very obscure (to me at least). Could you advise me why > is the class loader created with an exception thrown in the constructor > and then the reference to the semi-created instance is retrieved in the > finalizer. And then I wonder why it then raises SecurityException > instead of ClassFormatError. I reread about the finalizer semantic and > the ClassLoader api without finding a clue. Read http://www.securingjava.com/chapter-five/chapter-five-8.html for a description of the class loader attack that this is simulating. Regards, Jeroen From olivier.jolly@pcedev.com Sat Mar 11 22:18:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Sat, 11 Mar 2006 22:18:00 -0000 Subject: runFinalization in Classloader.initialize doesn't run on cacao In-Reply-To: References: Message-ID: <44134CC8.9020907@pcedev.com> Jeroen Frijters a ??crit : >Olivier Jolly wrote: > > >>Ok, I feared something like this. However, the way this test >>is written seems very obscure (to me at least). Could you advise me >> >> >why > > >>is the class loader created with an exception thrown in the >> >> >constructor > > >>and then the reference to the semi-created instance is retrieved in >> >> >the > > >>finalizer. And then I wonder why it then raises SecurityException >>instead of ClassFormatError. I reread about the finalizer semantic and >>the ClassLoader api without finding a clue. >> >> > >Read http://www.securingjava.com/chapter-five/chapter-five-8.html for a >description of the class loader attack that this is simulating. > > > Okey, it does make perfect sense now. Thanks for the test and the info. If you don't mind, I'll add comments to your testlet and link to this url. And, then, we don't have any test which checks ClassLoader.getPackages behaviour, I'm getting on this. >Regards, > > Thanks again, take care >Jeroen > > +Olivier From roman.kennke@aicas.com Mon Mar 13 15:10:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 13 Mar 2006 15:10:00 -0000 Subject: FYI: New AccessibleContext test Message-ID: I added a test for AccessibleContext that demonstrates a problem that we have in Classpath that shows up in the SwingSet2 demo from JDK1.5. 2006-03-13 Roman Kennke * gnu/testlet/javax/accessibility/AccessibleContext/TestAccessibleContext.java: New auxiliary helper class. * gnu/testlet/javax/accessibility/AccessibleContext/getAccessibleRelationSet.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4348 bytes Desc: not available URL: From roman.kennke@aicas.com Mon Mar 13 16:09:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 13 Mar 2006 16:09:00 -0000 Subject: FYI: New JInternalFrame test Message-ID: I added a test for JInternalFrame to see how setSelected() calls trigger repaint() calls. 2006-03-13 Roman Kennke * gnu/testlet/javax/swing/JInternalFrame/setSelected.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3679 bytes Desc: not available URL: From olivier.jolly@pcedev.com Mon Mar 13 18:39:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Mon, 13 Mar 2006 18:39:00 -0000 Subject: FYI: Added comments on ClassLoader exploit testlet Message-ID: <4415BC63.1090402@pcedev.com> Hi, following the explanations on this ml I asked about gnu.testlet.java.lang.ClassLoader.initialize behaviour, I commited a patch (with approbation from the original author) which comments this testlet. 2006-03-13 Olivier Jolly * gnu/teslet/java/lang/ClassLoader/initialize.java: Added comments. Cheers, +Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: classloader_initialize_comments.patch Type: text/x-patch Size: 2607 bytes Desc: not available URL: From david.gilbert@object-refinery.com Mon Mar 13 21:26:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 13 Mar 2006 21:26:00 -0000 Subject: FYI: SwingUtilities.calculateInnerArea() - new test Message-ID: <4415E48C.2090109@object-refinery.com> This patch (committed) adds a test for the calculateInnerArea() method in the SwingUtilities class: 2006-03-13 David Gilbert * gnu/testlet/javax/swing/SwingUtilities/calculateInnerArea.java: New test. One of the checks in this test (handling of a null component) fails with GNU Classpath. Shortly I will commit a patch to GNU Classpath CVS to fix this. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From olivier.jolly@pcedev.com Mon Mar 13 21:45:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Mon, 13 Mar 2006 21:45:00 -0000 Subject: FYI: testlet about package definition by the boot classloader Message-ID: <4415E7EC.4030803@pcedev.com> Hi, I committed the attached testlet which ensures that packages are correctly defined by the boot classloader (like the URLClassLoader does). The main part of the test isn't deterministic across vms since for each standard package, it checks that it is defined if it wasn't before once we load a class from it. Since the list of predefined packages when doing this test is vm dependant, the scope of this test is also. I'm sending a mail on the classpath ml on how to fix this problem (since it doesn't run for now in cacao nor jamvm). Cheers +Olivier 2006-03-13 Olivier Jolly * gnu/teslet/java/lang/ClassLoader/BootDefinedPackages.java: New test. From konqueror@gmx.de Tue Mar 14 06:10:00 2006 From: konqueror@gmx.de (Michael Koch) Date: Tue, 14 Mar 2006 06:10:00 -0000 Subject: FYI: testlet about package definition by the boot classloader In-Reply-To: <4415E7EC.4030803@pcedev.com> References: <4415E7EC.4030803@pcedev.com> Message-ID: <20060314060954.GB27960@mail.konqueror.de> On Mon, Mar 13, 2006 at 10:45:16PM +0100, Olivier Jolly wrote: > Hi, > I committed the attached testlet which ensures that packages are > correctly defined by the boot classloader (like the URLClassLoader > does). The main part of the test isn't deterministic across vms since > for each standard package, it checks that it is defined if it wasn't > before once we load a class from it. Since the list of predefined > packages when doing this test is vm dependant, the scope of this test is > also. > I'm sending a mail on the classpath ml on how to fix this problem > (since it doesn't run for now in cacao nor jamvm). > Cheers > > +Olivier > > 2006-03-13 Olivier Jolly > > * gnu/teslet/java/lang/ClassLoader/BootDefinedPackages.java: New test. Please attache the actual patch you are commiting so we can easily review it. Thanks for your work. Cheers, Michael -- http://www.worldforge.org/ From david.gilbert@object-refinery.com Tue Mar 14 15:47:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 14 Mar 2006 15:47:00 -0000 Subject: FYI: TableColumn.setResizable test enhanced Message-ID: <4416E5A8.5050109@object-refinery.com> This patch (committed) extends the test for the TableColumn.setResizable() method to check for the required PropertyChangeEvent: 2006-03-14 David Gilbert * gnu/testlet/javax/swing/table/TableColumn/setResizable.java (lastEvent): New field, (propertyChange): New method, (test): Extended to check PropertyChangeEvent. This currently fails with GNU Classpath - I will supply a patch to fix it soon. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From langel@redhat.com Tue Mar 14 16:58:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 14 Mar 2006 16:58:00 -0000 Subject: Patch: Container addImpl additional checks Message-ID: <1142355490.2422.38.camel@tow.toronto.redhat.com> Added checks. Repaint should not be called when a component is added to a Container. 2006-03-14 Lillian Angel * gnu/testlet/java/awt/Container/addImpl.java (test): Formatted function and added repaint functions to override repaint in Container. Added fails to these functions, they should not be called. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2840 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Mar 14 17:20:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 14 Mar 2006 17:20:00 -0000 Subject: FYI: TableColumn test enhancements Message-ID: <4416FB4B.5030803@object-refinery.com> This patch (committed) enhances some tests for the TableColumn class to check for the required PropertyChangeEvents: 2006-03-14 David Gilbert * gnu/testlet/javax/swing/table/TableColumn/setMinWidth.java (events): New field, (propertyChange): New method, (test): Added checks for PropertyChangeEvents, * gnu/testlet/javax/swing/table/TableColumn/setPreferredWidth.java (events): New field, (propertyChange): New method, (test): Added checks for PropertyChangeEvents, * gnu/testlet/javax/swing/table/tableColumn/setWidth.java (event): Removed, (events): New field, (propertyChange): Add event to new events list, (test): Added checks for PropertyChangeEvents. There are some failures with GNU Classpath - I will commit a patch to fix those shortly. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From olivier.jolly@pcedev.com Tue Mar 14 21:00:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Tue, 14 Mar 2006 21:00:00 -0000 Subject: FYI: testlet about package definition by the boot classloader In-Reply-To: <20060314060954.GB27960@mail.konqueror.de> References: <4415E7EC.4030803@pcedev.com> <20060314060954.GB27960@mail.konqueror.de> Message-ID: <44172EF8.1040303@pcedev.com> Michael Koch a ??crit : >> 2006-03-13 Olivier Jolly >> >> * gnu/teslet/java/lang/ClassLoader/BootDefinedPackages.java: New test. >> >> > >Please attache the actual patch you are commiting so we can easily >review it. > > > Sure, sorry Here it is >Thanks for your work. > > >Cheers, > > Cheers >Michael > > +Olivier -------------- next part -------------- A non-text attachment was scrubbed... Name: boot_defined_packages.patch Type: text/x-patch Size: 8209 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Mar 14 21:08:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 14 Mar 2006 21:08:00 -0000 Subject: FYI: TableColumn.setMaxWidth() test enhanced Message-ID: <44173217.8030501@object-refinery.com> This patch (committed) extends the test for the TableColumn.setMaxWidth() method to check for the correct PropertyChangeEvent(s): 2006-03-14 David Gilbert * gnu/testlet/javax/swing/table/TableColumn/setMaxWidth.java (events): New field, (propertyChange): New method, (test): Added checks for PropertyChangeEvents. I will commit a patch to GNU Classpath CVS shortly to make these tests pass. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Mar 15 11:42:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 15 Mar 2006 11:42:00 -0000 Subject: FYI: More TableColumn tests Message-ID: <4417FDBF.1000809@object-refinery.com> This patch (committed) adds more tests for the methods in the TableColumn class: 2006-03-15 David Gilbert * gnu/testlet/javax/swing/table/TableColumn/addPropertyChangeListener.java: New file, * gnu/testlet/javax/swing/table/TableColumn/removePropertyChangeListener.java: Likewise, * gnu/testlet/javax/swing/table/TableColumn/setCellEditor.java: Likewise, * gnu/testlet/javax/swing/table/TableColumn/setCellRenderer.java (test): Extended PropertyChangeEvent tests, * gnu/testlet/javax/swing/table/TableColumn/setHeaderRenderer.java (test): Likewise, * gnu/testlet/javax/swing/table/TableColumn/setHeaderValue.java (test): Likewise, * gnu/testlet/javax/swing/table/TableColumn/setIdentifier.java (event): New field, (propertyChange): New method, (test): Added checks for required PropertyChangeEvent. The failing tests will be fixed by a patch to GNU Classpath CVS shortly... Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From mark@klomp.org Wed Mar 15 13:13:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Wed, 15 Mar 2006 13:13:00 -0000 Subject: FYI: Add new logging.Level.parse() test Message-ID: <1142428378.4606.57.camel@localhost.localdomain> Hi, While investigating gcc.gnu.org/PR26668 I added this new test. The GNU Classpath code passes this, but it is useful to have this to make sure parsing works on constant strings and new/parsed strings. 2006-03-15 Mark Wielaard * gnu/testlet/java/util/logging/Level/parse.java (test): Add "new" string object to parse. Committed, Mark diff -u -r1.1 parse.java --- gnu/testlet/java/util/logging/Level/parse.java 26 Feb 2004 19:41:42 -0000 1.1 +++ gnu/testlet/java/util/logging/Level/parse.java 15 Mar 2006 13:08:55 -0000 @@ -46,6 +46,7 @@ h.checkPoint(name); h.check(Level.parse(name) == TestUtils.LEVELS[i]); + h.check(Level.parse((" " + name + " ").trim()) == TestUtils.LEVELS[i]); } /* Pass a number. */ -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From david.gilbert@object-refinery.com Wed Mar 15 14:00:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 15 Mar 2006 14:00:00 -0000 Subject: FYI: TableColumn.sizeWidthToFit() - new test Message-ID: <44181DF7.4070308@object-refinery.com> This patch (committed) adds checks for the sizeWidthToFit() method: 2006-03-15 David Gilbert * gnu/testlet/javax/swing/table/TableColumn/sizeWidthToFit.java: New file. This method is stubbed in GNU Classpath, so all the tests fail. I will commit an implementation shortly. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman.kennke@aicas.com Wed Mar 15 14:46:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Wed, 15 Mar 2006 14:46:00 -0000 Subject: FYI: New JInternalFrame tests Message-ID: I added a couple of tests to check if the boolean properties in JInternalFrame must be bound or not. This shows some mistakes in Classpath's impl. 2006-03-15 Roman Kennke * gnu/testlet/javax/swing/JInternalFrame/setSelected.java: Added test for bound property. * gnu/testlet/javax/swing/JInternalFrame/setResizable.java: Added test for bound property. * gnu/testlet/javax/swing/JInternalFrame/setMaximizable.java: Added test for bound property. * gnu/testlet/javax/swing/JInternalFrame/setIconifiable.java: Added test for bound property. * gnu/testlet/javax/swing/JInternalFrame/setClosed.java: Added test for bound property. * gnu/testlet/javax/swing/JInternalFrame/setClosable.java: Added test for bound property. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 15308 bytes Desc: not available URL: From langel@redhat.com Wed Mar 15 14:55:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 15 Mar 2006 14:55:00 -0000 Subject: FYI: new tests for addImpl Message-ID: <1142434529.2422.54.camel@tow.toronto.redhat.com> Added more tests to show that my Container.addImpl patch is correct. repaint is not called on Sun when a component is added to a showing or non-showing container. Right now, with my patch, it works the same. 2006-03-15 Lillian Angel * gnu/testlet/java/awt/Container/addImpl.java (test): Changed to call new functions. (test1): Moved old test to new function. (test2): New function to test if repaint is called when a component is added to a showing component. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3225 bytes Desc: not available URL: From langel@redhat.com Wed Mar 15 15:23:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 15 Mar 2006 15:23:00 -0000 Subject: FYI: new tests for addImpl In-Reply-To: <1142434529.2422.54.camel@tow.toronto.redhat.com> References: <1142434529.2422.54.camel@tow.toronto.redhat.com> Message-ID: <1142436188.2422.61.camel@tow.toronto.redhat.com> Added more checks for the Container.addImpl patch and the Component.show patch. 2006-03-15 Lillian Angel * gnu/testlet/java/awt/Container/addImpl.java (test1): Removed repaint function. Only need one. Also, added repaint functions to all the components. (test2): Added a lightweight container to the panel to show that repaint is not called on it. Also, added a check to show that repaint is not called on the frame when it is shown. On Wed, 2006-03-15 at 09:55 -0500, Lillian Angel wrote: > Added more tests to show that my Container.addImpl patch is correct. > repaint is not called on Sun when a component is added to a showing or > non-showing container. Right now, with my patch, it works the same. > > 2006-03-15 Lillian Angel > > * gnu/testlet/java/awt/Container/addImpl.java > (test): Changed to call new functions. > (test1): Moved old test to new function. > (test2): New function to test if repaint is called when a > component is added to a showing component. > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3187 bytes Desc: not available URL: From langel@redhat.com Wed Mar 15 16:25:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 15 Mar 2006 16:25:00 -0000 Subject: FYI: new Container.getComponentAt class Message-ID: <1142439945.2422.74.camel@tow.toronto.redhat.com> Added a new class containing tests for getComponentAt. getComponentAt should not ignore invisible components. 2006-03-15 Lillian Angel * gnu/testlet/java/awt/Container/getComponentAt.java: New Class -------------- next part -------------- A non-text attachment was scrubbed... Name: patch2.diff Type: text/x-patch Size: 2213 bytes Desc: not available URL: From tromey@redhat.com Wed Mar 15 22:16:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Wed, 15 Mar 2006 22:16:00 -0000 Subject: Patch: FYI: update a test's debug output Message-ID: I needed some extra debug info from this test. Tom 2006-03-15 Tom Tromey * gnu/testlet/java/util/jar/JarFile/basic.java (test_jar): Log exception when -debug. Index: gnu/testlet/java/util/jar/JarFile/basic.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/jar/JarFile/basic.java,v retrieving revision 1.4 diff -u -r1.4 basic.java --- gnu/testlet/java/util/jar/JarFile/basic.java 3 Jun 2004 14:31:16 -0000 1.4 +++ gnu/testlet/java/util/jar/JarFile/basic.java 15 Mar 2006 22:15:40 -0000 @@ -71,6 +71,7 @@ } catch(IOException e) { + harness.debug(e); harness.check(false, "all jarfile tests failed"); } } From fitzsim@redhat.com Thu Mar 16 14:22:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Thu, 16 Mar 2006 14:22:00 -0000 Subject: FYI: FileDialog graphics test Message-ID: <1142518947.16084.45.camel@tortoise.toronto.redhat.com> Hi, I committed this test for FileDialog graphics and painting. Tom 2006-03-16 Thomas Fitzsimmons * gnu/testlet/java/awt/FileDialog/TestGraphics.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-filedialog-graphics.patch Type: text/x-patch Size: 2727 bytes Desc: URL: From fitzsim@redhat.com Thu Mar 16 20:55:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Thu, 16 Mar 2006 20:55:00 -0000 Subject: FYI: TestLogicalFontMetrics Message-ID: <1142542529.18058.23.camel@tortoise.toronto.redhat.com> Hi, I committed this new test to Mauve. Tom 2006-03-16 Thomas Fitzsimmons * gnu/testlet/java/awt/FontMetrics/TestLogicalFontMetrics.java: New test. Remove timer to ensure all tests are run. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-logical-font-metrics.patch Type: text/x-patch Size: 41435 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-logical-font-metrics2.patch Type: text/x-patch Size: 5119 bytes Desc: not available URL: From fitzsim@redhat.com Thu Mar 16 22:11:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Thu, 16 Mar 2006 22:11:00 -0000 Subject: FYI: TestLogicalFontMetrics In-Reply-To: <1142542529.18058.23.camel@tortoise.toronto.redhat.com> References: <1142542529.18058.23.camel@tortoise.toronto.redhat.com> Message-ID: <1142547074.18058.27.camel@tortoise.toronto.redhat.com> On Thu, 2006-03-16 at 15:55 -0500, Thomas Fitzsimmons wrote: > Hi, > > I committed this new test to Mauve. I adjusted the tolerance so that it is larger for larger fonts. Now all tests should pass against GNU Classpath CVS HEAD. Tom 2006-03-16 Thomas Fitzsimmons * gnu/testlet/java/awt/FontMetrics/TestLogicalFontMetrics.java: Make tolerance larger for larger font sizes. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-logical-font-metrics3.patch Type: text/x-patch Size: 1803 bytes Desc: not available URL: From mark@klomp.org Fri Mar 17 10:22:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Fri, 17 Mar 2006 10:22:00 -0000 Subject: FYI: New test for BasicPermission Message-ID: <1142590926.4593.58.camel@localhost.localdomain> Hi, This adds some constructor argument checks for BasicPermission. 2006-03-17 Mark Wielaard * gnu/testlet/java/security/BasicPermission/newPermission.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: newPermission.java Type: text/x-java Size: 2805 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From roman@kennke.org Sun Mar 19 10:13:00 2006 From: roman@kennke.org (Roman Kennke) Date: Sun, 19 Mar 2006 10:13:00 -0000 Subject: Fixed ComboBox tests Message-ID: <1142763186.8782.1.camel@localhost.localdomain> There were some tests for the JComboBox UIs that checked for exact pixel layout instead of the logic behind this. This makes some tests incorrectly fail for Classpath. Fixed by the attached patch. 2006-03-19 Roman Kennke * gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/layout.java: Fixed test to check correct logic, not exact pixels. * gnu/testlet/javax/swing/plaf/metal/MetalComboBoxUI/getMinimumSize.java: Fixed test to check correct logic, not exact pixels. * gnu/testlet/javax/swing/plaf/metal/MetalComboBoxUI/getPreferredSize.java: Fixed test to check correct logic, not exact pixels. /Roman -- ?Improvement makes straight roads, but the crooked roads, without Improvement, are roads of Genius.? - William Blake -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 16371 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From tromey@redhat.com Sun Mar 19 18:24:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Sun, 19 Mar 2006 18:24:00 -0000 Subject: Patch: FYI: numeric shaper test Message-ID: I'm checking this in. Tom 2006-03-19 Tom Tromey * gnu/testlet/java/awt/font/NumericShaper/Basic.java: New file. Index: gnu/testlet/java/awt/font/NumericShaper/Basic.java =================================================================== RCS file: gnu/testlet/java/awt/font/NumericShaper/Basic.java diff -N gnu/testlet/java/awt/font/NumericShaper/Basic.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/awt/font/NumericShaper/Basic.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,110 @@ +/* Basic.java -- Test numeric shaper functionality + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.4 + +package gnu.testlet.java.awt.font.NumericShaper; + +import java.awt.font.NumericShaper; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class Basic implements Testlet +{ + public String xform(String input) + { + StringBuffer result = new StringBuffer(); + for (int i = 0; i < input.length(); ++i) + { + char c = input.charAt(i); + if (c < ' ' || c > 0x7f) + result.append("\\u").append(Integer.toHexString(c)); + else + result.append(c); + } + return result.toString(); + } + + public void testOne(TestHarness harness, String input, + NumericShaper shaper, String expected, + int context) + { + char[] chars = input.toCharArray(); + if (context == -1) + shaper.shape(chars, 0, chars.length); + else + shaper.shape(chars, 0, chars.length, context); + // Transforming here makes the output legible in case of failure. + harness.check(xform(new String(chars)), xform(expected)); + } + + public void test(TestHarness harness) + { + harness.checkPoint("non-contextual"); + NumericShaper nonc = NumericShaper.getShaper(NumericShaper.TIBETAN); + harness.check(! nonc.isContextual()); + testOne(harness, "abc 0123", nonc, + "abc \u0f20\u0f21\u0f22\u0f23", -1); + testOne(harness, "abc 0123", nonc, + "abc \u0f20\u0f21\u0f22\u0f23", NumericShaper.BENGALI); + + // Note that the JDK fails some of these, as ethiopic does not + // have a digit zero. + nonc = NumericShaper.getShaper(NumericShaper.ETHIOPIC); + testOne(harness, "abc 0123", nonc, + "abc 0\u1369\u136a\u136b", -1); + testOne(harness, "abc 0123", nonc, + "abc 0\u1369\u136a\u136b", NumericShaper.EASTERN_ARABIC); + + harness.checkPoint("contextual"); + NumericShaper contextualI + = NumericShaper.getContextualShaper(NumericShaper.KHMER + | NumericShaper.ETHIOPIC); + NumericShaper contextualE + = NumericShaper.getContextualShaper(NumericShaper.KHMER + | NumericShaper.ETHIOPIC, + NumericShaper.EUROPEAN); + harness.check(contextualE.equals(contextualI)); + harness.check(contextualE.isContextual()); + + // Use built-in context. + testOne(harness, "45", contextualE, "45", -1); + // Explicit context. + testOne(harness, "45", contextualE, "\u17e4\u17e5", NumericShaper.KHMER); + // Explicit but unrecognized context. + testOne(harness, "45", contextualE, "45", NumericShaper.ARABIC); + // The other explicit context. + testOne(harness, "45", contextualE, "\u136c\u136d", NumericShaper.ETHIOPIC); + // Context from the text. The first \\u is ethiopic, the second khmer. + testOne(harness, "45 \u134d 045 \u1782 045", contextualI, + "45 \u134d 0\u136c\u136d \u1782 \u17e0\u17e4\u17e5", -1); + + harness.checkPoint("arabic"); + NumericShaper arabic + = NumericShaper.getContextualShaper(NumericShaper.ARABIC + | NumericShaper.EASTERN_ARABIC); + // According to testing, eastern arabic takes precedence here. + testOne(harness, "\u062b 1", arabic, "\u062b \u06f1", -1); + // This should choose eastern arabic. + testOne(harness, "1", arabic, "\u06f1", NumericShaper.EASTERN_ARABIC); + } +} From abalkiss@redhat.com Tue Mar 21 16:17:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Tue, 21 Mar 2006 16:17:00 -0000 Subject: Reformat of some files Message-ID: <1142957839.3903.1.camel@tony.toronto.redhat.com> I reformatted the three files mentioned below in preparation for some work I will be doing on them. 2006-03-21 Anthony Balkissoon * gnu/testlet/SimpleTestHarness.java: Reformatted. * gnu/testlet/TestHarness.java: Reformatted, removed unused imports. * gnu/testlet/TestReport.java: Reformatted. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: Reformat.diff Type: text/x-patch Size: 28668 bytes Desc: not available URL: From tromey@redhat.com Tue Mar 21 19:58:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Tue, 21 Mar 2006 19:58:00 -0000 Subject: Patch: FYI: Bidi tests Message-ID: I'm checking this in. This adds tests for a couple of java.text.Bidi things. Tom 2006-03-21 Tom Tromey * gnu/testlet/java/text/Bidi/reorderVisually.java: New file. * gnu/testlet/java/text/Bidi/Basic.java: New file. Index: gnu/testlet/java/text/Bidi/Basic.java =================================================================== RCS file: gnu/testlet/java/text/Bidi/Basic.java diff -N gnu/testlet/java/text/Bidi/Basic.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/text/Bidi/Basic.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,68 @@ +/* Basic.java -- Tests of main Bidi functionality + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.4 + +package gnu.testlet.java.text.Bidi; + +import java.text.Bidi; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class Basic implements Testlet +{ + public void testOne(TestHarness harness, Bidi bidi, String expected) + { + StringBuffer buf = new StringBuffer(); + for (int i = 0; i < bidi.getLength(); ++i) + buf.append(bidi.getLevelAt(i)); + harness.check(buf.toString(), expected); + } + + public void test(TestHarness harness) + { + Bidi b; + + harness.checkPoint("simple"); + b = new Bidi("hi bob", Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT); + testOne(harness, b, "000000"); + harness.check(b.baseIsLeftToRight()); + harness.check(b.isLeftToRight()); + harness.check(b.getRunCount(), 1); + + harness.checkPoint("one embedding"); + b = new Bidi("hi \u202bbob", Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT); + testOne(harness, b, "0002222"); + + harness.checkPoint("override"); + b = new Bidi("hi \u202ebob", Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT); + testOne(harness, b, "0001111"); + + harness.checkPoint("override and pop"); + b = new Bidi("car means \u202eCAR\u202c.", + Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT); + testOne(harness, b, "0000000000111100"); + b = new Bidi("car \u202eMEANS CAR\u202c.", + Bidi.DIRECTION_RIGHT_TO_LEFT); + testOne(harness, b, "2221333333333311"); + } +} Index: gnu/testlet/java/text/Bidi/reorderVisually.java =================================================================== RCS file: gnu/testlet/java/text/Bidi/reorderVisually.java diff -N gnu/testlet/java/text/Bidi/reorderVisually.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/text/Bidi/reorderVisually.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,69 @@ +/* reorderVisually.java -- test bidi algorithm + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.4 + +package gnu.testlet.java.text.Bidi; + +import java.text.Bidi; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class reorderVisually implements Testlet +{ + public void testOne(TestHarness harness, String input, String levels, + String expected) + { + Object[] inputA = new Object[input.length()]; + byte[] levelsA = new byte[levels.length()]; + + for (int i = 0; i < input.length(); ++i) + { + inputA[i] = input.substring(i, i + 1); + levelsA[i] = (byte) (levels.charAt(i) - '0'); + } + + Bidi.reorderVisually(levelsA, 0, inputA, 0, inputA.length); + + StringBuffer result = new StringBuffer(); + for (int i = 0; i < inputA.length; ++i) + result.append(inputA[i]); + + harness.check(result.toString(), expected); + } + + public void test(TestHarness harness) + { + // These tests come from unicode.org: + // http://www.unicode.org/reports/tr9/ + testOne(harness, "car means CAR.", "00000000001110", + "car means RAC."); + testOne(harness, "car MEANS CAR.", "22211111111111", + ".RAC SNAEM car"); + testOne(harness, "he said \"car MEANS CAR.\"", + "000000000222111111111100", + "he said \"RAC SNAEM car.\""); + testOne(harness, "DID YOU SAY 'he said \"car MEANS CAR\"'?", + "11111111111112222222224443333333333211", + "?'he said \"RAC SNAEM car\"' YAS UOY DID"); + } +} From gbenson@redhat.com Wed Mar 22 10:48:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 22 Mar 2006 10:48:00 -0000 Subject: FYI: FilePermission symlink handling test Message-ID: <20060322104812.GC12530@redhat.com> Hi all, My last commit adds a test to check FilePermission's handling of symbolic links. Both proprietary JVMs I tried passed this test, but Classpath does not. Now to figure out how to fix this... Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1562 diff -u -r1.1562 ChangeLog --- ChangeLog 21 Mar 2006 19:59:15 -0000 1.1562 +++ ChangeLog 22 Mar 2006 10:41:39 -0000 @@ -1,3 +1,7 @@ +2006-03-22 Gary Benson + + * gnu/testlet/java/io/FilePermission/traversal.java: New test. + 2006-03-21 Tom Tromey * gnu/testlet/java/text/Bidi/reorderVisually.java: New file. Index: gnu/testlet/java/io/FilePermission/traversal.java =================================================================== RCS file: gnu/testlet/java/io/FilePermission/traversal.java diff -N gnu/testlet/java/io/FilePermission/traversal.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/io/FilePermission/traversal.java 22 Mar 2006 10:41:39 -0000 @@ -0,0 +1,135 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.io.FilePermission; + +import java.io.File; +import java.io.FilePermission; +import java.util.LinkedList; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +public class traversal implements Testlet +{ + public void test (TestHarness harness) + { + try { + harness.checkPoint("setup"); + + String[] items_to_access = new String[] { + "file", // a file in the directory + "rlink", // a relative link to a file outside the directory + "alink"}; // an absolute link to a file outside the directory + + String[] ways_to_access = new String[] { + "dir", // via the directory + "rlink", // via a relative link to the directory + "alink"}; // via an absolute link to the directory + + String[] item_states = new String[] { + "present", // the file exists + "absent"}; // the file does not exist + + LinkedList cleanup = new LinkedList(); + try { + File tempdir = new File(harness.getTempDirectory(), "mauve-testdir"); + harness.check(tempdir.isDirectory() || tempdir.mkdir()); + cleanup.add(tempdir); + + File testdir = new File(tempdir, "dir"); + harness.check(testdir.isDirectory() || testdir.mkdir()); + cleanup.add(testdir); + + File link = new File(tempdir, "rlink"); + harness.check(Runtime.getRuntime().exec(new String[] { + "ln", "-s", testdir.getName(), link.getPath() + }).waitFor() == 0); + cleanup.add(link); + + link = new File(tempdir, "alink"); + harness.check(Runtime.getRuntime().exec(new String[] { + "ln", "-s", testdir.getPath(), link.getPath() + }).waitFor() == 0); + cleanup.add(link); + + File[] dirs = new File[] {testdir, tempdir}; + for (int i = 0; i < dirs.length; i++) { + File file = new File(dirs[i], "file-present"); + harness.check(file.isFile() || file.createNewFile()); + cleanup.add(file); + + file = new File(dirs[i], "file-absent"); + harness.check(!file.exists()); + } + + for (int i = 0; i < item_states.length; i++) { + File file = new File(tempdir, "file-" + item_states[i]); + + link = new File(testdir, "rlink-" + item_states[i]); + harness.check(Runtime.getRuntime().exec(new String[] { + "ln", "-s", new File("..",file.getName()).getPath(), link.getPath() + }).waitFor() == 0); + cleanup.add(link); + + link = new File(testdir, "alink-" + item_states[i]); + harness.check(Runtime.getRuntime().exec(new String[] { + "ln", "-s", file.getPath(), link.getPath() + }).waitFor() == 0); + cleanup.add(link); + } + + harness.checkPoint("test"); + for (int i = 0; i < items_to_access.length; i++) { + String item_to_access = items_to_access[i]; + for (int j = 0; j < ways_to_access.length; j++) { + String how_to_access = ways_to_access[j]; + for (int k = 0; k < ways_to_access.length; k++) { + String how_permitted = ways_to_access[k]; + for (int l = 0; l < item_states.length; l++) { + String item_state = item_states[l]; + String item = item_to_access + "-" + item_state; + + FilePermission a = new FilePermission(new File( + new File(tempdir, how_permitted), item).getPath(), "read"); + + FilePermission b = new FilePermission(new File( + new File(tempdir, how_to_access), item).getPath(), "read"); + + harness.debug("\na = " + a); + harness.debug("b = " + b); + + harness.check(a.implies(b)); + } + } + } + } + } + finally { + for (int i = cleanup.size() - 1; i >= 0; i--) + ((File) cleanup.get(i)).delete(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From jeroen@sumatra.nl Wed Mar 22 10:56:00 2006 From: jeroen@sumatra.nl (Jeroen Frijters) Date: Wed, 22 Mar 2006 10:56:00 -0000 Subject: FilePermission symlink handling test Message-ID: Gary Benson wrote: > My last commit adds a test to check FilePermission's handling of > symbolic links. Both proprietary JVMs I tried passed this test, > but Classpath does not. Now to figure out how to fix this... I'm not happy with non-portable Runtime.exec() invocations in tests. Is there a better way to deal with this? At the very least the test should be marked in some way. Regards, Jeroen From gbenson@redhat.com Wed Mar 22 11:15:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 22 Mar 2006 11:15:00 -0000 Subject: FilePermission symlink handling test In-Reply-To: References: Message-ID: <20060322111507.GD12530@redhat.com> Jeroen Frijters wrote: > Gary Benson wrote: > > My last commit adds a test to check FilePermission's handling of > > symbolic links. Both proprietary JVMs I tried passed this test, > > but Classpath does not. Now to figure out how to fix this... > > I'm not happy with non-portable Runtime.exec() invocations in > tests. Is there a better way to deal with this? As far as I know Java has nothing to do with symlinks :( > At the very least the test should be marked in some way. Is there a way to detect the underlying OS so the test can be skipped on non-POSIX platforms? Cheers, Gary From gbenson@redhat.com Wed Mar 22 13:46:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 22 Mar 2006 13:46:00 -0000 Subject: FYI: Another FilePermission test Message-ID: <20060322134553.GE12530@redhat.com> Hi again, My last commit adds another set of checks for FilePermission. The checks are all for things which are forbidden (my earlier commit was things which are allowed). Classpath passes some of these, though not because it should! Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1563 diff -u -r1.1563 ChangeLog --- ChangeLog 22 Mar 2006 10:42:16 -0000 1.1563 +++ ChangeLog 22 Mar 2006 13:33:35 -0000 @@ -1,5 +1,9 @@ 2006-03-22 Gary Benson + * gnu/testlet/java/io/FilePermission/traversal2.java: New test. + +2006-03-22 Gary Benson + * gnu/testlet/java/io/FilePermission/traversal.java: New test. 2006-03-21 Tom Tromey Index: gnu/testlet/java/io/FilePermission/traversal2.java =================================================================== RCS file: gnu/testlet/java/io/FilePermission/traversal2.java diff -N gnu/testlet/java/io/FilePermission/traversal2.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/io/FilePermission/traversal2.java 22 Mar 2006 13:33:35 -0000 @@ -0,0 +1,125 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.io.FilePermission; + +import java.io.File; +import java.io.FilePermission; +import java.util.LinkedList; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +public class traversal2 implements Testlet +{ + public void test (TestHarness harness) + { + try { + harness.checkPoint("setup"); + + String[] ways_to_access = new String[] { + "dir", // via the directory + "rlink", // via a relative link to the directory + "alink"}; // via an absolute link to the directory + + String[] ways_to_escape = new String[] { + "..", // via the directory + "rlink", // via a relative link out of the directory + "alink"}; // via an absolute link out of the directory + + String[] item_states = new String[] { + "present", // the file exists + "absent"}; // the file does not exist + + LinkedList cleanup = new LinkedList(); + try { + File tempdir = new File(harness.getTempDirectory(), "mauve-testdir"); + harness.check(tempdir.isDirectory() || tempdir.mkdir()); + cleanup.add(tempdir); + + File testdir = new File(tempdir, "dir"); + harness.check(testdir.isDirectory() || testdir.mkdir()); + cleanup.add(testdir); + + File link = new File(tempdir, "rlink"); + harness.check(Runtime.getRuntime().exec(new String[] { + "ln", "-s", testdir.getName(), link.getPath() + }).waitFor() == 0); + cleanup.add(link); + + link = new File(tempdir, "alink"); + harness.check(Runtime.getRuntime().exec(new String[] { + "ln", "-s", testdir.getPath(), link.getPath() + }).waitFor() == 0); + cleanup.add(link); + + File file = new File(tempdir, "file-present"); + harness.check(file.isFile() || file.createNewFile()); + cleanup.add(file); + + file = new File(tempdir, "file-absent"); + harness.check(!file.exists()); + + link = new File(testdir, "rlink"); + harness.check(Runtime.getRuntime().exec(new String[] { + "ln", "-s", "..", link.getPath() + }).waitFor() == 0); + cleanup.add(link); + + link = new File(testdir, "alink"); + harness.check(Runtime.getRuntime().exec(new String[] { + "ln", "-s", tempdir.getPath(), link.getPath() + }).waitFor() == 0); + cleanup.add(link); + + harness.checkPoint("test"); + for (int i = 0; i < ways_to_access.length; i++) { + String how_to_access = ways_to_access[i]; + + FilePermission a = new FilePermission(new File( + new File(tempdir, how_to_access), "-").getPath(), "read"); + + for (int j = 0; j < ways_to_escape.length; j++) { + String how_to_escape = ways_to_escape[j]; + for (int k = 0; k < item_states.length; k++) { + String item = "file-" + item_states[k]; + + FilePermission b = new FilePermission(new File( + new File(testdir, how_to_escape), item).getPath(), "read"); + + harness.debug("\na = " + a); + harness.debug("b = " + b); + + harness.check(!a.implies(b)); + } + } + } + } + finally { + for (int i = cleanup.size() - 1; i >= 0; i--) + ((File) cleanup.get(i)).delete(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From langel@redhat.com Wed Mar 22 20:06:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 22 Mar 2006 20:06:00 -0000 Subject: FYI: New ImageIO read/write tests Message-ID: <1143057985.25781.17.camel@tow.toronto.redhat.com> New tests for reading/writing bitmaps. 2006-03-22 Lillian Angel * gnu/testlet/javax/imageio/ImageIO/Bitmap-16Bit.bmp: Added bitmap for test. * gnu/testlet/javax/imageio/ImageIO/Bitmap-1Bit.bmp: Added bitmap for test. * gnu/testlet/javax/imageio/ImageIO/Bitmap-24Bit.bmp: Added bitmap for test. * gnu/testlet/javax/imageio/ImageIO/Bitmap-32Bit.bmp: Added bitmap for test. * gnu/testlet/javax/imageio/ImageIO/Bitmap-4Bit.bmp: Added bitmap for test. * gnu/testlet/javax/imageio/ImageIO/Bitmap-8Bit.bmp: Added bitmap for test. * gnu/testlet/javax/imageio/ImageIO/Bitmap-RLE4.bmp: Added bitmap for test. * gnu/testlet/javax/imageio/ImageIO/Bitmap-RLE8.bmp: Added bitmap for test. * gnu/testlet/javax/imageio/ImageIO/outputBitmap.bmp: Added bitmap for test. * gnu/testlet/javax/imageio/ImageIO/ImageIOTest.java: (test): Moved tests to testStringData. Added calls to testReadWrite and testStringData. (testStringData): New function. (testReadWrite): Checks reading and writing of bitmap images. Compares images to verify they are the same. (checkPixels): Helper used to compare pixels of two images. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 6395 bytes Desc: not available URL: From WBaer@gmx.de Thu Mar 23 19:29:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Thu, 23 Mar 2006 19:29:00 -0000 Subject: FYI: New test. Message-ID: <4422F84C.1080206@gmx.de> Hi, I committed this new test for the recent checked in patch for this method. 2006-03-23 Wolfgang Baer * gnu/testlet/java/io/ObjectOutputStream/useProtocolVersion.java: New test. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: useProtocolVersion.java Type: text/x-java Size: 2957 bytes Desc: not available URL: From WBaer@gmx.de Thu Mar 23 19:43:00 2006 From: WBaer@gmx.de (Wolfgang Baer) Date: Thu, 23 Mar 2006 19:43:00 -0000 Subject: FYI: New test for java.awt.Window Message-ID: <4422FB6F.3090401@gmx.de> Hi, reverse japi points out that some methods must be overriden and made final in Window. This patch tests these overrriden methods. Patch is pending. 2006-03-23 Wolfgang Baer * gnu/testlet/java/awt/Window/focusCycleRootTest.java: New test. Wolfgang -------------- next part -------------- A non-text attachment was scrubbed... Name: focusCycleRootTest.java Type: text/x-java Size: 1446 bytes Desc: not available URL: From roman@kennke.org Sat Mar 25 12:42:00 2006 From: roman@kennke.org (Roman Kennke) Date: Sat, 25 Mar 2006 12:42:00 -0000 Subject: FYI: New GregorianCalendar test Message-ID: <1143290557.4774.5.camel@localhost.localdomain> This is the test that accompanies my last fix to GregorianCalendar in Classpath. It checks for the setFirstDayOfWeek method. 2006-03-25 Roman Kennke * gnu/testlet/java/util/GregorianCalendar/setFirstDayOfWeek.java: New tests. /Roman -- ?Improvement makes straight roads, but the crooked roads, without Improvement, are roads of Genius.? - William Blake -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3342 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From mkoch@konqueror.de Sat Mar 25 17:01:00 2006 From: mkoch@konqueror.de (Michael Koch) Date: Sat, 25 Mar 2006 17:01:00 -0000 Subject: [Patch] Updated locale data tests Message-ID: <20060325170022.GA20256@asterix.konqueror.de> Hello list, I fixed some testcases for pass with the new locale data in GNU classpath. These new data are more correct. Michael 2006-03-25 Michael Koch * gnu/testlet/locales/LocaleTest.java: Updated for new fixed locale data. -------------- next part -------------- Index: gnu/testlet/locales/LocaleTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/locales/LocaleTest.java,v retrieving revision 1.5 diff -u -r1.5 LocaleTest.java --- gnu/testlet/locales/LocaleTest.java 6 Jan 2005 13:19:57 -0000 1.5 +++ gnu/testlet/locales/LocaleTest.java 25 Mar 2006 16:58:58 -0000 @@ -273,7 +273,7 @@ new ExpectedValues("de", "DE", "", "de_DE", "deu", "DEU", "Deutsch", "Deutschland", "", "Deutsch (Deutschland)", "EUR", 2, "\u20ac"), - new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18. M\u00e4rz 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 CET"), + new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18. M\u00e4rz 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("1.000,00 \u20ac", "1.000.000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10.000.000,12 \u20ac"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), @@ -284,7 +284,7 @@ new ExpectedValues("fr", "BE", "", "fr_BE", "fra", "BEL", "Franz\u00f6sisch", "Belgien", "", "Franz\u00f6sisch (Belgien)", "EUR", 2, "\u20ac"), - new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18. M\u00e4rz 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 CET"), + new ExpectedDateValues("18-mars-74", "18/03/74", "18-mars-74", "18 mars 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("1.000,00 \u20ac", "1.000.000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10.000.000,12 \u20ac"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), @@ -297,7 +297,7 @@ new ExpectedValues("el", "GR", "", "el_GR", "ell", "GRC", "Griechisch", "Griechenland", "", "Griechisch (Griechenland)", "EUR", 2, "\u20ac"), - new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18. M\u00e4rz 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 CET"), + new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18. M\u00e4rz 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("1.000,00 \u20ac", "1.000.000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10.000.000,12 \u20ac"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), @@ -309,12 +309,12 @@ new ExpectedValues("en", "IE", "", "en_IE", "eng", "IRL", "Englisch", "Irland", "", "Englisch (Irland)", "EUR", 2, "\u20ac"), - new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18. M\u00e4rz 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 CET"), - new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), - new ExpectedNumberValues("1.000,00 \u20ac", "1.000.000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10.000.000,12 \u20ac"), - new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), - new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), - new ExpectedNumberValues("100.000%", "100.000.000%", "10.000%", "10.012%", "1.000.000.012%")); + new ExpectedDateValues("18 Mar 1974", "18/03/1974", "18 Mar 1974", "18 March 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), + new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), + new ExpectedNumberValues("\u20ac1,000.00", "\u20ac1,000,000.00", "\u20ac100.00", "\u20ac100.12", "\u20ac10,000,000.12"), + new ExpectedNumberValues("1,000", "1,000,000", "100", "100", "10,000,000"), + new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), + new ExpectedNumberValues("100,000%", "100,000,000%", "10,000%", "10,012%", "1,000,000,012%")); // Locale: France checkLocale(h, new Locale("fr", "FR"), new ExpectedValues("fr", "FR", "", "fr_FR", "fra", "FRA", @@ -364,7 +364,7 @@ new ExpectedValues("nl", "NL", "", "nl_NL", "nld", "NLD", "Niederl\u00e4ndisch", "Niederlande", "", "Niederl\u00e4ndisch (Niederlande)", "EUR", 2, "\u20ac"), - new ExpectedDateValues("18-mrt-1974", "18-3-74", "18-mrt-1974", "18 maart 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 CET"), + new ExpectedDateValues("18-mrt-1974", "18-3-74", "18-mrt-1974", "18 maart 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("\u20ac 1.000,00", "\u20ac 1.000.000,00", "\u20ac 100,00", "\u20ac 100,12", "\u20ac 10.000.000,12"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), @@ -385,8 +385,8 @@ checkLocale(h, Locale.UK, new ExpectedValues("en", "GB", "", "en_GB", "eng", "GBR", "Englisch", "Vereinigtes K\u00f6nigreich", "", "Englisch (Vereinigtes K\u00f6nigreich)", - "GBP", 2, "GBP"), - new ExpectedDateValues("18-Mar-1974", "18/03/74", "18-Mar-1974", "18 March 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 CET"), + "GBP", 2, "\u00a3"), + new ExpectedDateValues("18 Mar 1974", "18/03/1974", "18 Mar 1974", "18 March 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), new ExpectedNumberValues("\u00a31,000.00", "\u00a31,000,000.00", "\u00a3100.00", "\u00a3100.12", "\u00a310,000,000.12"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100", "10,000,000"), @@ -395,9 +395,9 @@ // Locale: United States checkLocale(h, Locale.US, new ExpectedValues("en", "US", "", "en_US", "eng", "USA", - "Englisch", "Vereinigte Staaten von Amerika", "", "Englisch (Vereinigte Staaten von Amerika)", - "USD", 2, "US$"), - new ExpectedDateValues("Mar 18, 1974", "3/18/74", "Mar 18, 1974", "March 18, 1974", "5:20:30 PM", "5:20 PM", "5:20:30 PM", "5:20:30 PM CET"), + "Englisch", "Vereinigte Staaten", "", "Englisch (Vereinigte Staaten)", + "USD", 2, "$"), + new ExpectedDateValues("Mar 18, 1974", "3/18/74", "Mar 18, 1974", "March 18, 1974", "5:20:30 PM", "5:20 PM", "5:20:30 PM", "5:20:30 PM GMT"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), new ExpectedNumberValues("$1,000.00", "$1,000,000.00", "$100.00", "$100.12", "$10,000,000.12"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100", "10,000,000"), @@ -407,8 +407,8 @@ checkLocale(h, new Locale("fi", "FI"), new ExpectedValues("fi", "FI", "", "fi_FI", "fin", "FIN", "Finnisch", "Finnland", "", "Finnisch (Finnland)", - "EUR", 2, "EUR"), - new ExpectedDateValues("18.3.1974", "18.3.1974", "18.3.1974", "18. maaliskuuta 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 CET"), + "EUR", 2, "\u20ac"), + new ExpectedDateValues("18.3.1974", "18.3.1974", "18.3.1974", "18. maaliskuuta 1974", "17.20.30", "17.20", "17.20.30", "17.20.30 GMT"), new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100,123", "10\u00a0000\u00a0000,123"), new ExpectedNumberValues("1\u00a0000,00 \u20ac", "1\u00a0000\u00a0000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10\u00a0000\u00a0000,12 \u20ac"), new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100", "10\u00a0000\u00a0000"), @@ -419,7 +419,7 @@ new ExpectedValues("tr", "TR", "", "tr_TR", "tur", "TUR", "T\u00fcrkisch", "T\u00fcrkei", "", "T\u00fcrkisch (T\u00fcrkei)", "TRL", 0, "TRL"), - new ExpectedDateValues("18.Mar.1974", "18.03.1974", "18.Mar.1974", "18 Mart 1974 Pazartesi", "17:20:30", "17:20", "17:20:30", "17:20:30 CET"), + new ExpectedDateValues("18.Mar.1974", "18.03.1974", "18.Mar.1974", "18 Mart 1974 Pazartesi", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("1.000 TRL", "1.000.000 TRL", "100 TRL", "100 TRL", "10.000.000 TRL"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), @@ -438,10 +438,10 @@ checkLocale(h, new Locale("et", "EE"), new ExpectedValues("et", "EE", "", "et_EE", "est", "EST", "Estnisch", "Estland", "", "Estnisch (Estland)", - "EEK", 2, "kr"), - new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "esmasp\u00e4ev, 18. M\u0034rts 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 CET"), + "EEK", 2, "EEK"), + new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18 m\u00e4rts 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100,123", "10\u00a0000\u00a0000,123"), - new ExpectedNumberValues("1\u00a0000 kr", "1\u00a0000\u00a0000 kr", "100 kr", "100,12 kr", "10\u00a0000\u00a0000,12 kr"), + new ExpectedNumberValues("1\u00a0000,00 EEK", "1\u00a0000\u00a0000,00 EEK", "100,00 EEK", "100,12 EEK", "10\u00a0000\u00a0000,12 EEK"), new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100", "10\u00a0000\u00a0000"), new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100,123", "10\u00a0000\u00a0000,123"), new ExpectedNumberValues("100\u00a0000%", "100\u00a0000\u00a0000%", "10\u00a0000%", "10\u00a0012%", "1\u00a0000\u00a0000\u00a0012%")); From mkoch@konqueror.de Sat Mar 25 23:35:00 2006 From: mkoch@konqueror.de (Michael Koch) Date: Sat, 25 Mar 2006 23:35:00 -0000 Subject: [Patch] updated test to check for CLDR 1.3 Message-ID: <20060325233529.GA25729@asterix.konqueror.de> Hi list, this is the last update to make mauve check for the latest CLDR 1.3 locale data. Cheers, Michael 2006-03-25 Michael Koch * gnu/testlet/locales/LocaleTest.java: Updated to fit new CLDR 1.3 data. -------------- next part -------------- Index: gnu/testlet/locales/LocaleTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/locales/LocaleTest.java,v retrieving revision 1.6 diff -u -r1.6 LocaleTest.java --- gnu/testlet/locales/LocaleTest.java 25 Mar 2006 17:00:40 -0000 1.6 +++ gnu/testlet/locales/LocaleTest.java 25 Mar 2006 23:33:49 -0000 @@ -104,10 +104,11 @@ ExpectedValues expected, ExpectedDateValues expectedDate, ExpectedNumberValues expectedNumber1, - ExpectedNumberValues expectedNumber2, + ExpectedNumberValues expectedNumberCurrency1, + ExpectedNumberValues expectedNumberCurrency2, ExpectedNumberValues expectedNumber3, ExpectedNumberValues expectedNumber4, - ExpectedNumberValues expectedNumber5) + ExpectedNumberValues expectedNumberProcent) { h.checkPoint("Locale " + locale); @@ -192,15 +193,26 @@ h.check(nf.format(10000000.1234d), expectedNumber1.e); } - if (expectedNumber2 != null) + if (expectedNumberCurrency1 != null) { nf = NumberFormat.getCurrencyInstance(locale); - h.check(nf.format(1000L), expectedNumber2.a); - h.check(nf.format(1000000L), expectedNumber2.b); - h.check(nf.format(100d), expectedNumber2.c); - h.check(nf.format(100.1234d), expectedNumber2.d); - h.check(nf.format(10000000.1234d), expectedNumber2.e); + h.check(nf.format(1000L), expectedNumberCurrency1.a); + h.check(nf.format(1000000L), expectedNumberCurrency1.b); + h.check(nf.format(100d), expectedNumberCurrency1.c); + h.check(nf.format(100.1234d), expectedNumberCurrency1.d); + h.check(nf.format(10000000.1234d), expectedNumberCurrency1.e); + } + + if (expectedNumberCurrency2 != null) + { + nf = NumberFormat.getCurrencyInstance(locale); + + h.check(nf.format(-1000L), expectedNumberCurrency2.a); + h.check(nf.format(-1000000L), expectedNumberCurrency2.b); + h.check(nf.format(-100d), expectedNumberCurrency2.c); + h.check(nf.format(-100.1234d), expectedNumberCurrency2.d); + h.check(nf.format(-10000000.1234d), expectedNumberCurrency2.e); } if (expectedNumber3 != null) @@ -225,15 +237,15 @@ h.check(nf.format(10000000.1234d), expectedNumber4.e); } - if (expectedNumber5 != null) + if (expectedNumberProcent != null) { nf = NumberFormat.getPercentInstance(locale); - h.check(nf.format(1000L), expectedNumber5.a); - h.check(nf.format(1000000L), expectedNumber5.b); - h.check(nf.format(100d), expectedNumber5.c); - h.check(nf.format(100.1234d), expectedNumber5.d); - h.check(nf.format(10000000.1234d), expectedNumber5.e); + h.check(nf.format(1000L), expectedNumberProcent.a); + h.check(nf.format(1000000L), expectedNumberProcent.b); + h.check(nf.format(100d), expectedNumberProcent.c); + h.check(nf.format(100.1234d), expectedNumberProcent.d); + h.check(nf.format(10000000.1234d), expectedNumberProcent.e); } // Currencies @@ -276,6 +288,7 @@ new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18. M\u00e4rz 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("1.000,00 \u20ac", "1.000.000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10.000.000,12 \u20ac"), + new ExpectedNumberValues("-1.000,00 \u20ac", "-1.000.000,00 \u20ac", "-100,00 \u20ac", "-100,12 \u20ac", "-10.000.000,12 \u20ac"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("100.000%", "100.000.000%", "10.000%", "10.012%", "1.000.000.012%")); @@ -287,6 +300,7 @@ new ExpectedDateValues("18-mars-74", "18/03/74", "18-mars-74", "18 mars 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("1.000,00 \u20ac", "1.000.000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10.000.000,12 \u20ac"), + new ExpectedNumberValues("-1.000,00 \u20ac", "-1.000.000,00 \u20ac", "-100,00 \u20ac", "-100,12 \u20ac", "-10.000.000,12 \u20ac"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("100.000%", "100.000.000%", "10.000%", "10.012%", "1.000.000.012%")); @@ -300,6 +314,7 @@ new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18. M\u00e4rz 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("1.000,00 \u20ac", "1.000.000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10.000.000,12 \u20ac"), + new ExpectedNumberValues("-1.000,00 \u20ac", "-1.000.000,00 \u20ac", "-100,00 \u20ac", "-100,12 \u20ac", "-10.000.000,12 \u20ac"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("100.000%", "100.000.000%", "10.000%", "10.012%", "1.000.000.012%")); @@ -312,6 +327,7 @@ new ExpectedDateValues("18 Mar 1974", "18/03/1974", "18 Mar 1974", "18 March 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), new ExpectedNumberValues("\u20ac1,000.00", "\u20ac1,000,000.00", "\u20ac100.00", "\u20ac100.12", "\u20ac10,000,000.12"), + new ExpectedNumberValues("-\u20ac1,000.00", "-\u20ac1,000,000.00", "-\u20ac100.00", "-\u20ac100.12", "-\u20ac10,000,000.12"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100", "10,000,000"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), new ExpectedNumberValues("100,000%", "100,000,000%", "10,000%", "10,012%", "1,000,000,012%")); @@ -325,6 +341,7 @@ null, null, null, + null, null); // Locale: Spain checkLocale(h, new Locale("es", "ES"), @@ -336,6 +353,7 @@ null, null, null, + null, null); // Locale: Portugal checkLocale(h, new Locale("pt", "PT"), @@ -347,6 +365,7 @@ null, null, null, + null, null); // Locale: Italy checkLocale(h, new Locale("it", "IT"), @@ -358,6 +377,7 @@ null, null, null, + null, null); // Locale: The Netherlands checkLocale(h, new Locale("nl", "NL"), @@ -367,6 +387,7 @@ new ExpectedDateValues("18-mrt-1974", "18-3-74", "18-mrt-1974", "18 maart 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("\u20ac 1.000,00", "\u20ac 1.000.000,00", "\u20ac 100,00", "\u20ac 100,12", "\u20ac 10.000.000,12"), + new ExpectedNumberValues("\u20ac 1.000,00-", "\u20ac 1.000.000,00-", "\u20ac 100,00-", "\u20ac 100,12-", "\u20ac 10.000.000,12-"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("100.000%", "100.000.000%", "10.000%", "10.012%", "1.000.000.012%")); @@ -380,6 +401,7 @@ null, null, null, + null, null); // Locale: United Kingdom checkLocale(h, Locale.UK, @@ -389,6 +411,7 @@ new ExpectedDateValues("18 Mar 1974", "18/03/1974", "18 Mar 1974", "18 March 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), new ExpectedNumberValues("\u00a31,000.00", "\u00a31,000,000.00", "\u00a3100.00", "\u00a3100.12", "\u00a310,000,000.12"), + new ExpectedNumberValues("-\u00a31,000.00", "-\u00a31,000,000.00", "-\u00a3100.00", "-\u00a3100.12", "-\u00a310,000,000.12"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100", "10,000,000"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), new ExpectedNumberValues("100,000%", "100,000,000%", "10,000%", "10,012%", "1,000,000,012%")); @@ -400,6 +423,7 @@ new ExpectedDateValues("Mar 18, 1974", "3/18/74", "Mar 18, 1974", "March 18, 1974", "5:20:30 PM", "5:20 PM", "5:20:30 PM", "5:20:30 PM GMT"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), new ExpectedNumberValues("$1,000.00", "$1,000,000.00", "$100.00", "$100.12", "$10,000,000.12"), + new ExpectedNumberValues("($1,000.00)", "($1,000,000.00)", "($100.00)", "($100.12)", "($10,000,000.12)"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100", "10,000,000"), new ExpectedNumberValues("1,000", "1,000,000", "100", "100.123", "10,000,000.123"), new ExpectedNumberValues("100,000%", "100,000,000%", "10,000%", "10,012%", "1,000,000,012%")); @@ -408,12 +432,13 @@ new ExpectedValues("fi", "FI", "", "fi_FI", "fin", "FIN", "Finnisch", "Finnland", "", "Finnisch (Finnland)", "EUR", 2, "\u20ac"), - new ExpectedDateValues("18.3.1974", "18.3.1974", "18.3.1974", "18. maaliskuuta 1974", "17.20.30", "17.20", "17.20.30", "17.20.30 GMT"), - new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100,123", "10\u00a0000\u00a0000,123"), - new ExpectedNumberValues("1\u00a0000,00 \u20ac", "1\u00a0000\u00a0000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10\u00a0000\u00a0000,12 \u20ac"), - new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100", "10\u00a0000\u00a0000"), - new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100,123", "10\u00a0000\u00a0000,123"), - new ExpectedNumberValues("100\u00a0000%", "100\u00a0000\u00a0000%", "10\u00a0000%", "10\u00a0012%", "1\u00a0000\u00a0000\u00a0012%")); + new ExpectedDateValues("18.3.1974", "18.3.1974", "18.3.1974", "18. maaliskuuta 1974", "17.20.30", "17.20", "17.20.30", "klo 17.20.30"), + new ExpectedNumberValues("1,000", "1,000,000", "100", "100,123", "10,000,000,123"), + new ExpectedNumberValues("1,000,00 \u20ac", "1,000,000,00 \u20ac", "100,00 \u20ac", "100,12 \u20ac", "10,000,000,12 \u20ac"), + new ExpectedNumberValues("-1,000,00 \u20ac", "-1,000,000,00 \u20ac", "-100,00 \u20ac", "-100,12 \u20ac", "-10,000,000,12 \u20ac"), + new ExpectedNumberValues("1,000", "1,000,000", "100", "100", "10,000,000"), + new ExpectedNumberValues("1,000", "1,000,000", "100", "100,123", "10,000,000,123"), + new ExpectedNumberValues("100,000%", "100,000,000%", "10,000%", "10,012%", "1,000,000,012%")); // Locale: Turkey checkLocale(h, new Locale("tr", "TR"), new ExpectedValues("tr", "TR", "", "tr_TR", "tur", "TUR", @@ -422,11 +447,15 @@ new ExpectedDateValues("18.Mar.1974", "18.03.1974", "18.Mar.1974", "18 Mart 1974 Pazartesi", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("1.000 TRL", "1.000.000 TRL", "100 TRL", "100 TRL", "10.000.000 TRL"), + new ExpectedNumberValues("-1.000 TRL", "-1.000.000 TRL", "-100 TRL", "-100 TRL", "-10.000.000 TRL"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100", "10.000.000"), new ExpectedNumberValues("1.000", "1.000.000", "100", "100,123", "10.000.000,123"), new ExpectedNumberValues("100.000%", "100.000.000%", "10.000%", "10.012%", "1.000.000.012%")); // Locale: Kazakstan checkLocale(h, new Locale("kk", "KZ"), + new ExpectedValues("kk", "KZ", "", "kk_KZ", "kaz", "KAZ", + "Kasachisch", "Kasachstan", "", "Kasachisch (Kasachstan)", + "KZT", 2, "KZT"), null, null, null, @@ -442,6 +471,7 @@ new ExpectedDateValues("18.03.1974", "18.03.74", "18.03.1974", "18 m\u00e4rts 1974", "17:20:30", "17:20", "17:20:30", "17:20:30 GMT"), new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100,123", "10\u00a0000\u00a0000,123"), new ExpectedNumberValues("1\u00a0000,00 EEK", "1\u00a0000\u00a0000,00 EEK", "100,00 EEK", "100,12 EEK", "10\u00a0000\u00a0000,12 EEK"), + new ExpectedNumberValues("-1\u00a0000,00 EEK", "-1\u00a0000\u00a0000,00 EEK", "-100,00 EEK", "-100,12 EEK", "-10\u00a0000\u00a0000,12 EEK"), new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100", "10\u00a0000\u00a0000"), new ExpectedNumberValues("1\u00a0000", "1\u00a0000\u00a0000", "100", "100,123", "10\u00a0000\u00a0000,123"), new ExpectedNumberValues("100\u00a0000%", "100\u00a0000\u00a0000%", "10\u00a0000%", "10\u00a0012%", "1\u00a0000\u00a0000\u00a0012%")); From theBohemian@gmx.net Wed Mar 29 15:27:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Wed, 29 Mar 2006 15:27:00 -0000 Subject: FYI: new GapContent.insertString test Message-ID: <442AA768.9060204@gmx.net> Hi, the attached patch contains a new test which checks for the wrong behavior which caused PR 26888. Additionally I made another part of that class more robust agains unexpected exceptions. The ChangeLog: 2006-03-29 Robert Schuster * gnu/testlet/javax/swing/text/GapContent/insertString.java: (testGeneral): Let test fail when unexpected exception occurs. (testSpecialInsert): New test. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-gapcontent-insert.diff Type: text/x-patch Size: 2026 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From langel@redhat.com Wed Mar 29 23:18:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 29 Mar 2006 23:18:00 -0000 Subject: Patch: TestPanelRepaint fix Message-ID: <1143674308.3175.34.camel@tow.toronto.redhat.com> Fixed up this test. It was incorrectly testing update. 2006-03-29 Lillian Angel * gnu/testlet/java/awt/Panel/TestPanelRepaint.java (test): Added check. (myPanel): Added component listener. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4174 bytes Desc: not available URL: From langel@redhat.com Wed Mar 29 23:19:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 29 Mar 2006 23:19:00 -0000 Subject: Patch: TestPanelRepaint fix In-Reply-To: <1143674308.3175.34.camel@tow.toronto.redhat.com> References: <1143674308.3175.34.camel@tow.toronto.redhat.com> Message-ID: <1143674376.3175.36.camel@tow.toronto.redhat.com> Removed the unnecessary stuff from the patch to make it more readable. On Wed, 2006-03-29 at 18:18 -0500, Lillian Angel wrote: > Fixed up this test. It was incorrectly testing update. > > 2006-03-29 Lillian Angel > > * gnu/testlet/java/awt/Panel/TestPanelRepaint.java > (test): Added check. > (myPanel): Added component listener. > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1675 bytes Desc: not available URL: From fitzsim@redhat.com Fri Mar 31 02:09:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Fri, 31 Mar 2006 02:09:00 -0000 Subject: Patch: FYI: TestJPEGQTable Message-ID: <1143770991.3595.18.camel@tortoise.toronto.redhat.com> Hi, I committed this test for JPEGQTable. Tom 2006-03-30 Thomas Fitzsimmons * gnu/testlet/javax/imageio/plugins/jpeg/TestJPEGQTable.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-jpeg-qtable.patch Type: text/x-patch Size: 8994 bytes Desc: not available URL: From langel@redhat.com Fri Mar 31 23:06:00 2006 From: langel@redhat.com (Lillian Angel) Date: Fri, 31 Mar 2006 23:06:00 -0000 Subject: FYI: keyPress new test Message-ID: <1143846383.3175.105.camel@tow.toronto.redhat.com> New test for Component.translateEvent 2006-03-31 Lillian Angel * gnu/testlet/java/awt/Component/keyPressTest.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3009 bytes Desc: not available URL: From fitzsim@redhat.com Mon Apr 3 20:21:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Mon, 03 Apr 2006 20:21:00 -0000 Subject: Patch: FYI: TestJPEGImageReadParam Message-ID: <1144095685.24113.7.camel@tortoise.toronto.redhat.com> Hi, I committed this patch. It adds a new test, TestJPEGImageReadParam, optimizes some imports and reformats TestJPEGHuffmanTable. Tom 2006-04-03 Thomas Fitzsimmons * gnu/testlet/javax/imageio/plugins/jpeg/TestJPEGHuffmanTable.java: Reformat. Optimize imports. * gnu/testlet/javax/imageio/plugins/jpeg/TestJPEGImageReadParam.java: New test. * gnu/testlet/javax/imageio/plugins/jpeg/TestJPEGQTable.java: Optimize imports. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-jpeg-image-read-param.patch Type: text/x-patch Size: 21022 bytes Desc: not available URL: From tromey@redhat.com Mon Apr 3 20:54:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Mon, 03 Apr 2006 20:54:00 -0000 Subject: Patch: FYI: test for PR 26971 Message-ID: I'm checking this in. This adds the test case from PR 26971. Tom 2006-04-03 Tom Tromey * gnu/testlet/javax/naming/directory/BasicAttribute/Enumerate.java: New file. Index: gnu/testlet/javax/naming/directory/BasicAttribute/Enumerate.java =================================================================== RCS file: gnu/testlet/javax/naming/directory/BasicAttribute/Enumerate.java diff -N gnu/testlet/javax/naming/directory/BasicAttribute/Enumerate.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/javax/naming/directory/BasicAttribute/Enumerate.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,55 @@ +/* Enumerate.java -- test BasicAttribute enumeration + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.3 + +package gnu.testlet.javax.naming.directory.BasicAttribute; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import javax.naming.NamingEnumeration; +import javax.naming.NamingException; +import javax.naming.directory.BasicAttribute; + +public class Enumerate implements Testlet +{ + public void test(TestHarness harness) + { + BasicAttribute b = new BasicAttribute("test"); + b.add("two"); + b.add("three"); + + boolean ok = true; + NamingEnumeration e = null; + try { + e = b.getAll(); + } catch (NamingException _) { + harness.debug(_); + ok = false; + } + harness.check(ok); + + harness.check(e.nextElement(), "two"); + harness.check(e.nextElement(), "three"); + harness.check(! e.hasMoreElements()); + } +} From fitzsim@redhat.com Tue Apr 4 00:53:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Tue, 04 Apr 2006 00:53:00 -0000 Subject: Patch: FYI: TestJPEGImageWriteParam Message-ID: <1144112032.5737.9.camel@tortoise.toronto.redhat.com> Hi, I committed TestJPEGImageWriteParam. Tom 2006-04-03 Thomas Fitzsimmons * gnu/testlet/javax/imageio/plugins/jpeg/TestJPEGImageWriteParam.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-jpeg-image-write-param.patch Type: text/x-patch Size: 8423 bytes Desc: not available URL: From mckinlay@redhat.com Wed Apr 5 17:41:00 2006 From: mckinlay@redhat.com (Bryce McKinlay) Date: Wed, 05 Apr 2006 17:41:00 -0000 Subject: FYI: New Iterator ConcurrentModificationException test Message-ID: <44340161.8000209@redhat.com> I'm checking in the following test case, which checks whether ConcurrentModificationException is thrown from hasNext() and other methods in iterators. See classpath PRs 27028 and 24752. Bryce -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-concurrentmodification.patch Type: text/x-patch Size: 4898 bytes Desc: not available URL: From tromey@redhat.com Wed Apr 5 18:30:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Wed, 05 Apr 2006 18:30:00 -0000 Subject: Patch: FYI: test for chaining oddity Message-ID: I'm checking this in. I wrote this test to check the behavior of exception chaining in an odd situation. I think this behavior is pretty broken, but we do agree with the JDK here, so I'm checking it in. Also I figured that if the JDK is ever fixed this will let us notice. Tom 2006-04-05 Tom Tromey * gnu/testlet/java/lang/reflect/InvocationTargetException/Chain.java: New file. Index: gnu/testlet/java/lang/reflect/InvocationTargetException/Chain.java =================================================================== RCS file: gnu/testlet/java/lang/reflect/InvocationTargetException/Chain.java diff -N gnu/testlet/java/lang/reflect/InvocationTargetException/Chain.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/reflect/InvocationTargetException/Chain.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,58 @@ +/* Chain.java -- Test exception chaining + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.4 + +package gnu.testlet.java.lang.reflect.InvocationTargetException; + +import java.lang.reflect.InvocationTargetException; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class Chain extends InvocationTargetException implements Testlet { + + public Chain() { + } + + public Chain(Throwable targetException, String err) { + super(targetException, err); + } + + public Chain(Throwable targetException) { + super(targetException); + } + + public void test(TestHarness harness) { + boolean ok = false; + try { + Throwable t = new Throwable(); + Chain c = new Chain(); + // Bogusly, the JDK does not allow this. + c.initCause(c); + } catch (IllegalStateException _) { + harness.debug(_); + ok = true; + } + harness.check(ok); + } + +} From tromey@redhat.com Wed Apr 5 18:39:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Wed, 05 Apr 2006 18:39:00 -0000 Subject: Patch: FYI: simple URLConnection test Message-ID: I'm checking this in. This adds a simple test for URLConnection.getFileNameMap. Tom 2006-04-05 Tom Tromey * gnu/testlet/java/net/URLConnection/getFileNameMap.java: New file. Index: gnu/testlet/java/net/URLConnection/getFileNameMap.java =================================================================== RCS file: gnu/testlet/java/net/URLConnection/getFileNameMap.java diff -N gnu/testlet/java/net/URLConnection/getFileNameMap.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/URLConnection/getFileNameMap.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,43 @@ +/* getFileNameMap.java -- Simple check of getFileNameMap + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.2 + +package gnu.testlet.java.net.URLConnection; + +import java.net.FileNameMap; +import java.net.URLConnection; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class getFileNameMap implements Testlet { + + public void test(TestHarness harness) { + FileNameMap fnm = URLConnection.getFileNameMap(); + harness.check(fnm != null); + + // A simple one everyone is likely to have. + harness.check(fnm.getContentTypeFor("foo.ps"), + "application/postscript"); + } + +} From abalkiss@redhat.com Wed Apr 5 20:20:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 05 Apr 2006 20:20:00 -0000 Subject: New Harness, version 1 Message-ID: <1144268386.3903.189.camel@tony.toronto.redhat.com> Okay, the new Harness is checked in, please use it and comment on features you would like added. Running tests is now much easier, please use the harness script in the top folder. ./harness -help will print a help message, and the README file gives more detailed instructions, but it is very intuitive. Simply specify the tests or folders you want to run. "./harness javax.swing" will run all the tests in gnu.testlet.javax.swing. It is important to specify the VM you wish to use to run the tests. If you always (or almost always) run the Mauve tests using the same VM, you should export the environment variable MAUVEVM. For example, I have MAUVEVM=jamvm, so the above command would run all the javax.swing tests on JamVM. Alternately, you can use the -vm option (say, if you want to run against Sun to make sure the tests pass, or just for comparison): "./harness -vm PATH-TO-EXECUTABLE" javax.swing" This will override the MAUVEVM variable. If neither of these options is used, the tests will be run on the system "java" VM, whatever you have that set to. Comments are greatly appreciated. 2006-04-05 Anthony Balkissoon * Harness.java: New file. * README: New file (old one moved to README.OldHarness). * README.OldHarness: New file, copied from the old README. * RunnerProcess.java: New file. * harness: New file. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: HarnessVersion1.diff Type: text/x-patch Size: 75259 bytes Desc: not available URL: From abalkiss@redhat.com Wed Apr 5 21:22:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 05 Apr 2006 21:22:00 -0000 Subject: New Harness, version 1 In-Reply-To: <1144268386.3903.189.camel@tony.toronto.redhat.com> References: <1144268386.3903.189.camel@tony.toronto.redhat.com> Message-ID: <1144272066.3903.198.camel@tony.toronto.redhat.com> The README was missing something important. 2006-04-05 Anthony Balkissoon * README: Added line about compiling the Harness, RunnerProcess, and tests. --Tony On Wed, 2006-04-05 at 16:19 -0400, Anthony Balkissoon wrote: > Okay, the new Harness is checked in, please use it and comment on > features you would like added. > > Running tests is now much easier, please use the harness script in the > top folder. ./harness -help will print a help message, and the README > file gives more detailed instructions, but it is very intuitive. Simply > specify the tests or folders you want to run. > > "./harness javax.swing" will run all the tests in > gnu.testlet.javax.swing. > > It is important to specify the VM you wish to use to run the tests. If > you always (or almost always) run the Mauve tests using the same VM, you > should export the environment variable MAUVEVM. For example, I have > MAUVEVM=jamvm, so the above command would run all the javax.swing tests > on JamVM. Alternately, you can use the -vm option (say, if you want to > run against Sun to make sure the tests pass, or just for comparison): > > "./harness -vm PATH-TO-EXECUTABLE" javax.swing" > > This will override the MAUVEVM variable. If neither of these options is > used, the tests will be run on the system "java" VM, whatever you have > that set to. > > Comments are greatly appreciated. > > 2006-04-05 Anthony Balkissoon > > * Harness.java: New file. > * README: New file (old one moved to README.OldHarness). > * README.OldHarness: New file, copied from the old README. > * RunnerProcess.java: New file. > * harness: New file. > > --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: README.diff Type: text/x-patch Size: 919 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Apr 6 09:18:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 06 Apr 2006 09:18:00 -0000 Subject: New Harness, version 1 In-Reply-To: <1144268386.3903.189.camel@tony.toronto.redhat.com> References: <1144268386.3903.189.camel@tony.toronto.redhat.com> Message-ID: <4434DCC7.2010602@object-refinery.com> Anthony Balkissoon wrote: >Okay, the new Harness is checked in, please use it and comment on >features you would like added. > >Running tests is now much easier, please use the harness script in the >top folder. ./harness -help will print a help message, and the README >file gives more detailed instructions, but it is very intuitive. Simply >specify the tests or folders you want to run. > >"./harness javax.swing" will run all the tests in >gnu.testlet.javax.swing. > >It is important to specify the VM you wish to use to run the tests. If >you always (or almost always) run the Mauve tests using the same VM, you >should export the environment variable MAUVEVM. For example, I have >MAUVEVM=jamvm, so the above command would run all the javax.swing tests >on JamVM. Alternately, you can use the -vm option (say, if you want to >run against Sun to make sure the tests pass, or just for comparison): > >"./harness -vm PATH-TO-EXECUTABLE" javax.swing" > >This will override the MAUVEVM variable. If neither of these options is >used, the tests will be run on the system "java" VM, whatever you have >that set to. > >Comments are greatly appreciated. > > > Hi Anthony, I gave this a quick run - it's very nice! I really like how easy you've made it to run all the tests for one class or package. I have a few comments: - is there an easy way to run all the tests? Maybe something like "./harness gnu.testlet -vm jamvm"? Perhaps I missed something obvious, but if this is possible then you could add it to the README. - compiling the code manually was straightforward, but perhaps it could be done in one step with "make" or "ant", just to make it as simple as possible? - this runner ignores the tags in the tests (JDK1.0, JDK1.1, GUI etc.) unless you use the -file option. Do you have any plans to add support for the flags? I don't know how much it matters, as I get the feeling that the tags are not used a lot. It would be nice to generate some HTML output for easy casual review, along the lines of: http://www.object-refinery.com/classpath/mauve/report/ Even better than that, though, would be to get some test coverage tool working and have that generate some HTML reports that we can use to monitor our progress... Regards, Dave From mark@klomp.org Thu Apr 6 13:05:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Thu, 06 Apr 2006 13:05:00 -0000 Subject: FYI: Add getClassLoader() check for bootstrap classes Message-ID: <1144328699.5497.60.camel@localhost.localdomain> Hi, I added the following test for a change I just checked into GNU Classpath. 2006-04-06 Mark Wielaard * gnu/testlet/java/lang/Class/security.java: Add check for no permissions when calling getClassLoader() on bootstrap class. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: security-bootstrap-loader.patch Type: text/x-patch Size: 1165 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From fitzsim@redhat.com Thu Apr 6 14:26:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Thu, 06 Apr 2006 14:26:00 -0000 Subject: New Harness, version 1 In-Reply-To: <4434DCC7.2010602@object-refinery.com> References: <1144268386.3903.189.camel@tony.toronto.redhat.com> <4434DCC7.2010602@object-refinery.com> Message-ID: <1144333610.2544.43.camel@ibm-t41-fitzsim> Hi, On Thu, 2006-04-06 at 10:17 +0100, David Gilbert wrote: > Anthony Balkissoon wrote: > > >Okay, the new Harness is checked in, please use it and comment on > >features you would like added. > > > >Running tests is now much easier, please use the harness script in the > >top folder. ./harness -help will print a help message, and the README > >file gives more detailed instructions, but it is very intuitive. Simply > >specify the tests or folders you want to run. > > > >"./harness javax.swing" will run all the tests in > >gnu.testlet.javax.swing. > > > >It is important to specify the VM you wish to use to run the tests. If > >you always (or almost always) run the Mauve tests using the same VM, you > >should export the environment variable MAUVEVM. For example, I have > >MAUVEVM=jamvm, so the above command would run all the javax.swing tests > >on JamVM. Alternately, you can use the -vm option (say, if you want to > >run against Sun to make sure the tests pass, or just for comparison): > > > >"./harness -vm PATH-TO-EXECUTABLE" javax.swing" > > > >This will override the MAUVEVM variable. If neither of these options is > >used, the tests will be run on the system "java" VM, whatever you have > >that set to. > > > >Comments are greatly appreciated. > > > > > > > Hi Anthony, > > I gave this a quick run - it's very nice! I really like how easy you've > made it to run all the tests for one class or package. > > I have a few comments: > > - is there an easy way to run all the tests? Maybe something like > "./harness gnu.testlet -vm jamvm"? Perhaps I missed something obvious, > but if this is possible then you could add it to the README. > > - compiling the code manually was straightforward, but perhaps it could > be done in one step with "make" or "ant", just to make it as simple as > possible? Agreed. I think we should have a configure script and Makefile because people expect those. I envision: ./configure --with-java=jamvm --with-javac=ecj make make check --with-java would specify the default VM to test and --with-javac would specify the build compiler. make would build the harness make check would run all the tests against the default VM (in other words, it would just run ./harness). Note that Anthony is going to have the harness compile tests, in which case make would only need to build the harness itself. > > - this runner ignores the tags in the tests (JDK1.0, JDK1.1, GUI etc.) > unless you use the -file option. Do you have any plans to add support > for the flags? I don't know how much it matters, as I get the feeling > that the tags are not used a lot. Yes, I think we should deprecate tags support. From what I hear tags were useful when testing embedded VMs on space-limited target boards and when use of reflection was disallowed. But reflection obsoletes the not-a-test tag, and modern compilers obsolete the Uses: lines. The GUI tag can be eliminated too since we can now -exclude java.awt and -exclude javax.swing. Likewise GNU-CRYPTO tagged tests can be specified by package instead. I don't know if we should actually remove the obsoleted tags, since they're harmless (thoughts?). I do think the we should keep and maintain the JDK version tags since they're useful in the same way that @since javadoc fields are. I would like to see the scripts and harnesses that use tags removed from HEAD since they'll only confuse new users -- everyone should use the same harness and we should focus all effort on improving and extending it. To proceed with that we must first fulfill libgcj's test harness requirements, which still relies on tag support. Tom From mike@middlesoft.co.uk Thu Apr 6 14:41:00 2006 From: mike@middlesoft.co.uk (Michael Barker) Date: Thu, 06 Apr 2006 14:41:00 -0000 Subject: RFC: Additional NIO tests. Message-ID: <1144333538.2955.21.camel@corona> Hi, Attached a couple of addtional tests for the NIO package. Regards, Michael Barker. -------------- next part -------------- A non-text attachment was scrubbed... Name: nio-non_blocking-scatter_gather_tests.patch Type: text/x-patch Size: 10985 bytes Desc: not available URL: From tromey@redhat.com Thu Apr 6 16:58:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Thu, 06 Apr 2006 16:58:00 -0000 Subject: RFC: Additional NIO tests. In-Reply-To: <1144333538.2955.21.camel@corona> References: <1144333538.2955.21.camel@corona> Message-ID: >>>>> "Michael" == Michael Barker writes: Michael> Attached a couple of addtional tests for the NIO package. Contact me in private email and we can set you up with an account. Michael> +/* mulitbufferIO.java -- FIXME: describe Michael> + Copyright (C) 2006 FIXME: your info here Michael> +// Tags: FIXME You've got to fill in the FIXME bits in the Eclipse-generate headers. The first one can be anything; or really you could just remove it, as the files are usually self-explanatory. The second is the copyright holder, either you or whatever entity you are working for. The third is typically the JDK release in which the class-to-be-tested was introduced, eg "JDK1.0" or "JDK1.5". Tom From david.gilbert@object-refinery.com Wed Apr 12 09:34:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 12 Apr 2006 09:34:00 -0000 Subject: FYI: Collections.unmodifiableMap() - new tests Message-ID: <443CC9E0.8000904@object-refinery.com> This patch (committed) adds some checks for the unmodifiableMap() method in the Collections class. Note that one check fails (modifying a Map.Entry in the array returned by map.entrySet().toArray() should throw an UnsupportedOperationException but doesn't) - I'll submit a bug report for that in a minute: 2006-04-12 David Gilbert * gnu/testlet/java/util/Collections/unmodifiableMap.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Apr 12 10:54:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 12 Apr 2006 10:54:00 -0000 Subject: FYI: some new BitSet tests Message-ID: <443CDC84.4050709@object-refinery.com> This patch (committed) adds a few extra tests for the BitSet class. There is one failure (in the get(int, int) method), I'll submit a bug report for it shortly. 2006-04-12 David Gilbert * gnu/testlet/java/util/BitSet/clear.java: New file, * gnu/testlet/java/util/BitSet/flip.java: New file, * gnu/testlet/java/util/BitSet/get.java: New file, * gnu/testlet/java/util/BitSet/Get.java: Merged with get.java. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From tromey@redhat.com Wed Apr 19 17:41:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Wed, 19 Apr 2006 17:41:00 -0000 Subject: Patch: FYI: test for PR 27189 Message-ID: I'm checking this in. This is a regression test for PR 27189. Tom 2006-04-19 Tom Tromey * gnu/testlet/java/text/SimpleDateFormat/regress.java (test): Added regression test for PR classpath/27189. Index: gnu/testlet/java/text/SimpleDateFormat/regress.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/SimpleDateFormat/regress.java,v retrieving revision 1.10 diff -u -r1.10 regress.java --- gnu/testlet/java/text/SimpleDateFormat/regress.java 25 Aug 2005 01:59:52 -0000 1.10 +++ gnu/testlet/java/text/SimpleDateFormat/regress.java 19 Apr 2006 17:41:14 -0000 @@ -114,6 +114,9 @@ } - + sdf = new SimpleDateFormat("yy-MM-dd HH:mm:ss Z"); + sdf.setTimeZone(TimeZone.getTimeZone("America/New_York")); + someTime = 1098968427000L; // 04-10-28 14:00:27 GMT + harness.check(sdf.format(new Date(someTime)), "04-10-28 09:00:27 -0400"); } } From olivier.jolly@pcedev.com Sun Apr 23 16:36:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Sun, 23 Apr 2006 16:36:00 -0000 Subject: FYI: tiny extra tests on unmodifiableMap linked to PR 27128 Message-ID: <444BACEB.1080105@pcedev.com> Hi, I added a little check to David tests on the mutability of a map via UnmodifiableMap.entrySet().toArray(Object[]). Cheers +Olivier 2006-04-23 Olivier Jolly * gnu/testlet/java/util/Collections/unmodifiableMap.java(testMap): Added regression test on UnmodifiableMap.entrySet().toArray(Object[]). -------------- next part -------------- A non-text attachment was scrubbed... Name: unmodifiableMapToArray2.patch Type: text/x-patch Size: 879 bytes Desc: not available URL: From abalkiss@redhat.com Mon Apr 24 20:23:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Mon, 24 Apr 2006 20:23:00 -0000 Subject: new Harness with compilation capabilities Message-ID: <1145910191.9046.19.camel@tony.toronto.redhat.com> This new version of the Harness has auto-compilation capabilities and also fixes a lot of bugs and performance issues that were present in the last one. Please read the README file and try the Harness out when running your Mauve tests. Here is a sample configuration, build, and run, using the auto-compilation feature, and using jamvm as the vm to be tested: 1) CONFIGURE: ./configure --enable-auto-compile --with-classpath-install-dir=/home/abalkiss/sources/classpath/install/share/classpath --with-vm=jamvm 2) BUILD: make 3) RUN: (JAVA) Harness javax.swing.JTable This will compile and run all of the tests in javax.swing.JTable on jamvm. You can switch the test vm easily using the -vm option: (JAVA) Harness javax.swing.JTable -vm /usr/lib/jvm/java-1.5.0/jre/bin/java will run the tests on the VM installed in the above location. The README is quite detailed and explains how to do many other things using the new Harness. Please file bug reports or email me if things aren't working as expected. Thanks. 2006-04-24 Anthony Balkissoon * .cvsignore: Added .ecjOut and .ecjErr. * configure.in: Added --with-vm, --enable-auto-compile, --with-classpath-install-dir, --with-ecj-jar options to support auto-compilation. * harness: Removed this unneeded wrapper script. * Harness.java: Rewritten to allow auto-compilation and faster test processing. * Makefile.am: Added Harness.java and RunnerProcess.java to harness_files, added new target 'harness' that compiles these files as well as gnu/testlet/config.java, and added target 'all-local' to make these compile by default. * Makefile.in: Regenerated. * README: Rewritten to include the new configure options, compilation options, and the new invocation style. * RunnerProcess.java: Fixed comments, formatting, and: (NOT-A-TEST-DESCRIPTION): Made this field private. (verbose): Made this field static. (debug): Likewise. (exceptions): Likewise. (report): Likewise. (xmlfile): Likewise. (RunnerProcess(boolean, boolean, boolean, TestReport)): Removed this unnecessary constructor. (RunnerProcess()): New constructor. * gnu/testlet/TestHarness.java: (getAutoCompile): New method. (getCpInstallDir): Likewise. (getEcjJar): Likewise. (getTestJava): Likewise. * gnu/testlet/config.java.in: (cpInstallDir): New field. (autoCompile): Likewise. (testJava): Likewise. (ecjJar): Likewise. (getCpInstallDir): New method. (getAutoCompile): Likewise. (getEcjJar): Likewise. (getTestJava): Likewise. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: patchSTRIPPED.diff Type: text/x-patch Size: 72030 bytes Desc: not available URL: From abalkiss@redhat.com Mon Apr 24 20:29:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Mon, 24 Apr 2006 20:29:00 -0000 Subject: new Harness with compilation capabilities In-Reply-To: <1145910191.9046.19.camel@tony.toronto.redhat.com> References: <1145910191.9046.19.camel@tony.toronto.redhat.com> Message-ID: <1145910556.9046.22.camel@tony.toronto.redhat.com> This spanned 3 commits (unfortunately) because I forgot to commit the Changelog, and didn't specify "harness" on the commit line and so it wasn't actually removed. --Tony On Mon, 2006-04-24 at 16:23 -0400, Anthony Balkissoon wrote: > This new version of the Harness has auto-compilation capabilities and > also fixes a lot of bugs and performance issues that were > present in the > last one. > > Please read the README file and try the Harness out when running > your > Mauve tests. > > Here is a sample configuration, build, and run, using the > auto-compilation feature, and using jamvm as the vm to be > tested: > > 1) CONFIGURE: > ./configure --enable-auto-compile > --with-classpath-install-dir=/home/abalkiss/sources/classpath/install/share/classpath --with-vm=jamvm > > 2) BUILD: > make > > 3) RUN: > (JAVA) Harness javax.swing.JTable > > This will compile and run all of the tests in javax.swing.JTable > on > jamvm. You can switch the test vm easily using the -vm option: > > (JAVA) Harness javax.swing.JTable > -vm /usr/lib/jvm/java-1.5.0/jre/bin/java will run the tests on > the VM > installed in the above location. The README is quite detailed > and > explains how to do many other things using the new Harness. > > Please file bug reports or email me if things aren't working as > expected. Thanks. > > > 2006-04-24 Anthony Balkissoon > > * .cvsignore: Added .ecjOut and .ecjErr. > * configure.in: Added --with-vm, --enable-auto-compile, > --with-classpath-install-dir, --with-ecj-jar options to > support > auto-compilation. > * harness: Removed this unneeded wrapper script. > * Harness.java: Rewritten to allow auto-compilation and > faster test > processing. > * Makefile.am: Added Harness.java and RunnerProcess.java > to > harness_files, added new target 'harness' that compiles > these files > as well as gnu/testlet/config.java, and added target > 'all-local' to > make these compile by default. > * Makefile.in: Regenerated. > * README: Rewritten to include the new configure > options, compilation > options, and the new invocation style. > * RunnerProcess.java: Fixed comments, formatting, and: > (NOT-A-TEST-DESCRIPTION): Made this field private. > (verbose): Made this field static. > (debug): Likewise. > (exceptions): Likewise. > (report): Likewise. > (xmlfile): Likewise. > (RunnerProcess(boolean, boolean, boolean, TestReport)): > Removed this > unnecessary constructor. > (RunnerProcess()): New constructor. > * gnu/testlet/TestHarness.java: > (getAutoCompile): New method. > (getCpInstallDir): Likewise. > (getEcjJar): Likewise. > (getTestJava): Likewise. > * gnu/testlet/config.java.in: > (cpInstallDir): New field. > (autoCompile): Likewise. > (testJava): Likewise. > (ecjJar): Likewise. > (getCpInstallDir): New method. > (getAutoCompile): Likewise. > (getEcjJar): Likewise. > (getTestJava): Likewise. > > --Tony From gbenson@redhat.com Tue Apr 25 12:21:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 25 Apr 2006 12:21:00 -0000 Subject: new Harness with compilation capabilities In-Reply-To: <1145910191.9046.19.camel@tony.toronto.redhat.com> References: <1145910191.9046.19.camel@tony.toronto.redhat.com> Message-ID: <20060425122051.GA5167@redhat.com> Anthony Balkissoon wrote: > This new version of the Harness has auto-compilation capabilities > and also fixes a lot of bugs and performance issues that were > present in the last one. This looks really nice, but I can't get it to run. I've applied the attached patch to make it build with 1.4 and I'm doing: ./configure --enable-auto-compile \ --with-classpath-install-dir=/home/users/gary/work/classpath/install \ --with-vm=jamvm I then do: CLASSPATH=`pwd` make (For some reason it doesn't find config.java without the extra bit). When I go to run some tests ecj is being invoked with -bootclasspath /home/users/gary/work/classpath/install/share/classpath and that directory contains the following: examples/ glibj.zip README tools/ tools.zip Am I building Classpath in some wierd way? Cheers, Gary -------------- next part -------------- Index: Harness.java =================================================================== RCS file: /cvs/mauve/mauve/Harness.java,v retrieving revision 1.2 diff -u -r1.2 Harness.java --- Harness.java 24 Apr 2006 19:42:02 -0000 1.2 +++ Harness.java 25 Apr 2006 12:12:02 -0000 @@ -28,6 +28,7 @@ import java.io.BufferedReader; import java.io.File; import java.io.FileNotFoundException; +import java.io.FileOutputStream; import java.io.FileReader; import java.io.IOException; import java.io.InputStreamReader; @@ -384,8 +385,8 @@ klass.getMethod ("compile", new Class[] { String.class, PrintWriter.class, PrintWriter.class }); - ecjWriterOut = new PrintWriter(".ecjOut"); - ecjWriterErr = new PrintWriter(".ecjErr"); + ecjWriterOut = new PrintWriter(new FileOutputStream(".ecjOut")); + ecjWriterErr = new PrintWriter(new FileOutputStream(".ecjErr")); // Set up the compiler options now that we know whether or not we are @@ -553,7 +554,7 @@ */ private static void initProcess(String[] args) { - StringBuilder sb = new StringBuilder(" RunnerProcess"); + StringBuffer sb = new StringBuffer(" RunnerProcess"); for (int i = 0; i < args.length; i++) sb.append(" " + args[i]); sb.insert(0, vmCommand); @@ -836,7 +837,7 @@ File dir = new File(folderName); String dirPath = dir.getPath(); File[] files = dir.listFiles(); - StringBuilder sb = new StringBuilder(); + StringBuffer sb = new StringBuffer(); String fullPath = null; boolean compilepassed = true; @@ -888,7 +889,7 @@ runFolder(sb, compilepassed); } - private static boolean compileFolder(StringBuilder sb, String folderName) + private static boolean compileFolder(StringBuffer sb, String folderName) { int result = - 1; int compileFailsInFolder = 0; @@ -1024,7 +1025,7 @@ * @param compilepassed true if the compilation step happened and all * tests passed or if compilation didn't happen (because of -nocompile). */ - private static void runFolder(StringBuilder sb, boolean compilepassed) + private static void runFolder(StringBuffer sb, boolean compilepassed) { StringTokenizer st = new StringTokenizer(sb.toString()); String nextTest = null; Index: RunnerProcess.java =================================================================== RCS file: /cvs/mauve/mauve/RunnerProcess.java,v retrieving revision 1.2 diff -u -r1.2 RunnerProcess.java --- RunnerProcess.java 24 Apr 2006 19:42:02 -0000 1.2 +++ RunnerProcess.java 25 Apr 2006 12:12:03 -0000 @@ -215,7 +215,7 @@ // we have to check through the file. while (firstLine != null) { - if (firstLine.contains("not-a-test")) + if (firstLine.indexOf("not-a-test") != -1) { description = NOT_A_TEST_DESCRIPTION; return; @@ -691,10 +691,10 @@ } // sb holds all the information we wish to return. - StringBuilder sb = - new StringBuilder(" " + (verbose ? "FAIL: " : "")+ "line " + lineOrigin - + ": " + (last_check == null ? "" : last_check) + - " [" + (count + 1) + "] -- uncaught exception:"); + StringBuffer sb = + new StringBuffer(" " + (verbose ? "FAIL: " : "")+ "line " + lineOrigin + + ": " + (last_check == null ? "" : last_check) + + " [" + (count + 1) + "] -- uncaught exception:"); // If a full stack trace will be printed, this method returns no details. if (exceptions) From abalkiss@redhat.com Tue Apr 25 15:58:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Tue, 25 Apr 2006 15:58:00 -0000 Subject: new Harness with compilation capabilities In-Reply-To: <20060425122051.GA5167@redhat.com> References: <1145910191.9046.19.camel@tony.toronto.redhat.com> <20060425122051.GA5167@redhat.com> Message-ID: <1145980726.9046.26.camel@tony.toronto.redhat.com> I will look into this right away. --Tony On Tue, 2006-04-25 at 13:20 +0100, Gary Benson wrote: > Anthony Balkissoon wrote: > > This new version of the Harness has auto-compilation capabilities > > and also fixes a lot of bugs and performance issues that were > > present in the last one. > > This looks really nice, but I can't get it to run. I've applied the > attached patch to make it build with 1.4 and I'm doing: > > ./configure --enable-auto-compile \ > --with-classpath-install-dir=/home/users/gary/work/classpath/install \ > --with-vm=jamvm > > I then do: > > CLASSPATH=`pwd` make > > (For some reason it doesn't find config.java without the extra bit). > When I go to run some tests ecj is being invoked with -bootclasspath > /home/users/gary/work/classpath/install/share/classpath and that > directory contains the following: > > examples/ glibj.zip README tools/ tools.zip > > Am I building Classpath in some wierd way? > > Cheers, > Gary From abalkiss@redhat.com Tue Apr 25 16:15:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Tue, 25 Apr 2006 16:15:00 -0000 Subject: new Harness with compilation capabilities (FIX inline) In-Reply-To: <1145980726.9046.26.camel@tony.toronto.redhat.com> References: <1145910191.9046.19.camel@tony.toronto.redhat.com> <20060425122051.GA5167@redhat.com> <1145980726.9046.26.camel@tony.toronto.redhat.com> Message-ID: <1145981730.9046.30.camel@tony.toronto.redhat.com> I have a fix for this issue ... but our servers are being funny and I cannot do a CVS diff right now ... but for some reason I can send email. If you want to fix it temporarily until I can commit a patch, in the file Harness.java replace the getClasspathInstallString() method with this one: /** * Get the bootclasspath from the configuration so it can be added * to the string passed to the compiler. * @return the bootclasspath for the compiler, in String format */ private static String getClasspathInstallString() { String temp = classpathInstallDir; if (temp == null) { temp = config.cpInstallDir; if (temp.equals("")) return temp; } temp = " -bootclasspath " + temp; if (!temp.endsWith(File.separator)) temp += File.separator; temp += "share" + File.separator + "classpath"; File f = new File (temp.substring(16) + File.separator + "glibj.zip"); if (f.exists()) temp += File.separator + "glibj.zip"; return temp; } This method adds "glibj.zip" onto the end of the bootclasspath. That wasn't necessary on my machine because I build with Eclipse and had the unpacked directories in there, so I overlooked it. My apologies. --Tony On Tue, 2006-04-25 at 11:58 -0400, Anthony Balkissoon wrote: > I will look into this right away. > > --Tony > > On Tue, 2006-04-25 at 13:20 +0100, Gary Benson wrote: > > Anthony Balkissoon wrote: > > > This new version of the Harness has auto-compilation capabilities > > > and also fixes a lot of bugs and performance issues that were > > > present in the last one. > > > > This looks really nice, but I can't get it to run. I've applied the > > attached patch to make it build with 1.4 and I'm doing: > > > > ./configure --enable-auto-compile \ > > --with-classpath-install-dir=/home/users/gary/work/classpath/install \ > > --with-vm=jamvm > > > > I then do: > > > > CLASSPATH=`pwd` make > > > > (For some reason it doesn't find config.java without the extra bit). > > When I go to run some tests ecj is being invoked with -bootclasspath > > /home/users/gary/work/classpath/install/share/classpath and that > > directory contains the following: > > > > examples/ glibj.zip README tools/ tools.zip > > > > Am I building Classpath in some wierd way? > > > > Cheers, > > Gary > From abalkiss@redhat.com Tue Apr 25 16:24:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Tue, 25 Apr 2006 16:24:00 -0000 Subject: new Harness with compilation capabilities (FIX inline) In-Reply-To: <1145981730.9046.30.camel@tony.toronto.redhat.com> References: <1145910191.9046.19.camel@tony.toronto.redhat.com> <20060425122051.GA5167@redhat.com> <1145980726.9046.26.camel@tony.toronto.redhat.com> <1145981730.9046.30.camel@tony.toronto.redhat.com> Message-ID: <1145982239.9046.33.camel@tony.toronto.redhat.com> > > On Tue, 2006-04-25 at 13:20 +0100, Gary Benson wrote: > > > Anthony Balkissoon wrote: > > > > This new version of the Harness has auto-compilation capabilities > > > > and also fixes a lot of bugs and performance issues that were > > > > present in the last one. > > > > > > This looks really nice, but I can't get it to run. I've applied the > > > attached patch to make it build with 1.4 and I'm doing: > > > > > > ./configure --enable-auto-compile \ > > > --with-classpath-install-dir=/home/users/gary/work/classpath/install \ > > > --with-vm=jamvm > > > > > > I then do: > > > > > > CLASSPATH=`pwd` make > > > > > > (For some reason it doesn't find config.java without the extra bit). > > > When I go to run some tests ecj is being invoked with -bootclasspath > > > /home/users/gary/work/classpath/install/share/classpath and that > > > directory contains the following: > > > > > > examples/ glibj.zip README tools/ tools.zip > > > > > > Am I building Classpath in some wierd way? > > > > > > Cheers, > > > Gary > > > Okay, the fix for this is committed, and I committed Gary's 1.4-compliant patch along with it, thank you Gary. 2006-04-24 Anthony Balkissoon * Harness.java: (setupCompiler): Changed ecjWriterOut and ecjWriterErr to use 1.4 PrintWriter constructors. (getClasspathInstallString): Add "glibj.zip" onto the end of the bootclasspath, if that file is present. (initProcess): Use StringBuffer instead of StringBuilder, so it compiles on older compilers. (compileFolder): Likewise. (runFolder): Likewise. * RunnerProcess.java: (runTest): Replaced String.contains() with String.indexOf() so it compiles on older compilers. (exceptionDetails): Replaced StringBuilder with StringBuffer so it compiles on older compilers. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: HarnessBootclasspathFix.diff Type: text/x-patch Size: 4025 bytes Desc: not available URL: From gbenson@redhat.com Wed Apr 26 09:58:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 26 Apr 2006 09:58:00 -0000 Subject: new Harness with compilation capabilities (FIX inline) In-Reply-To: <1145982239.9046.33.camel@tony.toronto.redhat.com> References: <1145910191.9046.19.camel@tony.toronto.redhat.com> <20060425122051.GA5167@redhat.com> <1145980726.9046.26.camel@tony.toronto.redhat.com> <1145981730.9046.30.camel@tony.toronto.redhat.com> <1145982239.9046.33.camel@tony.toronto.redhat.com> Message-ID: <20060426095829.GA12415@redhat.com> Anthony Balkissoon wrote: > Okay, the fix for this is committed, and I committed Gary's > 1.4-compliant patch along with it, thank you Gary. Thanks (and you're welcome!) This is really smooth, nice work! Cheers, Gary From abalkiss@redhat.com Wed Apr 26 18:14:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 26 Apr 2006 18:14:00 -0000 Subject: small Harness improvement .. auto-detect bootclasspath Message-ID: <1146075268.19760.6.camel@tony.toronto.redhat.com> Thanks to an idea by Tom Fitzsimmons, the Harness now auto-detects the bootclasspath for the compiler based on the VM that is used to run the tests. Because of this, auto-compilation can be enabled by default. The README is updated to reflect these changes. 2006-04-26 Anthony Balkissoon * Harness.java: (bcp_timeout): New field. (showCompilationErrors): Set to true by default. (setupHarness): Changed -showcompilefails option to -hidecompilefails since fails are shown by default now. Also changed -classpath-install-dir option to -bootclasspath to match the configure option. (getClasspathInstallString): If no bootclasspath was specified on the command line or in configure, then auto-detect it with the new method getBootClassPath. (getBootClassPath): New method. * README: Changed --with-classpath-install-dir to --with-bootclasspath, changed text to reflect the fact that auto-compilation is now enabeld by default. Added the -hidecompilefails option to the text. * configure: Regenerated. * configure.in: Changed --with-classpath-install-dir to --with-bootclasspath, changed auto-compilation to be enabled by default. * gnu/testlet/DetectBootclasspath.java: New file. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: HarnessAutoDetectBCPStripped.diff Type: text/x-patch Size: 17285 bytes Desc: not available URL: From abalkiss@redhat.com Wed Apr 26 18:41:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 26 Apr 2006 18:41:00 -0000 Subject: FYI: configure option name change Message-ID: <1146076895.19760.8.camel@tony.toronto.redhat.com> At Tom Fitzsimmon's request, the --enable-auto-compile option has been changed to --enable-auto-compilation. 2006-04-26 Anthony Balkissoon * Harness.java: Changed reference to --disable-auto-compile to --disable-auto-compilation. * configure: Regenerated. * configure.in: Changed --enabled-auto-compile option to --enable-auto-compilation. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: AutoCompileRename.diff Type: text/x-patch Size: 1746 bytes Desc: not available URL: From abalkiss@redhat.com Wed Apr 26 19:51:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 26 Apr 2006 19:51:00 -0000 Subject: FYI: small fixlet for harness to allow gij testing Message-ID: <1146081074.19760.14.camel@tony.toronto.redhat.com> gij didn't like the "/" in "gnu/testlet/DetectBootclasspath" so I changed it to ".". This patch also includes a bug fix where multiple compile errors in one test were being counted as multiple tests and multiple fails. 2006-04-26 Anthony Balkissoon * Harness.java: (getBootClassPath): Changed "/" to "." in exec command so it works with gij. (compileFolder): Count multiple compile errors for the same test as just one total test and one total fail, and print the FAIL header info only once. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: CompilerDoubleCountFix.diff Type: text/x-patch Size: 4732 bytes Desc: not available URL: From theBohemian@gmx.net Thu Apr 27 09:24:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Thu, 27 Apr 2006 09:24:00 -0000 Subject: FYI: javax.swing.text.Utilities.getTabbedTextOffset() test Message-ID: <44508C63.40203@gmx.net> Hi. Here is a new test which shows that something is wrong with our javax.swing.text.Utilities.getTabbedTextOffset() implementation. Since I committed before making a patch I attached the new file. The ChangeLog: 2006-04-27 Robert Schuster * gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java: New test. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: getTabbedTextOffset.java Type: text/x-java Size: 3606 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From theBohemian@gmx.net Thu Apr 27 10:33:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Thu, 27 Apr 2006 10:33:00 -0000 Subject: FYI: fix for Utilities.getTabbedTextOffset test Message-ID: <44509CAB.7090303@gmx.net> Hi, the attached changes the Utilities.getTabbedTextOffset test. I got confused about the meaning of the methods arguments and made it dependent on the length of the text. However the argument in question is a coordinate and has nothing to do with the length. I added a note and changed the argument. 2006-04-27 Robert Schuster * gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java: (test): Use fixed value to end loop. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-utilities.diff Type: text/x-patch Size: 1241 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From theBohemian@gmx.net Thu Apr 27 16:29:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Thu, 27 Apr 2006 16:29:00 -0000 Subject: FYI: fix for Utilities.getTabbedTextOffset test In-Reply-To: <44509CAB.7090303@gmx.net> References: <44509CAB.7090303@gmx.net> Message-ID: <4450F07C.9090904@gmx.net> I forgot to commit this and will do it together with another patch. Robert Schuster wrote: > Hi, > the attached changes the Utilities.getTabbedTextOffset test. I got confused > about the meaning of the methods arguments and made it dependent on the length > of the text. However the argument in question is a coordinate and has nothing to > do with the length. I added a note and changed the argument. > > 2006-04-27 Robert Schuster > > * gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java: > (test): Use fixed value to end loop. > > cya > Robert > > > ------------------------------------------------------------------------ > > Index: gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java > =================================================================== > RCS file: /cvs/mauve/mauve/gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java,v > retrieving revision 1.1 > diff -u -r1.1 getTabbedTextOffset.java > --- gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java 27 Apr 2006 09:21:15 -0000 1.1 > +++ gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java 27 Apr 2006 10:20:52 -0000 > @@ -51,17 +51,19 @@ > */ > public void test(TestHarness harness) > { > + // The x value that has to be reached before getTabbedTextOffset stops. > + int endX = 50; > > harness.checkPoint("without rounding"); > - for (int i=0; i < s.count; i++) > + for (int i=0; i <= endX; i++) > harness.check(calculate(i, false), expectWithoutRounding(i)); > > harness.checkPoint("with rounding"); > - for (int i=0; i < s.count; i++) > + for (int i=0; i <= endX; i++) > harness.check(calculate(i, true), expectWithRounding(i)); > > harness.checkPoint("with rounding (implicit)"); > - for (int i=0; i < s.count; i++) > + for (int i=0; i <= endX; i++) > harness.check(calculate(i), expectWithRounding(i)); > > } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From theBohemian@gmx.net Thu Apr 27 16:31:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Thu, 27 Apr 2006 16:31:00 -0000 Subject: FYI: fix for Utilities.getTabbedTextOffset test and new test Message-ID: <4450F0D1.5050103@gmx.net> Hi, the attached changes the Utilities.getTabbedTextOffset test. I got confused about the meaning of the methods arguments and made it dependent on the length of the text. However the argument in question is a coordinate and has nothing to do with the length. I added a note and changed the argument. Additionally this patch contains a new test which I used to find out errors in our javax.swing.text.Utilities.getNextWord() implementation. 2006-04-27 Robert Schuster * gnu/testlet/javax/swing/text/Utilities/getNextWord.java: New test. * gnu/testlet/javax/swing/text/Utilities/getTabbedTextOffset.java: (test): Use fixed value to end loop. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-utilities2.diff Type: text/x-patch Size: 5084 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From olivier.jolly@pcedev.com Mon May 1 00:05:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Mon, 01 May 2006 00:05:00 -0000 Subject: FYI: PR27343 (lack of side effect in Calandar.setTimeZone) regression test Message-ID: <445550CD.4080102@pcedev.com> Hi, I committed this patch, based on the junit test proposed on bugzilla by KiYun Roe, to ensure non regression on this problem. Cheers +Olivier 2006-05-01 Olivier Jolly * gnu/testlet/java/util/Calendar/TimeZone.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: pr27343.patch Type: text/x-patch Size: 2105 bytes Desc: not available URL: From olivier.jolly@pcedev.com Mon May 1 14:38:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Mon, 01 May 2006 14:38:00 -0000 Subject: FYI: PR27343 compilation fix In-Reply-To: <445550CD.4080102@pcedev.com> References: <445550CD.4080102@pcedev.com> Message-ID: <44561D51.7010007@pcedev.com> Hi, I broke compilation of a few test with my latest testcase creation named TimeZone. I've committed this patch to restore the compilability. +Olivier 2006-05-01 Olivier Jolly * gnu/testlet/java/util/Calendar/add.java: (test): Fixed compilation error introduced by the addition of the TimeZone test. * gnu/testlet/java/util/Calendar/minmax.java: (test): Fixed compilation error introduced by the addition of the TimeZone test. * gnu/testlet/java/util/Calendar/roll.java: (test): Fixed compilation error introduced by the addition of the TimeZone test. -------------- next part -------------- A non-text attachment was scrubbed... Name: pr27343_compilation_fix.patch Type: text/x-patch Size: 2057 bytes Desc: not available URL: From theBohemian@gmx.net Wed May 3 00:17:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Wed, 03 May 2006 00:17:00 -0000 Subject: FYI: small fixes for GapContent tests Message-ID: <4457F4BF.2030905@gmx.net> Hi, the attached patch makes the GapContent tests more robust against unwanted exceptions and adds a note about a specific behavior which can only be seen in version >=1.5 of the RI. ChangeLog: 2006-05-03 Robert Schuster * gnu/testlet/javax/swing/text/GapContent/constructors.java: (testConstructor2): Put checks into try-catch block. added a second length check. * gnu/testlet/javax/swing/text/GapContent/insertString.java: (testGeneral): Added note. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-gapcontent.diff Type: text/x-patch Size: 2254 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From adac.onlus@tin.it Thu May 4 09:10:00 2006 From: adac.onlus@tin.it (Photoshop) Date: Thu, 04 May 2006 09:10:00 -0000 Subject: photoshop e AutoCAD Message-ID: <541110.GYPTBPBC@tin.it> Corso di photoshop il corso di Photoshop inizia 4/05/2006 posti disponibili 4 http://www.associazioneadac.com/photoshop.html corso di AutoCAD inizio 9/05/2006 2D posti disponibili 4 http://www.associazioneadac.com/cad2d.html corsi di inglese 1? e 2? Livello http://www.associazioneadac.com/inglese.html corso di Arabo inizia il 15/05/2006 http://www.associazioneadac.com/arabo.html cordiali saluti per informazioni ed iscrizioni dal luned? al gioved? ore 17.30 - 21.45 041/5241422 info@associazioneadac.com C/O ESU DI VENEZIA, CALLE LARGA FOSCARI, PALAZZO DEI POMPIERI, 1? PIANO PRESSO IL CENTRO POLIVALENTE AGOSTINO NARDOCCI www.associazioneadac.com From adac.onlus@tin.it Thu May 4 09:11:00 2006 From: adac.onlus@tin.it (Photoshop) Date: Thu, 04 May 2006 09:11:00 -0000 Subject: photoshop e AutoCAD Message-ID: <541111.QXATBXMR@tin.it> Corso di photoshop il corso di Photoshop inizia 4/05/2006 posti disponibili 4 http://www.associazioneadac.com/photoshop.html corso di AutoCAD inizio 9/05/2006 2D posti disponibili 4 http://www.associazioneadac.com/cad2d.html corsi di inglese 1? e 2? Livello http://www.associazioneadac.com/inglese.html corso di Arabo inizia il 15/05/2006 http://www.associazioneadac.com/arabo.html al piu presto saranno comunicate le Date dei corsi estivi cordiali saluti per informazioni ed iscrizioni dal luned? al gioved? ore 17.30 - 21.45 041/5241422 info@associazioneadac.com C/O ESU DI VENEZIA, CALLE LARGA FOSCARI, PALAZZO DEI POMPIERI, 1? PIANO PRESSO IL CENTRO POLIVALENTE AGOSTINO NARDOCCI www.associazioneadac.com From gbenson@redhat.com Thu May 4 14:59:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 04 May 2006 14:59:00 -0000 Subject: FYI: Updated java.lang.Thread throwpoint tests Message-ID: <20060504145917.GD5193@redhat.com> Hi all, My previous commit fixes a number of problems with the Thread throwpoint tests. Firstly, they failed big-time on proprietary runtimes: seems that Classpath's default SecurityManager's checkAccess() methods perform permission checks in more cases than is necessary. Secondly, some constructor throwpoints were not tested. It turns out they aren't working either, so this commit causes four new fails. My next task is to fix all this :) Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1604 diff -u -r1.1604 ChangeLog --- ChangeLog 3 May 2006 00:13:37 -0000 1.1604 +++ ChangeLog 4 May 2006 14:37:33 -0000 @@ -1,3 +1,9 @@ +2006-05-04 Gary Benson + + * gnu/testlet/java/lang/Thread/security.java: Added some missing + constructor tests, and rearranged to work with class libraries + other than Classpath. + 2006-05-03 Robert Schuster * gnu/testlet/javax/swing/text/GapContent/constructors.java: Index: gnu/testlet/java/lang/Thread/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Thread/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/lang/Thread/security.java 17 Feb 2006 13:11:14 -0000 1.2 +++ gnu/testlet/java/lang/Thread/security.java 4 May 2006 14:37:33 -0000 @@ -32,13 +32,17 @@ public class security implements Testlet { + private static Permission[] modifyThread = new Permission[] { + new RuntimePermission("modifyThread")}; + + private static Permission[] modifyThreadGroup = new Permission[] { + new RuntimePermission("modifyThreadGroup")}; + public void test(TestHarness harness) { try { harness.checkPoint("setup"); - Thread testThread = new Thread(); - // we need a different classloader for some of the checks to occur. Class testClass = new URLClassLoader(new URL[] { new File(harness.getSourceDirectory()).toURL()}, null).loadClass( @@ -48,11 +52,30 @@ Method getContextClassLoaderTest = testClass.getMethod( "testGetContextClassLoader", new Class[] {Thread.class}); - Thread currentThread = Thread.currentThread(); + TestSecurityManager2 sm = new TestSecurityManager2(harness); + + // The default SecurityManager.checkAccess(Thread) method only + // checks permissions when the thread in question is a system + // thread. System threads are those whose parent is the system + // threadgroup, which is the threadgroup with no parent. + // + // The default SecurityManager.checkAccess(ThreadGroup) method + // only checks permissions when the threadgroup in question is + // the system threadgroup. + ThreadGroup systemGroup = Thread.currentThread().getThreadGroup(); + while (systemGroup.getParent() != null) + systemGroup = systemGroup.getParent(); + + Thread testThread = new Thread(systemGroup, "test thread"); + harness.check(testThread.getThreadGroup().getParent() == null); + + Thread modifyGroupThread = new Thread( + systemGroup, new SysTestRunner(harness, sm, testThread)); + harness.check(modifyGroupThread.getThreadGroup().getParent() == null); + Throwable threadDeath = new ThreadDeath(); Throwable notThreadDeath = new ClassNotFoundException(); - ThreadGroup group = new ThreadGroup("test group"); Runnable runnable = new Runnable() { public void run() @@ -66,17 +89,17 @@ Permission[] setContextClassLoader = new Permission[] { new RuntimePermission("setContextClassLoader")}; - Permission[] modifyThread = new Permission[] { - new RuntimePermission("modifyThread")}; - Permission[] stopThread = new Permission[] { new RuntimePermission("modifyThread"), new RuntimePermission("stopThread")}; - Permission[] modifyThreadGroup = new Permission[] { - new RuntimePermission("modifyThreadGroup")}; + // XXX Thread.stop() tests only work on Classpath + // XXX The checks don't happen otherwise, so calls + // XXX to Thread.currentThread().stop() actually + // XXX happen :( So, we inhibit this. + boolean we_are_gnu_classpath = + System.getProperty("gnu.classpath.version") != null; - TestSecurityManager2 sm = new TestSecurityManager2(harness); try { sm.install(); @@ -189,18 +212,6 @@ harness.debug(ex); harness.check(false, "unexpected check"); } - - // throwpoint: java.lang.Thread-enumerate - harness.checkPoint("enumerate"); - try { - sm.prepareChecks(modifyThreadGroup); - Thread.enumerate(new Thread[0]); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } // throwpoint: java.lang.Thread-stop() harness.checkPoint("stop()"); @@ -216,7 +227,8 @@ try { sm.prepareChecks(modifyThread, true); - currentThread.stop(); + if (we_are_gnu_classpath) + Thread.currentThread().stop(); harness.check(false, "shouldn't be reached"); } catch (SecurityException ex) { @@ -253,7 +265,8 @@ try { sm.prepareChecks(modifyThread, true); - currentThread.stop(threadDeath); + if (we_are_gnu_classpath) + Thread.currentThread().stop(threadDeath); harness.check(false, "shouldn't be reached"); } catch (SecurityException ex) { @@ -268,7 +281,8 @@ try { sm.prepareChecks(stopThread, true); - currentThread.stop(notThreadDeath); + if (we_are_gnu_classpath) + Thread.currentThread().stop(notThreadDeath); harness.check(false, "shouldn't be reached"); } catch (SecurityException ex) { @@ -281,6 +295,10 @@ } } + // The modifyThreadGroup tests get run in a system thread. + modifyGroupThread.start(); + modifyGroupThread.join(); + // throwpoint: java.lang.Thread-Thread(ThreadGroup, Runnable) // throwpoint: java.lang.Thread-Thread(ThreadGroup, Runnable, String) // throwpoint: java.lang.Thread-Thread(ThreadGroup, Runnable, String, long) @@ -288,19 +306,19 @@ harness.checkPoint("ThreadGroup constructors"); for (int i = 1; i <= 4; i++) { try { - sm.prepareChecks(modifyThreadGroup); + sm.prepareChecks(modifyThreadGroup, modifyThread); switch (i) { case 1: - new Thread(group, runnable); + new Thread(systemGroup, runnable); break; case 2: - new Thread(group, runnable, "test thread"); + new Thread(systemGroup, runnable, "test thread"); break; case 3: - new Thread(group, runnable, "test thread", 1024); + new Thread(systemGroup, runnable, "test thread", 1024); break; case 4: - new Thread(group, "test thread"); + new Thread(systemGroup, "test thread"); break; } sm.checkAllChecked(harness); @@ -326,4 +344,81 @@ { t.getContextClassLoader(); } + + // Stuff for the modifyThreadGroup tests + public static class SysTestRunner implements Runnable + { + private TestHarness harness; + private TestSecurityManager2 sm; + private Thread testThread; + + private static Runnable runnable = new Runnable() + { + public void run() + { + } + }; + + public SysTestRunner(TestHarness harness, + TestSecurityManager2 sm, + Thread testThread) + { + this.harness = harness; + this.sm = sm; + this.testThread = testThread; + } + + public void run() + { + try { + Thread thisThread = Thread.currentThread(); + + // throwpoint: java.lang.Thread-enumerate + harness.checkPoint("enumerate"); + try { + sm.prepareChecks(modifyThreadGroup); + Thread.enumerate(new Thread[0]); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.Thread-Thread() + // throwpoint: java.lang.Thread-Thread(Runnable) + // throwpoint: java.lang.Thread-Thread(String) + // throwpoint: java.lang.Thread-Thread(Runnable, String) + harness.checkPoint("basic constructors"); + for (int i = 1; i <= 4; i++) { + try { + sm.prepareChecks(modifyThreadGroup, modifyThread); + switch (i) { + case 1: + new Thread(); + break; + case 2: + new Thread(runnable); + break; + case 3: + new Thread("test thread"); + break; + case 4: + new Thread(runnable, "test thread"); + break; + } + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + } } From gbenson@redhat.com Fri May 5 12:28:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 05 May 2006 12:28:00 -0000 Subject: FYI: Updated java.lang.ThreadGroup throwpoint tests Message-ID: <20060505122838.GC5185@redhat.com> Hi all, This commit fixes similar problems with java.lang.ThreadGroup's throwpoint tests to the problems with the Thread throwpoint checks I committed the other day. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1605 diff -u -r1.1605 ChangeLog --- ChangeLog 4 May 2006 14:48:19 -0000 1.1605 +++ ChangeLog 5 May 2006 12:26:00 -0000 @@ -1,3 +1,8 @@ +2006-05-05 Gary Benson + + * gnu/testlet/java/lang/ThreadGroup/security.java: Rearranged to + work with class libraries other than Classpath. + 2006-05-04 Gary Benson * gnu/testlet/java/lang/Thread/security.java: Added some missing Index: gnu/testlet/java/lang/ThreadGroup/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/ThreadGroup/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/lang/ThreadGroup/security.java 20 Feb 2006 11:56:05 -0000 1.1 +++ gnu/testlet/java/lang/ThreadGroup/security.java 5 May 2006 12:26:00 -0000 @@ -33,217 +33,298 @@ try { harness.checkPoint("setup"); - ThreadGroup testGroup = Thread.currentThread().getThreadGroup(); - if (testGroup.getParent() == null) - testGroup = new ThreadGroup(testGroup, "test group"); - harness.check(testGroup.getParent() != null); - - Permission[] modifyThreadGroup = new Permission[] { - new RuntimePermission("modifyThreadGroup")}; - - Permission[] modifyThread = new Permission[] { - new RuntimePermission("modifyThread")}; - - Permission[] stopThread = new Permission[] { - new RuntimePermission("modifyThread"), - new RuntimePermission("stopThread")}; + // The default SecurityManager.checkAccess(ThreadGroup) method + // only checks permissions when the threadgroup in question is + // the system threadgroup, which is defined as the threadgroup + // with no parent. + + ThreadGroup systemGroup = Thread.currentThread().getThreadGroup(); + while (systemGroup.getParent() != null) + systemGroup = systemGroup.getParent(); - TestSecurityManager2 sm = new TestSecurityManager2(harness); + Thread testThread = new Thread(systemGroup, new TestRunner(harness)); + + testThread.start(); + testThread.join(); + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + public static class TestRunner implements Runnable + { + private TestHarness harness; + + public TestRunner(TestHarness harness) + { + this.harness = harness; + } + + public void run() + { try { - sm.install(); + ThreadGroup testGroup = Thread.currentThread().getThreadGroup(); + harness.check(testGroup.getParent() == null); - // throwpoint: java.lang.ThreadGroup-ThreadGroup(String) - harness.checkPoint("ThreadGroup(String)"); - try { - sm.prepareChecks(modifyThreadGroup); - new ThreadGroup("test"); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + ThreadGroup nonSystemGroup = new ThreadGroup(testGroup, "test group"); + harness.check(nonSystemGroup.getParent() != null); - // throwpoint: java.lang.ThreadGroup-ThreadGroup(ThreadGroup, String) - harness.checkPoint("ThreadGroup(ThreadGroup, String)"); - try { - sm.prepareChecks(modifyThreadGroup); - new ThreadGroup(testGroup, "test"); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + Permission[] modifyThreadGroup = new Permission[] { + new RuntimePermission("modifyThreadGroup")}; - // throwpoint: java.lang.ThreadGroup-checkAccess - harness.checkPoint("checkAccess"); - try { - sm.prepareChecks(modifyThreadGroup); - testGroup.checkAccess(); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + Permission[] modifyThread = new Permission[] { + new RuntimePermission("modifyThread")}; + + Permission[] stopThread = new Permission[] { + new RuntimePermission("modifyThread"), + new RuntimePermission("stopThread")}; - // throwpoint: java.lang.ThreadGroup-enumerate(Thread[]) - harness.checkPoint("enumerate(Thread[])"); + TestSecurityManager2 sm = new TestSecurityManager2(harness); try { - sm.prepareChecks(modifyThreadGroup); - testGroup.enumerate(new Thread[0]); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + sm.install(); - // throwpoint: java.lang.ThreadGroup-enumerate(Thread[], boolean) - harness.checkPoint("enumerate(Thread[], boolean)"); - for (int i = 0; i <= 1; i++) { + // throwpoint: java.lang.ThreadGroup-ThreadGroup(String) + harness.checkPoint("ThreadGroup(String)"); + try { + sm.prepareChecks(modifyThreadGroup); + new ThreadGroup("test"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-ThreadGroup(ThreadGroup, String) + harness.checkPoint("ThreadGroup(ThreadGroup, String)"); try { sm.prepareChecks(modifyThreadGroup); - testGroup.enumerate(new Thread[0], i == 1); + new ThreadGroup(testGroup, "test"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-checkAccess + harness.checkPoint("checkAccess"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.checkAccess(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.lang.ThreadGroup-enumerate(Thread[]) + harness.checkPoint("enumerate(Thread[])"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.enumerate(new Thread[0]); sm.checkAllChecked(harness); } catch (SecurityException ex) { harness.debug(ex); harness.check(false, "unexpected check"); } - } - // throwpoint: java.lang.ThreadGroup-enumerate(ThreadGroup[]) - harness.checkPoint("enumerate(ThreadGroup[])"); - try { - sm.prepareChecks(modifyThreadGroup); - testGroup.enumerate(new ThreadGroup[0]); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + // throwpoint: java.lang.ThreadGroup-enumerate(Thread[], boolean) + harness.checkPoint("enumerate(Thread[], boolean)"); + for (int i = 0; i <= 1; i++) { + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.enumerate(new Thread[0], i == 1); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } - // throwpoint: java.lang.ThreadGroup-enumerate(ThreadGroup[], boolean) - harness.checkPoint("enumerate(ThreadGroup[], boolean)"); - for (int i = 0; i <= 1; i++) { + // throwpoint: java.lang.ThreadGroup-enumerate(ThreadGroup[]) + harness.checkPoint("enumerate(ThreadGroup[])"); try { sm.prepareChecks(modifyThreadGroup); - testGroup.enumerate(new ThreadGroup[0], i == 1); + testGroup.enumerate(new ThreadGroup[0]); sm.checkAllChecked(harness); } catch (SecurityException ex) { harness.debug(ex); harness.check(false, "unexpected check"); } - } - // throwpoint: java.lang.ThreadGroup-getParent - harness.checkPoint("getParent"); - try { - sm.prepareChecks(modifyThreadGroup); - testGroup.getParent(); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + // throwpoint: java.lang.ThreadGroup-enumerate(ThreadGroup[], boolean) + harness.checkPoint("enumerate(ThreadGroup[], boolean)"); + for (int i = 0; i <= 1; i++) { + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.enumerate(new ThreadGroup[0], i == 1); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.lang.ThreadGroup-getParent + harness.checkPoint("getParent"); + try { + sm.prepareChecks(modifyThreadGroup); + nonSystemGroup.getParent(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } - // throwpoint: java.lang.ThreadGroup-setDaemon - harness.checkPoint("setDaemon"); - try { - sm.prepareChecks(modifyThreadGroup); - testGroup.setDaemon(false); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + // throwpoint: java.lang.ThreadGroup-setDaemon + harness.checkPoint("setDaemon"); + try { + sm.prepareChecks(modifyThreadGroup); + testGroup.setDaemon(false); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } - // throwpoint: java.lang.ThreadGroup-setMaxPriority - harness.checkPoint("setMaxPriority"); - try { - int priority = testGroup.getMaxPriority(); - sm.prepareChecks(modifyThreadGroup); - testGroup.setMaxPriority(priority); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + // throwpoint: java.lang.ThreadGroup-setMaxPriority + harness.checkPoint("setMaxPriority"); + try { + int priority = testGroup.getMaxPriority(); + sm.prepareChecks(modifyThreadGroup); + testGroup.setMaxPriority(priority); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } - // throwpoint: java.lang.ThreadGroup-suspend - harness.checkPoint("suspend"); - try { - sm.prepareChecks(modifyThreadGroup); - testGroup.suspend(); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + // throwpoint: java.lang.ThreadGroup-suspend + harness.checkPoint("suspend"); + try { + sm.prepareChecks(modifyThreadGroup, modifyThread, true); + testGroup.suspend(); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } - // throwpoint: java.lang.ThreadGroup-resume - harness.checkPoint("resume"); - try { - sm.prepareChecks(modifyThreadGroup); - testGroup.resume(); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + // throwpoint: java.lang.ThreadGroup-resume + harness.checkPoint("resume"); + try { + sm.prepareChecks(modifyThreadGroup, modifyThread, true); + testGroup.resume(); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } - // throwpoint: java.lang.ThreadGroup-destroy - harness.checkPoint("destroy"); - try { - sm.prepareChecks(modifyThreadGroup); - testGroup.destroy(); - sm.checkAllChecked(harness); - } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + // throwpoint: TODO: java.lang.ThreadGroup-destroy + // XXX I'm not sure you can test for this one. It's an + // XXX error to call this on a non-empty threadgroup, but + // XXX the check only happens for the system group which + // XXX will not be empty. - // throwpoint: java.lang.ThreadGroup-interrupt - harness.checkPoint("interrupt"); - try { - sm.prepareChecks(modifyThreadGroup, modifyThread); - testGroup.interrupt(); - sm.checkAllChecked(harness); + // throwpoint: java.lang.ThreadGroup-interrupt + harness.checkPoint("interrupt"); + try { + sm.prepareChecks(modifyThreadGroup, modifyThread, true); + testGroup.interrupt(); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.lang.ThreadGroup-stop + harness.checkPoint("stop"); + try { + sm.prepareChecks(modifyThreadGroup, stopThread, true); + testGroup.stop(); + harness.check(false, "shouldn't be reached"); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); + finally { + sm.uninstall(); } - // throwpoint: java.lang.ThreadGroup-stop - harness.checkPoint("stop"); + sm = new SpecialSecurityManager(harness); try { - sm.prepareChecks(modifyThreadGroup, stopThread); - testGroup.stop(); - sm.checkAllChecked(harness); + sm.install(); + + // throwpoint: java.lang.ThreadGroup-destroy + harness.checkPoint("destroy"); + try { + sm.prepareChecks(modifyThreadGroup); + nonSystemGroup.destroy(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } } - catch (SecurityException ex) { - harness.debug(ex); - harness.check(false, "unexpected check"); + finally { + sm.uninstall(); } } - finally { - sm.uninstall(); + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); } } - catch (Throwable ex) { - harness.debug(ex); - harness.check(false, "Unexpected exception"); + } + + public static class SpecialSecurityManager extends TestSecurityManager2 + { + public SpecialSecurityManager(TestHarness harness) + { + super(harness); + } + + public void checkAccess(ThreadGroup g) + { + checkPermission(new RuntimePermission("modifyThreadGroup")); } } } From olivier.jolly@pcedev.com Sat May 6 15:43:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Sat, 06 May 2006 15:43:00 -0000 Subject: FYI: PR27362 regression test about Calendar.clear(int) swallowing pending changes Message-ID: <445CC422.9030406@pcedev.com> Hi, here is a regression test about Calendar.clear(int) which currently swallow pending changes on a dirty calendar. It is related to PR 27362 +Olivier 2006-05-06 Olivier Jolly * gnu/testlet/java/util/Calendar/add.java: (test): Added call to the new test. (testPreviousDate): Regression test for PR27362, which ensures that Calendar.clear(int) doesn't swallow previous calendar changes. -------------- next part -------------- A non-text attachment was scrubbed... Name: pr27362.patch Type: text/x-patch Size: 1568 bytes Desc: not available URL: From gnu_andrew@member.fsf.org Sun May 7 21:06:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sun, 07 May 2006 21:06:00 -0000 Subject: FYI: PR#27311 test Message-ID: <20060507210548.GA6689@localhost.localdomain> The attached test checks for the bug mentioned in PR#27311. Changelog: 2006-05-07 Andrew John Hughes * gnu/testlet/java/text/DecimalFormat/PR27311.java: Test for the bug in PR#27311. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- Index: gnu/testlet/java/text/DecimalFormat/PR27311.java =================================================================== RCS file: gnu/testlet/java/text/DecimalFormat/PR27311.java diff -N gnu/testlet/java/text/DecimalFormat/PR27311.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/text/DecimalFormat/PR27311.java 7 May 2006 19:48:52 -0000 @@ -0,0 +1,53 @@ +// Tags: JDK1.2 + +// Copyright (C) 2006 Andrew John Hughes + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. */ + +package gnu.testlet.java.text.DecimalFormat; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import java.text.DecimalFormat; +import java.text.DecimalFormatSymbols; +import java.util.Locale; + +/* + * This test is based on PR27311, where + * formatting 0.0E00 using the format 0.0#####E0 + * produced 0.0E--9223372036854775808. This was down + * to incorrect use of the logarithm function in + * calculating the exponent. The log of 0 is negative + * infinity, which explains the bizarre output. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + */ +public class PR27311 + implements Testlet +{ + public void test(TestHarness harness) + { + DecimalFormatSymbols dfs = new DecimalFormatSymbols(Locale.ENGLISH); + DecimalFormat nf = new DecimalFormat("0.0#####E00", dfs); + nf.setGroupingUsed(false); + String result = nf.format(0.0E00); + harness.check(result.equals("0.0E00"),result); + } +} + -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From sven@physto.se Sun May 7 22:45:00 2006 From: sven@physto.se (Sven de Marothy) Date: Sun, 07 May 2006 22:45:00 -0000 Subject: PR#27343 test Message-ID: <1147041755.20166.5.camel@qcplx01.physto.se> Please check this in, someone. /Sven -------------- next part -------------- A non-text attachment was scrubbed... Name: setTimeZone.java Type: text/x-java Size: 1456 bytes Desc: not available URL: From gnu_andrew@member.fsf.org Sun May 7 22:52:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sun, 07 May 2006 22:52:00 -0000 Subject: FYI: Mauve patch to test for bug #27435 Message-ID: <20060507225234.GA10541@localhost.localdomain> 2006-05-07 Andrew John Hughes * gnu/testlet/java/util/zip/Deflater/PR27435.java: Test for the bug in PR#27435. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- Index: gnu/testlet/java/util/zip/Deflater/PR27435.java =================================================================== RCS file: gnu/testlet/java/util/zip/Deflater/PR27435.java diff -N gnu/testlet/java/util/zip/Deflater/PR27435.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/util/zip/Deflater/PR27435.java 7 May 2006 22:49:22 -0000 @@ -0,0 +1,61 @@ +// Tags: JDK1.2 + +// Copyright (C) 2006 Andrew John Hughes + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. */ + +package gnu.testlet.java.util.zip.Deflater; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import java.util.zip.Deflater; + +/* + * This test is based on PR27435, which reported + * an ArrayOutOfBoundsException when using the DeflateFast + * method. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + */ +public class PR27435 + implements Testlet +{ + /** + * Buffer must be big enough to go over the internal + * buffer size of 16384. Currently somewhere above + * 1024*1024*4. + */ + public static final int BUFFER_SIZE = 1024*1024*5; + + public void test(TestHarness harness) + { + byte[] inputBytes = new byte[BUFFER_SIZE]; + byte[] compressedData = new byte[BUFFER_SIZE]; + + /* Fill array with bytes */ + for (int a = 0; a < inputBytes.length; ++a) + inputBytes[a] = 1; + + Deflater deflater = new Deflater(Deflater.BEST_SPEED); + deflater.setInput(inputBytes); + deflater.finish(); + deflater.deflate(compressedData); + harness.check(true); + } +} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From gnu_andrew@member.fsf.org Sun May 7 23:01:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sun, 07 May 2006 23:01:00 -0000 Subject: PR#27343 test In-Reply-To: <1147041755.20166.5.camel@qcplx01.physto.se> References: <1147041755.20166.5.camel@qcplx01.physto.se> Message-ID: <1147042911.7340.64.camel@localhost.localdomain> On Mon, 2006-05-08 at 00:42 +0200, Sven de Marothy wrote: > Please check this in, someone. > > /Sven Committed. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From olivier.jolly@pcedev.com Mon May 8 12:37:00 2006 From: olivier.jolly@pcedev.com (Olivier Jolly) Date: Mon, 08 May 2006 12:37:00 -0000 Subject: PR#27343 test In-Reply-To: <1147042911.7340.64.camel@localhost.localdomain> References: <1147041755.20166.5.camel@qcplx01.physto.se> <1147042911.7340.64.camel@localhost.localdomain> Message-ID: <445F3B81.3090009@pcedev.com> Andrew John Hughes wrote: > On Mon, 2006-05-08 at 00:42 +0200, Sven de Marothy wrote: > >> Please check this in, someone. >> >> /Sven >> > > Committed. > For info, I had committed the very same testcase last week in gnu/testlet/java/util/Calendar/TimeZone.java +Olivier From sven@physto.se Mon May 8 16:23:00 2006 From: sven@physto.se (Sven de Marothy) Date: Mon, 08 May 2006 16:23:00 -0000 Subject: PR#27343 test In-Reply-To: <445F3B81.3090009@pcedev.com> References: <1147041755.20166.5.camel@qcplx01.physto.se> <1147042911.7340.64.camel@localhost.localdomain> <445F3B81.3090009@pcedev.com> Message-ID: <1147105201.12835.1.camel@qcplx01.physto.se> On Mon, 2006-05-08 at 14:37 +0200, Olivier Jolly wrote: > For info, I had committed the very same testcase last week in > gnu/testlet/java/util/Calendar/TimeZone.java Oh, sorry! My mistake. I don't really follow Mauve that closely.. But to your credit, I felt it was so important I wanted to make sure it was in Mauve. /Sven From gbenson@redhat.com Tue May 9 09:53:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 09 May 2006 09:53:00 -0000 Subject: FYI: Tidied java.lang.Thread throwpoint tests Message-ID: <20060509095310.GB5166@redhat.com> Hi all, My last commit tidied up some unused stuff from the java.lang.Thread throwpoint testcase. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1610 diff -u -r1.1610 ChangeLog --- ChangeLog 7 May 2006 23:01:25 -0000 1.1610 +++ ChangeLog 9 May 2006 09:33:19 -0000 @@ -1,3 +1,7 @@ +2006-05-09 Gary Benson + + * gnu/testlet/java/lang/Thread/security.java: Removed unused stuff. + 2005-04-29 Sven de Marothy * gnu/testlet/java/util/Calendar/setTimeZone.java: Index: gnu/testlet/java/lang/Thread/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Thread/security.java,v retrieving revision 1.3 diff -u -r1.3 security.java --- gnu/testlet/java/lang/Thread/security.java 4 May 2006 14:48:19 -0000 1.3 +++ gnu/testlet/java/lang/Thread/security.java 9 May 2006 09:33:19 -0000 @@ -70,7 +70,7 @@ harness.check(testThread.getThreadGroup().getParent() == null); Thread modifyGroupThread = new Thread( - systemGroup, new SysTestRunner(harness, sm, testThread)); + systemGroup, new SysTestRunner(harness, sm)); harness.check(modifyGroupThread.getThreadGroup().getParent() == null); Throwable threadDeath = new ThreadDeath(); @@ -350,7 +350,6 @@ { private TestHarness harness; private TestSecurityManager2 sm; - private Thread testThread; private static Runnable runnable = new Runnable() { @@ -359,20 +358,15 @@ } }; - public SysTestRunner(TestHarness harness, - TestSecurityManager2 sm, - Thread testThread) + public SysTestRunner(TestHarness harness, TestSecurityManager2 sm) { this.harness = harness; this.sm = sm; - this.testThread = testThread; } public void run() { try { - Thread thisThread = Thread.currentThread(); - // throwpoint: java.lang.Thread-enumerate harness.checkPoint("enumerate"); try { From theBohemian@gmx.net Tue May 9 20:43:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Tue, 09 May 2006 20:43:00 -0000 Subject: FYI: new AbstractDocument test Message-ID: <4460FF36.2020705@gmx.net> Hi, this patch adds several tests which check whether the AbstractDocument class correctly calls (or calls not) an associated DocumentFilter and its Content instance. One may argue that this kind of stuff is deeply implementation specific. However I see that mimicing this behavior is neccessary to be exception-compatible. See the patch for PR24216 for details. ChangeLog: 2006-05-09 Robert Schuster * gnu/testlet/javax/swing/text/AbstractDocument/filterTest.java: New test. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-abstractdocument-filter.diff Type: text/x-patch Size: 11342 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From gbenson@redhat.com Wed May 10 11:40:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 10 May 2006 11:40:00 -0000 Subject: FYI: Excessive Thread and ThreadGroup security tests Message-ID: <20060510114036.GA12490@redhat.com> Hi all, My last commit adds new testcases for instances where Thread and ThreadGroup security checks are being performed where they shouldn't be. All these tests fail on Classpath at present. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1612 diff -u -r1.1612 ChangeLog --- ChangeLog 9 May 2006 20:34:23 -0000 1.1612 +++ ChangeLog 10 May 2006 11:36:12 -0000 @@ -1,3 +1,8 @@ +2006-05-10 Gary Benson + + * gnu/testlet/java/lang/Thread/insecurity.java: New test. + * gnu/testlet/java/lang/ThreadGroup/insecurity.java: Likewise. + 2006-05-09 Robert Schuster * gnu/testlet/javax/swing/text/AbstractDocument/filterTest.java: New test. Index: gnu/testlet/java/lang/Thread/insecurity.java =================================================================== RCS file: gnu/testlet/java/lang/Thread/insecurity.java diff -N gnu/testlet/java/lang/Thread/insecurity.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/Thread/insecurity.java 10 May 2006 11:36:13 -0000 @@ -0,0 +1,307 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.Thread; + +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class insecurity implements Testlet +{ + private static Permission[] noChecks = new Permission[0]; + + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + + // The default SecurityManager.checkAccess(Thread) method should + // only check permissions when the thread in question is a system + // thread. System threads are those whose parent is the system + // threadgroup, which is the threadgroup with no parent. + // + // The default SecurityManager.checkAccess(ThreadGroup) method + // should only check permissions when the threadgroup in + // question is the system threadgroup. + ThreadGroup systemGroup = Thread.currentThread().getThreadGroup(); + while (systemGroup.getParent() != null) + systemGroup = systemGroup.getParent(); + + ThreadGroup nonSystemGroup = new ThreadGroup(systemGroup, "test group"); + + Thread testThread = new Thread(nonSystemGroup, "test thread"); + harness.check(testThread.getThreadGroup().getParent() != null); + + Thread modifyGroupThread = new Thread( + nonSystemGroup, new SysTestRunner(harness, sm)); + harness.check(modifyGroupThread.getThreadGroup().getParent() != null); + + Throwable threadDeath = new ThreadDeath(); + Throwable notThreadDeath = new ClassNotFoundException(); + + Runnable runnable = new Runnable() + { + public void run() + { + } + }; + + Permission[] stopThread = new Permission[] { + new RuntimePermission("stopThread")}; + + try { + sm.install(); + + // corresponding throwpoint: java.lang.Thread-checkAccess + harness.checkPoint("checkAccess"); + try { + sm.prepareChecks(noChecks); + testThread.checkAccess(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.Thread-interrupt + harness.checkPoint("interrupt"); + try { + sm.prepareChecks(noChecks); + testThread.interrupt(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.Thread-suspend + harness.checkPoint("suspend"); + try { + sm.prepareChecks(noChecks); + testThread.suspend(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.Thread-resume + harness.checkPoint("resume"); + try { + sm.prepareChecks(noChecks); + testThread.resume(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.Thread-setPriority + harness.checkPoint("setPriority"); + try { + int priority = testThread.getPriority(); + sm.prepareChecks(noChecks); + testThread.setPriority(priority); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.Thread-setName + harness.checkPoint("setName"); + try { + sm.prepareChecks(noChecks); + testThread.setName("a test thread"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.Thread-setDaemon + harness.checkPoint("setDaemon"); + try { + sm.prepareChecks(noChecks); + testThread.setDaemon(false); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.Thread-stop() + harness.checkPoint("stop()"); + try { + sm.prepareChecks(noChecks); + testThread.stop(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.Thread-stop(Throwable) + harness.checkPoint("stop(Throwable)"); + try { + sm.prepareChecks(stopThread); + testThread.stop(threadDeath); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + try { + sm.prepareChecks(stopThread); + testThread.stop(notThreadDeath); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // The noChecksGroup tests get run in a system thread. + modifyGroupThread.start(); + modifyGroupThread.join(); + + // corresponding throwpoints: java.lang.Thread-Thread(ThreadGroup, ...) + harness.checkPoint("ThreadGroup constructors"); + for (int i = 1; i <= 4; i++) { + try { + sm.prepareChecks(noChecks); + switch (i) { + case 1: + new Thread(nonSystemGroup, runnable); + break; + case 2: + new Thread(nonSystemGroup, runnable, "test thread"); + break; + case 3: + new Thread(nonSystemGroup, runnable, "test thread", 1024); + break; + case 4: + new Thread(nonSystemGroup, "test thread"); + break; + } + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + // Stuff for the modifyThreadGroup tests + public static class SysTestRunner implements Runnable + { + private TestHarness harness; + private TestSecurityManager2 sm; + + private static Runnable runnable = new Runnable() + { + public void run() + { + } + }; + + public SysTestRunner(TestHarness harness, TestSecurityManager2 sm) + { + this.harness = harness; + this.sm = sm; + } + + public void run() + { + try { + // corresponding throwpoint: java.lang.Thread-enumerate + harness.checkPoint("enumerate"); + try { + sm.prepareChecks(noChecks); + Thread.enumerate(new Thread[0]); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.Thread-Thread() + // corresponding throwpoint: java.lang.Thread-Thread(Runnable) + // corresponding throwpoint: java.lang.Thread-Thread(String) + // corresponding throwpoint: java.lang.Thread-Thread(Runnable, String) + harness.checkPoint("basic constructors"); + for (int i = 1; i <= 4; i++) { + try { + sm.prepareChecks(noChecks); + switch (i) { + case 1: + new Thread(); + break; + case 2: + new Thread(runnable); + break; + case 3: + new Thread("test thread"); + break; + case 4: + new Thread(runnable, "test thread"); + break; + } + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + } +} Index: gnu/testlet/java/lang/ThreadGroup/insecurity.java =================================================================== RCS file: gnu/testlet/java/lang/ThreadGroup/insecurity.java diff -N gnu/testlet/java/lang/ThreadGroup/insecurity.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/ThreadGroup/insecurity.java 10 May 2006 11:36:13 -0000 @@ -0,0 +1,281 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.ThreadGroup; + +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class insecurity implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + // The default SecurityManager.checkAccess(ThreadGroup) method + // should only check permissions when the threadgroup in + // question is the system threadgroup, which is defined as the + // threadgroup with no parent. + + ThreadGroup systemGroup = Thread.currentThread().getThreadGroup(); + while (systemGroup.getParent() != null) + systemGroup = systemGroup.getParent(); + + ThreadGroup nonSystemGroup = new ThreadGroup(systemGroup, "test group"); + + Thread testThread = new Thread(nonSystemGroup, new TestRunner(harness)); + + testThread.start(); + testThread.join(); + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + public static class TestRunner implements Runnable + { + private TestHarness harness; + + public TestRunner(TestHarness harness) + { + this.harness = harness; + } + + public void run() + { + try { + ThreadGroup testGroup = Thread.currentThread().getThreadGroup(); + harness.check(testGroup.getParent() != null); + + ThreadGroup nonSystemGroup = new ThreadGroup(testGroup, "test group"); + harness.check(nonSystemGroup.getParent() != null); + + Permission[] noChecks = new Permission[0]; + + Permission[] modifyThreadGroup = new Permission[] { + new RuntimePermission("modifyThreadGroup")}; + + Permission[] modifyThread = new Permission[] { + new RuntimePermission("modifyThread")}; + + Permission[] stopThread = new Permission[] { + new RuntimePermission("modifyThread"), + new RuntimePermission("stopThread")}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // corresponding throwpoint: + // java.lang.ThreadGroup-ThreadGroup(String) + harness.checkPoint("ThreadGroup(String)"); + try { + sm.prepareChecks(noChecks); + new ThreadGroup("test"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: + // java.lang.ThreadGroup-ThreadGroup(ThreadGroup, String) + harness.checkPoint("ThreadGroup(ThreadGroup, String)"); + try { + sm.prepareChecks(noChecks); + new ThreadGroup(testGroup, "test"); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.ThreadGroup-checkAccess + harness.checkPoint("checkAccess"); + try { + sm.prepareChecks(noChecks); + testGroup.checkAccess(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: + // java.lang.ThreadGroup-enumerate(Thread[]) + harness.checkPoint("enumerate(Thread[])"); + try { + sm.prepareChecks(noChecks); + testGroup.enumerate(new Thread[0]); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: + // java.lang.ThreadGroup-enumerate(Thread[], boolean) + harness.checkPoint("enumerate(Thread[], boolean)"); + for (int i = 0; i <= 1; i++) { + try { + sm.prepareChecks(noChecks); + testGroup.enumerate(new Thread[0], i == 1); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // corresponding throwpoint: + // java.lang.ThreadGroup-enumerate(ThreadGroup[]) + harness.checkPoint("enumerate(ThreadGroup[])"); + try { + sm.prepareChecks(noChecks); + testGroup.enumerate(new ThreadGroup[0]); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: + // java.lang.ThreadGroup-enumerate(ThreadGroup[], boolean) + harness.checkPoint("enumerate(ThreadGroup[], boolean)"); + for (int i = 0; i <= 1; i++) { + try { + sm.prepareChecks(noChecks); + testGroup.enumerate(new ThreadGroup[0], i == 1); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // corresponding throwpoint: java.lang.ThreadGroup-getParent + harness.checkPoint("getParent"); + try { + sm.prepareChecks(noChecks); + nonSystemGroup.getParent(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.ThreadGroup-setDaemon + harness.checkPoint("setDaemon"); + try { + sm.prepareChecks(noChecks); + testGroup.setDaemon(false); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.ThreadGroup-setMaxPriority + harness.checkPoint("setMaxPriority"); + try { + int priority = testGroup.getMaxPriority(); + sm.prepareChecks(noChecks); + testGroup.setMaxPriority(priority); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.ThreadGroup-suspend + harness.checkPoint("suspend"); + try { + sm.prepareChecks(noChecks); + nonSystemGroup.suspend(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.ThreadGroup-resume + harness.checkPoint("resume"); + try { + sm.prepareChecks(noChecks); + nonSystemGroup.resume(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.ThreadGroup-interrupt + harness.checkPoint("interrupt"); + try { + sm.prepareChecks(noChecks); + nonSystemGroup.interrupt(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // corresponding throwpoint: java.lang.ThreadGroup-stop + harness.checkPoint("stop"); + try { + sm.prepareChecks(noChecks); + nonSystemGroup.stop(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + } +} From mark@klomp.org Thu May 11 12:33:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Thu, 11 May 2006 12:33:00 -0000 Subject: Logger initialization regression fix and a little story on security contexts during class initialization Message-ID: <1147350676.7640.40.camel@localhost.localdomain> Hi, We had an interesting regression with the logging code in GNU Classpath. It wasn't immediately apparent because it was only caused with certain compilers. The class initialization order was subtly different between byte code compiled with gcj -C and jikes. So it didn't show up with gcj -C which I used when committing this code. The mauve test pointed out that an unexpected SecurityManager check was made in some cases. Those cases were when the Logger class was initialized for the first time. This is an interesting case since depending on how/where a class is first initialized its static constructor will be run in different security context. So the fix is to initialize the global Logger in a PrivilegedAction to make sure that even if the first class initialization is done through a untrusted context the static fields can be initialized. What makes this really awkward is that if a class is initialized from a untrusted context for the first time and throws a SecurityException from its static constructor that class can then NEVER be initialized again, even if it is loaded through a privileged context. 2006-05-11 Mark Wielaard * java/util/logging/Logger.java (global): Initialize inside static PrivilegedAction. Unfortunately this patch only solves the real world scenario. It doesn't solve the mauve failure since the security manager used in the test doesn't actually use the security context to see whether the calls are made with the right privileges. It is actually hard to figure out how to test for this situation correctly. Because depends on when exactly the class is first initialized. So for now I just make sure that the logging framework is completely initialized before installing the test security manager. 2006-05-11 Mark Wielaard * gnu/testlet/java/util/logging/Handler/TestSecurityManager.java (install): Initialize LogManager first. * gnu/testlet/java/util/logging/Logger/TestSecurityManager.java (install): Likewise. What we really need is a test that is run with minimal privileges and install a real security manager that respect the whole security context (through AccessController) which then tries to load every class to see whether or not they can at least be initialized properly from such a minimal security context. The problem with that is that while setting up such a test part of the core classes are already initialized of course. So it is hard to get anything that really tests it all. Both patches have been committed to classpath and mauve. The classpath patch will also go onto the release branch. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: logging-init.patch Type: text/x-patch Size: 1150 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-logging-security.patch Type: text/x-patch Size: 1968 bytes Desc: not available URL: From archie@dellroad.org Thu May 11 13:49:00 2006 From: archie@dellroad.org (Archie Cobbs) Date: Thu, 11 May 2006 13:49:00 -0000 Subject: [cp-patches] Logger initialization regression fix and a little story on security contexts during class initialization In-Reply-To: <1147350676.7640.40.camel@localhost.localdomain> References: <1147350676.7640.40.camel@localhost.localdomain> Message-ID: <4463414C.6010802@dellroad.org> Mark Wielaard wrote: > We had an interesting regression with the logging code in GNU Classpath. > It wasn't immediately apparent because it was only caused with certain > compilers. The class initialization order was subtly different between > byte code compiled with gcj -C and jikes. So it didn't show up with gcj > -C which I used when committing this code. Since class initialization is strictly defined by the JVM spec, doesn't this necessarily imply a bug in either gcj or jikes? The only other alternative is that they both compile the same code correctly, but do so differenly enough to change the class initialization order, which to me seems even more surprising (but possible I guess.. ?) -Archie __________________________________________________________________________ Archie Cobbs * CTO, Awarix * http://www.awarix.com From theBohemian@gmx.net Fri May 12 11:21:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Fri, 12 May 2006 11:21:00 -0000 Subject: FYI: new test Utilities.getPreviousWord Message-ID: <44647011.9040709@gmx.net> Hi, the attached patch contains a new test for Utilities.getPreviousWord() it is and adaption of the test for Utilities.getNextWord(). Currently it will show some errors in Classpath but I have fixes for that. The ChangeLog: 2006-05-12 Robert Schuster * gnu/testlet/javax/swing/text/Utilities/getPreviousWord.java: New test. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-Utilities.getPreviousWord.java Type: text/x-java Size: 3950 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From theBohemian@gmx.net Sat May 13 11:16:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Sat, 13 May 2006 11:16:00 -0000 Subject: FYI: more Utilities tests Message-ID: <4465C00B.4000105@gmx.net> Hi, this adds a new test for Utilities.getWordStart and enhances the existing one for getNextWord and getPreviousWord. Unfortunately these show bugs in Classpath which are more difficult to fix. 2006-05-13 Robert Schuster * gnu/testlet/javax/swing/text/Utilities/getWordStart.java: New test. * gnu/testlet/javax/swing/text/Utilities/getPreviousWord.java: Renamed fields, added second string to check. * gnu/testlet/javax/swing/text/Utilities/getNextWord.java: Dito. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-Utilities-tests.diff Type: text/x-patch Size: 10965 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From mark@klomp.org Sun May 14 15:06:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 14 May 2006 15:06:00 -0000 Subject: [cp-patches] Logger initialization regression fix and a little story on security contexts during class initialization In-Reply-To: <4463414C.6010802@dellroad.org> References: <1147350676.7640.40.camel@localhost.localdomain> <4463414C.6010802@dellroad.org> Message-ID: <1147619161.4356.73.camel@localhost.localdomain> Hi Archie, On Thu, 2006-05-11 at 08:51 -0500, Archie Cobbs wrote: > Mark Wielaard wrote: > > We had an interesting regression with the logging code in GNU Classpath. > > It wasn't immediately apparent because it was only caused with certain > > compilers. The class initialization order was subtly different between > > byte code compiled with gcj -C and jikes. So it didn't show up with gcj > > -C which I used when committing this code. > > Since class initialization is strictly defined by the JVM spec, > doesn't this necessarily imply a bug in either gcj or jikes? > > The only other alternative is that they both compile the same code > correctly, but do so differenly enough to change the class initialization > order, which to me seems even more surprising (but possible I guess.. ?) Yeah, I didn't really investigate further since the issue was real and not just a contrived case in Mauve. We need to make sure that if a class is initialized from a non-trusted environment the static constructor runs correctly. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From mark@klomp.org Sun May 14 19:54:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 14 May 2006 19:54:00 -0000 Subject: New ServerSocket AcceptTimeout test Message-ID: <1147636479.4477.3.camel@localhost.localdomain> Hi, Here is a test for a bug found in classpath. 2006-05-14 Mark Wielaard * gnu/testlet/java/net/ServerSocket/AcceptTimeout.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: AcceptTimeout.java Type: text/x-java Size: 1894 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From david.gilbert@object-refinery.com Tue May 16 20:34:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 16 May 2006 20:34:00 -0000 Subject: FYI: SizeSequence - new tests Message-ID: <446A370A.2000909@object-refinery.com> This patch (committed) adds some tests for the SizeSequence class: 2006-05-16 David Gilbert * gnu/testlet/javax/swing/SizeSequence/constructors.java: New test, * gnu/testlet/javax/swing/SizeSequence/getIndex.java: New test, * gnu/testlet/javax/swing/SizeSequence/getSize.java: New test, * gnu/testlet/javax/swing/SizeSequence/getSizes.java: New test, * gnu/testlet/javax/swing/SizeSequence/insertEntries.java: New test, * gnu/testlet/javax/swing/SizeSequence/removeEntries.java: New test, * gnu/testlet/javax/swing/SizeSequence/setSize.java: New test, * gnu/testlet/javax/swing/SizeSequence/setSizes.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Tue May 16 22:02:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 16 May 2006 22:02:00 -0000 Subject: FYI: DefaultButtonModel tests Message-ID: <446A4B7F.2030800@object-refinery.com> This patch (committed) adds tests for the DefaultButtonModel class: 2006-05-16 David Gilbert * gnu/testlet/javax/swing/DefaultButtonModel/addActionListener.java: New file, * gnu/testlet/javax/swing/DefaultButtonModel/constants.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/constructor.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/getSelectedObjects.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/MyDefaultButtonModel.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/setActionCommand.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/setArmed.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/setEnabled.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/setGroup.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/setMnemonic.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/setPressed.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/setRollover.java: Likewise, * gnu/testlet/javax/swing/DefaultButtonModel/setSelected.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From langel@redhat.com Wed May 17 19:59:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 17 May 2006 19:59:00 -0000 Subject: FYI: ImageGraphicAttribute tests Message-ID: <1147895958.2577.258.camel@tow.toronto.redhat.com> Added new tests for ImageGraphicAttribute class 2006-05-16 Lillian Angel * gnu/testlet/java/awt/font/ImageGraphicAttribute: New directory * gnu/testlet/java/awt/font/ImageGraphicAttribute/ImageGraphicAttributeTest.java: New test. * gnu/testlet/java/awt/font/ImageGraphicAttribute/image.bmp: New bitmap used in test. -------------- next part -------------- A non-text attachment was scrubbed... Name: m.diff Type: text/x-patch Size: 3157 bytes Desc: not available URL: From fitzsim@redhat.com Thu May 18 01:54:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Thu, 18 May 2006 01:54:00 -0000 Subject: FYI: ImageInputStreamImpl test Message-ID: <446BD3B6.7020300@redhat.com> Hi, I committed this new test to Mauve. Tom 2006-05-17 Thomas Fitzsimmons * gnu/testlet/javax/imageio/stream/MemoryCacheImageInputStream/TestImageInputStreamImpl.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-imageio-image-input-stream.patch Type: text/x-patch Size: 6505 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu May 18 09:44:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 18 May 2006 09:44:00 -0000 Subject: FYI: test for PR27651 (TreePath.isDescendant) Message-ID: <446C41EA.2090101@object-refinery.com> This patch (committed) checks an implementation detail for the TreePath.isDescendant() method. It turns out not to isolate the bug reported in PR27651, but I'm committing the test anyway: 2006-05-18 David Gilbert * gnu/testlet/javax/swing/tree/TreePath/PR27651.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From langel@redhat.com Thu May 18 17:17:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 18 May 2006 17:17:00 -0000 Subject: Patch: ShapeGraphicAttribute test Message-ID: <1147967715.2577.274.camel@tow.toronto.redhat.com> 2006-05-18 Lillian Angel * gnu/testlet/java/awt/font/ShapeGraphicAttribute: New directory. * gnu/testlet/java/awt/font/ShapeGraphicAttribute/ShapeGraphicAttributeTest: New test. * gnu/testlet/java/awt/font/ImageGraphicAttribute/ImageGraphicAttributeTest.java: Added equals test. -------------- next part -------------- A non-text attachment was scrubbed... Name: m.diff Type: text/x-patch Size: 4250 bytes Desc: not available URL: From abalkiss@redhat.com Thu May 18 20:06:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Thu, 18 May 2006 20:06:00 -0000 Subject: Harness fix Message-ID: <1147982790.2370.17.camel@tony.toronto.redhat.com> This patch moves DetectBootclasspath from gnu/testlet/DetectBootclasspath to an inner class of Harness which indirectly fixes a problem found by Tom Fitzsimmons where DetectBootclasspath wasn't being compiled by default, leading to problems setting up the compiler. 2006-05-18 Anthony Balkissoon * Harness.java: (getBootClassPath): Changed location of DetectBootclasspath because it is now an inner class of Harness rather than a separate source file in gnu/testlet. (Harness.DetectBootclasspath): New inner class. * gnu/testlet/DetectBootclasspath.java: Removed this file. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: DBCPFix.diff Type: text/x-patch Size: 6088 bytes Desc: not available URL: From fitzsim@redhat.com Fri May 19 02:12:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Fri, 19 May 2006 02:12:00 -0000 Subject: FYI: complete ImageInputStreamImpl test Message-ID: <446D296F.8010104@redhat.com> Hi, I committed this patch which completes the ImageInputStreamImpl test. Tom 2006-05-18 Thomas Fitzsimmons * gnu/testlet/javax/imageio/stream/MemoryCacheImageInputStream/TestImageInputStreamImpl.java: Complete test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-imageio-image-input-stream-2.patch Type: text/x-patch Size: 19389 bytes Desc: not available URL: From gnu_andrew@member.fsf.org Sun May 21 17:13:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sun, 21 May 2006 17:13:00 -0000 Subject: FYI: Mauve tests for java.beans.beancontext Message-ID: <20060521171343.GA7807@localhost.localdomain> I'm committing the attached patch to add tests for adding a bean to a bean context. Changelog: 2006-05-21 Andrew John Hughes * gnu/testlet/java/beans/beancontext/Add.java: New file. Tests the semantics of adding a bean to a context. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- Index: gnu/testlet/java/beans/beancontext/Add.java =================================================================== RCS file: gnu/testlet/java/beans/beancontext/Add.java diff -N gnu/testlet/java/beans/beancontext/Add.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/beans/beancontext/Add.java 21 May 2006 17:01:17 -0000 @@ -0,0 +1,93 @@ +// Tags: JDK1.2 + +/* + Copyright (C) 2006 Andrew John Hughes (gnu_andrew@member.fsf.org) + + This file is part of Mauve. + + Mauve is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + Mauve is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Mauve; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +package gnu.testlet.java.beans.beancontext; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +import java.beans.PropertyVetoException; + +import java.beans.beancontext.BeanContext; +import java.beans.beancontext.BeanContextChild; +import java.beans.beancontext.BeanContextChildSupport; +import java.beans.beancontext.BeanContextSupport; + +public class Add + implements Testlet +{ + + private static BeanContextSupport context = new BeanContextSupport(); + private static BeanContextChild child = new BeanContextChildSupport(); + private static BeanContextChild brokenChild = new BeanContextChildSupport() + { + public void setBeanContext(BeanContext c) + throws PropertyVetoException + { + throw new PropertyVetoException("I don't like you.", null); + } + }; + + public void test(TestHarness h) + { + /* Check child is contextless */ + h.check(child.getBeanContext() == null); + /* Check initial empty status of context */ + h.check(context.isEmpty()); + h.check(context.size() == 0); + /* Add child */ + h.check(context.add(child)); + /* Check child is added to context */ + h.check(context.isEmpty() == false); + h.check(context.size() == 1); + /* Check child now knows about context */ + h.check(child.getBeanContext() == context); + /* Check that context maintains set semantics */ + h.check(context.add(child) == false); + h.check(context.size() == 1); + /* Check that context catches null */ + try + { + context.add(null); + h.check(false); + } + catch (Exception e) + { + h.check(e instanceof IllegalArgumentException); + } + /* Check correct handling of veto from child */ + try + { + context.add(brokenChild); + h.check(false); + } + catch (Exception e) + { + h.check(e instanceof IllegalStateException); + /* Check that child has not been added */ + h.check(context.size() == 1); + } + } + +} + -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From gnu_andrew@member.fsf.org Sun May 21 17:34:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sun, 21 May 2006 17:34:00 -0000 Subject: FYI: Character block tests and updates to beancontext patch Message-ID: <20060521173427.GA11299@localhost.localdomain> I'm committing the attached patch to add some tests for the new Character blocks I did about a year ago when I first added them to the generics branch. Now they are on HEAD, these succeed. This also includes some updates to the patch I just committed, to include more data on which check is taking place. Changelog: 2006-05-21 Andrew John Hughes * gnu/testlet/java/lang/Character/Blocks.java, * gnu/testlet/java/lang/Character/Blocks15.java: New files to test Character blocks. * gnu/testlet/java/beans/beancontext/Add.java: Add more readable checkpoints. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- Index: gnu/testlet/java/beans/beancontext/Add.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/beans/beancontext/Add.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 Add.java --- gnu/testlet/java/beans/beancontext/Add.java 21 May 2006 17:24:32 -0000 1.1 +++ gnu/testlet/java/beans/beancontext/Add.java 21 May 2006 17:31:39 -0000 @@ -51,41 +51,41 @@ public class Add public void test(TestHarness h) { /* Check child is contextless */ - h.check(child.getBeanContext() == null); + h.check(child.getBeanContext() == null, "Contextless check"); /* Check initial empty status of context */ - h.check(context.isEmpty()); - h.check(context.size() == 0); + h.check(context.isEmpty(), "Empty check"); + h.check(context.size() == 0, "Size of 0 check"); /* Add child */ - h.check(context.add(child)); + h.check(context.add(child), "Child addition check"); /* Check child is added to context */ - h.check(context.isEmpty() == false); - h.check(context.size() == 1); + h.check(context.isEmpty() == false, "Non-empty check"); + h.check(context.size() == 1, "Size of 1 check"); /* Check child now knows about context */ - h.check(child.getBeanContext() == context); + h.check(child.getBeanContext() == context, "Correct context check"); /* Check that context maintains set semantics */ - h.check(context.add(child) == false); - h.check(context.size() == 1); + h.check(context.add(child) == false, "Set check"); + h.check(context.size() == 1, "Same size after failed addition check"); /* Check that context catches null */ try { context.add(null); - h.check(false); + h.fail("Failed to catch null child"); } catch (Exception e) { - h.check(e instanceof IllegalArgumentException); + h.check(e instanceof IllegalArgumentException, "Caught null child"); } /* Check correct handling of veto from child */ try { context.add(brokenChild); - h.check(false); + h.fail("Failed to catch veto by child"); } catch (Exception e) { - h.check(e instanceof IllegalStateException); + h.check(e instanceof IllegalStateException, "Caught veto from child"); /* Check that child has not been added */ - h.check(context.size() == 1); + h.check(context.size() == 1, "Same size after veto check"); } } Index: gnu/testlet/java/lang/Character/Blocks.java =================================================================== RCS file: gnu/testlet/java/lang/Character/Blocks.java diff -N gnu/testlet/java/lang/Character/Blocks.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/Character/Blocks.java 21 May 2006 17:31:39 -0000 @@ -0,0 +1,38 @@ +// Tags: JDK1.2 + +/* + Copyright (C) 2005 Andrew John Hughes (gnu_andrew@member.fsf.org) + + This file is part of Mauve. + + Mauve is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + Mauve is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Mauve; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +package gnu.testlet.java.lang.Character; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +public class Blocks + implements Testlet +{ + + public void test (TestHarness harness) + { + harness.check(Character.UnicodeBlock.of('\u2191'), Character.UnicodeBlock.ARROWS); + } + +} Index: gnu/testlet/java/lang/Character/Blocks15.java =================================================================== RCS file: gnu/testlet/java/lang/Character/Blocks15.java diff -N gnu/testlet/java/lang/Character/Blocks15.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/Character/Blocks15.java 21 May 2006 17:31:39 -0000 @@ -0,0 +1,84 @@ +// Tags: JDK1.5 + +/* + Copyright (C) 2005 Andrew John Hughes (gnu_andrew@member.fsf.org) + + This file is part of Mauve. + + Mauve is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + Mauve is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Mauve; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +package gnu.testlet.java.lang.Character; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +public class Blocks15 + implements Testlet +{ + + public void test (TestHarness harness) + { + harness.check(Character.UnicodeBlock.forName("Greek"), Character.UnicodeBlock.GREEK); + harness.check(Character.UnicodeBlock.forName("Combining Marks for Symbols"), + Character.UnicodeBlock.COMBINING_MARKS_FOR_SYMBOLS); + harness.check(Character.UnicodeBlock.forName("CombiningMarksforSymbols"), + Character.UnicodeBlock.COMBINING_MARKS_FOR_SYMBOLS); + harness.check(Character.UnicodeBlock.forName("Miscellaneous Mathematical Symbols-B"), + Character.UnicodeBlock.MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B); + harness.check(Character.UnicodeBlock.forName("MiscellaneousMathematicalSymbols-B"), + Character.UnicodeBlock.MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B); + harness.check(Character.UnicodeBlock.forName("Miscellaneous_Mathematical_Symbols_B"), + Character.UnicodeBlock.MISCELLANEOUS_MATHEMATICAL_SYMBOLS_B); + harness.check(Character.UnicodeBlock.forName("Surrogates Area"), + Character.UnicodeBlock.SURROGATES_AREA); + harness.check(Character.UnicodeBlock.forName("SurrogatesArea"), + Character.UnicodeBlock.SURROGATES_AREA); + harness.check(Character.UnicodeBlock.forName("Surrogates_Area"), + Character.UnicodeBlock.SURROGATES_AREA); + try + { + Character.UnicodeBlock.forName(null); + harness.fail("null allowed to forName()"); + } + catch (NullPointerException e) + { + harness.check(true); + } + try + { + Character.UnicodeBlock.forName("GNU Classpath Characters"); + harness.fail("Allowed request for invalid character set to forName()"); + } + catch (IllegalArgumentException e) + { + harness.check(true); + } + harness.check(Character.UnicodeBlock.of(0x2191), Character.UnicodeBlock.ARROWS); + harness.check(Character.UnicodeBlock.of(0x100000), + Character.UnicodeBlock.SUPPLEMENTARY_PRIVATE_USE_AREA_B); + try + { + Character.UnicodeBlock.of(0x200000); + harness.fail("Allowed invalid codepoint to of(int)"); + } + catch (IllegalArgumentException e) + { + harness.check(true); + } + } + +} -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From gnu_andrew@member.fsf.org Sun May 21 19:30:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sun, 21 May 2006 19:30:00 -0000 Subject: FYI: Add test for removing a bean from a context Message-ID: <20060521192924.GA2871@localhost.localdomain> I'm committing the attached patch which tests the semantics of removing a bean from a BeanContextSupport. All 14 tests pass with my next Classpath patch. Changelog: 2006-05-21 Andrew John Hughes * gnu/testlet/java/beans/beancontext/Remove.java: New file. Tests the semantics of removing a bean from a context. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- Index: gnu/testlet/java/beans/beancontext/Remove.java =================================================================== RCS file: gnu/testlet/java/beans/beancontext/Remove.java diff -N gnu/testlet/java/beans/beancontext/Remove.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/beans/beancontext/Remove.java 21 May 2006 19:26:58 -0000 @@ -0,0 +1,128 @@ +// Tags: JDK1.2 + +/* + Copyright (C) 2006 Andrew John Hughes (gnu_andrew@member.fsf.org) + + This file is part of Mauve. + + Mauve is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + Mauve is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Mauve; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +package gnu.testlet.java.beans.beancontext; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +import java.beans.PropertyVetoException; + +import java.beans.beancontext.BeanContext; +import java.beans.beancontext.BeanContextChild; +import java.beans.beancontext.BeanContextChildSupport; +import java.beans.beancontext.BeanContextSupport; + +public class Remove + implements Testlet +{ + + private static TestBeanContextSupport context = new TestBeanContextSupport(); + private static BeanContextChild child = new BeanContextChildSupport(); + private static BeanContextChild brokenChild = new BeanContextChildSupport() + { + public void setBeanContext(BeanContext c) + throws PropertyVetoException + { + if (c == null) + throw new PropertyVetoException("I don't like you.", null); + } + }; + + public void test(TestHarness h) + { + /* Setup */ + h.check(context.add(child), "Child addition check"); + /* Check child is added to context */ + h.check(context.isEmpty() == false, "Non-empty check"); + h.check(context.size() == 1, "Size of 1 check"); + /* Check child now knows about context */ + h.check(child.getBeanContext() == context, "Correct context check"); + /* Check that context catches null */ + try + { + context.remove(null); + h.fail("Failed to catch null child"); + } + catch (Exception e) + { + h.check(e instanceof IllegalArgumentException, "Caught null child"); + } + /* Check handling of non-existant child */ + h.check(context.remove(brokenChild) == false, "Remove non-existant child check"); + h.check(context.add(brokenChild), "Add broken child check"); + /* Check correct handling of veto from child */ + try + { + context.remove(brokenChild); + h.fail("Failed to catch veto by child"); + } + catch (Exception e) + { + h.check(e instanceof IllegalStateException, "Caught veto from child"); + /* Check that child has not been removed */ + h.check(context.size() == 2, "Same size after veto check"); + } + /* Check correct handling of broken child with no veto */ + context.removeTest(h); + /* Check the child was removed */ + h.check(context.size() == 1, "Size of 1 check"); + /* Check remove first child */ + h.check(context.remove(child), "Remove child check"); + /* Add child back */ + h.check(context.add(child), "Child re-addition check"); + /* Change child context from elsewhere */ + try + { + child.setBeanContext(null); + } + catch (PropertyVetoException e) + { + h.debug(e); + } + h.check(context.size() == 0, "Empty context check"); + } + + private static class TestBeanContextSupport + extends BeanContextSupport + { + public void removeTest(TestHarness h) + { + /* Check correct handling of broken child with no veto */ + try + { + h.check(remove(brokenChild, false), + "Correctly avoided notification of child"); + } + catch (Exception e) + { + if (e instanceof IllegalStateException) + h.fail("Wrongly threw veto when not asked to notify child"); + else + h.debug(e); + } + } + } + +} + -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From gnu_andrew@member.fsf.org Sun May 21 20:09:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sun, 21 May 2006 20:09:00 -0000 Subject: FYI: Tests for array use and class name instantiation in bean contexts Message-ID: <20060521200845.GA3106@localhost.localdomain> I'm committing the attached patch, which adds some more tests for java.beans.beancontext.BeanContextSupport. Changelog: 2006-05-21 Andrew John Hughes * gnu/testlet/java/beans/beancontext/Array.java: New file. Test the semantics of contains and converting to an array. * gnu/testlet/java/beans/beancontext/InstantiateChild.java: New file. Test instantiation of a child in a context by class name. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- Index: gnu/testlet/java/beans/beancontext/Array.java =================================================================== RCS file: gnu/testlet/java/beans/beancontext/Array.java diff -N gnu/testlet/java/beans/beancontext/Array.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/beans/beancontext/Array.java 21 May 2006 20:05:08 -0000 @@ -0,0 +1,68 @@ +// Tags: JDK1.2 + +/* + Copyright (C) 2006 Andrew John Hughes (gnu_andrew@member.fsf.org) + + This file is part of Mauve. + + Mauve is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + Mauve is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Mauve; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +package gnu.testlet.java.beans.beancontext; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +import java.beans.beancontext.BeanContextChild; +import java.beans.beancontext.BeanContextChildSupport; +import java.beans.beancontext.BeanContextSupport; + +import java.util.Arrays; + +public class Array + implements Testlet +{ + + private static BeanContextSupport context = new BeanContextSupport(); + + public void test(TestHarness h) + { + BeanContextChild[] children = new BeanContextChild[5]; + + /* Create and add five children */ + for (int a = 0; a < 5; ++a) + { + children[a] = new BeanContextChildSupport(); + context.add(children[a]); + h.check(context.contains(children[a]), "Child " + a + " present."); + } + /* Check size */ + h.check(context.size() == 5, "Size of 5 check"); + /* Compare arrays */ + Object[] addedChildren = context.toArray(); + /* Order will differ, so we must find a matching one somewhere */ + for (int a = 0; a < 5; ++a) + { + boolean flag = false; + for (int b = 0; b < 5; ++b) + if (addedChildren[b] == children[a]) + flag = true; + h.check(flag, "Check for child " + a + " in array."); + } + } + +} + Index: gnu/testlet/java/beans/beancontext/InstantiateChild.java =================================================================== RCS file: gnu/testlet/java/beans/beancontext/InstantiateChild.java diff -N gnu/testlet/java/beans/beancontext/InstantiateChild.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/beans/beancontext/InstantiateChild.java 21 May 2006 20:05:08 -0000 @@ -0,0 +1,57 @@ +// Tags: JDK1.2 + +/* + Copyright (C) 2006 Andrew John Hughes (gnu_andrew@member.fsf.org) + + This file is part of Mauve. + + Mauve is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + Mauve is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Mauve; see the file COPYING. If not, write to + the Free Software Foundation, 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +package gnu.testlet.java.beans.beancontext; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +import java.beans.beancontext.BeanContextSupport; + +public class InstantiateChild + implements Testlet +{ + + private static BeanContextSupport context = new BeanContextSupport(); + + public void test(TestHarness h) + { + try + { + /* Check initial empty status of context */ + h.check(context.isEmpty(), "Empty check"); + h.check(context.size() == 0, "Size of 0 check"); + /* Add child */ + h.check(context.instantiateChild("java.beans.beancontext.BeanContextChildSupport"), + "Child instantiated addition check"); + /* Check child is added to context */ + h.check(context.isEmpty() == false, "Non-empty check"); + h.check(context.size() == 1, "Size of 1 check"); + } + catch (Exception e) + { + h.debug(e); + } + } +} + -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From gnu_andrew@member.fsf.org Sun May 21 20:30:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sun, 21 May 2006 20:30:00 -0000 Subject: FYI: Fix for InstantiateChild test Message-ID: <20060521202908.GA7910@localhost.localdomain> I'm committing the attached patch which fixes a bug in the recent InstantiateChild test; it shouldn't compare the return value as we do with add. Changelog: 2006-05-21 Andrew John Hughes * gnu/testlet/java/beans/beancontext/InstantiateChild.java: Fix incorrect test of return value of InstantiateChild. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- Index: gnu/testlet/java/beans/beancontext/InstantiateChild.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/beans/beancontext/InstantiateChild.java,v retrieving revision 1.1 diff -u -3 -p -u -r1.1 InstantiateChild.java --- gnu/testlet/java/beans/beancontext/InstantiateChild.java 21 May 2006 20:09:11 -0000 1.1 +++ gnu/testlet/java/beans/beancontext/InstantiateChild.java 21 May 2006 20:23:34 -0000 @@ -42,8 +42,7 @@ public class InstantiateChild h.check(context.isEmpty(), "Empty check"); h.check(context.size() == 0, "Size of 0 check"); /* Add child */ - h.check(context.instantiateChild("java.beans.beancontext.BeanContextChildSupport"), - "Child instantiated addition check"); + context.instantiateChild("java.beans.beancontext.BeanContextChildSupport"); /* Check child is added to context */ h.check(context.isEmpty() == false, "Non-empty check"); h.check(context.size() == 1, "Size of 1 check"); -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From gbenson@redhat.com Tue May 23 09:43:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 23 May 2006 09:43:00 -0000 Subject: FYI: Throwpoint checks for java.awt.Robot Message-ID: <20060523094253.GB5168@redhat.com> Hi all, This commit adds throwpoint checks for java.awt.Robot. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1632 diff -u -r1.1632 ChangeLog --- ChangeLog 21 May 2006 20:29:32 -0000 1.1632 +++ ChangeLog 23 May 2006 09:37:35 -0000 @@ -1,3 +1,7 @@ +2006-05-23 Gary Benson + + * gnu/testlet/java/awt/Robot/security.java: New test. + 2006-05-21 Andrew John Hughes * gnu/testlet/java/beans/beancontext/InstantiateChild.java: Index: gnu/testlet/java/awt/Robot/security.java =================================================================== RCS file: gnu/testlet/java/awt/Robot/security.java diff -N gnu/testlet/java/awt/Robot/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/awt/Robot/security.java 23 May 2006 09:37:35 -0000 @@ -0,0 +1,92 @@ +// Tags: GUI JDK1.3 + +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.awt.Robot; + +import java.awt.AWTPermission; +import java.awt.GraphicsDevice; +import java.awt.GraphicsEnvironment; +import java.awt.Robot; +import java.awt.Toolkit; +import java.security.Permission; +import java.util.PropertyPermission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + Toolkit.getDefaultToolkit(); + Math.log(1); + + GraphicsDevice gd = + GraphicsEnvironment.getLocalGraphicsEnvironment() + .getDefaultScreenDevice(); + + Permission[] createRobot = new Permission[] { + new AWTPermission("createRobot")}; + + Permission[] readProperty = new Permission[] { + new PropertyPermission("*", "read")}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // throwpoint: java.awt.Robot() + harness.checkPoint("0-arg constructor"); + try { + sm.prepareChecks(createRobot, readProperty); + new Robot(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.awt.Robot(GraphicsDevice) + harness.checkPoint("1-arg constructor"); + try { + sm.prepareChecks(createRobot, readProperty); + new Robot(gd); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From gbenson@redhat.com Tue May 23 10:58:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 23 May 2006 10:58:00 -0000 Subject: FYI: Throwpoint checks for java.awt.Window Message-ID: <20060523105607.GC5168@redhat.com> Hi again, This commit adds throwpoint checks for java.awt.Window. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1633 diff -u -r1.1633 ChangeLog --- ChangeLog 23 May 2006 09:41:46 -0000 1.1633 +++ ChangeLog 23 May 2006 10:40:39 -0000 @@ -1,3 +1,7 @@ +2006-05-23 Gary Benson + + * gnu/testlet/java/awt/Window/security.java: New test. + 2006-05-23 Gary Benson * gnu/testlet/java/awt/Robot/security.java: New test. Index: gnu/testlet/java/awt/Window/security.java =================================================================== RCS file: gnu/testlet/java/awt/Window/security.java diff -N gnu/testlet/java/awt/Window/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/awt/Window/security.java 23 May 2006 10:40:39 -0000 @@ -0,0 +1,100 @@ +// Tags: GUI JDK1.3 + +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.awt.Window; + +import java.awt.AWTPermission; +import java.awt.Frame; +import java.awt.GraphicsConfiguration; +import java.awt.Toolkit; +import java.awt.Window; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + Toolkit.getDefaultToolkit(); + //Math.log(1); + + Frame frame = new Frame(); + Window window = new Window(frame); + GraphicsConfiguration gc = window.getGraphicsConfiguration(); + + Permission[] showWindowWithoutWarningBanner = new Permission[] { + new AWTPermission("showWindowWithoutWarningBanner")}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // throwpoint: java.awt.Window(Frame) + harness.checkPoint("Window(Frame)"); + try { + sm.prepareChecks(showWindowWithoutWarningBanner); + new Window(frame); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.awt.Window(Window) + harness.checkPoint("Window(Window)"); + try { + sm.prepareChecks(showWindowWithoutWarningBanner); + new Window(window); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.awt.Window(Window, GraphicsConfiguration) + harness.checkPoint("Window(Window, GraphicsConfiguration)"); + try { + sm.prepareChecks(showWindowWithoutWarningBanner); + new Window(window, gc); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From tromey@redhat.com Sat May 27 01:08:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Sat, 27 May 2006 01:08:00 -0000 Subject: Patch: FYI: modPow test Message-ID: I'm checking this in. This tests for a BigInteger.modPow bug. Tom 2006-05-26 Tom Tromey * gnu/testlet/java/math/BigInteger/modPow.java: New file. Index: gnu/testlet/java/math/BigInteger/modPow.java =================================================================== RCS file: gnu/testlet/java/math/BigInteger/modPow.java diff -N gnu/testlet/java/math/BigInteger/modPow.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/math/BigInteger/modPow.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,45 @@ +/* modPow.java -- tests for modPow + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.1 + +package gnu.testlet.java.math.BigInteger; + +import java.math.BigInteger; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class modPow implements Testlet { + + public void test(TestHarness harness) { + BigInteger ten = BigInteger.valueOf(10); + BigInteger three = BigInteger.valueOf(3); + BigInteger five = BigInteger.valueOf(5); + BigInteger minusFive = five.negate(); + BigInteger seven = BigInteger.valueOf(7); + + harness.check(three.modPow(five, ten), three); + harness.check(three.modPow(minusFive, ten), seven); + harness.check(three.modPow(three.negate(), ten), three); + } + +} From david.gilbert@object-refinery.com Sun May 28 21:51:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Sun, 28 May 2006 21:51:00 -0000 Subject: FYI: DefaultTreeCellRenderer tests Message-ID: <447A21A9.80207@object-refinery.com> This patch (committed) adds some basic tests for the DefaultTreeCellRenderer class. 2006-05-28 David Gilbert * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/constructor.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/getBackgroundNonSelectionColor.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/getBackgroundSelectionColor.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/getBorderSelectionColor.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/getClosedIcon.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/getDefaultClosedIcon.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/getDefaultLeafIcon.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/getDefaultOpenIcon.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/getLeafIcon.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/getOpenIcon.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/setBackgroundNonSelectionColor.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/setBackgroundSelectionColor.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/setBorderSelectionColor.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/setClosedIcon.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/setLeafIcon.java: New file, * gnu/testlet/javax/swing/tree/DefaultTreeCellRenderer/setOpenIcon.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Sun May 28 22:34:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Sun, 28 May 2006 22:34:00 -0000 Subject: FYI: JSplitPane - new tests Message-ID: <447A30F0.2030404@object-refinery.com> This patch (committed) adds some new tests for the JSplitPane class: 2006-05-28 David Gilbert * gnu/testlet/javax/swing/JSplitPane/MyJSplitPane.java: New file, * gnu/testlet/javax/swing/JSplitPane/paramString.java: New file, * gnu/testlet/javax/swing/JSplitPane/setResizeWeight.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 07:59:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 07:59:00 -0000 Subject: FYI: JScrollBar - new tests Message-ID: <447D4B8A.9080901@object-refinery.com> This patch (committed) adds some new tests for the JScrollBar class: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JScrollBar/MyJScrollBar.java: New file, * gnu/testlet/javax/swing/JScrollBar/getAccessibleContext.java: New file, * gnu/testlet/javax/swing/JScrollBar/paramString.java: New file. Regards, Dave Gilbert -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 08:11:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 08:11:00 -0000 Subject: FYI: DefaultListSelectionModel.setLeadSelectionIndex() test updated Message-ID: <447D4F35.5010703@object-refinery.com> This patch (committed) adds more tests for the setLeadSelectionIndex() method: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/DefaultListSelectionModel/setLeadSelectionIndex.java (lastEvent): New field, (valueChanged): New method, (test): Call new test methods, (testSingleSelection): New method, (testSingleIntervalSelection): New method, (testMultipleIntervalSelection): New method. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 09:09:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 09:09:00 -0000 Subject: FYI: DefaultListSelectionModel - new tests Message-ID: <447D5D2C.9020500@object-refinery.com> This patch (committed) adds many new tests for the DefaultListSelectionModel class: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/DefaultListSelectionModel/addListSelectionListener.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/addSelectionInterval.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/clearSelection.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/clone.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/constructor.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/getAnchorSelection.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/getLeadSelectionIndex.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/getListeners.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/getListSelectionListeners.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/getMaxSelectionIndex.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/getMinSelectionIndex.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/getSelectionMode.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/getValueIsAdjusting.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/insertIndexInterval.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/isLeadAnchorNotificationEnabled.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/isSelectedIndex.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/isSelectionEmpty.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/moveLeadSelectionIndex.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/removeIndexInterval.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/removeListSelectionListener.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/removeSelectionInterval.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/setAnchorSelectionIndex.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/setSelectionInterval.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/setSelectionMode.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/setValueIsAdjusting.java: New file, * gnu/testlet/javax/swing/DefaultListSelectionModel/toString.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 10:36:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 10:36:00 -0000 Subject: FYI: JProgressBar - new tests Message-ID: <447D718E.7000802@object-refinery.com> This patch (committed) adds a bunch of new tests for the JProgressBar component: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JProgressBar/getAccessibleContext.java: New file, * gnu/testlet/javax/swing/JProgressBar/getPercentComplete.java: New file, * gnu/testlet/javax/swing/JProgressBar/getString.java: New file, * gnu/testlet/javax/swing/JProgressBar/isStringPainted.java: New file, * gnu/testlet/javax/swing/JProgressBar/MyJProgressBar.java: New file, * gnu/testlet/javax/swing/JProgressBar/paramString.java: New file, * gnu/testlet/javax/swing/JProgressBar/setBorderPainted.java: New file, * gnu/testlet/javax/swing/JProgressBar/setModel.java: New file, * gnu/testlet/javax/swing/JProgressBar/setOrientation.java: New file, * gnu/testlet/javax/swing/JProgressBar/setString.java: New file, * gnu/testlet/javax/swing/JProgressBar/setStringPainted.java: New file, * gnu/testlet/javax/swing/JProgressBar/setValue.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 11:23:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 11:23:00 -0000 Subject: FYI: JToolTip - new tests Message-ID: <447D7935.9020508@object-refinery.com> This patch (committed) adds some tests for the JToolTip class: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JToolTip/getAccessibleContext.java: New file, * gnu/testlet/javax/swing/JToolTip/getComponent.java: New file, * gnu/testlet/javax/swing/JToolTip/getTipText.java: New file, * gnu/testlet/javax/swing/JToolTip/getUIClassID.java: New file, * gnu/testlet/javax/swing/JToolTip/paramString.java: New file, * gnu/testlet/javax/swing/JToolTip/setComponent.java: New file, * gnu/testlet/javax/swing/JToolTip/setTipText.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 12:34:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 12:34:00 -0000 Subject: FYI: JLabel - new tests Message-ID: <447D8D35.9070904@object-refinery.com> This patch (committed) adds some new tests for the JLabel class: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JLabel/getAccessibleContext.java: New file, * gnu/testlet/javax/swing/JLabel/paramString.java: New file, * gnu/testlet/javax/swing/JLabel/setLabelFor.java: New file, * gnu/testlet/javax/swing/JLabel/MyJLabel.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 12:41:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 12:41:00 -0000 Subject: FYI: AccessibleJLabel - new test Message-ID: <447D8ECB.3000109@object-refinery.com> This patch (committed) adds a new test for the AccessibleJLabel class: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JLabel/AccessibleJLabel/getAccessibleName: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 13:24:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 13:24:00 -0000 Subject: FYI: JInternalFrame - new tests Message-ID: <447D98C9.7030904@object-refinery.com> This patch (committed) adds some new tests for the JInternalFrame class: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JInternalFrame/constructors.java: New file, * gnu/testlet/javax/swing/JInternalFrame/dispose.java: New file, * gnu/testlet/javax/swing/JInternalFrame/getDesktopIcon.java: New file, * gnu/testlet/javax/swing/JInternalFrame/getNormalBounds.java: New file, * gnu/testlet/javax/swing/JInternalFrame/isIconifiable.java: New file, * gnu/testlet/javax/swing/JInternalFrame/isResizable.java: New file, * gnu/testlet/javax/swing/JInternalFrame/MyJInternalFrame.java: New file, * gnu/testlet/javax/swing/JInternalFrame/paramString.java: New file, * gnu/testlet/javax/swing/JInternalFrame/setDefaultCloseOperation.java: New file, * gnu/testlet/javax/swing/JInternalFrame/setDesktopIcon.java: New file, * gnu/testlet/javax/swing/JInternalFrame/setFrameIcon.java: New file, * gnu/testlet/javax/swing/JInternalFrame/setNormalBounds.java: New file, * gnu/testlet/javax/swing/JInternalFrame/setTitle.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 13:50:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 13:50:00 -0000 Subject: FYI: More JInternalFrame tests Message-ID: <447D9F2F.9070904@object-refinery.com> This patch (committed) updates some existing tests and adds one new test file: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JInternalFrame/setClosable.java (TestPropertyChangeHandler): Removed, (lastEvent): New field, (propertyChange): New method, (test): Rewritten, * gnu/testlet/javax/swing/JInternalFrame/setIconifiable.java (TestPropertyChangeHandler): Removed, (lastEvent): New field, (propertyChange): New method, (test): Rewritten, * gnu/testlet/javax/swing/JInternalFrame/setResizable.java (TestPropertyChangeHandler): Removed, (lastEvent): New field, (propertyChange): New method, (test): Rewritten, * gnu/testlet/javax/swing/JInternalFrame/setSelected2.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 14:25:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 14:25:00 -0000 Subject: FYI: AccessibleJInternalFrame - new tests Message-ID: <447DA729.6050903@object-refinery.com> This patch (committed) adds some checks for the AccessibleJInternalFrame class: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JInternalFrame/AccessibleJInternalFrame/getAccessibleName.java: New file, * gnu/testlet/javax/swing/JInternalFrame/AccessibleJInternalFrame/getAccessibleRole.java: New file, * gnu/testlet/javax/swing/JInternalFrame/AccessibleJInternalFrame/getAccessibleValue.java: New file, * gnu/testlet/javax/swing/JInternalFrame/AccessibleJInternalFrame/getCurrentAccessibleValue.java: New file, * gnu/testlet/javax/swing/JInternalFrame/AccessibleJInternalFrame/getMaximumAccessibleValue.java: New file, * gnu/testlet/javax/swing/JInternalFrame/AccessibleJInternalFrame/getMinimumAccessibleValue.java: New file, * gnu/testlet/javax/swing/JInternalFrame/AccessibleJInternalFrame/setMaximumAccessibleValue.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 14:37:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 14:37:00 -0000 Subject: FYI: JInternalFrame.setSelected fixlet Message-ID: <447DA9F4.1020607@object-refinery.com> This patch (committed) fixes a minor problem with the setSelected() test: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JInternalFrame/setSelected.java: Removed unnecessary import and fixed API doc warning. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed May 31 16:32:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 16:32:00 -0000 Subject: FYI: JTable.getAccessibleContext() - new test Message-ID: <447DC489.3090007@object-refinery.com> This patch (committed) adds some checks for the getAccessibleContext() method in the JTable class: 2006-05-31 David Gilbert * gnu/testlet/javax/swing/JTable/getAccessibleContext.java: New file, * gnu/testlet/javax/swing/JTable/getCellEditor.java: New file. A patch has already gone into GNU Classpath CVS to fix the failing tests. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From abalkiss@redhat.com Wed May 31 17:24:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 31 May 2006 17:24:00 -0000 Subject: Harness patch to allow code coverage Message-ID: <1149096239.2370.102.camel@tony.toronto.redhat.com> This patch is mainly to allow easy use of the EMMA tool, but also contains small bug fixes. EMMA usage is auto detected so the normal usage will not be affected. 2006-05-31 Anthony Balkissoon * Harness.java: (getBootclasspath): Accept output to console from the auto detector. (finalize): Dump the coverage data. (initProces): Confirm that the RunnerProcess started properly. (runTest): Use a invalidTest flag to suppress output when -showpasses is used and a file is run that is "not-a-test". If the RunnerProcess startup confirmation fails, print a message and exit. Handle the statup confirmation and coverage dump confirmatino from the RunnerProcess. * Makefile.in: Regenerated. * RunnerProcess.java: (emmaJarLocation): New field. (useEMMA): New field. (emmaMethod): New field. (main): Accept the -emma command line argument to specify the emma.jar location. Setup the EMMA coverage dumping facilities. Handle the messages from the Harness indicating we should confirm startup or force a coverage dump. (setupEMMA): New method. (dumpCoverageData): New method. * configure: Regenerated. * configure.in: Added -with-emma method to allow optional setting of emma.jar location. * gnu/testlet/TestHarness.java: (getEmmaString): New method. * gnu/testlet/config.java.in: (emmaString): New field. (getEmmaString): New method. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: HarnessEMMA.diff Type: text/x-patch Size: 17077 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed May 31 17:38:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 31 May 2006 17:38:00 -0000 Subject: Harness patch to allow code coverage In-Reply-To: <1149096239.2370.102.camel@tony.toronto.redhat.com> References: <1149096239.2370.102.camel@tony.toronto.redhat.com> Message-ID: <447DD309.3020201@object-refinery.com> Anthony Balkissoon wrote: >This patch is mainly to allow easy use of the EMMA tool, but also >contains small bug fixes. EMMA usage is auto detected so the normal >usage will not be affected. > > Great! Do you have this working? Is there a report anywhere to see? Regards, Dave From abalkiss@redhat.com Wed May 31 21:02:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 31 May 2006 21:02:00 -0000 Subject: Harness patch to allow code coverage In-Reply-To: <447DD309.3020201@object-refinery.com> References: <1149096239.2370.102.camel@tony.toronto.redhat.com> <447DD309.3020201@object-refinery.com> Message-ID: <1149109326.2370.107.camel@tony.toronto.redhat.com> On Wed, 2006-05-31 at 18:31 +0100, David Gilbert wrote: > Anthony Balkissoon wrote: > > >This patch is mainly to allow easy use of the EMMA tool, but also > >contains small bug fixes. EMMA usage is auto detected so the normal > >usage will not be affected. > > > > > Great! Do you have this working? Is there a report anywhere to see? > > Regards, > > Dave Hi David, yes, it's working now, I have a report viewable internally (ie - Red Hat). I have no public space so I couldn't put them up anywhere else. They will be up on builder.classpath.org soon, Tom Fitzsimmons is now working on that. He also wants to have a combined Japi/code coverage report so you can link to the source code right from the Japi scores and see which lines are being tested. This is all coming soon. --Tony From david.gilbert@object-refinery.com Thu Jun 1 07:51:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 01 Jun 2006 07:51:00 -0000 Subject: Harness patch to allow code coverage In-Reply-To: <1149109326.2370.107.camel@tony.toronto.redhat.com> References: <1149096239.2370.102.camel@tony.toronto.redhat.com> <447DD309.3020201@object-refinery.com> <1149109326.2370.107.camel@tony.toronto.redhat.com> Message-ID: <447E9C78.4030609@object-refinery.com> Anthony Balkissoon wrote: > >Hi David, > >yes, it's working now, I have a report viewable internally (ie - Red >Hat). I have no public space so I couldn't put them up anywhere else. >They will be up on builder.classpath.org soon, Tom Fitzsimmons is now >working on that. He also wants to have a combined Japi/code coverage >report so you can link to the source code right from the Japi scores and >see which lines are being tested. This is all coming soon. > >--Tony > > > Great, I'm looking forward to that. Another thing that would be great is just a set of results for Mauve generated nightly. From time to time, I run this one (that's linked from the GNU Classpath home page): http://www.object-refinery.com/classpath/mauve/report/ ...but the code that generates this is quite flaky...a replacement would be very welcome! Regards, Dave From david.gilbert@object-refinery.com Thu Jun 1 13:42:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 01 Jun 2006 13:42:00 -0000 Subject: FYI: MyJInternalFrame, MyJLabel, MyJToolTip - fixed tags Message-ID: <447EEE13.9010805@object-refinery.com> This patch (committed) marks each of these files as 'not-a-test': 2006-06-01 David Gilbert * gnu/testlet/javax/swing/JInternalFrame/MyJInternalFrame.java: Fixed tag, * gnu/testlet/javax/swing/JLabel/MyJLabel.java: Likewise, * gnu/testlet/javax/swing/JToolTip/MyJToolTip.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From fitzsim@redhat.com Thu Jun 1 16:13:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Thu, 01 Jun 2006 16:13:00 -0000 Subject: Harness patch to allow code coverage In-Reply-To: <447E9C78.4030609@object-refinery.com> References: <1149096239.2370.102.camel@tony.toronto.redhat.com> <447DD309.3020201@object-refinery.com> <1149109326.2370.107.camel@tony.toronto.redhat.com> <447E9C78.4030609@object-refinery.com> Message-ID: <447EEEF5.8080602@redhat.com> David Gilbert wrote: > Anthony Balkissoon wrote: > >> >> Hi David, >> >> yes, it's working now, I have a report viewable internally (ie - Red >> Hat). I have no public space so I couldn't put them up anywhere else. >> They will be up on builder.classpath.org soon, Tom Fitzsimmons is now >> working on that. He also wants to have a combined Japi/code coverage >> report so you can link to the source code right from the Japi scores and >> see which lines are being tested. This is all coming soon. >> >> --Tony >> >> >> > Great, I'm looking forward to that. Another thing that would be great > is just a set of results for Mauve generated nightly. From time to > time, I run this one (that's linked from the GNU Classpath home page): > > http://www.object-refinery.com/classpath/mauve/report/ > > ...but the code that generates this is quite flaky...a replacement would > be very welcome! Yes, we need a nightly script to generate Mauve results. But the report page should be more detailed, laid out like this: Package: Total: Passed: Failed: java.awt 1284 1270 14 And the Failed number should be a link to a list of the specific failing tests, with the failure messages produced by the new harness: Package: java.awt FAIL: gnu.testlet.java.awt.Frame.size1 line 54: got 29 but expected 53 line 45: boolean passed to check was false line 45: boolean passed to check was false line 45: boolean passed to check was false That would tell people which tests to work on. We also need a percentage bar beside each package in the JAPI output, indicating the number passing and failing tests. Tom From theBohemian@gmx.net Thu Jun 1 17:01:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Thu, 01 Jun 2006 17:01:00 -0000 Subject: FYI: test for PR27864 Message-ID: <447F1CF5.1060407@gmx.net> Hi, this patch adds a new test which shows a specific problem in GNU Classpath. 2006-06-01 Robert Schuster * gnu/testlet/javax/xml/parsers/DocumentBuilder/PR27864.java: New test. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-PR27864.diff Type: text/x-patch Size: 3573 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 252 bytes Desc: OpenPGP digital signature URL: From gbenson@redhat.com Fri Jun 2 09:53:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 02 Jun 2006 09:53:00 -0000 Subject: FYI: Comment fixes Message-ID: <20060602095225.GC3558@redhat.com> Hi all, My last commit fixed some broken throwpoint comments that were breaking http://people.redhat.com/gbenson/throwpoint-report.html. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1652 diff -u -r1.1652 ChangeLog --- ChangeLog 1 Jun 2006 16:56:29 -0000 1.1652 +++ ChangeLog 2 Jun 2006 09:26:31 -0000 @@ -1,3 +1,8 @@ +2006-06-02 Gary Benson + + * gnu/testlet/java/awt/Robot/security.java: Comment fixes. + * gnu/testlet/java/awt/Window/security.java: Likewise. + 2006-06-01 Robert Schuster * gnu/testlet/javax/xml/parsers/DocumentBuilder/PR27864.java: New test. Index: gnu/testlet/java/awt/Robot/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Robot/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/awt/Robot/security.java 23 May 2006 09:41:46 -0000 1.1 +++ gnu/testlet/java/awt/Robot/security.java 2 Jun 2006 09:26:31 -0000 @@ -56,7 +56,7 @@ try { sm.install(); - // throwpoint: java.awt.Robot() + // throwpoint: java.awt.Robot-Robot() harness.checkPoint("0-arg constructor"); try { sm.prepareChecks(createRobot, readProperty); @@ -68,7 +68,7 @@ harness.check(false, "unexpected check"); } - // throwpoint: java.awt.Robot(GraphicsDevice) + // throwpoint: java.awt.Robot-Robot(GraphicsDevice) harness.checkPoint("1-arg constructor"); try { sm.prepareChecks(createRobot, readProperty); Index: gnu/testlet/java/awt/Window/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Window/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/awt/Window/security.java 23 May 2006 10:41:23 -0000 1.1 +++ gnu/testlet/java/awt/Window/security.java 2 Jun 2006 09:26:31 -0000 @@ -39,7 +39,6 @@ { try { Toolkit.getDefaultToolkit(); - //Math.log(1); Frame frame = new Frame(); Window window = new Window(frame); @@ -52,7 +51,7 @@ try { sm.install(); - // throwpoint: java.awt.Window(Frame) + // throwpoint: java.awt.Window-Window(Frame) harness.checkPoint("Window(Frame)"); try { sm.prepareChecks(showWindowWithoutWarningBanner); @@ -64,7 +63,7 @@ harness.check(false, "unexpected check"); } - // throwpoint: java.awt.Window(Window) + // throwpoint: java.awt.Window-Window(Window) harness.checkPoint("Window(Window)"); try { sm.prepareChecks(showWindowWithoutWarningBanner); @@ -76,7 +75,7 @@ harness.check(false, "unexpected check"); } - // throwpoint: java.awt.Window(Window, GraphicsConfiguration) + // throwpoint: java.awt.Window-Window(Window, GraphicsConfiguration) harness.checkPoint("Window(Window, GraphicsConfiguration)"); try { sm.prepareChecks(showWindowWithoutWarningBanner); From kgallowa@redhat.com Mon Jun 5 16:59:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Mon, 05 Jun 2006 16:59:00 -0000 Subject: JDWP filter test cases Message-ID: <448462CD.5060405@redhat.com> I have coded up some test cases for two of the JDWP filters(more to come). I would appreciate it if someone would review and commit. Thanks, Kyle From kgallowa@redhat.com Mon Jun 5 17:02:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Mon, 05 Jun 2006 17:02:00 -0000 Subject: JDWP filter test cases In-Reply-To: <448462CD.5060405@redhat.com> References: <448462CD.5060405@redhat.com> Message-ID: <448463AB.1000302@redhat.com> Kyle Galloway wrote: > I have coded up some test cases for two of the JDWP filters(more to > come). I would appreciate it if someone would review and commit. > > Thanks, > Kyle Woops, here are the files. -------------- next part -------------- A non-text attachment was scrubbed... Name: JDWP-tests.patch Type: text/x-patch Size: 8033 bytes Desc: not available URL: From mark@klomp.org Mon Jun 5 17:05:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Mon, 05 Jun 2006 17:05:00 -0000 Subject: JDWP filter test cases In-Reply-To: <448462CD.5060405@redhat.com> References: <448462CD.5060405@redhat.com> Message-ID: <1149527118.21882.6.camel@localhost.localdomain> Hi Kyle, On Mon, 2006-06-05 at 12:58 -0400, Kyle Galloway wrote: > I have coded up some test cases for two of the JDWP filters(more to > come). I would appreciate it if someone would review and commit. Sure that would be cool. But it seems you forgot to attach the actual test cases you wrote. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From langel@redhat.com Mon Jun 5 20:33:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 05 Jun 2006 20:33:00 -0000 Subject: FYI: JFrame test Message-ID: <1149539613.2468.127.camel@tow.toronto.redhat.com> I am committing this for Tania. She has written a test for all the JFrame constructors. 2006-06-05 Tania Bento * gnu/testlet/javax/swing/JFrame/constructors.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: tania_mauve.diff Type: text/x-patch Size: 5225 bytes Desc: not available URL: From tromey@redhat.com Mon Jun 5 20:56:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Mon, 05 Jun 2006 20:56:00 -0000 Subject: JDWP filter test cases In-Reply-To: <448462CD.5060405@redhat.com> References: <448462CD.5060405@redhat.com> Message-ID: >>>>> "Kyle" == Kyle Galloway writes: Kyle> I have coded up some test cases for two of the JDWP filters(more to Kyle> come). I would appreciate it if someone would review and commit. So, these are unit tests for parts of the classpath jdwp implementation? You do need to add "Tags" comments to the new files. I think it is fine to do this, even a good thing :-). However I'd like Keith to weigh in on his preferred testing approach. Tom From keiths@redhat.com Mon Jun 5 21:13:00 2006 From: keiths@redhat.com (Keith Seitz) Date: Mon, 05 Jun 2006 21:13:00 -0000 Subject: JDWP filter test cases In-Reply-To: References: <448462CD.5060405@redhat.com> Message-ID: <44849E83.2080601@redhat.com> Tom Tromey wrote: >>>>>> "Kyle" == Kyle Galloway writes: > > Kyle> I have coded up some test cases for two of the JDWP filters(more to > Kyle> come). I would appreciate it if someone would review and commit. > > So, these are unit tests for parts of the classpath jdwp > implementation? > > You do need to add "Tags" comments to the new files. > > I think it is fine to do this, even a good thing :-). However I'd > like Keith to weigh in on his preferred testing approach. Yes, I definitely think this is a right step. I've spoken to Kyle about it already, but, alas, I didn't know there was a mauve-patches list! In any case, it has always been my intent to add unit tests for the various generic classes, like events, "exceptions"/errors, filters, and so on. Especially the filters, since those are rather strictly defined. At one time, I actually did have tests for several of these things (including VMIdManager, EventManager, and more), but I think I lost most of that when my hard drive went south last year. Or I misplaced it (in the trash) by mistake. I don't remember any more. :-( Since we can't really do much more with classpath alone, we would need to do more functional testing from the VM side, and this is where I have to figure out how proceed. Right now I have my own little Itcl testing suite that I use. We'll have to discuss how to either integrate it or implement something similar. [My Itcl app is actually more a debugging tool than testing. It will dump packets and the like, too, for example.] Keith From david.gilbert@object-refinery.com Tue Jun 6 03:19:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 06 Jun 2006 03:19:00 -0000 Subject: FYI: Some AccessibleJTable tests Message-ID: <4484FF1E.70209@object-refinery.com> This patch adds some tests for AccessibleJTable: 2006-06-06 David Gilbert * gnu/testlet/javax/swing/JTable/AccessibleJTable/getAccessibleColumnHeader.java: New file, * gnu/testlet/javax/swing/JTable/AccessibleJTable/AccessibleJTableCell/getAccessibleRole.java: New file, * gnu/testlet/javax/swing/JTable/AccessibleJTable/AccessibleJTableCell/MyBooleanTableCellRenderer.java: New file, * gnu/testlet/javax/swing/JTable/AccessibleJTable/AccessibleJTableHeaderCell/getAccessibleRole.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Tue Jun 6 09:31:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 06 Jun 2006 09:31:00 -0000 Subject: FYI: JComponent.getInputMap() tests Message-ID: <44854B91.9050508@object-refinery.com> This patch (committed) adds new tests covering the patch I committed to GNU Classpath a few minutes ago: 2006-06-06 David Gilbert * gnu/testlet/javax/swing/JComponent/getInputMap.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From mark@klomp.org Tue Jun 6 09:45:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 06 Jun 2006 09:45:00 -0000 Subject: FYI: Some AccessibleJTable tests In-Reply-To: <4484FF1E.70209@object-refinery.com> References: <4484FF1E.70209@object-refinery.com> Message-ID: <1149587082.4367.20.camel@localhost.localdomain> Hi David, On Tue, 2006-06-06 at 05:05 +0100, David Gilbert wrote: > +/* MyBooleanTableCellRenderer.java -- FIXME: describe > + Copyright (C) 2006 FIXME: your info here > > [...] > +// Tags: FIXME You left some FIXMEs in there. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From david.gilbert@object-refinery.com Tue Jun 6 09:56:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 06 Jun 2006 09:56:00 -0000 Subject: FYI: Some AccessibleJTable tests In-Reply-To: <1149587082.4367.20.camel@localhost.localdomain> References: <4484FF1E.70209@object-refinery.com> <1149587082.4367.20.camel@localhost.localdomain> Message-ID: <44855176.6080203@object-refinery.com> Mark Wielaard wrote: >Hi David, > >On Tue, 2006-06-06 at 05:05 +0100, David Gilbert wrote: > > >>+/* MyBooleanTableCellRenderer.java -- FIXME: describe >>+ Copyright (C) 2006 FIXME: your info here >> >> >>>[...] >>> >>> >>+// Tags: FIXME >> >> > >You left some FIXMEs in there. > >Cheers, > >Mark > > Sorry, thanks for noticing. Fixed by this patch: 2006-06-06 David Gilbert * gnu/testlet/javax/swing/JTable/AccessibleJTable/AccessibleJTableCell/MyBooleanTableCellRenderer.java: Filled in header details (replacing FIXMEs). Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From tromey@redhat.com Tue Jun 6 14:55:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Tue, 06 Jun 2006 14:55:00 -0000 Subject: JDWP filter test cases In-Reply-To: <44849E83.2080601@redhat.com> References: <448462CD.5060405@redhat.com> <44849E83.2080601@redhat.com> Message-ID: >>>>> "Keith" == Keith Seitz writes: Keith> Yes, I definitely think this is a right step. I've spoken to Kyle Keith> about it already, but, alas, I didn't know there was a mauve-patches Keith> list! Half the time I forget about it too :) Anyway, cool. Keith> Since we can't really do much more with classpath alone, we would need Keith> to do more functional testing from the VM side, and this is where I Keith> have to figure out how proceed. Right now I have my own little Itcl Keith> testing suite that I use. We'll have to discuss how to either Keith> integrate it or implement something similar. [My Itcl app is actually Keith> more a debugging tool than testing. It will dump packets and the like, Keith> too, for example.] Yeah, this sounds like something that would be pretty useful to have around for debugging. Where it should go, I don't know. Maybe classpath/scripts. Tom From langel@redhat.com Tue Jun 6 20:08:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 06 Jun 2006 20:08:00 -0000 Subject: FYI: JFrame test In-Reply-To: <1149539613.2468.127.camel@tow.toronto.redhat.com> References: <1149539613.2468.127.camel@tow.toronto.redhat.com> Message-ID: <1149624489.2468.162.camel@tow.toronto.redhat.com> 2006-06-06 Lillian Angel * gnu/testlet/javax/swing/JFrame/constructors.java: Fixed copyright comments. On Mon, 2006-06-05 at 16:33 -0400, Lillian Angel wrote: > I am committing this for Tania. She has written a test for all the > JFrame constructors. > > 2006-06-05 Tania Bento > > * gnu/testlet/javax/swing/JFrame/constructors.java: New test. > -------------- next part -------------- A non-text attachment was scrubbed... Name: t2_m.diff Type: text/x-patch Size: 2044 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Jun 6 22:15:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 06 Jun 2006 22:15:00 -0000 Subject: FYI: JList.getInputMap() tests Message-ID: <4485FEC6.4020604@object-refinery.com> This patch (committed) adds some tests for the getInputMap() methods inherited by JList (this in fact tests the set-up performed by BasicListUI): 2006-06-06 David Gilbert * gnu/testlet/javax/swing/JList/getInputMap.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jun 7 09:49:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 07 Jun 2006 09:49:00 -0000 Subject: FYI: Swing key mapping tests Message-ID: <4486A152.1000808@object-refinery.com> This patch (committed) adds checks for the key mappings of a number of Swing components. Not all the mappings are correct yet, so there are some failures: 2006-06-07 David Gilbert * gnu/testlet/javax/swing/JInternalFrame/getInputMap.java: New file, * gnu/testlet/javax/swing/JLabel/getInputMap.java: New file, * gnu/testlet/javax/swing/JMenu/getInputMap.java: New file, * gnu/testlet/javax/swing/JMenuBar/getInputMap.java: New file, * gnu/testlet/javax/swing/JOptionPane/getInputMap.java: New file, * gnu/testlet/javax/swing/JOptionPane/MyJOptionPane.java: New file, * gnu/testlet/javax/swing/JPopupMenu/getInputMap.java: New file, * gnu/testlet/javax/swing/JScrollBar/getInputMap.java: New file, * gnu/testlet/javax/swing/JScrollPane/getInputMap.java: New file, * gnu/testlet/javax/swing/JSplitPane/getInputMap.java: New file, * gnu/testlet/javax/swing/JTabbedPane/getInputMap.java: New file, * gnu/testlet/javax/swing/JTable/getInputMap.java: New file, * gnu/testlet/javax/swing/JTableHeader/getInputMap.java: New file, * gnu/testlet/javax/swing/JToolBar/getInputMap.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From fitzsim@redhat.com Wed Jun 7 14:39:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Wed, 07 Jun 2006 14:39:00 -0000 Subject: RFC: remove old harness Message-ID: <4486E4A2.50004@redhat.com> Hi, This patch removes the old harness and makes the new one the default. It also makes: ./configure --with-vm=/path/to/vm make make check work. I wanted some comments before making this change. It reports test results differently -- each test is a pass/fail rather than each check -- so we'll also need to update our nightly scripts. The new harness is better than the old one in every way, in my opinion, so I see no reason in keeping the old one around. What do people think? Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-remove-old-harness.patch Type: text/x-patch Size: 59056 bytes Desc: not available URL: From fkung@redhat.com Wed Jun 7 18:55:00 2006 From: fkung@redhat.com (Francis Kung) Date: Wed, 07 Jun 2006 18:55:00 -0000 Subject: RFC: JMenuBar tests Message-ID: <1149706530.3664.37.camel@to-fcjpp2.toronto.redhat.com> Hello, Please find attached a number of new tests for the JMenuBar class. Francis 2006-06-07 Francis Kung * gnu/testlet/javax/swing/JMenuBar/basic.java: New tests. * gnu/testlet/javax/swing/JMenuBar/constructors.java: New tests. * gnu/testlet/javax/swing/JMenuBar/getComponentIndex.java: New tests. * gnu/testlet/javax/swing/JMenuBar/getMenu.java: New tests. * gnu/testlet/javax/swing/JMenuBar/getSubElements.java: New tests. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-JMenuBar.diff Type: text/x-patch Size: 14525 bytes Desc: not available URL: From langel@redhat.com Wed Jun 7 19:06:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 07 Jun 2006 19:06:00 -0000 Subject: RFC: JMenuBar tests In-Reply-To: <1149706530.3664.37.camel@to-fcjpp2.toronto.redhat.com> References: <1149706530.3664.37.camel@to-fcjpp2.toronto.redhat.com> Message-ID: <1149707171.2468.200.camel@tow.toronto.redhat.com> Great tests! I will commit these for you. You need to get yourself commit access :) On Wed, 2006-06-07 at 14:55 -0400, Francis Kung wrote: > Hello, > > Please find attached a number of new tests for the JMenuBar class. > > Francis > > > 2006-06-07 Francis Kung > > * gnu/testlet/javax/swing/JMenuBar/basic.java: New tests. > * gnu/testlet/javax/swing/JMenuBar/constructors.java: New tests. > * gnu/testlet/javax/swing/JMenuBar/getComponentIndex.java: New tests. > * gnu/testlet/javax/swing/JMenuBar/getMenu.java: New tests. > * gnu/testlet/javax/swing/JMenuBar/getSubElements.java: New tests. > From tbento@redhat.com Wed Jun 7 20:42:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 07 Jun 2006 20:42:00 -0000 Subject: Patch: JButton constructor tests Message-ID: <1149711849.2269.2.camel@toad.toronto.redhat.com> Constructor tests for JButton. langel has approved it and I will commit it. 2006-06-07 Tania Bento * gnu/testlet/javax/swing/JButton/constructors.java: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 7269 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed Jun 7 21:48:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 07 Jun 2006 21:48:00 -0000 Subject: FYI: InternalFrameEvent tests Message-ID: <4487450D.20008@object-refinery.com> This patch (committed) adds some tests for the InternalFrameEvent class: 2006-06-07 David Gilbert * gnu/testlet/javax/swing/event/InternalFrameEvent/constructor.java: New file, * gnu/testlet/javax/swing/event/InternalFrameEvent/getInternalFrame.java: New file, * gnu/testlet/javax/swing/event/InternalFrameEvent/paramString.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jun 7 22:57:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 07 Jun 2006 22:57:00 -0000 Subject: FYI: AccessibleJTableHeader tests Message-ID: <4487553C.6070407@object-refinery.com> This patch (committed) adds tests for the AccessibleJTableHeader: 2006-06-07 David Gilbert * gnu/testlet/javax/swing/table/JTableHeader/getAccessibleContext.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/getAccessibleChild.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/getAccessibleChildrenCount.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/getAccessibleRole.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getAccessibleChild.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getAccessibleChildrenCount.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getAccessibleComponent.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getAccessibleContext.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getAccessibleDescription.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getAccessibleIndexInParent.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getAccessibleName.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getAccessibleRole.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getAccessibleValue.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getBackground.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getFont.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getForeground.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/getLocale.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/isFocusTraversable.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/isVisible.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/MyTableCellRenderer.java: New file, * gnu/testlet/javax/swing/table/JTableHeader/AccessibleJTableHeader/AccessibleJTableHeaderEntry/setAccessibleName.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Thu Jun 8 11:12:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 08 Jun 2006 11:12:00 -0000 Subject: FYI: JScrollPane.getActionMap() test Message-ID: <44880665.9080404@object-refinery.com> This patch (committed) adds a test for the getActionMap() method in the JScrollPane class: 2006-06-08 David Gilbert * gnu/testlet/javax/swing/JScrollPane/getActionMap.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Thu Jun 8 14:59:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 08 Jun 2006 14:59:00 -0000 Subject: FYI: Graphics2D.setTransform() test Message-ID: <44883B5F.8090207@object-refinery.com> This patch (committed) adds tests for the setTransform() and transform() methods in Graphics2D: 2006-06-08 David Gilbert * gnu/testlet/java/awt/Graphics2D/setTransform.java: New file, * gnu/testlet/java/awt/Graphics2D/transform.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Thu Jun 8 17:28:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 08 Jun 2006 17:28:00 -0000 Subject: FYI: More Graphics2D tests Message-ID: <44884D75.7000209@object-refinery.com> This patch (committed) adds some more checks for Graphics2D: 2006-06-08 David Gilbert * gnu/testlet/java/awt/Graphics2D/clip.java: New file, * gnu/testlet/java/awt/Graphics2D/getClip.java: New file, * gnu/testlet/java/awt/Graphics2D/getClipBounds.java: New file, * gnu/testlet/java/awt/Graphics2D/setClip.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From fkung@redhat.com Thu Jun 8 19:29:00 2006 From: fkung@redhat.com (Francis Kung) Date: Thu, 08 Jun 2006 19:29:00 -0000 Subject: FYI: Extra ComboBox test Message-ID: <1149794945.14111.20.camel@to-fcjpp2.toronto.redhat.com> Hi, Extra test (committed) for the BasicComboBoxUI, checking for the proper height when a null or empty item has been included in the combobox. Regards, Francis 2006-06-08 Francis Kung * gnu/testlet/javax/swing/plaf/basic/BasicComboBoxUI/getPreferredSize.java: Additional tests for null and empty elements. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-ComboBox.diff Type: text/x-patch Size: 1045 bytes Desc: not available URL: From kgallowa@redhat.com Fri Jun 9 14:55:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Fri, 09 Jun 2006 14:55:00 -0000 Subject: RFC: JDWP filter tests Message-ID: <44898BC3.9050704@redhat.com> Here are 5 tests for JDWP filters. ChangeLog: 2006-06-05 Kyle Galloway * gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassMatchFilter.java: New file. * gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassExcludeFilter.java: New file. * gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfInstanceOnlyFilter.java: New file. * gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfCountFilter.java: New file. * gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassOnlyFilter.java: New file. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: jdwp-filter-testspatch URL: From kgallowa@redhat.com Fri Jun 9 15:05:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Fri, 09 Jun 2006 15:05:00 -0000 Subject: RFC: JDWP filter tests In-Reply-To: <44898BC3.9050704@redhat.com> References: <44898BC3.9050704@redhat.com> Message-ID: <44898E21.2010600@redhat.com> Kyle Galloway wrote: > Here are 5 tests for JDWP filters. > > ChangeLog: > > 2006-06-05 Kyle Galloway > > * > gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassMatchFilter.java: > > New file. > * > gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassExcludeFilter.java: > > New file. > * > gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfInstanceOnlyFilter.java: > > New file. > * > gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfCountFilter.java: > New file. > * > gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassOnlyFilter.java: > New file. Reposting with Tags properly set, sorry about that... -Kyle -------------- next part -------------- A non-text attachment was scrubbed... Name: jdwp-filter-tests.patch Type: text/x-patch Size: 19804 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Jun 9 15:48:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 09 Jun 2006 15:48:00 -0000 Subject: RFC: remove old harness In-Reply-To: <4486E4A2.50004@redhat.com> References: <4486E4A2.50004@redhat.com> Message-ID: <4489987D.8000403@object-refinery.com> Thomas Fitzsimmons wrote: > Hi, > > This patch removes the old harness and makes the new one the default. > It also makes: > > ./configure --with-vm=/path/to/vm > make > make check > > work. I wanted some comments before making this change. It reports > test results differently -- each test is a pass/fail rather than each > check -- so we'll also need to update our nightly scripts. > > The new harness is better than the old one in every way, in my > opinion, so I see no reason in keeping the old one around. > > What do people think? > > Tom No objections from me. Regards, Dave From david.gilbert@object-refinery.com Fri Jun 9 16:24:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 09 Jun 2006 16:24:00 -0000 Subject: FYI: ColorModel constructor tests Message-ID: <4489A0D2.9010100@object-refinery.com> This patch (committed) adds some checks for the constructors in the ColorModel class: 2006-06-09 David Gilbert * gnu/testlet/java/awt/image/ColorModel/MyColorModel.java: New file, * gnu/testlet/java/awt/image/ColorModel/constructors.java: New file. I didn't fix the failures in Classpath yet, because I'm still unfamiliar with the dependencies in this part of the code. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From sven@physto.se Fri Jun 9 18:58:00 2006 From: sven@physto.se (Sven de Marothy) Date: Fri, 09 Jun 2006 18:58:00 -0000 Subject: Additional Bidi tests. Message-ID: <1149879494.27856.0.camel@qcplx01.physto.se> Found a bidi bug, here's a test. /Sven -------------- next part -------------- A non-text attachment was scrubbed... Name: bidi.patch Type: text/x-patch Size: 1097 bytes Desc: not available URL: From keiths@redhat.com Fri Jun 9 21:02:00 2006 From: keiths@redhat.com (Keith Seitz) Date: Fri, 09 Jun 2006 21:02:00 -0000 Subject: RFC: JDWP filter tests In-Reply-To: <44898E21.2010600@redhat.com> References: <44898BC3.9050704@redhat.com> <44898E21.2010600@redhat.com> Message-ID: <4489E1F1.1010604@redhat.com> Kyle Galloway wrote: > Index: gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassExcludeFilter.java > =================================================================== > RCS file: gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassExcludeFilter.java > diff -N gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassExcludeFilter.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassExcludeFilter.java 1 Jan 1970 00:00:00 -0000 > @@ -0,0 +1,97 @@ I only have one comment on this (and it applies to the others, too, probably): Are there any inputs to ClassMatchFilter which are simply illegal? For example, the spec describes the pattern as "Disallowed class pattern. Matches are limited to exact matches of the given class pattern and matches of patterns that begin or end with '*'; for example, "*.Foo" or "java.*"." One of the errors that is listed at the end of the description of Event.Set is "INVALID_STRING". Perhaps that is bit overboard, though. I don't really know. You can't really do much with this for many filters, e.g., ClassOnlyFilter, because of they require valid IDs and the like, and they are checked by PacketProcessor and *CommandSet before creating the filter. Of course, this begs the question: Should this check be done by the filter or the command set processor that is creating the filter? Alas, that's a different conversation for a different list. [The most prudent answer to this is that we should always test for invalid input. If that check is done in the code in the filter, then it should be tested in the filter. If the check is done somewhere else, it should be tested there, too. But regardless of where the check and test are located, they should both be done.] > Index: gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassOnlyFilter.java > =================================================================== > RCS file: gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassOnlyFilter.java > diff -N gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassOnlyFilter.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfClassOnlyFilter.java 1 Jan 1970 00:00:00 -0000 > @@ -0,0 +1,105 @@ [snip] > + public void testConstructor(TestHarness harness) > + { > + harness.checkPoint("Constructor"); > + for (int i = 0; i < 3; i++) > + { > + ReferenceTypeId testId = new ClassReferenceTypeId(); > + SoftReference testSR = new SoftReference(Integer.class); > + testId.setReference(testSR); > + > + try > + { > + ClassOnlyFilter testCOF = new ClassOnlyFilter(testId); > + } > + catch (InvalidClassException ex) > + { > + harness.check(false, "Constructor failed with exception" + ex); > + } > + } > + } I think I mentioned this before, but you could simply use VMIdManager to get Object and ReferenceType IDs. No big deal, though, if you would rather avoid that. What about testing the case where the constructor *should* fail, i.e., don't set the reference for the ID. [aside from the whole "should it be checked here somewhere else" thing again] > Index: gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfCountFilter.java > =================================================================== > RCS file: gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfCountFilter.java > diff -N gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfCountFilter.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfCountFilter.java 1 Jan 1970 00:00:00 -0000 [snip] > + try > + { > + CountFilter testCF = new CountFilter(COUNT); > + for (int i = 0; i < COUNT; i++) > + { > + matched = testCF.matches(new ClassPrepareEvent(Thread.currentThread(), > + Integer.class, 0)); > + if(i < COUNT-1) > + harness.check(!matched, "Matches returns false for < count"); > + else > + harness.check(matched, "Matches returns true after count # of" > + + "events"); > + } > + } > + catch(InvalidCountException ex) > + { > + harness.check(false, "Constructor failed for valid count"); > + } > + } I suggest looping over something like "COUNT + 1" to check what happens when the count has been exceeded. It should *only* match once. [Missing a space in the string "Matches returns true after count # ofevents".] You could recycle the event instead of creating a new one every time. Probably doesn't matter, but it would be trivial enough in this case to keep that overhead out of the testsuite. > Index: gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfInstanceOnlyFilter.java > =================================================================== > RCS file: gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfInstanceOnlyFilter.java > diff -N gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfInstanceOnlyFilter.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ gnu/testlet/gnu/classpath/jdwp/events/filters/TestOfInstanceOnlyFilter.java 1 Jan 1970 00:00:00 -0000 [snip] > + try > + { > + InstanceOnlyFilter testIOF = new InstanceOnlyFilter(testOID); > + harness.check(true, "Constructor successful"); > + } > + catch (InvalidObjectException ex) > + { > + harness.check(false, "constructor failed for valid ObjectId"); > + } > + > + } Another good place to try passing something invalid to the constructor and test whether it fails. Also, for this one, "null" should be tested as a constructor argument, since it is valid. > + try > + { > + InstanceOnlyFilter testIOF = new InstanceOnlyFilter(testOID); > + BreakpointEvent testEvent = new BreakpointEvent(Thread.currentThread(), > + null, testInt); > + harness.check(testIOF.matches(testEvent), "testing Instance match"); > + } > + catch (InvalidObjectException ex) > + { > + harness.check(false, "constructor failed for valid ObjectId"); > + } > + } Missing a test where this should fail. Hmm. What about things to test object equality? Maybe add a test that checks against a clone of the object? I think for InstanceOnly, we need obj1 == obj2, not obj1.equals(obj2). Keith From tromey@redhat.com Mon Jun 12 15:44:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Mon, 12 Jun 2006 15:44:00 -0000 Subject: RFC: remove old harness In-Reply-To: <4486E4A2.50004@redhat.com> References: <4486E4A2.50004@redhat.com> Message-ID: >>>>> "Tom" == Thomas Fitzsimmons writes: Tom> I wanted some comments before making this change. It reports Tom> test results differently -- each test is a pass/fail rather than each Tom> check -- so we'll also need to update our nightly scripts. If the output is vaguely similar ("PASS: foo") then I think all we need to do is delete our old baselines. Tom> The new harness is better than the old one in every way, in my Tom> opinion, so I see no reason in keeping the old one around. I didn't read the patch or anything, I take your word for it. Tom> What do people think? Forward! Do we need to update the build code in libgcj's test suite? I think mauve testing there has been broken for a while :( It would be nice to make that more robust. Tom From fkung@redhat.com Mon Jun 12 19:50:00 2006 From: fkung@redhat.com (Francis Kung) Date: Mon, 12 Jun 2006 19:50:00 -0000 Subject: FYI: Combo box mouseclicks Message-ID: <1150141814.2486.6.camel@to-fcjpp2.toronto.redhat.com> Thanks to Lillian and Tom for pointing me to the Robot class; new mauve test (committed) for the JComboBox mouseclick patch I submitted earlier on the classpath list. Francis 2006-06-12 Francis Kung * gnu/testlet/javax/swing/JComboBox/basic.java: (test): added new test (testTogglingVisibility): new test for mouse clicks -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-JComboBox.diff Type: text/x-patch Size: 2671 bytes Desc: not available URL: From mark@klomp.org Tue Jun 13 07:38:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 13 Jun 2006 07:38:00 -0000 Subject: FYI: Graphics2D.setTransform() test In-Reply-To: <44883B5F.8090207@object-refinery.com> References: <44883B5F.8090207@object-refinery.com> Message-ID: <1150184321.4740.5.camel@localhost.localdomain> Hi David, On Thu, 2006-06-08 at 15:59 +0100, David Gilbert wrote: > 2006-06-08 David Gilbert > > * gnu/testlet/java/awt/Graphics2D/setTransform.java: New file, > * gnu/testlet/java/awt/Graphics2D/transform.java: New file. I changed these slightly to prevent some class cast exceptions. getClip() returns a Shape. And at least the GNU Classpath implementation sometimes just returns a GeneralPath instead of a Rectangle2D, probably a missed optimization, but I don't think it is actually wrong, even though the tests still fail of course. 2006-06-13 Mark Wielaard * gnu/testlet/java/awt/Graphics2D/setTransform.java: getClip() returns a Shape. * gnu/testlet/java/awt/Graphics2D/transform.java: Likewise. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: getClip-Shape.patch Type: text/x-patch Size: 2552 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From gbenson@redhat.com Tue Jun 13 14:03:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 13 Jun 2006 14:03:00 -0000 Subject: FYI: Minor cleanups Message-ID: <20060613140323.GB3625@redhat.com> Hi all, My last commit removed some unnecessary workarounds from the AWT throwpoint checks. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1678 diff -u -r1.1678 ChangeLog --- ChangeLog 13 Jun 2006 10:54:00 -0000 1.1678 +++ ChangeLog 13 Jun 2006 14:01:02 -0000 @@ -1,3 +1,8 @@ +2006-06-13 Gary Benson + + * gnu/testlet/java/awt/Robot/security.java: Minor cleanup. + * gnu/testlet/java/awt/Window/security.java: Likewise. + 2006-06-13 Raif S. Naffah * gnu/testlet/gnu/javax/crypto/jce/TestOfPR27849.java: New test. Index: gnu/testlet/java/awt/Robot/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Robot/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/awt/Robot/security.java 2 Jun 2006 09:27:54 -0000 1.2 +++ gnu/testlet/java/awt/Robot/security.java 13 Jun 2006 14:01:02 -0000 @@ -26,7 +26,6 @@ import java.awt.GraphicsDevice; import java.awt.GraphicsEnvironment; import java.awt.Robot; -import java.awt.Toolkit; import java.security.Permission; import java.util.PropertyPermission; @@ -39,9 +38,6 @@ public void test(TestHarness harness) { try { - Toolkit.getDefaultToolkit(); - Math.log(1); - GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment() .getDefaultScreenDevice(); Index: gnu/testlet/java/awt/Window/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Window/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/awt/Window/security.java 2 Jun 2006 09:27:54 -0000 1.2 +++ gnu/testlet/java/awt/Window/security.java 13 Jun 2006 14:01:02 -0000 @@ -25,7 +25,6 @@ import java.awt.AWTPermission; import java.awt.Frame; import java.awt.GraphicsConfiguration; -import java.awt.Toolkit; import java.awt.Window; import java.security.Permission; @@ -38,8 +37,6 @@ public void test(TestHarness harness) { try { - Toolkit.getDefaultToolkit(); - Frame frame = new Frame(); Window window = new Window(frame); GraphicsConfiguration gc = window.getGraphicsConfiguration(); From tbento@redhat.com Tue Jun 13 14:54:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 13 Jun 2006 14:54:00 -0000 Subject: FYI: JCheckBoxItem test Message-ID: <1150210473.2274.5.camel@toad.toronto.redhat.com> I have written a test for all of the JCheckBoxMenuItem constructors and fixed the constructor regressions. 2006-06-13 Tania Bento * gnu/testlet/javax/swing/JCheckBoxMenuItem/constructors.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 8785 bytes Desc: not available URL: From langel@redhat.com Wed Jun 14 14:23:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 14 Jun 2006 14:23:00 -0000 Subject: FYI: PixelGrabber test Message-ID: <1150294983.29068.72.camel@tow.toronto.redhat.com> 2006-06-14 Lillian Angel * gnu/testlet/java/awt/image/PixelGrabber/testNullProducer.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve.diff Type: text/x-patch Size: 1784 bytes Desc: not available URL: From langel@redhat.com Wed Jun 14 16:33:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 14 Jun 2006 16:33:00 -0000 Subject: FYI: TextComponent test Message-ID: <1150302772.29068.81.camel@tow.toronto.redhat.com> This test shows how all old-style mouse events are ignored when performed on TextComponents 2006-06-14 Lillian Angel * gnu/testlet/java/awt/TextComponent/ignoreOldMouseEvents.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve.diff Type: text/x-patch Size: 4090 bytes Desc: not available URL: From abalkiss@redhat.com Wed Jun 14 19:30:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 14 Jun 2006 19:30:00 -0000 Subject: RFC: remove old harness In-Reply-To: <4486E4A2.50004@redhat.com> References: <4486E4A2.50004@redhat.com> Message-ID: <1150313389.25174.23.camel@tony.toronto.redhat.com> This patch is committed as follows. 2006-06-14 Anthony Balkissoon * .cvsignore: Removed .ecjOut and .ecjErr from this file. * Harness.java: (lastFailingCompile): New field. (numCompileFailsInFolder): New field. (showCompilationErrors): Removed this field. (main): Removed the handling of showCompilationErrors. (setupCompiler): Changed ecjWriterOut and ecjWriterErr to use custom PrintWriters instead of writing to .ecjOut and .ecjErr. (getClasspathInstallString): Do not look for the property in config.java, the -with-bootclasspath option has been removed from configuration. (printHelpMessage): Changed the "exceptions" message to indicate that full stack traces are now printed by default. (compileFolder): Removed the code that reads the compiler output and parses it, this is now done in the custom PrintWriter used by the compiler. (compileTest): Likewise. (problemsString): Removed this method. (isCompileSummary): New method. (CompilerErrorWriter): New class. * Makefile.am: Removed SimpleTestHarness.java from harness_files target, removed references to the old harness structure, added check_local and clean_local targets. * Makefile.in: Regenerated. * README: Mentioned that exceptions are now printed by default and -noexceptions is the option to turn them off. * README.OldHarness: Removed this file. * README.TestletToAPI: Likewise. * RunnerProcess.java: (exceptions): Changed from false by default to true by default. (main): Changed -exceptions to -noexceptions. * aclocal.m4: Regenerated. * batch_run: Removed this file. * build.xml: Likewise. * choose: Likewise. * choose-classes: Likewise. * configure: Regenerated. * configure.in: Do not export MAUVEVM, removed --with-gcj option, removed --with-bootclasspath option, removed --enable-gcj-classes option, removed --enable-class-files option. * runner: Removed this file. * uses-list: Likewise. On Wed, 2006-06-07 at 10:37 -0400, Thomas Fitzsimmons wrote: > Hi, > > This patch removes the old harness and makes the new one the default. It also > makes: > > ./configure --with-vm=/path/to/vm > make > make check > > work. I wanted some comments before making this change. It reports test > results differently -- each test is a pass/fail rather than each check -- so > we'll also need to update our nightly scripts. > > The new harness is better than the old one in every way, in my opinion, so I see > no reason in keeping the old one around. > > What do people think? > > Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: OldHarnessRemoveStripped.diff Type: text/x-patch Size: 66187 bytes Desc: not available URL: From kgallowa@redhat.com Wed Jun 14 20:03:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Wed, 14 Jun 2006 20:03:00 -0000 Subject: RFA JDWP TestOfClassExcludeFilter Message-ID: <44906B7D.3060104@redhat.com> Test for ClassExcludeFilter from JDWP. Requesting approval, and commit since I don't have access. Thanks, Kyle -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4597 bytes Desc: not available URL: From kgallowa@redhat.com Wed Jun 14 20:12:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Wed, 14 Jun 2006 20:12:00 -0000 Subject: RFA JDWP TestOfClassMatchFilter Message-ID: <44906DAD.8040209@redhat.com> Test for ClassMatchFilter from JDWP. Requesting approval, and commit since I don't have access. Thanks, Kyle -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4580 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed Jun 14 22:31:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 14 Jun 2006 22:31:00 -0000 Subject: FYI: Polygon.getPathIterator() test Message-ID: <44908E10.9050105@object-refinery.com> I added a test for the getPathIterator() method in the Polygon class: 2006-06-14 David Gilbert * gnu/testlet/java/awt/Polygon/getPathIterator.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From vivekl@redhat.com Thu Jun 15 01:39:00 2006 From: vivekl@redhat.com (Vivek Lakshmanan) Date: Thu, 15 Jun 2006 01:39:00 -0000 Subject: FYI: New test for Cipher init behaviour Message-ID: <4490B992.90504@redhat.com> Hi, Added a new test to outline proper behaviour for javax.crypto.Cipher.init when cipher parameters are not specified. Thanks, Vivek Changelog: 2006-06-14 Vivek Lakshmanan * gnu/testlet/gnu/javax/crypto/jce/TestOfCipherEngineInit.java: New test. Index: gnu/testlet/gnu/javax/crypto/jce/TestOfCipherEngineInit.java =================================================================== RCS file: gnu/testlet/gnu/javax/crypto/jce/TestOfCipherEngineInit.java diff -N gnu/testlet/gnu/javax/crypto/jce/TestOfCipherEngineInit.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/gnu/javax/crypto/jce/TestOfCipherEngineInit.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,160 @@ +/* TestOfCipherEngineInit.java -- Some more tests for engineInit + * related to the tests in TestOfPR27849. + Copyright (C) 2006 Free Software Foundation, Inc. + This file is part of Mauve. + + Mauve is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + Mauve is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Mauve; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + 02110-1301 USA. + + */ + + +package gnu.testlet.gnu.javax.crypto.jce; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import java.security.InvalidKeyException; +import java.security.Key; +import java.security.SecureRandom; + +import javax.crypto.Cipher; +import javax.crypto.KeyGenerator; + +/** + * Regression test for logic around engineInit(int, Key, SecureRandom) If the + * cipher being initialized requires parameters not derivable from the key, then + * defaults/random parameters must be generated, provide the opmode is ENCRYPT + * and WRAP. If the opmode is DECRYPT or UNWRAP then an exception should be + * thrown. + */ +public class TestOfCipherEngineInit + implements Testlet +{ + private Key key; + + private Cipher cipher; + + byte[] iv; + + /* + * (non-Javadoc) + * + * @see gnu.testlet.Testlet#test(gnu.testlet.TestHarness) + */ + public void test(TestHarness harness) + { + setUp(harness); + testECB(harness); + testNotECB(harness); + } + + private void setUp(TestHarness harness) + { + try + { + KeyGenerator keyG = KeyGenerator.getInstance("DESede"); + keyG.init(new SecureRandom()); + key = keyG.generateKey(); + } + catch (Exception e) + { + harness.debug(e); + harness.fail(String.valueOf(e)); + } + + } + + private void testECB(TestHarness harness) + { + try + { + cipher = Cipher.getInstance("DESede/ECB/NoPadding"); + String input = "Does this work ?"; + + cipher.init(Cipher.ENCRYPT_MODE, key); + iv = cipher.getIV(); + harness.check(iv == null, + "(Encrypting) cipher.getIV() for ECB MUST return null"); + byte[] plaintext = input.getBytes(); + byte[] ciphertext = cipher.doFinal(plaintext); + + iv = null; + cipher.init(Cipher.DECRYPT_MODE, key); + iv = cipher.getIV(); + harness.check(iv == null, + "(Decrypting) cipher.getIV() for ECB MUST return null"); + byte[] plaintext2 = cipher.doFinal(ciphertext); + String recovered = new String(plaintext2); + + harness.check(input.equals(recovered), + "Original and recovered texts MUST be equal"); + } + catch (Exception x) + { + harness.debug(x); + harness.fail(String.valueOf(x)); + } + } + + public void testNotECB(TestHarness harness) + { + try + { + cipher = Cipher.getInstance("DESede/CBC/NoPadding"); + String input = "Does this work ?"; + + cipher.init(Cipher.ENCRYPT_MODE, key); + iv = cipher.getIV(); + harness.check(iv != null, + "(Encrypting) cipher.getIV() for CBC MUST NOT return null"); + harness.check(iv.length == 8, "(Encrypting) IV length for MUST be 8"); + byte[] plaintext = input.getBytes(); + byte[] ciphertext = cipher.doFinal(plaintext); + + iv = null; + try + { + cipher.init(Cipher.DECRYPT_MODE, key); + harness.fail("(Decrypting) init of CBC without IV NOT possible"); + } + catch (Exception e) + { + String type = e.getClass().getName(); + harness.check(type.equals(InvalidKeyException.class.getName()), + "(Decrypt) No exception at CBC init without IV"); + } + cipher.init(Cipher.DECRYPT_MODE, key, cipher.getParameters()); + iv = cipher.getIV(); + harness.check(iv != null, + "(Decrypting) cipher.getIV() for CBC MUST NOT return null"); + harness.check(iv.length == 8, "(Decrypt) IV length for CBC should be 8"); + byte[] plaintext2 = cipher.doFinal(ciphertext); + String recovered = new String(plaintext2); + + harness.check(input.equals(recovered), + "Original and recovered texts MUST be equal"); + } + catch (Exception x) + { + harness.debug(x); + harness.fail(String.valueOf(x)); + } + } + + //TODO: Add tests for WRAP and UNWRAP too. + + +} From kgallowa@redhat.com Thu Jun 15 14:21:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Thu, 15 Jun 2006 14:21:00 -0000 Subject: RFA JDWP TestOfClassExcludeFilter(fixed) Message-ID: <44916CE8.50707@redhat.com> Test for ClassExcludeFilter from JDWP. Requesting approval, and commit since I don't have access. Must have been half asleep last time formatting was wrong, and I forgot a changelog. Thanks, Kyle 2006-06-15 Kyle Galloway * gnu/testlet/gnu/classpath/jdwp/event/filters/ ClassExcludeFilter.java: New Test. -------------- next part -------------- A non-text attachment was scrubbed... Name: classexcludefilter.patch Type: text/x-patch Size: 5368 bytes Desc: not available URL: From kgallowa@redhat.com Thu Jun 15 14:22:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Thu, 15 Jun 2006 14:22:00 -0000 Subject: RFA JDWP TestOfClassMatchFilter Message-ID: <44916D09.4090000@redhat.com> Test for ClassMatchFilter from JDWP. Requesting approval, and commit since I don't have access. Must have been half asleep last time formatting was wrong, and I forgot a changelog. Thanks, Kyle 2006-06-15 Kyle Galloway * gnu/testlet/gnu/classpath/jdwp/event/filters/ ClassMatchFilter.java: New Test. -------------- next part -------------- A non-text attachment was scrubbed... Name: classmatchfilter.patch Type: text/x-patch Size: 5255 bytes Desc: not available URL: From kgallowa@redhat.com Thu Jun 15 14:23:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Thu, 15 Jun 2006 14:23:00 -0000 Subject: RFA JDWP TestOfClassOnlyFilter Message-ID: <44916D5C.10608@redhat.com> Test for ClassOnlyFilter from JDWP. Requesting approval, and commit since I don't have access. Thanks, Kyle 2006-06-15 Kyle Galloway * gnu/testlet/gnu/classpath/jdwp/event/filters/ ClassOnlyFilter.java: New Test. -------------- next part -------------- A non-text attachment was scrubbed... Name: classonlyfilter.patch Type: text/x-patch Size: 4140 bytes Desc: not available URL: From kgallowa@redhat.com Thu Jun 15 14:53:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Thu, 15 Jun 2006 14:53:00 -0000 Subject: RFA JDWP TestOfCountFilter Message-ID: <44917466.5090406@redhat.com> Test for CountFilter from JDWP. Requesting approval, and commit since I don't have access. Thanks, Kyle 2006-06-15 Kyle Galloway * gnu/testlet/gnu/classpath/jdwp/event/filters/ CountFilter.java: New Test. -------------- next part -------------- A non-text attachment was scrubbed... Name: countfilter.patch Type: text/x-patch Size: 3803 bytes Desc: not available URL: From konqueror@gmx.de Thu Jun 15 15:34:00 2006 From: konqueror@gmx.de (Michael Koch) Date: Thu, 15 Jun 2006 15:34:00 -0000 Subject: RFA JDWP TestOfCountFilter In-Reply-To: <44917466.5090406@redhat.com> References: <44917466.5090406@redhat.com> Message-ID: <20060615153429.GO30916@mail.konqueror.de> On Thu, Jun 15, 2006 at 10:53:26AM -0400, Kyle Galloway wrote: > +// Tags: JDK1.4 That is wrong. gnu.classpath.jdwp.event.filters is no package provided by SUNs impl. Its classpath specific. The tag should reflect this. Cheers, Michael -- http://www.worldforge.org/ From kgallowa@redhat.com Thu Jun 15 17:13:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Thu, 15 Jun 2006 17:13:00 -0000 Subject: RFA JDWP TestOfCountFilter In-Reply-To: <20060615153429.GO30916@mail.konqueror.de> References: <44917466.5090406@redhat.com> <20060615153429.GO30916@mail.konqueror.de> Message-ID: <4491952A.1040508@redhat.com> Ok, any suggestions about which tag to use. I know there is a list that is included with classpath, and there is nothing there to cover this case. Should I use something like GNU JDK 1.4 or just GNU or GNU 0.91..... I'll be happy to fix and re-submit, but I would like some guidance about the best way to proceed. Thanks, Kyle Michael Koch wrote: > On Thu, Jun 15, 2006 at 10:53:26AM -0400, Kyle Galloway wrote: > >> +// Tags: JDK1.4 >> > > That is wrong. gnu.classpath.jdwp.event.filters is no package provided > by SUNs impl. Its classpath specific. The tag should reflect this. > > > Cheers, > Michael > From konqueror@gmx.de Thu Jun 15 17:36:00 2006 From: konqueror@gmx.de (Michael Koch) Date: Thu, 15 Jun 2006 17:36:00 -0000 Subject: RFA JDWP TestOfCountFilter In-Reply-To: <4491952A.1040508@redhat.com> References: <44917466.5090406@redhat.com> <20060615153429.GO30916@mail.konqueror.de> <4491952A.1040508@redhat.com> Message-ID: <20060615173634.GQ30916@mail.konqueror.de> On Thu, Jun 15, 2006 at 01:13:14PM -0400, Kyle Galloway wrote: > Ok, any suggestions about which tag to use. I know there is a list that > is included with classpath, and there is nothing there to cover this > case. Should I use something like GNU JDK 1.4 or just GNU or GNU 0.91..... > > I'll be happy to fix and re-submit, but I would like some guidance about > the best way to proceed. Good question. I would propose "Classepath". What does others think? Cheers, Michael -- http://www.worldforge.org/ From tbento@redhat.com Thu Jun 15 18:00:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 15 Jun 2006 18:00:00 -0000 Subject: FYI: Added one more check for JCheckBoxMenuItem constructors Message-ID: <1150394421.2666.25.camel@toad.toronto.redhat.com> Hey, Just added one check that checks the value of 'focusable'. Cheers, Tania 2006-06-15 Tania Bento * gnu/testlet/javax/swing/JCheckBoxMenuItem/constructors.java (testConstructor1): Added 'focusable' check. (testConstructor2): Added 'focusable' check. (testConstructor4): Added 'focusable' check. (testConstructor6): Added 'focusable' check. (testConstructor8): Added 'focusable' check. (testConstructor10): Added 'focusable' check. (testConstructor12): Added 'focusable' check. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1747 bytes Desc: not available URL: From tbento@redhat.com Thu Jun 15 18:20:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 15 Jun 2006 18:20:00 -0000 Subject: FYI: JRadioButtonMenuItem 'focusable' test Message-ID: <1150395642.2666.34.camel@toad.toronto.redhat.com> Hey, Created a new mauve test that would test the value of 'focusable'. Cheers, Tania 2006-06-15 Tania Bento * gnu/testlet/javax/swing/JRadioButtonMenuItem/isFocusable.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1787 bytes Desc: not available URL: From tbento@redhat.com Thu Jun 15 18:38:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 15 Jun 2006 18:38:00 -0000 Subject: FYI: BasicArrowButton 'focusable' test Message-ID: <1150396686.2666.44.camel@toad.toronto.redhat.com> Hey, Created a new mauve test that would check focusability. Cheers, Tania 2006-06-15 Tania Bento * gnu/testlet/javax/swing/plaf/basic/BasicArrowButton/isFocusable.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1861 bytes Desc: not available URL: From tbento@redhat.com Thu Jun 15 18:51:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 15 Jun 2006 18:51:00 -0000 Subject: FYI: MetalScrollButton 'focusable' test Message-ID: <1150397478.2666.53.camel@toad.toronto.redhat.com> Hey, Created a new mauve test that would check MetalScrollButton's focusability. Cheers, Tania 2006-06-15 Tania Bento * gnu/testlet/javax/swing/plaf/metal/MetalScrollButton/isFocusable.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1839 bytes Desc: not available URL: From tbento@redhat.com Thu Jun 15 19:11:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 15 Jun 2006 19:11:00 -0000 Subject: FYI: Added one more check in JButton's constructor tests Message-ID: <1150398713.2666.61.camel@toad.toronto.redhat.com> Hey, Just added one more check that checks the focusability of JButton. Cheers, Tania 2006-06-15 Tania Bento * gnu/testlet/javax/swing/JButton/constructors.java (testConstructor1): Added 'focusable' test. (testConstructor2): Added 'focusable' test. (testConstructor4): Added 'focusable' test. (testConstructor6): Added 'focusable' test. (testConstructor9): Added 'focusable' test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1679 bytes Desc: not available URL: From tbento@redhat.com Thu Jun 15 19:19:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 15 Jun 2006 19:19:00 -0000 Subject: FYI: JToggleButton 'focusable' test Message-ID: <1150399179.2666.64.camel@toad.toronto.redhat.com> Hey, Created a new mauve test that would check JToggleButton's focusablility. Cheers, Tania 2006-06-15 Tania Bento * gnu/testlet/javax/swing/JToggleButton/isFocusable.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1730 bytes Desc: not available URL: From tbento@redhat.com Thu Jun 15 19:28:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 15 Jun 2006 19:28:00 -0000 Subject: FYI: JCheckBox 'focusable' test Message-ID: <1150399684.2666.68.camel@toad.toronto.redhat.com> Hey, Created a new mauve test that would check JCheckBox's focusability. Cheers, Tania 2006-06-15 Tania Bento * gnu/testlet/javax/swing/JCheckBox/isFocusable.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2263 bytes Desc: not available URL: From tbento@redhat.com Thu Jun 15 19:32:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 15 Jun 2006 19:32:00 -0000 Subject: FYI: JRadioButton 'focusable' test Message-ID: <1150399932.2666.70.camel@toad.toronto.redhat.com> Hey, Created a new mauve test that would check JRadioButton's focusability. Cheers, Tania 2006-06-15 Tania Bento * gnu/testlet/javax/swing/JRadioButton/isFocusable.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1723 bytes Desc: not available URL: From vivekl@redhat.com Thu Jun 15 23:17:00 2006 From: vivekl@redhat.com (Vivek Lakshmanan) Date: Thu, 15 Jun 2006 23:17:00 -0000 Subject: FYI: Check for correct exceptions for TestOfCipherEngineInit Message-ID: <4491E9E6.3080009@redhat.com> The following _already committed_ updates the testInitWithParameterSpec test with a check for the correct exception expected. Also provides more comments for the logic involved in this test case. Thanks, Vivek 2006-06-15 Vivek Lakshmanan * gnu/testlet/gnu/javax/crypto/jce/TestOfCipherEngineInit.java (testInitWithParameterSpec): More comments and look for InvalidAlgorithmParameterException instead of InvalidKeyException. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-TestOfCipherEngineInit.patch Type: text/x-patch Size: 4665 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Jun 16 13:24:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 16 Jun 2006 13:24:00 -0000 Subject: FYI: ListDataEvent - new tests Message-ID: <4492B176.9040101@object-refinery.com> This patch (committed) adds new tests for the ListDataEvent class: 2006-06-16 David Gilbert * gnu/testlet/javax/swing/event/ListDataEvent/constructor.java: New file, * gnu/testlet/javax/swing/event/ListDataEvent/getIndex0.java: New file, * gnu/testlet/javax/swing/event/ListDataEvent/getIndex1.java: New file, * gnu/testlet/javax/swing/event/ListDataEvent/getSource.java: New file, * gnu/testlet/javax/swing/event/ListDataEvent/getType.java: New file, * gnu/testlet/javax/swing/event/ListDataEvent/toString.java: New file. I already committed a patch to GNU Classpath CVS to fix the failing tests. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Fri Jun 16 13:51:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 16 Jun 2006 13:51:00 -0000 Subject: FYI: DefaultButtonModel.setSelected update Message-ID: <4492B7C9.5030808@object-refinery.com> This patch (committed) updates the setSelected.java test to cover a minor bug in GNU Classpath: 2006-06-16 David Gilbert * gnu/testlet/javax/swing/DefaultButtonModel/setSelected.java (lastItemEvent): New field, (itemChanged): New method, (test): Check for required item event. I already committed a patch to GNU Classpath to make this test pass. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Fri Jun 16 14:34:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 16 Jun 2006 14:34:00 -0000 Subject: FYI: DefaultComboBoxModel.removeElement test updated Message-ID: <4492C1C0.2020307@object-refinery.com> This patch (committed) updates the test for the removeElement() method: 2006-06-16 David Gilbert * gnu/testlet/javax/swing/DefaultComboBoxModel/removeElement.java (events): New field, (index0): Removed, (index1): Removed, (type): Removed, (contentsChanged): Add event to list, (intervalAdded): Likewise, (intervalRemoved): Likewise, (test): Updated checks to look for event or events in list. I have already committed a patch to GNU Classpath to fix the failing checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From kgallowa@redhat.com Fri Jun 16 15:44:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Fri, 16 Jun 2006 15:44:00 -0000 Subject: RFA JDWP TestOfCountFilter In-Reply-To: <20060615173634.GQ30916@mail.konqueror.de> References: <44917466.5090406@redhat.com> <20060615153429.GO30916@mail.konqueror.de> <4491952A.1040508@redhat.com> <20060615173634.GQ30916@mail.konqueror.de> Message-ID: <4492D1C4.2070600@redhat.com> Looking at the GNU-Crypto tests, I think that the JDWP test should be tagged GNU-JDWP JDK 1.4. Any comments about this idea? -Kyle Michael Koch wrote: > On Thu, Jun 15, 2006 at 01:13:14PM -0400, Kyle Galloway wrote: > >> Ok, any suggestions about which tag to use. I know there is a list that >> is included with classpath, and there is nothing there to cover this >> case. Should I use something like GNU JDK 1.4 or just GNU or GNU 0.91..... >> >> I'll be happy to fix and re-submit, but I would like some guidance about >> the best way to proceed. >> > > Good question. I would propose "Classepath". > > What does others think? > > > Cheers, > Michael > From konqueror@gmx.de Fri Jun 16 17:53:00 2006 From: konqueror@gmx.de (Michael Koch) Date: Fri, 16 Jun 2006 17:53:00 -0000 Subject: RFA JDWP TestOfCountFilter In-Reply-To: <4492D1C4.2070600@redhat.com> References: <44917466.5090406@redhat.com> <20060615153429.GO30916@mail.konqueror.de> <4491952A.1040508@redhat.com> <20060615173634.GQ30916@mail.konqueror.de> <4492D1C4.2070600@redhat.com> Message-ID: <20060616175251.GW30916@mail.konqueror.de> On Fri, Jun 16, 2006 at 11:44:04AM -0400, Kyle Galloway wrote: > Looking at the GNU-Crypto tests, I think that the JDWP test should be > tagged GNU-JDWP JDK 1.4. Any comments about this idea? As AFAIK a new tag begins after a whitespace this would be three tags with two of them wrong. Just my 2 cents, Cheers, Michael -- http://www.worldforge.org/ From kgallowa@redhat.com Fri Jun 16 17:57:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Fri, 16 Jun 2006 17:57:00 -0000 Subject: RFA JDWP TestOfCountFilter In-Reply-To: <20060616175251.GW30916@mail.konqueror.de> References: <44917466.5090406@redhat.com> <20060615153429.GO30916@mail.konqueror.de> <4491952A.1040508@redhat.com> <20060615173634.GQ30916@mail.konqueror.de> <4492D1C4.2070600@redhat.com> <20060616175251.GW30916@mail.konqueror.de> Message-ID: <4492F110.4000805@redhat.com> Michael Koch wrote: > On Fri, Jun 16, 2006 at 11:44:04AM -0400, Kyle Galloway wrote: > >> Looking at the GNU-Crypto tests, I think that the JDWP test should be >> tagged GNU-JDWP JDK 1.4. Any comments about this idea? >> > > As AFAIK a new tag begins after a whitespace this would be three tags > with two of them wrong. > Ok, so would just GNU-JDWP be the best option, I don't know much about how these tags work, but this seems like it would allow for these tests to be excluded from the normal Classpath vs Sun tests while still being able to call the whole set of them to test all the JDWP filters. > Just my 2 cents, > > > Cheers, > Michael > From konqueror@gmx.de Fri Jun 16 18:03:00 2006 From: konqueror@gmx.de (Michael Koch) Date: Fri, 16 Jun 2006 18:03:00 -0000 Subject: RFA JDWP TestOfCountFilter In-Reply-To: <4492F110.4000805@redhat.com> References: <44917466.5090406@redhat.com> <20060615153429.GO30916@mail.konqueror.de> <4491952A.1040508@redhat.com> <20060615173634.GQ30916@mail.konqueror.de> <4492D1C4.2070600@redhat.com> <20060616175251.GW30916@mail.konqueror.de> <4492F110.4000805@redhat.com> Message-ID: <20060616180321.GY30916@mail.konqueror.de> On Fri, Jun 16, 2006 at 01:57:36PM -0400, Kyle Galloway wrote: > Michael Koch wrote: > >On Fri, Jun 16, 2006 at 11:44:04AM -0400, Kyle Galloway wrote: > > > >>Looking at the GNU-Crypto tests, I think that the JDWP test should be > >>tagged GNU-JDWP JDK 1.4. Any comments about this idea? > >> > > > >As AFAIK a new tag begins after a whitespace this would be three tags > >with two of them wrong. > > > Ok, so would just GNU-JDWP be the best option, I don't know much about > how these tags work, but this seems like it would allow for these tests > to be excluded from the normal Classpath vs Sun tests while still being > able to call the whole set of them to test all the JDWP filters. Ok. Michael -- http://www.worldforge.org/ From kgallowa@redhat.com Fri Jun 16 18:30:00 2006 From: kgallowa@redhat.com (Kyle Galloway) Date: Fri, 16 Jun 2006 18:30:00 -0000 Subject: RFA JDWP Event Filter Tests In-Reply-To: <20060616180321.GY30916@mail.konqueror.de> References: <44917466.5090406@redhat.com> <20060615153429.GO30916@mail.konqueror.de> <4491952A.1040508@redhat.com> <20060615173634.GQ30916@mail.konqueror.de> <4492D1C4.2070600@redhat.com> <20060616175251.GW30916@mail.konqueror.de> <4492F110.4000805@redhat.com> <20060616180321.GY30916@mail.konqueror.de> Message-ID: <4492F8A6.2010406@redhat.com> Alright I have changed the tags on these tests. Same tests as before, but all tagged as GNU-JDWP. I submitted these as one patch since the comprise a full set of tests for the JDWP event filters. Requesting approval and commit(I don't have access). Thanks, Kyle 2006-06-16 Kyle Galloway * gnu/testlet/gnu/classpath/jdwp/event/filters/TestOfClassMatchFilter.java: New Test. * gnu/testlet/gnu/classpath/jdwp/event/filters/TestOfClassExcludeFilter.java: New Test. * gnu/testlet/gnu/classpath/jdwp/event/filters/TestOfClassOnlyFilter.java: New Test. * gnu/testlet/gnu/classpath/jdwp/event/filters/TestOfCountFilter.java: New Test. * gnu/testlet/gnu/classpath/jdwp/event/filters/TestOfExceptionOnlyFilter.java: New Test. * gnu/testlet/gnu/classpath/jdwp/event/filters/TestOfInstanceOnlyFilter.java: New Test. * gnu/testlet/gnu/classpath/jdwp/event/filters/TestOfThreadOnlyFilter.java: New Test. Michael Koch wrote: > On Fri, Jun 16, 2006 at 01:57:36PM -0400, Kyle Galloway wrote: > >> Michael Koch wrote: >> >>> On Fri, Jun 16, 2006 at 11:44:04AM -0400, Kyle Galloway wrote: >>> >>> >>>> Looking at the GNU-Crypto tests, I think that the JDWP test should be >>>> tagged GNU-JDWP JDK 1.4. Any comments about this idea? >>>> >>>> >>> As AFAIK a new tag begins after a whitespace this would be three tags >>> with two of them wrong. >>> >>> >> Ok, so would just GNU-JDWP be the best option, I don't know much about >> how these tags work, but this seems like it would allow for these tests >> to be excluded from the normal Classpath vs Sun tests while still being >> able to call the whole set of them to test all the JDWP filters. >> > > Ok. > > > Michael > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 31376 bytes Desc: not available URL: From neugens@limasoftware.net Sat Jun 17 17:20:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Sat, 17 Jun 2006 17:20:00 -0000 Subject: RFC: simple preference api test Message-ID: <1150564913.3127.19.camel@nirvana.limasoftware> Hi! This is a simple and by no means complete test for java.util.prefs This is my first attempt at learning mauve, so hopefully everything is right. Comments are welcome. Mario 2006-06-17 neugens * gnu/testlet/java/util/prefs: new package added. * gnu/testlet/java/util/prefs/PreferenceTest.java: new test. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve_preference_test.patch Type: text/x-patch Size: 10921 bytes Desc: not available URL: From fitzsim@redhat.com Sun Jun 18 19:21:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Sun, 18 Jun 2006 19:21:00 -0000 Subject: FYI: gnu.testlet.java.awt.GridBagLayout.AdjustForGravity Message-ID: <4495A7D9.1090006@redhat.com> Hi, I committed this new test for java.awt.GridBagLayout.AdjustForGravity. Tom 2006-06-18 Thomas Fitzsimmons * gnu/testlet/java/awt/GridBagLayout/AdjustForGravity.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-adjust-for-gravity.patch Type: text/x-patch Size: 10011 bytes Desc: not available URL: From fitzsim@redhat.com Sun Jun 18 19:29:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Sun, 18 Jun 2006 19:29:00 -0000 Subject: FYI: small Makefile change Message-ID: <4495A99F.3030503@redhat.com> Hi, I committed this small Makefile simplification. Tom 2006-06-18 Thomas Fitzsimmons * Makefile.am (harness_files): Add gnu/testlet/config.java. (gnu/testlet/config.class): Remove target. * Makefile.in: Regenerate. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-config.patch Type: text/x-patch Size: 939 bytes Desc: not available URL: From fitzsim@redhat.com Sun Jun 18 20:59:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Sun, 18 Jun 2006 20:59:00 -0000 Subject: RFC: simple preference api test In-Reply-To: <1150564913.3127.19.camel@nirvana.limasoftware> References: <1150564913.3127.19.camel@nirvana.limasoftware> Message-ID: <4495BE8A.3050304@redhat.com> Mario Torre wrote: > Hi! > > This is a simple and by no means complete test for java.util.prefs > This is my first attempt at learning mauve, so hopefully everything is > right. > > Comments are welcome. This looks good to me. Tom From neugens@limasoftware.net Sun Jun 18 21:59:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Sun, 18 Jun 2006 21:59:00 -0000 Subject: RFC: simple preference api test In-Reply-To: <4495BE8A.3050304@redhat.com> References: <1150564913.3127.19.camel@nirvana.limasoftware> <4495BE8A.3050304@redhat.com> Message-ID: <1150668018.2623.16.camel@nirvana.limasoftware> Il giorno dom, 18/06/2006 alle 16.58 -0400, Thomas Fitzsimmons ha scritto: > This looks good to me. > > Tom Hi! I have added one more test and turned off the debug output. The test run fine on a pIII based pc (one processor), but 1 out of 5 generates this on a dual core (centrino) pc: Exception in thread "Thread-1" java.lang.IllegalMonitorStateException at java.lang.VMObject.wait(Native Method) at java.lang.Object.wait(Object.java:434) at gnu.java.util.prefs.EventDispatcher.run(EventDispatcher.java:77) at java.lang.VMThread.run(VMThread.java:120) The test that generate this is testListener, the virtual machine is Cacao, gcj and the Sun jdk work (at least it seems) without problems. It seems like one method is called twice, but this is not always the same, and introducing locks in the listener class does not solve. There are known issues with Cacao or I'm doing something wrong here? The test is more or less what a real application would do with the preference api. Anyway I'll try to move the listener test out of the class and build a separate test case for it. In the mean time, this is the new test, the ChangeLog is the same: 2006-06-18 neugens * gnu/testlet/java/util/prefs: new package added. * gnu/testlet/java/util/prefs/PreferenceTest.java: new test. If you think we can go with this for now, please commit for me, as I don't have write access to the cvs. Thank you, Mario -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve_preference_test.patch Type: text/x-patch Size: 12415 bytes Desc: not available URL: From david.gilbert@object-refinery.com Mon Jun 19 10:01:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 19 Jun 2006 10:01:00 -0000 Subject: RFC: simple preference api test In-Reply-To: <1150668018.2623.16.camel@nirvana.limasoftware> References: <1150564913.3127.19.camel@nirvana.limasoftware> <4495BE8A.3050304@redhat.com> <1150668018.2623.16.camel@nirvana.limasoftware> Message-ID: <4496765E.1050209@object-refinery.com> Hi Mario, All these checks pass for me on the reference implementation and with GNU Classpath / JamVM, so I committed your patch. Thanks for writing tests! If you plan on writing more tests for Mauve (I hope so!) you should e-mail someone at Redhat (maybe Tom Tromey) and ask for CVS write access so you can commit them yourself. Regards, Dave Mario Torre wrote: >Il giorno dom, 18/06/2006 alle 16.58 -0400, Thomas Fitzsimmons ha >scritto: > > > >>This looks good to me. >> >>Tom >> >> > >Hi! > >I have added one more test and turned off the debug output. > >The test run fine on a pIII based pc (one processor), but 1 out of 5 >generates this on a dual core (centrino) pc: > >Exception in thread "Thread-1" java.lang.IllegalMonitorStateException > at java.lang.VMObject.wait(Native Method) > at java.lang.Object.wait(Object.java:434) > at gnu.java.util.prefs.EventDispatcher.run(EventDispatcher.java:77) > at java.lang.VMThread.run(VMThread.java:120) > >The test that generate this is testListener, the virtual machine is >Cacao, gcj and the Sun jdk work (at least it seems) without problems. > >It seems like one method is called twice, but this is not always the >same, and introducing locks in the listener class does not solve. > >There are known issues with Cacao or I'm doing something wrong here? The >test is more or less what a real application would do with the >preference api. Anyway I'll try to move the listener test out of the >class and build a separate test case for it. > >In the mean time, this is the new test, the ChangeLog is the same: > > >2006-06-18 neugens > > * gnu/testlet/java/util/prefs: new package added. > * gnu/testlet/java/util/prefs/PreferenceTest.java: > new test. > > >If you think we can go with this for now, please commit for me, as I >don't have write access to the cvs. > >Thank you, >Mario > > >------------------------------------------------------------------------ > >Index: gnu/testlet/java/util/prefs/PreferenceTest.java >=================================================================== >RCS file: gnu/testlet/java/util/prefs/PreferenceTest.java >diff -N gnu/testlet/java/util/prefs/PreferenceTest.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ gnu/testlet/java/util/prefs/PreferenceTest.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,405 @@ >+/* >+ * PreferenceTest.java -- simple test for java.utils.prefs Copyright (C) 2006 >+ * Lima Software. This file is part of Mauve. >+ * >+ * Mauve is free software; you can redistribute it and/or modify it under the >+ * terms of the GNU General Public License as published by the Free Software >+ * Foundation; either version 2, or (at your option) any later version. >+ * >+ * Mauve is distributed in the hope that it will be useful, but WITHOUT ANY >+ * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR >+ * A PARTICULAR PURPOSE. See the GNU General Public License for more details. >+ * >+ * You should have received a copy of the GNU General Public License along with >+ * Mauve; see the file COPYING. If not, write to the Free Software Foundation, >+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. >+ * >+ */ >+ >+// Tags: JDK1.4 >+package gnu.testlet.java.util.prefs; >+ >+import java.io.ByteArrayInputStream; >+import java.io.ByteArrayOutputStream; >+import java.io.IOException; >+import java.io.ObjectInputStream; >+import java.io.ObjectOutputStream; >+ >+import java.util.prefs.BackingStoreException; >+import java.util.prefs.NodeChangeEvent; >+import java.util.prefs.NodeChangeListener; >+ >+import java.util.prefs.PreferenceChangeEvent; >+import java.util.prefs.PreferenceChangeListener; >+import java.util.prefs.Preferences; >+ >+import gnu.testlet.TestHarness; >+import gnu.testlet.Testlet; >+ >+/** >+ * This simple test just read and write a set of preference. Does not assume a >+ * particular backend. >+ * >+ * @author Mario Torre >+ */ >+public class PreferenceTest implements Testlet >+{ >+ /** >+ * The expected full name of this preference node. Note: >+ * change it if you move this class, it always reflects the package name. >+ */ >+ private static final String FULL_PATH = "/gnu/testlet/java/util/prefs"; >+ >+ /** >+ * Default key used for tests. >+ */ >+ private static final String KEY = "AppName"; >+ >+ /** >+ * Default value for the test key. >+ */ >+ private static final String VALUE = >+ "GNU Classpath - Preference API Test Case"; >+ >+ /** >+ * Defines if we want debug information on the default debug log or not. >+ * Enable the if you need it or leave disabled for normal tests. >+ */ >+ private static final boolean DEBUG = false; >+ >+ /* Test Harness */ >+ protected TestHarness harness = null; >+ >+ /** Preference */ >+ private Preferences prefs = null; >+ >+ public void test(TestHarness harness) >+ { >+ this.harness = harness; >+ >+ // initiliaze tests, call it before any other method of this class >+ setup(); >+ >+ if (DEBUG) printInfo(); >+ >+ // run tests >+ testAbsolutePath(); >+ >+ // clear the preference tree, to be sure it does not contains >+ // keys we will use >+ testClear(); >+ >+ testPut(); >+ testByte(); >+ >+ testListener(); >+ testChildren(); >+ } >+ >+ /** >+ * Setup the preference api backend. >+ */ >+ private void setup() >+ { >+ //System.setProperty("java.util.prefs.PreferencesFactory", >+ // "gnu.java.util.prefs.GConfBasedFactory"); >+ >+ this.prefs = Preferences.userNodeForPackage(PreferenceTest.class); >+ } >+ >+ private void testAbsolutePath() >+ { >+ this.harness.checkPoint("absolutePath()"); >+ >+ String absolutePath = this.prefs.absolutePath(); >+ print("Absolute path: " + absolutePath); >+ >+ this.harness.check(FULL_PATH.compareTo(absolutePath) == 0); >+ } >+ >+ private void testClear() >+ { >+ this.harness.checkPoint("testClear()"); >+ >+ try { >+ this.prefs.clear(); >+ >+ } catch (BackingStoreException e) { >+ print(e.getLocalizedMessage()); >+ this.harness.fail("testClear()"); >+ } >+ >+ this.harness.check(true); >+ } >+ >+ /** >+ * Put the default key on the preference node, then get it and check the >+ * result to see if the preference api is actually capable of storing >+ * preferences. >+ */ >+ private void testPut() >+ { >+ this.harness.checkPoint("testPut()"); >+ >+ this.prefs.put(KEY, VALUE); >+ >+ // suggest a sync to try to avoid memory caching. >+ try { >+ this.prefs.sync(); >+ >+ } catch (BackingStoreException e) { >+ print(e.getLocalizedMessage()); >+ this.harness.fail("testPut(), call to sync"); >+ } >+ >+ String value = this.prefs.get(KEY, "Wrong value for key: " + KEY >+ + ", expected: " + VALUE); >+ >+ print("Key (" + KEY + "): " + value); >+ this.harness.check(VALUE.compareTo(value) == 0); >+ } >+ >+ /** >+ * Add a series of children to this node, put some preferences inside them >+ * and retrieve everything, checking that the preference backend correctly >+ * handles the tree structure of the entries under the current node. >+ * Note: this test removes the preference node. >+ */ >+ private void testChildren() >+ { >+ this.harness.checkPoint("testChildren()"); >+ >+ String absolutePath = null; >+ >+ // add 3 new nodes, these will be direct children of the current node >+ >+ // node 1 >+ Preferences pref1 = this.prefs.node("children_1"); >+ this.harness.check("children_1".compareTo(pref1.name()) == 0); >+ absolutePath = pref1.absolutePath(); >+ this.harness.check( >+ (FULL_PATH + "/children_1").compareTo(absolutePath) == 0); >+ >+ // node 2 >+ Preferences pref2 = this.prefs.node("children_2"); >+ this.harness.check("children_2".compareTo(pref2.name()) == 0); >+ absolutePath = pref2.absolutePath(); >+ this.harness.check( >+ (FULL_PATH + "/children_2").compareTo(absolutePath) == 0); >+ >+ // node 3 >+ Preferences pref3 = this.prefs.node("children_3"); >+ this.harness.check("children_3".compareTo(pref3.name()) == 0); >+ absolutePath = pref3.absolutePath(); >+ this.harness.check( >+ (FULL_PATH + "/children_3").compareTo(absolutePath) == 0); >+ >+ // now add a preference key to each of these new nodes >+ pref1.put("key1", "value1"); >+ pref2.put("key2", "value2"); >+ pref3.put("key3", "value3"); >+ >+ // add a subnode for child #1 >+ Preferences child1 = pref1.node("subPreference1"); >+ this.harness.check("subPreference1".compareTo(child1.name()) == 0); >+ absolutePath = child1.absolutePath(); >+ this.harness.check((FULL_PATH + "/children_1/" + "subPreference1") >+ .compareTo(absolutePath) == 0); >+ >+ child1.put("key1-child1", "some value"); >+ >+ // retrieve the list of children of the root node >+ this.harness.checkPoint("testAddChildren() - check new children"); >+ String[] expResult = { "children_1", "children_2", "children_3" }; >+ if (!listChildren(this.prefs, expResult)) { >+ this.harness.fail("testAddChildren(), children listing error"); >+ } >+ >+ this.harness.checkPoint("testAddChildren() - check subnodes"); >+ expResult = new String[] { "subPreference1"}; >+ if (!listChildren(pref1, expResult)) { >+ this.harness.fail("testAddChildren(), children listing error"); >+ } >+ >+ // clean everything >+ try { >+ this.prefs.removeNode(); >+ this.prefs.flush(); >+ >+ } catch (BackingStoreException e) { >+ print(e.getLocalizedMessage()); >+ this.harness.fail("testAddChildren(), call to clear()"); >+ } >+ >+ // to check that the node is empty we simply call childrenNames on it >+ // this operation should fail because the node does not exist anymore >+ this.harness.checkPoint("testAddChildren() - checking emptyness"); >+ try { >+ this.prefs.childrenNames(); >+ this.harness.fail("The node should not exist anymore!"); >+ >+ } catch (IllegalStateException e) { >+ this.harness.check(true); >+ >+ } catch (BackingStoreException e) { >+ print(e.getLocalizedMessage()); >+ this.harness.fail("The node should not exist anymore!"); >+ } >+ } >+ >+ private boolean listChildren(Preferences pref, String[] expResult) >+ { >+ boolean _res = false; >+ >+ try { >+ String[] result = pref.childrenNames(); >+ >+ print("Resuls length: " + result.length + ", expected: " >+ + expResult.length); >+ this.harness.check(result.length == expResult.length); >+ >+ for (int i = 0; i < expResult.length; i++) { >+ print("result[" + i + "] = " + result[i] + ", expected = " >+ + expResult[i]); >+ this.harness.check(result[i], expResult[i]); >+ } >+ >+ _res = true; >+ >+ } catch (BackingStoreException e) { >+ print(e.getLocalizedMessage()); >+ this.harness.fail("call to childrenNames()"); >+ } >+ >+ return _res; >+ } >+ >+ private void testByte() >+ { >+ this.harness.checkPoint("testByte()"); >+ >+ String string = "an array of bytes value"; >+ byte[] bytes = null; >+ byte[] result = null; >+ >+ ByteArrayOutputStream stream = new ByteArrayOutputStream(); >+ ObjectOutputStream oStream; >+ >+ try { >+ oStream = new ObjectOutputStream(stream); >+ oStream.writeObject(string); >+ bytes = stream.toByteArray(); >+ >+ this.harness.checkPoint("testByte() - put byte array"); >+ prefs.putByteArray(KEY, bytes); >+ >+ this.harness.checkPoint("testByte() - get byte array"); >+ result = prefs.getByteArray(KEY, null); >+ >+ // this fails, but the result is correct when restoring the >+ // String >+ //this.harness.check(result, bytes); >+ >+ ByteArrayInputStream iStream = new ByteArrayInputStream(result); >+ ObjectInputStream oiStream = new ObjectInputStream(iStream); >+ String rString = (String) oiStream.readObject(); >+ >+ print("Result: " + rString + ", expected: " + string); >+ this.harness.check(rString, string); >+ >+ } catch (IOException e) { >+ print(e.getLocalizedMessage()); >+ this.harness.fail("call to testByte() - IO Exception"); >+ >+ } catch (ClassNotFoundException e) { >+ print(e.getLocalizedMessage()); >+ this.harness.fail("call to testByte() - ClassNotFoundException"); >+ } >+ } >+ >+ private void testListener() >+ { >+ this.harness.checkPoint("testListener()"); >+ >+ PreferenceListener listener = new PreferenceListener(); >+ >+ this.harness.checkPoint("testListener() - adding listeners"); >+ this.prefs.addNodeChangeListener(listener); >+ this.prefs.addPreferenceChangeListener(listener); >+ >+ // store this, key, read it then remove it >+ this.harness.checkPoint("testListener() - inserting key"); >+ >+ this.prefs.put("new_key", "some value"); >+ String key = this.prefs.get("new_key", "Wrong! Wrong! Wrong!"); >+ this.harness.check(key, "some value"); >+ >+ this.harness.checkPoint("testListener() - updating key"); >+ >+ this.prefs.put("new_key", "some other value"); >+ key = this.prefs.get("new_key", "Wrong! Wrong! Wrong!"); >+ this.harness.check(key, "some other value"); >+ >+ this.harness.checkPoint("testListener() - removing listeners"); >+ >+ this.prefs.removeNodeChangeListener(listener); >+ this.prefs.removePreferenceChangeListener(listener); >+ >+ this.harness.checkPoint("testListener() - removing key"); >+ this.prefs.remove("new_key"); >+ } >+ >+ /** >+ * Prints on screen some information about the class we are about to test. >+ * This can be useful for debugging, ant to check if a particoular backend >+ * is enabled. >+ */ >+ private void printInfo() >+ { >+ String backendName = System.getProperty( >+ "java.util.prefs.PreferencesFactory", >+ "No backend registered, using default backend"); >+ String vendor = System.getProperty("java.vendor"); >+ >+ this.harness.debug(vendor); >+ this.harness.debug(backendName); >+ } >+ >+ private void print(String message) >+ { >+ if (DEBUG) harness.debug(message); >+ } >+ >+ private class PreferenceListener >+ implements NodeChangeListener, PreferenceChangeListener >+ { >+ public void childAdded(NodeChangeEvent event) >+ { >+ PreferenceTest.this.harness.check(true); >+ >+ print("Child added!"); >+ String name = event.getChild().name(); >+ print("name: " + name); >+ } >+ >+ public void childRemoved(NodeChangeEvent event) >+ { >+ PreferenceTest.this.harness.check(true); >+ >+ print("Child removed!"); >+ String name = event.getChild().name(); >+ print("name: " + name); >+ } >+ >+ public void preferenceChange(PreferenceChangeEvent event) >+ { >+ PreferenceTest.this.harness.check(true); >+ >+ print("Preference changed!"); >+ String name = event.getNode().name(); >+ String value = event.getNewValue(); >+ print("name: " + name); >+ print("value: " + value); >+ } >+ } >+} > > From abalkiss@redhat.com Mon Jun 19 17:54:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Mon, 19 Jun 2006 17:54:00 -0000 Subject: Harness bug fixes Message-ID: <1150739631.25174.56.camel@tony.toronto.redhat.com> This patch fixes bugs brought to my attention by Raif. The TimeoutWatcher class now has a method that allows the timer to be stopped, so the timer used to make sure the BootClasspath auto-detector doesn't hang is stopped and no longer interferes with the test run causing a spurious FAIL result. Also, every time a test calls one of the check() methods, the timer is reset. This way tests are killed if they are hung, but not if they are just lengthy (in that they involve a lot of calls to check()). If the test does A LOT (>60 seconds worth) of work between calls to check() it will still be considered a hang and will be killed. 2006-06-19 Anthony Balkissoon * Harness.java: (getBootclasspath): When the auto detector returns, stop the timeout watcher. (printHelpMessage): Replaced reference to old --with-test-java with the correct --with-vm. (initProcess): Replace the runner_watcher after confirming the startup of the RunnerProcess. This way the runner_watcher will not time out before the first real test is run. (runTest): Added code to handle a timer reset request from the RunnerProcess. (TimeoutWatcher.shouldContinue): New field. (TimeoutWatcher.stop): New method. (TimeoutWatcher.run): Added reference to shouldContinue to allow this method to be stopped. * RunnerProcess.java: (check2): Send a message to the Harness requesting a reset of the timer. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: BCPTimeoutFix.diff Type: text/x-patch Size: 6732 bytes Desc: not available URL: From abalkiss@redhat.com Mon Jun 19 18:27:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Mon, 19 Jun 2006 18:27:00 -0000 Subject: Harness tweak Message-ID: <1150741648.25174.59.camel@tony.toronto.redhat.com> This patch adds some reporting functionality that Tom Fitzsimmons asked for. It reports the total number of calls to check() that failed, so that a developer can know if his/her patch to Classpath improved the results at all, even if that patch didn't result in the entire test passing. 2006-06-19 Anthony Balkissoon * Harness.java: (total_check_fails): New field. (main): Print a summary even if only one test failed. Include the total number of failing check() calls in the summary. (runTest): When a test fails, increment total_check_fails by the number of checks in that test that failed, which is passed back from the RunnerProcess. * RunnerProcess.java: (main): If a test fails to load, report the failure and count 0 total check() fails. (runAndReport): When a test fails, report the number of calls to check() that failed. (done): If the test failed, return the number of calls to check() that failed. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: ReportingTweak.diff Type: text/x-patch Size: 3223 bytes Desc: not available URL: From abalkiss@redhat.com Mon Jun 19 22:09:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Mon, 19 Jun 2006 22:09:00 -0000 Subject: Harness XML output improvements Message-ID: <1150754929.25174.62.camel@tony.toronto.redhat.com> This patch improves the XML output from the Harness to be as verbose as the standard output. Includes line numbers for passes and fails, and stack traces for uncaught exceptions. 2006-06-19 Anthony Balkissoon * RunnerProcess.java: (lastFailureMessage): New field. (runtest): Strip the "gnu.testlet" from the name passed to the TestResult. Also use the new 3 parameter TestResult.addException to pass the stack trace to the TestResult. Properly indent the stack trace when printing exception details. (getStackTraceString): New method. (fail): Get the description from check2 and add the full failure string to the TestResult. (check(Object, Object)): Likewise. (check(boolean, boolean)): Likewise. (check(int, int)): Likewise. (check(long, long)): Likewise. (check(boolean)): Likewise. (check2): Return the description. Do not add the failure description to the TestResult here, do it in the individual check() methods so that a full description can be added. Use the new TestResult.addPass(String) method instead of the old no argument method. * TestReport.java: (writeXML): Do not write the passCount value, write the passes as well as the fails, and write the stack traces for exceptions. Properly indent the xml. * TestResult.java: (passCount): Removed this field. (passMessages): New field. (exceptionReason): New field. (addPass): Now takes in a String argument, acts just like addFail(). Descriptions are taken in for passes as well as fails. (addException): Now takes 3 arguments instead of 2, the new argument is the stack trace for the exception. (getPassCount): Returns the size of the passMessages ArrayList. (getPassMessages): New method. (getExceptionReason): Likewise. --Tony From gbenson@redhat.com Tue Jun 20 11:47:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 20 Jun 2006 11:47:00 -0000 Subject: FYI: Throwpoint checks for java.awt.Toolkit Message-ID: <20060620114705.GF3540@redhat.com> Hi all, This commit adds throwpoint checks for java.awt.Toolkit. Note that many of these checks are the responsibilty of the peer, so running this testcase will only check the current peer. Ideally I'd like this test to check all peers, but I don't know if this is possible. Does anyone know? Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1708 diff -u -r1.1708 ChangeLog --- ChangeLog 19 Jun 2006 22:07:37 -0000 1.1708 +++ ChangeLog 20 Jun 2006 11:42:17 -0000 @@ -1,3 +1,7 @@ +2006-06-20 Gary Benson + + * gnu/testlet/java/awt/Toolkit/security.java: New test. + 2006-06-19 Anthony Balkissoon * RunnerProcess.java: Index: gnu/testlet/java/awt/Toolkit/security.java =================================================================== RCS file: gnu/testlet/java/awt/Toolkit/security.java diff -N gnu/testlet/java/awt/Toolkit/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/awt/Toolkit/security.java 20 Jun 2006 11:42:17 -0000 @@ -0,0 +1,168 @@ +// Tags: GUI JDK1.3 + +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.awt.Toolkit; + +import java.awt.AWTEvent; +import java.awt.AWTPermission; +import java.awt.Frame; +import java.awt.JobAttributes; +import java.awt.PageAttributes; +import java.awt.Toolkit; +import java.awt.event.AWTEventListener; +import java.security.Permission; +import java.util.Properties; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + Toolkit toolkit = Toolkit.getDefaultToolkit(); + toolkit.getSystemEventQueue(); + + AWTEventListener listener = new TestEventListener(); + + Frame frame = new Frame(); + Properties props = new Properties(); + JobAttributes jobattrs = new JobAttributes(); + PageAttributes pageattrs = new PageAttributes(); + + Permission[] listenToAllAWTEvents = new Permission[] { + new AWTPermission("listenToAllAWTEvents")}; + + Permission[] queuePrintJob = new Permission[] { + new RuntimePermission("queuePrintJob")}; + + Permission[] accessClipboard = new Permission[] { + new AWTPermission("accessClipboard")}; + + Permission[] accessEventQueue = new Permission[] { + new AWTPermission("accessEventQueue")}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // throwpoint: java.awt.Toolkit-addAWTEventListener + harness.checkPoint("addAWTEventListener"); + try { + sm.prepareChecks(listenToAllAWTEvents); + toolkit.addAWTEventListener(listener, AWTEvent.KEY_EVENT_MASK); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.awt.Toolkit-removeAWTEventListener + harness.checkPoint("removeAWTEventListener"); + try { + sm.prepareChecks(listenToAllAWTEvents); + toolkit.removeAWTEventListener(listener); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.awt.Toolkit-getPrintJob(Frame, String, Properties) + harness.checkPoint("getPrintJob(3-arg)"); + try { + sm.prepareChecks(queuePrintJob, true); + toolkit.getPrintJob(frame, "Test job", props); + harness.check(false); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.awt.Toolkit-getPrintJob(Frame, String, JobAttributes, PageAttributes) + harness.checkPoint("getPrintJob(4-arg)"); + try { + sm.prepareChecks(queuePrintJob, true); + toolkit.getPrintJob(frame, "Test job", jobattrs, pageattrs); + harness.check(false); + } + catch (SecurityException ex) { + if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { + harness.check(true); + } + else { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.awt.Toolkit-getSystemClipboard + harness.checkPoint("getSystemClipboard"); + try { + sm.prepareChecks(accessClipboard); + toolkit.getSystemClipboard(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.awt.Toolkit-getSystemEventQueue + harness.checkPoint("getSystemEventQueue"); + try { + sm.prepareChecks(accessEventQueue); + toolkit.getSystemEventQueue(); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + private static class TestEventListener implements AWTEventListener + { + public void eventDispatched(AWTEvent event) + { + } + } +} From tbento@redhat.com Tue Jun 20 18:39:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 20 Jun 2006 18:39:00 -0000 Subject: FYI: JMenu Constructor Test Message-ID: <1150828783.2289.3.camel@toad.toronto.redhat.com> Hey, I have written a test for all of JMenu's constructors and fixed the constructor regressions. I will be posting these shortly. Here's the Changelog entry: 2006-06-20 Tania Bento * gnu/testlet/javax/swing/JMenu/constructors.java: New test. Cheers, Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 6473 bytes Desc: not available URL: From tbento@redhat.com Tue Jun 20 19:41:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 20 Jun 2006 19:41:00 -0000 Subject: FYI: Constructor Regression Test Message-ID: <1150832495.2289.10.camel@toad.toronto.redhat.com> Hey, This is a new mauve test that I wrote due to the constructor regressions for JMenu. These constructor regressions will be posted shortly. Here's the Changelog entry: 2006-06-20 Tania Bento * gnu/testlet/javax/swing/JMenu/getPopUpMenu.java: New test. Cheers, Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 6286 bytes Desc: not available URL: From tbento@redhat.com Tue Jun 20 19:48:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 20 Jun 2006 19:48:00 -0000 Subject: FYI: Another Constructor Regression test Message-ID: <1150832909.2289.14.camel@toad.toronto.redhat.com> Hey, This is yet another mauve test that I wrote due to the constructor regressions for JMenu. It focuses on the remove(int) method and what happens for different values of int. These constructor regressions will be posted shortly. Here's the Changelog entry: 2006-06-20 Tania Bento * gnu/testlet/javax/swing/JMenu/remove.java: New test. Cheers, Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2456 bytes Desc: not available URL: From tromey@redhat.com Tue Jun 20 21:19:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Tue, 20 Jun 2006 21:19:00 -0000 Subject: Patch: FYI: new test for URLStreamHandler Message-ID: This adds a new test case for URLStreamHandler, from PR 28095. Tom 2006-06-20 Tom Tromey * gnu/testlet/java/net/URLStreamHandler/Except.java: New file. Index: gnu/testlet/java/net/URLStreamHandler/Except.java =================================================================== RCS file: gnu/testlet/java/net/URLStreamHandler/Except.java diff -N gnu/testlet/java/net/URLStreamHandler/Except.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/URLStreamHandler/Except.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,62 @@ +/* Except.java -- Regression test for URLStreamHandler + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.4 + +package gnu.testlet.java.net.URLStreamHandler; + +import java.net.MalformedURLException; +import java.net.URL; +import java.net.URLConnection; +import java.net.URLStreamHandler; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +/** + * PR 28095 regression test. + */ +public class Except implements Testlet { + public static class Handler extends URLStreamHandler + { + protected URLConnection openConnection(URL u) + { + return null; + } + + protected void parseURL(URL url, String spec, int start, int end) + { + throw new RuntimeException(); + } + } + + public void test(TestHarness harness) { + boolean ok = false; + try { + URL u = new URL(null, "blah://", new Handler()); + } catch (MalformedURLException ignore) { + ok = true; + } catch (Exception ex) { + harness.debug(ex); + } + harness.check(ok); + } +} From gbenson@redhat.com Wed Jun 21 08:15:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 21 Jun 2006 08:15:00 -0000 Subject: FYI: Throwpoint checks for java.awt.Graphics2D Message-ID: <20060621081507.GB23387@redhat.com> Hi all, This commit adds throwpoint checks for java.awt.Graphics2D. As with the java.awt.Toolkit checks, this check is the responsibilty of the peer, so running this testcase will only check the current peer. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1713 diff -u -r1.1713 ChangeLog --- ChangeLog 20 Jun 2006 21:20:03 -0000 1.1713 +++ ChangeLog 21 Jun 2006 08:12:27 -0000 @@ -1,3 +1,7 @@ +2006-06-21 Gary Benson + + * gnu/testlet/java/awt/Graphics2D/security.java: New test. + 2006-06-20 Tom Tromey * gnu/testlet/java/net/URLStreamHandler/Except.java: New file. Index: gnu/testlet/java/awt/Graphics2D/security.java =================================================================== RCS file: gnu/testlet/java/awt/Graphics2D/security.java diff -N gnu/testlet/java/awt/Graphics2D/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/awt/Graphics2D/security.java 21 Jun 2006 08:12:27 -0000 @@ -0,0 +1,96 @@ +// Tags: GUI JDK1.3 + +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.awt.Graphics2D; + +import java.awt.AWTPermission; +import java.awt.Composite; +import java.awt.CompositeContext; +import java.awt.Frame; +import java.awt.Graphics2D; +import java.awt.Window; +import java.awt.RenderingHints; +import java.awt.image.ColorModel; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + Window window = new Frame(); + window.setVisible(true); + + Graphics2D graphics2d = (Graphics2D) window.getGraphics(); + + Composite composite = new TestComposite(); + + Permission[] readDisplayPixels = new Permission[] { + new AWTPermission("readDisplayPixels")}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // throwpoint: java.awt.Graphics2D-setComposite + harness.checkPoint("setComposite"); + try { + sm.prepareChecks(readDisplayPixels); + try { + graphics2d.setComposite(composite); + } + catch (UnsupportedOperationException ex) { + } + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + + window.setVisible(false); + window.dispose(); + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + private static class TestComposite implements Composite + { + public CompositeContext createContext(ColorModel srcColorModel, + ColorModel dstColorModel, + RenderingHints hints) + { + return null; + } + } +} From gbenson@redhat.com Wed Jun 21 10:04:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 21 Jun 2006 10:04:00 -0000 Subject: FYI: Throwpoint checks for java.lang.reflect.AccessibleObject Message-ID: <20060621100429.GC23387@redhat.com> Hi again, This commit adds checks for java.lang.reflect.AccessibleObject's throwpoints. This is the last testcase for java.lang :) Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1714 diff -u -r1.1714 ChangeLog --- ChangeLog 21 Jun 2006 08:13:03 -0000 1.1714 +++ ChangeLog 21 Jun 2006 09:59:27 -0000 @@ -1,3 +1,7 @@ + 2006-06-21 Gary Benson + + * gnu/testlet/java/lang/reflect/AccessibleObject/security.java: New test. + 2006-06-21 Gary Benson * gnu/testlet/java/awt/Graphics2D/security.java: New test. Index: gnu/testlet/java/lang/reflect/AccessibleObject/security.java =================================================================== RCS file: gnu/testlet/java/lang/reflect/AccessibleObject/security.java diff -N gnu/testlet/java/lang/reflect/AccessibleObject/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/reflect/AccessibleObject/security.java 21 Jun 2006 09:59:27 -0000 @@ -0,0 +1,136 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.reflect.AccessibleObject; + +import java.lang.reflect.AccessibleObject; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.ReflectPermission; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager2; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("constructor"); + Constructor constructor = + ClassLoader.class.getDeclaredConstructor(new Class[0]); + int mods = constructor.getModifiers(); + harness.check(Modifier.isPrivate(mods) || Modifier.isProtected(mods)); + try { + constructor.newInstance(new Object[0]); + harness.check(false); + } + catch (IllegalAccessException ex) { + harness.check(true); + } + + harness.checkPoint("field"); + Field field = String.class.getDeclaredField("serialVersionUID"); + mods = field.getModifiers(); + harness.check(Modifier.isPrivate(mods) || Modifier.isProtected(mods)); + try { + field.get(""); + harness.check(false); + } + catch (IllegalAccessException ex) { + harness.check(true); + } + + harness.checkPoint("method"); + Method method = + ClassLoader.class.getDeclaredMethod("getPackages", new Class[0]); + mods = method.getModifiers(); + harness.check(Modifier.isPrivate(mods) || Modifier.isProtected(mods)); + try { + method.invoke(getClass().getClassLoader(), new Object[0]); + harness.check(false); + } + catch (IllegalAccessException ex) { + harness.check(true); + } + + AccessibleObject[] objects = + new AccessibleObject[] {constructor, field, method}; + + AccessibleObject class_constructor = + Class.class.getDeclaredConstructors()[0]; + + Permission[] suppressAccessChecks = new Permission[] { + new ReflectPermission("suppressAccessChecks")}; + + TestSecurityManager2 sm = new TestSecurityManager2(harness); + try { + sm.install(); + + // throwpoint: java.lang.reflect.AccessibleObject-setAccessible(boolean) + harness.checkPoint("setAccessible (per-object)"); + for (int i = 0; i < objects.length; i++) { + try { + sm.prepareChecks(suppressAccessChecks); + objects[i].setAccessible(true); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + + harness.checkPoint("setAccessible (class constructor)"); + try { + sm.prepareChecks(suppressAccessChecks); + class_constructor.setAccessible(true); + harness.check(false); + } + catch (SecurityException ex) { + sm.checkAllChecked(harness); + } + + // throwpoint: java.lang.reflect.AccessibleObject-setAccessible(AccessibleObject[], boolean) + harness.checkPoint("setAccessible (array)"); + try { + sm.prepareChecks(suppressAccessChecks); + AccessibleObject.setAccessible(objects, true); + sm.checkAllChecked(harness); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Throwable ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From neugens@limasoftware.net Wed Jun 21 19:23:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Wed, 21 Jun 2006 19:23:00 -0000 Subject: FYI: GConf Preference test small update Message-ID: <1150917890.2656.5.camel@nirvana.limasoftware.net> Hi have added a simple test: 2006-06-21 neugens * gnu/testlet/java/util/prefs/PreferenceTest.java (testBoolean): new test method. (test): call to enable new test. Mario -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve_preference_test.patch Type: text/x-patch Size: 2081 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Questa ? una parte del messaggio firmata digitalmente URL: From abalkiss@redhat.com Wed Jun 21 19:56:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 21 Jun 2006 19:56:00 -0000 Subject: remove SimpleTestHarness Message-ID: <1150919767.25174.75.camel@tony.toronto.redhat.com> This file was part of the old harness structure and is now removed. 2006-06-21 Anthony Balkissoon * gnu/testlet/SimpleTestHarness.java: Removed this file. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: removeSimple.diff Type: text/x-patch Size: 12351 bytes Desc: not available URL: From neugens@limasoftware.net Wed Jun 21 20:09:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Wed, 21 Jun 2006 20:09:00 -0000 Subject: FYI: GConf Preference test small update In-Reply-To: <1150917890.2656.5.camel@nirvana.limasoftware.net> References: <1150917890.2656.5.camel@nirvana.limasoftware.net> Message-ID: <1150920620.2656.12.camel@nirvana.limasoftware.net> Attached the right patch without the ChangeLog in it... Sorry for the confusion, I feel a newbie... Mario 2006-06-21 neugens * gnu/testlet/java/util/prefs/PreferenceTest.java (testBoolean): new test method. (test): call to enable new test. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve_preference_test.patch Type: text/x-patch Size: 1431 bytes Desc: not available URL: From abalkiss@redhat.com Wed Jun 21 20:18:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 21 Jun 2006 20:18:00 -0000 Subject: new -vmarg option to Harness Message-ID: <1150921128.25174.77.camel@tony.toronto.redhat.com> As suggested by Mark on #classpath, I added an easy way to pass arguments to the VM running the RunnerProcess. 2006-06-21 Anthony Balkissoon * README: Added info about new -vmarg option for the Harness. * Harness.java: (vmArgs): New field. (main): Handle new -vmarg option. (initProcess): Concatenate the vmArgs to the vmCommand before running exec. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: VMArgs.diff Type: text/x-patch Size: 3097 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Jun 22 08:47:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 22 Jun 2006 08:47:00 -0000 Subject: FYI: JLabel.setDisplayedMnemonic() tests Message-ID: <449A5928.1000300@object-refinery.com> This patch (committed) adds some checks for the setDisplayedMnemonic() and setDisplayedMnemonicIndex() methods: 2006-06-22 David Gilbert * gnu/testlet/javax/swing/JLabel/setDisplayedMnemonic.java: New test, * gnu/testlet/javax/swing/JLabel/setDisplayedMnemonicIndex.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Thu Jun 22 10:00:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 22 Jun 2006 10:00:00 -0000 Subject: FYI: JLabel.setDisplayedMnemonic() tests updated Message-ID: <449A6A39.8020506@object-refinery.com> This patch (committed) updates the tests I committed earlier to cover a few additional cases: 2006-06-22 David Gilbert * gnu/testlet/javax/swing/JLabel/setDisplayedMnemonic.java: (displayedMnemonicWhenEventFired): New field, (propertyChange): Record mnemonic value at time of event, (testMethod1): Check mnemonic at event time, (testMethod2): Added new checks, * gnu/testlet/javax/swing/JLabel/setDisplayedMnemonicIndex.java: (propertyChange): Only record index for a specific event, (test): Added new checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman@kennke.org Thu Jun 22 11:15:00 2006 From: roman@kennke.org (Roman Kennke) Date: Thu, 22 Jun 2006 11:15:00 -0000 Subject: FYI: PlainDocument.insertUpdate() test Message-ID: <1150974890.5160.3.camel@localhost.localdomain> I added a test class for testing PlainDocument.insertUpdate(). 2006-06-22 David Gilbert * gnu/testlet/javax/swing/text/PlainDocument/insertUpdate.java New test class. /Roman -- ?Improvement makes straight roads, but the crooked roads, without Improvement, are roads of Genius.? - William Blake -------------- next part -------------- A non-text attachment was scrubbed... Name: insertUpdate.java Type: text/x-java Size: 2689 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From roman@kennke.org Thu Jun 22 12:43:00 2006 From: roman@kennke.org (Roman Kennke) Date: Thu, 22 Jun 2006 12:43:00 -0000 Subject: FYI: Abstract/PlainDocument tests Message-ID: <1150980140.5160.5.camel@localhost.localdomain> I added tests for the AbstractDocument's getDocumentProperties() which checks some default properties installed there. 2006-06-22 Roman Kennke * gnu/testlet/javax/swing/text/PlainDocument/getDocumentProperties.java: New test class. * gnu/testlet/javax/swing/text/AbstractDocument/getDocumentProperties.java: New test class. * gnu/testlet/javax/swing/text/AbstractDocument/TestAbstractDocument.java: New auxiliary class. /Roman -- ?Improvement makes straight roads, but the crooked roads, without Improvement, are roads of Genius.? - William Blake -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 6455 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From langel@redhat.com Thu Jun 22 14:16:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 22 Jun 2006 14:16:00 -0000 Subject: FYI: CheckboxGroup test Message-ID: <1150985762.23461.122.camel@tow.toronto.redhat.com> This class tests how a checkbox dynamically changes if the checkbox group changes. 2006-06-22 Lillian Angel * gnu/testlet/java/awt/CheckboxGroup/testGroup.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-checkbox.diff Type: text/x-patch Size: 2367 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Jun 22 14:19:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 22 Jun 2006 14:19:00 -0000 Subject: FYI: CheckboxGroup test In-Reply-To: <1150985762.23461.122.camel@tow.toronto.redhat.com> References: <1150985762.23461.122.camel@tow.toronto.redhat.com> Message-ID: <449AA6D8.9070700@object-refinery.com> Hi Lillian, You left a FIXME in for the tag. Regards, Dave Lillian Angel wrote: >This class tests how a checkbox dynamically changes if the checkbox >group changes. > >2006-06-22 Lillian Angel > > * gnu/testlet/java/awt/CheckboxGroup/testGroup.java: New test. > > > >------------------------------------------------------------------------ > >Index: gnu/testlet/java/awt/CheckboxGroup/testGroup.java >=================================================================== >RCS file: gnu/testlet/java/awt/CheckboxGroup/testGroup.java >diff -N gnu/testlet/java/awt/CheckboxGroup/testGroup.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ gnu/testlet/java/awt/CheckboxGroup/testGroup.java 22 Jun 2006 14:13:12 -0000 >@@ -0,0 +1,69 @@ >+/* testGroup.java -- >+ Copyright (C) 2006 Red Hat >+This file is part of Mauve. >+ >+Mauve is free software; you can redistribute it and/or modify >+it under the terms of the GNU General Public License as published by >+the Free Software Foundation; either version 2, or (at your option) >+any later version. >+ >+Mauve is distributed in the hope that it will be useful, but >+WITHOUT ANY WARRANTY; without even the implied warranty of >+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >+General Public License for more details. >+ >+You should have received a copy of the GNU General Public License >+along with Mauve; see the file COPYING. If not, write to the >+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA >+02110-1301 USA. >+ >+*/ >+ >+// Tags: FIXME >+ >+package gnu.testlet.java.awt.CheckboxGroup; >+ >+import gnu.testlet.TestHarness; >+import gnu.testlet.Testlet; >+ >+import java.awt.Checkbox; >+import java.awt.CheckboxGroup; >+import java.awt.Frame; >+import java.awt.Robot; >+ >+public class testGroup >+implements Testlet >+{ >+ >+ /** >+ * This tests a checkbox in a group. >+ * The checkbox turns to a radio button when it is >+ * put into a group. If the group is set to null, then >+ * the checkbox turns into a regular checkbox. >+ * >+ * This tests a dynamically changing group. >+ */ >+ public void test(TestHarness harness) >+ { >+ Robot r = harness.createRobot (); >+ Frame frame = new Frame(); >+ Checkbox checkbox = new Checkbox("Checkbox"); >+ frame.add(checkbox); >+ frame.setBounds(0, 0, 100, 100); >+ >+ harness.check(checkbox.getCheckboxGroup(), null); >+ CheckboxGroup group = new CheckboxGroup(); >+ checkbox.setCheckboxGroup(group); >+ harness.check(group, checkbox.getCheckboxGroup()); >+ frame.setVisible(true); >+ >+ r.waitForIdle (); >+ r.delay(1000); >+ >+ checkbox.setCheckboxGroup(null); >+ >+ r.delay(1000); >+ >+ harness.check(checkbox.getCheckboxGroup(), null); >+ } >+} > > From langel@redhat.com Thu Jun 22 14:45:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 22 Jun 2006 14:45:00 -0000 Subject: FYI: CheckboxGroup test In-Reply-To: <449AA6D8.9070700@object-refinery.com> References: <1150985762.23461.122.camel@tow.toronto.redhat.com> <449AA6D8.9070700@object-refinery.com> Message-ID: <1150987508.23461.124.camel@tow.toronto.redhat.com> On Thu, 2006-06-22 at 15:19 +0100, David Gilbert wrote: > Hi Lillian, > > You left a FIXME in for the tag. Oops! Fixed 2006-06-22 Lillian Angel * gnu/testlet/java/awt/CheckboxGroup/testGroup.java: Fixed Tag, removed FIXME. > > Regards, > > Dave > > Lillian Angel wrote: > > >This class tests how a checkbox dynamically changes if the checkbox > >group changes. > > > >2006-06-22 Lillian Angel > > > > * gnu/testlet/java/awt/CheckboxGroup/testGroup.java: New test. > > > > > > > >------------------------------------------------------------------------ > > > >Index: gnu/testlet/java/awt/CheckboxGroup/testGroup.java > >=================================================================== > >RCS file: gnu/testlet/java/awt/CheckboxGroup/testGroup.java > >diff -N gnu/testlet/java/awt/CheckboxGroup/testGroup.java > >--- /dev/null 1 Jan 1970 00:00:00 -0000 > >+++ gnu/testlet/java/awt/CheckboxGroup/testGroup.java 22 Jun 2006 14:13:12 -0000 > >@@ -0,0 +1,69 @@ > >+/* testGroup.java -- > >+ Copyright (C) 2006 Red Hat > >+This file is part of Mauve. > >+ > >+Mauve is free software; you can redistribute it and/or modify > >+it under the terms of the GNU General Public License as published by > >+the Free Software Foundation; either version 2, or (at your option) > >+any later version. > >+ > >+Mauve is distributed in the hope that it will be useful, but > >+WITHOUT ANY WARRANTY; without even the implied warranty of > >+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > >+General Public License for more details. > >+ > >+You should have received a copy of the GNU General Public License > >+along with Mauve; see the file COPYING. If not, write to the > >+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > >+02110-1301 USA. > >+ > >+*/ > >+ > >+// Tags: FIXME > >+ > >+package gnu.testlet.java.awt.CheckboxGroup; > >+ > >+import gnu.testlet.TestHarness; > >+import gnu.testlet.Testlet; > >+ > >+import java.awt.Checkbox; > >+import java.awt.CheckboxGroup; > >+import java.awt.Frame; > >+import java.awt.Robot; > >+ > >+public class testGroup > >+implements Testlet > >+{ > >+ > >+ /** > >+ * This tests a checkbox in a group. > >+ * The checkbox turns to a radio button when it is > >+ * put into a group. If the group is set to null, then > >+ * the checkbox turns into a regular checkbox. > >+ * > >+ * This tests a dynamically changing group. > >+ */ > >+ public void test(TestHarness harness) > >+ { > >+ Robot r = harness.createRobot (); > >+ Frame frame = new Frame(); > >+ Checkbox checkbox = new Checkbox("Checkbox"); > >+ frame.add(checkbox); > >+ frame.setBounds(0, 0, 100, 100); > >+ > >+ harness.check(checkbox.getCheckboxGroup(), null); > >+ CheckboxGroup group = new CheckboxGroup(); > >+ checkbox.setCheckboxGroup(group); > >+ harness.check(group, checkbox.getCheckboxGroup()); > >+ frame.setVisible(true); > >+ > >+ r.waitForIdle (); > >+ r.delay(1000); > >+ > >+ checkbox.setCheckboxGroup(null); > >+ > >+ r.delay(1000); > >+ > >+ harness.check(checkbox.getCheckboxGroup(), null); > >+ } > >+} > > > > > -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-checkbox.diff Type: text/x-patch Size: 531 bytes Desc: not available URL: From theBohemian@gmx.net Thu Jun 22 15:21:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Thu, 22 Jun 2006 15:21:00 -0000 Subject: [Fwd: [cp-patches] FYI: More PlainDocument.insertUpdate() tests] Message-ID: <449AB565.3000708@gmx.net> This was sent to the wrong list. -------------- next part -------------- An embedded message was scrubbed... From: Roman Kennke Subject: [cp-patches] FYI: More PlainDocument.insertUpdate() tests Date: Thu, 22 Jun 2006 15:33:37 +0200 Size: 11313 URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 253 bytes Desc: OpenPGP digital signature URL: From david.gilbert@object-refinery.com Thu Jun 22 16:11:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 22 Jun 2006 16:11:00 -0000 Subject: FYI: JLabel tests Message-ID: <449AC126.9020401@object-refinery.com> This patch (committed) contains new tests for the JLabel class, which I've been working on today. There are still a few failures, but most of the problems have been fixed. I'm checking in the tests in case someone wants to clean up the remaining bugs before I get a chance: 2006-06-22 David Gilbert * gnu/testlet/javax/swing/JLabel/getActionMap.java: New file, * gnu/testlet/javax/swing/JLabel/getInputMap.java (testMethod2): Added new checks, * gnu/testlet/javax/swing/JLabel/setDisplayedMnemonic.java (testKeyMap): New method, * gnu/testlet/javax/swing/JLabel/setFont.java: New file, * gnu/testlet/javax/swing/JLabel/setHorizontalAlignment.java: New file, * gnu/testlet/javax/swing/JLabel/setIconTextGap.java: New file, * gnu/testlet/javax/swing/JLabel/setText.java (events): New field, (propertyChange): New method, (testGeneral): New method, (testGeneralWithMnemonic): New method, * gnu/testlet/javax/swing/JLabel/setVerticalAlignment.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From abalkiss@redhat.com Thu Jun 22 20:05:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Thu, 22 Jun 2006 20:05:00 -0000 Subject: Harness fix Message-ID: <1151006747.25174.93.camel@tony.toronto.redhat.com> This patch allows the Harness to display info that tests sent to their error stream (via System.err.pritnln or Throwable.printStackTrace or something similar). It also stops the timeout watcher for the startup process and passes vmargs when autodetecting the bootclasspath for the compiler. The commit also included the README because I forgot to check it in with the update I made yesterday (that patch was sent to this list). 2006-06-22 Anthony Balkissoon * Harness.java: (runner_in_err): New field. (getBootClassPath): Use the vmArgs when forking the detector. (finalize): Close the pipe to the RunnerProcess' error stream. (initProcess): Set up the pipe to the RunnerProcess' error stream. Stop the watcher after confirming startup. (runTest): Collect error stream output from the RunnerProcess in a StringBuffer and print it when there's no new regular output from the test. Also print it after the test has completed. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: AcceptRunnerErrorStream.diff Type: text/x-patch Size: 3508 bytes Desc: not available URL: From mark@klomp.org Thu Jun 22 21:36:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Thu, 22 Jun 2006 21:36:00 -0000 Subject: FYI: Small builder cleanups Message-ID: <1151012193.4343.8.camel@localhost.localdomain> Some references to Gcjx and Jacks which were recently removed were still in some scripts. 2006-06-22 Mark Wielaard * scripts/Build: Remove GjcX. * scripts/Check: Remove Jacks. * scripts/Update: Likewise. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: cleanup.patch Type: text/x-patch Size: 1383 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From roman@kennke.org Fri Jun 23 12:21:00 2006 From: roman@kennke.org (Roman Kennke) Date: Fri, 23 Jun 2006 12:21:00 -0000 Subject: FYI: JInternalFrame tests fixed Message-ID: <1151065263.5842.6.camel@localhost.localdomain> I fixed the setSelected2 test in JInternalFrame, so that it passes on JDK5. 2006-06-23 Roman Kennke * gnu/testlet/javax/swing/JInternalFrame/setSelected2.java (test): Make sure the internal frame is showing, otherwise setSelected doesn't work on JDK5. Fixed some tests to PASS with JDK5. /Roman -- ?Improvement makes straight roads, but the crooked roads, without Improvement, are roads of Genius.? - William Blake -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: Dies ist ein digital signierter Nachrichtenteil URL: From abalkiss@redhat.com Fri Jun 23 16:31:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Fri, 23 Jun 2006 16:31:00 -0000 Subject: RFC: add "not-a-test" tag to several tests Message-ID: <1151080291.25174.104.camel@tony.toronto.redhat.com> This patch adds the "not-a-test" tag to several tests. This is RFC because these were not my tests, if you are the author of one or more of these tests and disagree with the not-a-test label, please say so. Almost certainly that won't be the case because these files did not implement Testlet or call TestHarness.test(), but since they're not mine I just want to make sure. Cheers, Tony 2006-06-23 Anthony Balkissoon * RunnerProcess.java: (FAILED_TO_LOAD_DESCRIPTION): New field. (runtest): Set description to FAILED_TO_LOAD_DESCRIPTION if the test fails to load. Print out a suggestion that perhaps the file should be marked "not-a-test". * gnu/testlet/javax/rmi/CORBA/Tie/RMI_test.java: Marked not-a-test. * gnu/testlet/javax/xml/parsers/DocumentBuilder/Verifyer.java: Likewise. * gnu/testlet/org/omg/CORBA/ORB/Asynchron/_asyncImplBase.java: Likewise. * gnu/testlet/org/omg/CORBA/ORB/Asynchron/_asyncStub.java: Likewise. * gnu/testlet/org/omg/CORBA/ORB/Asynchron/assServant.java: Likewise. * gnu/testlet/org/omg/CORBA/ORB/Asynchron/async.java: Likewise. * gnu/testlet/org/omg/CORBA/ORB/RF11/B.java: Likewise. * gnu/testlet/org/omg/CORBA/ORB/RF11/NEC_RF11.java: Likewise. * gnu/testlet/org/omg/CORBA/ORB/RF11/rf11Operations.java: Likewise. * gnu/testlet/org/omg/CORBA/ORB/communication/comTester.java: Likewise. * gnu/testlet/org/omg/CORBA/ORB/communication/ourUserException.java: Likewise. * gnu/testlet/org/omg/CORBA/portable/OutputStream/mirror.java: Likewise. * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/Greetings.java: Likewise. * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/InfoValueFactory.java: Likewise. * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/cmInfoValueFactory.java: Likewise. * gnu/testlet/org/omg/DynamicAny/DynAny/Iona/TestEnum.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/Test.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestDSIRef_impl.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestDSI_impl.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestLocationForward.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardActivator_impl.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardOperations.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardServer.java:Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardServerMain.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardServerOperations.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestLocationForward_impl.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestOperations.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/TestUtil.java: Likewise. * gnu/testlet/org/omg/PortableServer/POA/Test_impl.java: Likewise. * gnu/testlet/org/omg/PortableServer/POAOperations/communication/poa_comTester.java: Likewise. * gnu/testlet/org/omg/PortableServer/POAOperations/communication/poa_comTesterOperations.java: Likewise. * gnu/testlet/org/omg/PortableServer/POAOperations/communication/remotePoaControl.java: Likewise. * gnu/testlet/org/omg/PortableServer/POAOperations/communication/remotePoaControlOperations.java: Likewise. * gnu/testlet/runner/CheckResult.java: Likewise. * gnu/testlet/runner/ClassResult.java: Likewise. * gnu/testlet/runner/PackageResult.java: Likewise. * gnu/testlet/runner/RunResult.java: Likewise. * gnu/testlet/runner/Tags.java: Likewise. * gnu/testlet/runner/TestResult.java: Likewise. * gnu/testlet/runner/XMLGenerator.java: Likewise. -------------- next part -------------- A non-text attachment was scrubbed... Name: NotATest.diff Type: text/x-patch Size: 28851 bytes Desc: not available URL: From tromey@redhat.com Fri Jun 23 17:42:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Fri, 23 Jun 2006 17:42:00 -0000 Subject: RFC: add "not-a-test" tag to several tests In-Reply-To: <1151080291.25174.104.camel@tony.toronto.redhat.com> References: <1151080291.25174.104.camel@tony.toronto.redhat.com> Message-ID: Tony> Almost certainly that won't be the case because these Tony> files did not implement Testlet or call TestHarness.test(), but since Tony> they're not mine I just want to make sure. I didn't read the patch, but for ones that don't implement Testlet, just go ahead. Tom From mark@klomp.org Sat Jun 24 17:32:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sat, 24 Jun 2006 17:32:00 -0000 Subject: FYI: Make Harness sleep a little Message-ID: <1151170367.4532.71.camel@localhost.localdomain> Hi, Currently the Harness is doing a busy wait for its child TestRunner process to produce some output. This is not so nice. I already discussed this with Tony and he is working on a real solution. But for now I think it is appropriate to have a little quickfix workaround to get the testsuite to run a little (actually twice on my machine) faster. 2006-06-24 Mark Wielaard * Harness.java (getBootClassPath): Add Thread.sleep(). (runTest): Likewise. This should also reduce the time needed to run mauve on builder significantly. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: Harness-workaround.patch Type: text/x-patch Size: 1342 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From gnu_andrew@member.fsf.org Sat Jun 24 21:08:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sat, 24 Jun 2006 21:08:00 -0000 Subject: FYI: Tests for new management beans Message-ID: <20060624210754.GA9631@localhost.localdomain> The attached patch adds tests for the new management beans; mainly to ensure that the security restrictions are respected. Changelog: 2006-06-24 Andrew John Hughes * gnu/testlet/java/lang/management/BadGuy.java: Restrictive security manager used for testing the management beans. * gnu/testlet/java/lang/management/OperatingSystemMXBeanTest.java, * gnu/testlet/java/lang/management/RuntimeMxBeanTest.java: New tests for the management beans. * gnu/testlet/java/util/logging/LoggingMXBean.java: Test the logging bean. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- Index: gnu/testlet/java/lang/management/BadGuy.java =================================================================== RCS file: gnu/testlet/java/lang/management/BadGuy.java diff -N gnu/testlet/java/lang/management/BadGuy.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/management/BadGuy.java 24 Jun 2006 21:03:03 -0000 @@ -0,0 +1,87 @@ +// Tags: not-a-test + +// Copyright (C) 2006 Andrew John Hughes + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.management; + +import java.lang.management.ManagementPermission; + +import java.security.Permission; +import java.security.AccessControlException; + +import java.util.PropertyPermission; + +/** + * An evil {@link java.lang.SecurityManager} which disallows use + * of the management beans. + * + * @author Andrew John Hughes + */ +public class BadGuy + extends SecurityManager +{ + + private final Permission propertyPermission = new PropertyPermission("*", "read,write"); + private final Permission monitorPermission = new ManagementPermission("monitor"); + private final Permission controlPermission = new ManagementPermission("control"); + + private SecurityManager oldManager; + + /** + * Checks permissions and disallows property access or management + * control and monitoring. + * + * @param p the request permission. + * @throws AccessControlException if property access, management control, + * or monitoring is requested. + */ + public void checkPermission(Permission p) + { + if (propertyPermission.implies(p)) + throw new AccessControlException("Property access disallowed.", p); + if (controlPermission.implies(p)) + throw new AccessControlException("Management control disallowed.", p); + if (monitorPermission.implies(p)) + throw new AccessControlException("Monitoring disallowed.", p); + } + + /** + * Installs this security manager in place of the current one. + */ + public void install() + { + SecurityManager oldsm = System.getSecurityManager(); + + if (oldsm == this) + throw new IllegalStateException("already installed"); + + oldManager = oldsm; + System.setSecurityManager(this); + } + + /** + * Reinstates the original security manager. + */ + public void uninstall() + { + System.setSecurityManager(oldManager); + } + +} Index: gnu/testlet/java/lang/management/OperatingSystemMXBeanTest.java =================================================================== RCS file: gnu/testlet/java/lang/management/OperatingSystemMXBeanTest.java diff -N gnu/testlet/java/lang/management/OperatingSystemMXBeanTest.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/management/OperatingSystemMXBeanTest.java 24 Jun 2006 21:03:03 -0000 @@ -0,0 +1,96 @@ +// Tags: JDK1.5 + +// Copyright (C) 2006 Andrew John Hughes + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.management; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import java.lang.management.ManagementFactory; +import java.lang.management.OperatingSystemMXBean; + +/** + * Gets hold of a OS management bean from the + * @link{java.lang.management.ManagementFactory} and + * test its security. + * + * @author Andrew John Hughes + */ +public class OperatingSystemMXBeanTest + implements Testlet +{ + + private BadGuy bg = new BadGuy(); + + public void test(TestHarness h) + { + try + { + Exception caught = null; + OperatingSystemMXBean bean = ManagementFactory.getOperatingSystemMXBean(); + + bg.install(); + + // Check getName + caught = null; + try + { + bean.getName(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "name"); + + // Check getArch + caught = null; + try + { + bean.getArch(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "arch"); + + // Check getVersion + caught = null; + try + { + bean.getVersion(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "version"); + + } + finally + { + bg.uninstall(); + } + } + +} + Index: gnu/testlet/java/lang/management/RuntimeMXBeanTest.java =================================================================== RCS file: gnu/testlet/java/lang/management/RuntimeMXBeanTest.java diff -N gnu/testlet/java/lang/management/RuntimeMXBeanTest.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/management/RuntimeMXBeanTest.java 24 Jun 2006 21:03:03 -0000 @@ -0,0 +1,195 @@ +// Tags: JDK1.5 + +// Copyright (C) 2006 Andrew John Hughes + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.management; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import java.lang.management.ManagementFactory; +import java.lang.management.RuntimeMXBean; + +/** + * Gets hold of a runtime management bean from the + * @link{java.lang.management.ManagementFactory} and + * test its security. + * + * @author Andrew John Hughes + */ +public class RuntimeMXBeanTest + implements Testlet +{ + + private BadGuy bg = new BadGuy(); + + public void test(TestHarness h) + { + try + { + Exception caught = null; + RuntimeMXBean bean = ManagementFactory.getRuntimeMXBean(); + + bg.install(); + + // Check getVmName + caught = null; + try + { + bean.getVmName(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "vmName"); + + // Check getVmVendor + caught = null; + try + { + bean.getVmVendor(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "vmVendor"); + + // Check getVmVersion + caught = null; + try + { + bean.getVmVersion(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "vmVersion"); + + // Check getSpecName + caught = null; + try + { + bean.getSpecName(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "specName"); + + // Check getSpecVendor + caught = null; + try + { + bean.getSpecVendor(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "specVendor"); + + // Check getSpecVersion + caught = null; + try + { + bean.getSpecVersion(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "specVersion"); + + // Check getClassPath + caught = null; + try + { + bean.getClassPath(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "classPath"); + + // Check getLibraryPath + caught = null; + try + { + bean.getLibraryPath(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "libraryPath"); + + // Check getBootClassPath + caught = null; + try + { + bean.getBootClassPath(); + } + catch (Exception ex) + { + caught = ex; + } + if (bean.isBootClassPathSupported()) + h.check(caught instanceof SecurityException, "bootClassPath"); + else + h.check(caught instanceof UnsupportedOperationException, "bootClassPath"); + + // Check getInputArguments + caught = null; + try + { + bean.getInputArguments(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "inputArguments"); + + // Check getSystemProperties + caught = null; + try + { + bean.getSystemProperties(); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "systemProperties"); + + } + finally + { + bg.uninstall(); + } + } + +} + Index: gnu/testlet/java/util/logging/LoggingMXBean/Test.java =================================================================== RCS file: gnu/testlet/java/util/logging/LoggingMXBean/Test.java diff -N gnu/testlet/java/util/logging/LoggingMXBean/Test.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/util/logging/LoggingMXBean/Test.java 24 Jun 2006 21:03:03 -0000 @@ -0,0 +1,91 @@ +// Tags: JDK1.5 + +// Copyright (C) 2006 Andrew John Hughes + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.util.logging.LoggingMXBean; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import gnu.testlet.java.util.logging.Logger.TestSecurityManager; + +import java.util.logging.LoggingMXBean; +import java.util.logging.LogManager; + +/** + * Gets hold of a logging bean from the + * @link{java.util.logging.LogManager} and + * test its security. + * + * @author Andrew John Hughes + */ +public class Test + implements Testlet +{ + + private TestSecurityManager tsm = new TestSecurityManager(); + + public void test(TestHarness h) + { + try + { + Exception caught = null; + LoggingMXBean bean = LogManager.getLoggingMXBean(); + + tsm.install(); + + // Check setLoggerLevel + caught = null; + try + { + bean.setLoggerLevel("global", null); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "loggerLevel"); + try + { + bean.setLoggerLevel("NotALogger", null); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof IllegalArgumentException, "loggerLevel"); + try + { + bean.setLoggerLevel(null, null); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof NullPointerException, "loggerLevel"); + } + finally + { + tsm.uninstall(); + } + } + +} + -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From gnu_andrew@member.fsf.org Sun Jun 25 00:55:00 2006 From: gnu_andrew@member.fsf.org (Andrew John Hughes) Date: Sun, 25 Jun 2006 00:55:00 -0000 Subject: FYI: Add test for class loading management bean Message-ID: <20060625005546.GA3421@localhost.localdomain> This tests the one method of ClassLoadingMXBean that has anything more than very simple 'return a value' behaviour. setVerbose should be protected by the 'control' management permission, which this ensures. Changelog: 2006-06-24 Andrew John Hughes * gnu/testlet/java/lang/management/ClassLoadingMXBeanTest.java: New test to ensure security of setVerbose is maintained. -- Andrew :-) Please avoid sending me Microsoft Office (e.g. Word, PowerPoint) attachments. See http://www.fsf.org/philosophy/no-word-attachments.html If you use Microsoft Office, support movement towards the end of vendor lock-in: http://opendocumentfellowship.org/petition/ "Value your freedom, or you will lose it, teaches history. `Don't bother us with politics' respond those who don't want to learn." -- Richard Stallman Escape the Java Trap with GNU Classpath! http://www.gnu.org/philosophy/java-trap.html public class gcj extends Freedom implements Java { ... } -------------- next part -------------- Index: gnu/testlet/java/lang/management/ClassLoadingMXBeanTest.java =================================================================== RCS file: gnu/testlet/java/lang/management/ClassLoadingMXBeanTest.java diff -N gnu/testlet/java/lang/management/ClassLoadingMXBeanTest.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/lang/management/ClassLoadingMXBeanTest.java 25 Jun 2006 00:53:05 -0000 @@ -0,0 +1,72 @@ +// Tags: JDK1.5 + +// Copyright (C) 2006 Andrew John Hughes + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.lang.management; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import java.lang.management.ClassLoadingMXBean; +import java.lang.management.ManagementFactory; + +/** + * Gets hold of a class loading management bean from the + * @link{java.lang.management.ManagementFactory} and + * test its security. + * + * @author Andrew John Hughes + */ +public class ClassLoadingMXBeanTest + implements Testlet +{ + + private BadGuy bg = new BadGuy(); + + public void test(TestHarness h) + { + try + { + Exception caught = null; + ClassLoadingMXBean bean = ManagementFactory.getClassLoadingMXBean(); + + bg.install(); + + // Check getName + caught = null; + try + { + bean.setVerbose(true); + } + catch (Exception ex) + { + caught = ex; + } + h.check(caught instanceof SecurityException, "verbose"); + + } + finally + { + bg.uninstall(); + } + } + +} + -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Digital signature URL: From mark@klomp.org Sun Jun 25 16:55:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 25 Jun 2006 16:55:00 -0000 Subject: FYI: Add extra Class.newInstance() checks Message-ID: <1151254521.8131.6.camel@hermans.wildebeest.org> Hi, This adds some tests to make sure that interface, abstract, primitive and void classes cannot be instantiated. 2006-06-25 Mark Wielaard * gnu/testlet/java/lang/Class/newInstance.java: Add checks for interface, abstract, primitive and void classes. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: newInstance.patch Type: text/x-patch Size: 2799 bytes Desc: not available URL: From gbenson@redhat.com Mon Jun 26 09:38:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Mon, 26 Jun 2006 09:38:00 -0000 Subject: FYI: Tweaked throwpoint checks for java.io.FileInputStream In-Reply-To: <20060621100429.GC23387@redhat.com> References: <20060621100429.GC23387@redhat.com> Message-ID: <20060626093804.GA3668@redhat.com> Morning all, This commit makes some small changes to the throwpoint checks for java.io.FileInputStream. Hardly worth bothering with except that it's the testcase I point people at who want a simple one to base things on, so it makes sense to have it perfect. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1732 diff -u -r1.1732 ChangeLog --- ChangeLog 25 Jun 2006 16:55:59 -0000 1.1732 +++ ChangeLog 26 Jun 2006 09:32:53 -0000 @@ -1,3 +1,7 @@ +2006-06-26 Gary Benson + + * gnu/testlet/java/io/FileInputStream/security.java: Minor tweaks. + 2006-06-25 Mark Wielaard * gnu/testlet/java/lang/Class/newInstance.java: Add checks for Index: gnu/testlet/java/io/FileInputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/FileInputStream/security.java,v retrieving revision 1.5 diff -u -r1.5 security.java --- gnu/testlet/java/io/FileInputStream/security.java 3 Feb 2006 10:21:46 -0000 1.5 +++ gnu/testlet/java/io/FileInputStream/security.java 26 Jun 2006 09:32:53 -0000 @@ -1,4 +1,4 @@ -// Copyright (C) 2005 Red Hat, Inc. +// Copyright (C) 2005, 2006 Red Hat, Inc. // Written by Gary Benson // This file is part of Mauve. @@ -37,18 +37,19 @@ File file = new File(harness.getSourceDirectory(), "ChangeLog"); String path = file.getPath(); - Permission perm = new FilePermission(path, "read"); - Permission fdPerm = new RuntimePermission("readFileDescriptor"); + Permission[] perm = new Permission[] { + new FilePermission(path, "read")}; + Permission[] fdPerm = new Permission[] { + new RuntimePermission("readFileDescriptor")}; TestSecurityManager2 sm = new TestSecurityManager2(harness); - try { sm.install(); // throwpoint: java.io.FileInputStream-FileInputStream(File) harness.checkPoint("File constructor"); try { - sm.prepareChecks(new Permission[] {perm}); + sm.prepareChecks(perm); new FileInputStream(file); sm.checkAllChecked(harness); } @@ -60,7 +61,7 @@ // throwpoint: java.io.FileInputStream-FileInputStream(String) harness.checkPoint("String constructor"); try { - sm.prepareChecks(new Permission[] {perm}); + sm.prepareChecks(perm); new FileInputStream(path); sm.checkAllChecked(harness); } @@ -72,7 +73,7 @@ // throwpoint: java.io.FileInputStream-FileInputStream(FileDescriptor) harness.checkPoint("FileDescriptor constructor"); try { - sm.prepareChecks(new Permission[] {fdPerm}); + sm.prepareChecks(fdPerm); new FileInputStream(FileDescriptor.in); sm.checkAllChecked(harness); } From gbenson@redhat.com Mon Jun 26 09:39:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Mon, 26 Jun 2006 09:39:00 -0000 Subject: FYI: Tests for new management beans In-Reply-To: <20060624210754.GA9631@localhost.localdomain> References: <20060624210754.GA9631@localhost.localdomain> Message-ID: <20060626093922.GB3668@redhat.com> Hi Andrew, Andrew John Hughes wrote: > The attached patch adds tests for the new management beans; > mainly to ensure that the security restrictions are respected. Would it make sense to rewrite this to be like the other security manager tests? There's already a special security manager for this kind of thing, for example. Have a look at gnu/testlet/java/io/FileInputStream/security.java if you want to see what a simple test looks like. Cheers, Gary From david.gilbert@object-refinery.com Mon Jun 26 13:31:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 26 Jun 2006 13:31:00 -0000 Subject: FYI: JList.setLayoutOrientation() test Message-ID: <449FE1B4.7080509@object-refinery.com> This patch (committed) adds some checks for the JList.setLayoutOrientation() method: 2006-06-26 David Gilbert * gnu/testlet/javax/swing/JList/setLayoutOrientation.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From abalkiss@redhat.com Mon Jun 26 14:20:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Mon, 26 Jun 2006 14:20:00 -0000 Subject: RFC: add "not-a-test" tag to several tests In-Reply-To: <1151080291.25174.104.camel@tony.toronto.redhat.com> References: <1151080291.25174.104.camel@tony.toronto.redhat.com> Message-ID: <1151331641.3361.8.camel@localhost.localdomain> Committed, minus the RunnerProcess change, patch attached. The RunnerProcess change will come later along with more changes to RunnerProcess. Tony On Fri, 2006-06-23 at 12:31 -0400, Anthony Balkissoon wrote: > This patch adds the "not-a-test" tag to several tests. > > This is RFC because these were not my tests, if you are the author of > one or more of these tests and disagree with the not-a-test label, > please say so. Almost certainly that won't be the case because these > files did not implement Testlet or call TestHarness.test(), but since > they're not mine I just want to make sure. > > Cheers, > Tony > > 2006-06-23 Anthony Balkissoon > > * RunnerProcess.java: > (FAILED_TO_LOAD_DESCRIPTION): New field. > (runtest): Set description to FAILED_TO_LOAD_DESCRIPTION if the test > fails to load. Print out a suggestion that perhaps the file should > be marked "not-a-test". > * gnu/testlet/javax/rmi/CORBA/Tie/RMI_test.java: Marked not-a-test. > * gnu/testlet/javax/xml/parsers/DocumentBuilder/Verifyer.java: > Likewise. > * gnu/testlet/org/omg/CORBA/ORB/Asynchron/_asyncImplBase.java: > Likewise. > * gnu/testlet/org/omg/CORBA/ORB/Asynchron/_asyncStub.java: Likewise. > * gnu/testlet/org/omg/CORBA/ORB/Asynchron/assServant.java: Likewise. > * gnu/testlet/org/omg/CORBA/ORB/Asynchron/async.java: Likewise. > * gnu/testlet/org/omg/CORBA/ORB/RF11/B.java: Likewise. > * gnu/testlet/org/omg/CORBA/ORB/RF11/NEC_RF11.java: Likewise. > * gnu/testlet/org/omg/CORBA/ORB/RF11/rf11Operations.java: Likewise. > * gnu/testlet/org/omg/CORBA/ORB/communication/comTester.java: Likewise. > * gnu/testlet/org/omg/CORBA/ORB/communication/ourUserException.java: > Likewise. > * gnu/testlet/org/omg/CORBA/portable/OutputStream/mirror.java: > Likewise. > * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/Greetings.java: Likewise. > * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/InfoValueFactory.java: > Likewise. > * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/cmInfoValueFactory.java: > Likewise. > * gnu/testlet/org/omg/DynamicAny/DynAny/Iona/TestEnum.java: Likewise. > * gnu/testlet/org/omg/PortableServer/POA/Test.java: Likewise. > * gnu/testlet/org/omg/PortableServer/POA/TestDSIRef_impl.java: > Likewise. > * gnu/testlet/org/omg/PortableServer/POA/TestDSI_impl.java: Likewise. > * gnu/testlet/org/omg/PortableServer/POA/TestLocationForward.java: > Likewise. > * > gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardActivator_impl.java: Likewise. > * > gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardOperations.java: Likewise. > * > gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardServer.java:Likewise. > * > gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardServerMain.java: Likewise. > * > gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardServerOperations.java: Likewise. > * gnu/testlet/org/omg/PortableServer/POA/TestLocationForward_impl.java: > Likewise. > * gnu/testlet/org/omg/PortableServer/POA/TestOperations.java: Likewise. > * gnu/testlet/org/omg/PortableServer/POA/TestUtil.java: Likewise. > * gnu/testlet/org/omg/PortableServer/POA/Test_impl.java: Likewise. > * > gnu/testlet/org/omg/PortableServer/POAOperations/communication/poa_comTester.java: Likewise. > * > gnu/testlet/org/omg/PortableServer/POAOperations/communication/poa_comTesterOperations.java: Likewise. > * > gnu/testlet/org/omg/PortableServer/POAOperations/communication/remotePoaControl.java: Likewise. > * > gnu/testlet/org/omg/PortableServer/POAOperations/communication/remotePoaControlOperations.java: Likewise. > * gnu/testlet/runner/CheckResult.java: Likewise. > * gnu/testlet/runner/ClassResult.java: Likewise. > * gnu/testlet/runner/PackageResult.java: Likewise. > * gnu/testlet/runner/RunResult.java: Likewise. > * gnu/testlet/runner/Tags.java: Likewise. > * gnu/testlet/runner/TestResult.java: Likewise. > * gnu/testlet/runner/XMLGenerator.java: Likewise. -------------- next part -------------- A non-text attachment was scrubbed... Name: NotATest2.diff Type: text/x-patch Size: 27445 bytes Desc: not available URL: From mark@klomp.org Mon Jun 26 14:40:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Mon, 26 Jun 2006 14:40:00 -0000 Subject: RFC: add "not-a-test" tag to several tests In-Reply-To: <1151331641.3361.8.camel@localhost.localdomain> References: <1151080291.25174.104.camel@tony.toronto.redhat.com> <1151331641.3361.8.camel@localhost.localdomain> Message-ID: <1151332775.2701.16.camel@elsschot.wildebeest.org> Hi Tony, On Mon, 2006-06-26 at 10:20 -0400, Anthony Balkissoon wrote: > The RunnerProcess change will come later along with more changes to > RunnerProcess. I have a few local changes to RunnerProcess that I haven't cleanup up yet, but that you might find handy. They make it possible to use RunnerProcess just as you could use SimpleTestHarness (e.g. echo gnu.testlet.some.test | runtime RunnerProcess) by just returning when stdin is empty (and in.readLine() returns null). And it makes sure the description of a test is always set to prevent null pointer exceptions later on when a test isn't loaded correctly (and doesn't contain a Tag: not-a-test). It also outputs a FAIL: line in such a case. If you could take a look and/or incorporate those changes into your patches that would be appreciated. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: RunnerProcess.patch Type: text/x-patch Size: 1626 bytes Desc: not available URL: From david.gilbert@object-refinery.com Mon Jun 26 15:12:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 26 Jun 2006 15:12:00 -0000 Subject: FYI: BasicHTML.isHTMLString() test Message-ID: <449FF97A.2040008@object-refinery.com> This patch (committed) adds some checks for the BasicHTML.isHTMLString() method: 2006-06-26 David Gilbert * gnu/testlet/javax/swing/plaf/basic/BasicHTML/isHTMLString.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Mon Jun 26 15:21:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 26 Jun 2006 15:21:00 -0000 Subject: JList setValueIsAdjusting() and setVisibleRowCount() tests Message-ID: <449FFB75.3040100@object-refinery.com> This patch (committed) adds a couple of new tests: 2006-06-26 David Gilbert * gnu/testlet/javax/swing/JList/setValueIsAdjusting.java: New test, * gnu/testlet/javax/swing/JList/setVisibleRowCount.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From fitzsim@redhat.com Mon Jun 26 16:40:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Mon, 26 Jun 2006 16:40:00 -0000 Subject: RFC: add "not-a-test" tag to several tests In-Reply-To: <1151332775.2701.16.camel@elsschot.wildebeest.org> References: <1151080291.25174.104.camel@tony.toronto.redhat.com> <1151331641.3361.8.camel@localhost.localdomain> <1151332775.2701.16.camel@elsschot.wildebeest.org> Message-ID: <44A00DF9.9040306@redhat.com> Mark Wielaard wrote: > Hi Tony, > > On Mon, 2006-06-26 at 10:20 -0400, Anthony Balkissoon wrote: >> The RunnerProcess change will come later along with more changes to >> RunnerProcess. > > I have a few local changes to RunnerProcess that I haven't cleanup up > yet, but that you might find handy. They make it possible to use > RunnerProcess just as you could use SimpleTestHarness (e.g. echo > gnu.testlet.some.test | runtime RunnerProcess) by just returning when > stdin is empty (and in.readLine() returns null). This can already be done using the current Harness: jamvm Harness gnu.testlet.some.test Harness also supports specifying multiple tests: jamvm Harness gnu/testlet/java/awt/Frame/size1.java gnu/testlet/javax/swing/JTable/addColumn.java I'd rather not introduce another way of specifying tests. Tom From mark@klomp.org Mon Jun 26 16:49:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Mon, 26 Jun 2006 16:49:00 -0000 Subject: RFC: add "not-a-test" tag to several tests In-Reply-To: <44A00DF9.9040306@redhat.com> References: <1151080291.25174.104.camel@tony.toronto.redhat.com> <1151331641.3361.8.camel@localhost.localdomain> <1151332775.2701.16.camel@elsschot.wildebeest.org> <44A00DF9.9040306@redhat.com> Message-ID: <1151340576.2557.3.camel@elsschot.wildebeest.org> On Mon, 2006-06-26 at 12:40 -0400, Thomas Fitzsimmons wrote: > Mark Wielaard wrote: > > They make it possible to use > > RunnerProcess just as you could use SimpleTestHarness (e.g. echo > > gnu.testlet.some.test | runtime RunnerProcess) by just returning when > > stdin is empty (and in.readLine() returns null). > > This can already be done using the current Harness: > > jamvm Harness gnu.testlet.some.test > > Harness also supports specifying multiple tests: > > jamvm Harness gnu/testlet/java/awt/Frame/size1.java > gnu/testlet/javax/swing/JTable/addColumn.java I know, but that is a terrible way for debugging. Hunting down a crasher bug for example is really, really awkward using the Harness since it does way too many things. When examining tests (especially under gdb) for debugging you need to be able to run them just through the RunnerProcess to make sure you are looking at just the thing that fails. It works nicely with that one-liner patch though, so it isn't really another way to run tests, it is just to make sure you can run the tests by hand as if the Harness would run them. Cheers, Mark From abalkiss@redhat.com Mon Jun 26 19:28:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Mon, 26 Jun 2006 19:28:00 -0000 Subject: RFC: Harness with no busy-waiting Message-ID: <1151350073.3361.12.camel@localhost.localdomain> This removes the busy waiting from the Harness and replaces it with blocking read() calls using Sockets with specified timeouts. This is RFC because I'd like it to be tested to see if it speeds things up as much as Mark's workaround before it is checked in. --Tony 2006-06-26 Anthony Balkissoon * Harness.java: (bcp_timeout): Removed this field. (server): New field. (client): New field. (runner_watcher): Removed this field. (testIsHung): Removed this field. (runner_lock): Removed this field. (getBootClassPath): Removed the TimeoutWatcher here, just assume this tiny program doesn't hang. Also remove the workaround for busy-waiting. (finalize): Close the server socket. (initProcess): Setup the server socket and client socket. Set the runner_in and runner_out streams to be from the getInputStream() and getOutputStream() methods for the client socket rather than from the forked process. Removed the references to runner_watcher. (runTest): Redesigned to use a blocking readLine() with a specified timeout, rather than polling for input with a separate TimeoutWatcher. (TimeoutWatcher): Removed this class. * RunnerProcess.java: Replaced all references to System.out with the new PrintWriter "out". Also: (FAILED_TO_LOAD_DESCRIPTION): New field. (socket): Likewise. (out): Likewise. (in): Likewise. (main): Setup the Socket-based communications with Harness. Return if testname is null. (runtest): Set description at the start to avoid NPE later. If the test throws a Throwable when loading set the description to FAILED_TO_LOAD_DESCRIPTION and print an error message. -------------- next part -------------- A non-text attachment was scrubbed... Name: Sockets2.diff Type: text/x-patch Size: 29909 bytes Desc: not available URL: From mark@klomp.org Tue Jun 27 08:41:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 27 Jun 2006 08:41:00 -0000 Subject: RFC: Harness with no busy-waiting In-Reply-To: <1151350073.3361.12.camel@localhost.localdomain> References: <1151350073.3361.12.camel@localhost.localdomain> Message-ID: <1151397675.2555.6.camel@elsschot.wildebeest.org> Hi Anthony, On Mon, 2006-06-26 at 15:27 -0400, Anthony Balkissoon wrote: > This removes the busy waiting from the Harness and replaces it with > blocking read() calls using Sockets with specified timeouts. > > This is RFC because I'd like it to be tested to see if it speeds things > up as much as Mark's workaround before it is checked in. I don't really like this design. It puts even more stuff inside the RunnerProcess which really should be as simple as possible so you can easily run and debug it. Otherwise you might be trying to debug the infrastructure and not the test itself. And by adding Sockets you a also make it very hard/impossible to run single tests without the Harness to really debug them. Please just use normal streams for communication between the RunnerProcess and whatever calls it. And add a old-fashion timeout with Object.wait()/notify() to the Harness, or if you want something more fancy there add a nio.channel.Selector. But please don't make the RunnerProcess depend on too much infrastructure. Cheers, Mark From david.gilbert@object-refinery.com Tue Jun 27 09:42:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 27 Jun 2006 09:42:00 -0000 Subject: FYI: Component.setComponentOrientation() and Container.applyComponentOrientation() tests Message-ID: <44A0FD68.5030700@object-refinery.com> This patch (committed) adds a couple of new tests for the Component and Container classes: 2006-06-27 David Gilbert * gnu/testlet/java/awt/Component/setComponentOrientation.java: New test, * gnu/testlet/java/awt/Container/applyComponentOrientation.java: New test. Some of the checks currently fail in GNU Classpath. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Tue Jun 27 09:57:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 27 Jun 2006 09:57:00 -0000 Subject: FYI: Removed unused stuff from ThreadGroup insecurity checks Message-ID: <20060627095701.GA3645@redhat.com> Hi all, This commit removes some unused stuff from the ThreadGroup insecurity checks. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1739 diff -u -r1.1739 ChangeLog --- ChangeLog 27 Jun 2006 09:38:07 -0000 1.1739 +++ ChangeLog 27 Jun 2006 09:54:21 -0000 @@ -1,3 +1,8 @@ +2006-06-27 Gary Benson + + * gnu/testlet/java/lang/ThreadGroup/insecurity.java: + Removed some unused stuff. + 2006-06-27 David Gilbert * gnu/testlet/java/awt/Component/setComponentOrientation.java: Index: gnu/testlet/java/lang/ThreadGroup/insecurity.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/ThreadGroup/insecurity.java,v retrieving revision 1.1 diff -u -r1.1 insecurity.java --- gnu/testlet/java/lang/ThreadGroup/insecurity.java 10 May 2006 11:36:45 -0000 1.1 +++ gnu/testlet/java/lang/ThreadGroup/insecurity.java 27 Jun 2006 09:54:21 -0000 @@ -75,16 +75,6 @@ Permission[] noChecks = new Permission[0]; - Permission[] modifyThreadGroup = new Permission[] { - new RuntimePermission("modifyThreadGroup")}; - - Permission[] modifyThread = new Permission[] { - new RuntimePermission("modifyThread")}; - - Permission[] stopThread = new Permission[] { - new RuntimePermission("modifyThread"), - new RuntimePermission("stopThread")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); try { sm.install(); From gbenson@redhat.com Tue Jun 27 10:01:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 27 Jun 2006 10:01:00 -0000 Subject: FYI: Minor fix for Thread insecurity checks Message-ID: <20060627100151.GB3645@redhat.com> Hi again, This commit fixes a failure in the Thread insecurity checks. I have no idea how this passed before. There's something about Thread checks that turns my brain to cheese. Probably someone at Sun watches me commit then changes the javadoc... Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1740 diff -u -r1.1740 ChangeLog --- ChangeLog 27 Jun 2006 09:54:43 -0000 1.1740 +++ ChangeLog 27 Jun 2006 09:58:14 -0000 @@ -1,3 +1,7 @@ +2006-06-27 Gary Benson + + * gnu/testlet/java/lang/Thread/insecurity.java: Minor fix. + 2006-06-27 Gary Benson * gnu/testlet/java/lang/ThreadGroup/insecurity.java: Index: gnu/testlet/java/lang/Thread/insecurity.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Thread/insecurity.java,v retrieving revision 1.1 diff -u -r1.1 insecurity.java --- gnu/testlet/java/lang/Thread/insecurity.java 10 May 2006 11:36:45 -0000 1.1 +++ gnu/testlet/java/lang/Thread/insecurity.java 27 Jun 2006 09:58:14 -0000 @@ -162,7 +162,7 @@ // corresponding throwpoint: java.lang.Thread-stop() harness.checkPoint("stop()"); try { - sm.prepareChecks(noChecks); + sm.prepareChecks(stopThread); testThread.stop(); sm.checkAllChecked(harness); } From gbenson@redhat.com Tue Jun 27 10:18:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 27 Jun 2006 10:18:00 -0000 Subject: FYI: Fix for Runtime.exec() security checks Message-ID: <20060627101801.GC3645@redhat.com> Hi again, This commit fixes the throwpoint checks for the various Runtime.exec() methods. I broke them when I fixed the thread constructors to always perform threadgroup access checks on thread creation. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1741 diff -u -r1.1741 ChangeLog --- ChangeLog 27 Jun 2006 09:58:34 -0000 1.1741 +++ ChangeLog 27 Jun 2006 10:07:45 -0000 @@ -1,3 +1,8 @@ +2006-06-27 Gary Benson + + * gnu/testlet/java/lang/Runtime/security.java: Classpath now + also checks modifyThreadGroup on thread creation. + 2006-06-27 Gary Benson * gnu/testlet/java/lang/Thread/insecurity.java: Minor fix. Index: gnu/testlet/java/lang/Runtime/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Runtime/security.java,v retrieving revision 1.4 diff -u -r1.4 security.java --- gnu/testlet/java/lang/Runtime/security.java 3 Feb 2006 10:21:47 -0000 1.4 +++ gnu/testlet/java/lang/Runtime/security.java 27 Jun 2006 10:07:45 -0000 @@ -48,8 +48,9 @@ Permission[] executeCommand = new Permission[] { new FilePermission(sCommand, "execute")}; - Permission[] modifyThread = new Permission[] { - new RuntimePermission("modifyThread")}; + Permission[] modifyThreadOrGroup = new Permission[] { + new RuntimePermission("modifyThread"), + new RuntimePermission("modifyThreadGroup")}; Permission[] exitVM = new Permission[] { new RuntimePermission("exitVM")}; @@ -69,7 +70,7 @@ // throwpoint: java.lang.Runtime-exec(String) harness.checkPoint("exec(String)"); try { - sm.prepareChecks(executeCommand, modifyThread); + sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(sCommand).waitFor(); sm.checkAllChecked(harness); } @@ -81,7 +82,7 @@ // throwpoint: java.lang.Runtime-exec(String, String[]) harness.checkPoint("exec(String, String[])"); try { - sm.prepareChecks(executeCommand, modifyThread); + sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(sCommand, null).waitFor(); sm.checkAllChecked(harness); } @@ -93,7 +94,7 @@ // throwpoint: java.lang.Runtime-exec(String, String[], File) harness.checkPoint("exec(String, String[], File)"); try { - sm.prepareChecks(executeCommand, modifyThread); + sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(sCommand, null, null).waitFor(); sm.checkAllChecked(harness); } @@ -105,7 +106,7 @@ // throwpoint: java.lang.Runtime-exec(String[]) harness.checkPoint("exec(String[])"); try { - sm.prepareChecks(executeCommand, modifyThread); + sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(aCommand).waitFor(); sm.checkAllChecked(harness); } @@ -117,7 +118,7 @@ // throwpoint: java.lang.Runtime-exec(String[], String[]) harness.checkPoint("exec(String[], String[])"); try { - sm.prepareChecks(executeCommand, modifyThread); + sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(aCommand, null).waitFor(); sm.checkAllChecked(harness); } @@ -129,7 +130,7 @@ // throwpoint: java.lang.Runtime-exec(String[], String[], File) harness.checkPoint("exec(String[], String[], File)"); try { - sm.prepareChecks(executeCommand, modifyThread); + sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(aCommand, null, null).waitFor(); sm.checkAllChecked(harness); } From gbenson@redhat.com Tue Jun 27 12:48:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 27 Jun 2006 12:48:00 -0000 Subject: FYI: Monster throwpoint checks refactoring Message-ID: <20060627124742.GD3645@redhat.com> Hi all, With this commit the long-unused gnu.testlet.TestSecurityManager has been replaced by what was gnu.testlet.TestSecurityManager2. Since this required touching all throwpoint checks I made a bunch of other changes I've been wanting to make for some time. The main change is that the way that halting checks work has changed to make it more obvious what's happening. Other changes were that checkAllChecked() lost it's unnecessary harness argument, tests that caught Throwable have been changed to catch Exception, and that TestSecurityManager now has javadoc to tell you how to use it. Cheers, Gary kk -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1742 diff -u -r1.1742 ChangeLog --- ChangeLog 27 Jun 2006 10:08:13 -0000 1.1742 +++ ChangeLog 27 Jun 2006 12:20:52 -0000 @@ -1,3 +1,30 @@ +2006-06-27 Gary Benson + + * gnu/testlet/TestSecurityManager.java: Replaced with a + refactored, javadocced version of what was TestSecurityManager2. + * gnu/testlet/java/awt/Graphics2D/security.java: Use the above. + * gnu/testlet/java/awt/Robot/security.java: Likewise. + * gnu/testlet/java/awt/Toolkit/security.java: Likewise. + * gnu/testlet/java/awt/Window/security.java: Likewise. + * gnu/testlet/java/io/File/security.java: Likewise. + * gnu/testlet/java/io/FileInputStream/security.java: Likewise. + * gnu/testlet/java/io/FileOutputStream/security.java: Likewise. + * gnu/testlet/java/io/ObjectInputStream/security.java: Likewise. + * gnu/testlet/java/io/ObjectOutputStream/security.java: Likewise. + * gnu/testlet/java/io/RandomAccessFile/security.java: Likewise. + * gnu/testlet/java/lang/Class/security.java: Likewise. + * gnu/testlet/java/lang/ClassLoader/security.java: Likewise. + * gnu/testlet/java/lang/Runtime/security.java: Likewise. + * gnu/testlet/java/lang/SecurityManager/thread.java: Likewise. + * gnu/testlet/java/lang/System/security.java: Likewise. + * gnu/testlet/java/lang/Thread/insecurity.java: Likewise. + * gnu/testlet/java/lang/Thread/security.java: Likewise. + * gnu/testlet/java/lang/ThreadGroup/insecurity.java: Likewise. + * gnu/testlet/java/lang/ThreadGroup/security.java: Likewise. + * gnu/testlet/java/lang/reflect/AccessibleObject/security.java: + Likewise. + * gnu/testlet/TestSecurityManager2.java: Removed. + 2006-06-27 Gary Benson * gnu/testlet/java/lang/Runtime/security.java: Classpath now Index: gnu/testlet/TestSecurityManager.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/TestSecurityManager.java,v retrieving revision 1.1 diff -u -r1.1 TestSecurityManager.java --- gnu/testlet/TestSecurityManager.java 21 Jul 2003 01:29:27 -0000 1.1 +++ gnu/testlet/TestSecurityManager.java 27 Jun 2006 12:20:52 -0000 @@ -1,5 +1,7 @@ -// Copyright (c) 2003 Red Hat, Inc. -// Written by Tom Tromey +// Copyright (C) 2004 Stephen Crawley. +// Copyright (C) 2005, 2006 Red Hat, Inc. +// Written by Stephen Crawley +// Extensively modified by Gary Benson // This file is part of Mauve. @@ -21,45 +23,274 @@ package gnu.testlet; import java.security.Permission; +import java.security.SecurityPermission; +import java.util.PropertyPermission; +/** + * A security manager for testing that security checks are performed. + * + * Typically a testcase would call prepareChecks() to + * specify permissions that are expected to be checked during this + * test. Next you call whatever should perform the checks, and + * finally you call checkAllChecked() to check that the + * permissions you specified were checked. Any unexpected checks + * cause a {@link SecurityException} to be thrown. + * + * As well as the permissions that must be checked it is possible to + * supply prepareChecks() with a list of permissions that + * may be checked. This allows some cases where proprietary JVMs + * check something incidental that Classpath does not to be checked. + * There are also halting versions of prepareChecks() + * which will cause an exception to be thrown when all permissions + * have been checked. This allows throwpoints on things like + * System.exit() to be tested. + * + * @author Stephen Crawley (crawley@dstc.edu.au) + * @author Gary Benson (gbenson@redhat.com) + */ public class TestSecurityManager extends SecurityManager { - public boolean runChecks = true; + /** + * The security manager that was in force before we were installed. + */ + private SecurityManager oldManager; + + /** + * Permissions that must be checked for this test to pass. + */ + private Permission[] mustCheck; + + /** + * Permissions that may be checked during this test. + */ + private Permission[] mayCheck; + + /** + * Must-check permissions are flagged as they are checked. + */ + private boolean[] checked; + + /** + * The test harness in use. + */ + private final TestHarness harness; + + /** + * Should we halt after all checks have occurred? + */ + private boolean isHalting; + + /** + * The exception to throw when halting. + */ + public static class SuccessException extends SecurityException + { + private static final long serialVersionUID = 23; + }; + private final SuccessException successException = new SuccessException(); + + /** + * An empty list of checks, for convenience. + */ + private final Permission[] noChecks = new Permission[0]; + + /** + * Create a new test security manager. + * + * @param harness TestHarness the tests will be run by + */ + public TestSecurityManager(TestHarness harness) + { + super(); + this.harness = harness; + } + + /** + * Install this test security manager. + */ + public void install() + { + SecurityManager oldsm = System.getSecurityManager(); + if (oldsm == this) + throw new IllegalStateException("already installed"); + oldManager = oldsm; + + // On some JVMs, setting the security manager for the first time + // triggers some initialization that reads system properties. + prepareChecks(noChecks, new Permission[] { + new SecurityPermission("getProperty.*"), + new PropertyPermission("*", "read")}); + + System.setSecurityManager(this); + } + + /** + * Uninstall this test security manager, replacing it with whatever + * was in force before it was installed. + */ + public void uninstall() + { + SecurityManager oldsm = System.getSecurityManager(); + if (oldsm != this) + throw new IllegalStateException("not installed"); + + prepareChecks(noChecks, new Permission[] { + new RuntimePermission("setSecurityManager")}); + + System.setSecurityManager(oldManager); + } + + /** + * Prepare this test security manager for a series of checks. + * checkAllChecked() should be called after the + * test to check that the specified permissions were checked. + * + * @param mustCheck permissions that must be checked in order for + * the test to pass + */ + public void prepareChecks(Permission[] mustCheck) + { + prepareChecks(mustCheck, noChecks); + } - public void setRunChecks(boolean runChecks) + /** + * Prepare this test security manager for a series of checks. + * checkAllChecked() should be called after the + * test to check that the specified permissions were checked. + * + * @param mustCheck permissions that must be checked in order for + * the test to pass + * @param mayCheck permissions that may be checked during the test + * but are not required in order for the test to pass + */ + public void prepareChecks(Permission[] mustCheck, Permission[] mayCheck) { - this.runChecks = runChecks; + prepareChecks(mustCheck, mayCheck, false); } - public void checkPermission(Permission perm) + /** + * Prepare this test security manager for a series of checks. + * A SuccessException will be thrown when the + * final permission is checked, halting the test. + * + * @param mustCheck permissions that must be checked in order for + * the test to pass + */ + public void prepareHaltingChecks(Permission[] mustCheck) { - if (runChecks && ! checkContext()) - super.checkPermission(perm); + prepareHaltingChecks(mustCheck, noChecks); } - public void checkPermission(Permission perm, Object context) + /** + * Prepare this test security manager for a series of checks. + * A SuccessException will be thrown when the + * final permission is checked, halting the test. + * + * @param mustCheck permissions that must be checked in order for + * the test to pass + * @param mayCheck permissions that may be checked during the test + * but are not required in order for the test to pass + */ + public void prepareHaltingChecks(Permission[] mustCheck, + Permission[] mayCheck) { - if (runChecks && ! checkContext()) - super.checkPermission(perm, context); + prepareChecks(mustCheck, mayCheck, true); + } + + /** + * Prepare this test security manager for a series of checks. + * + * @param mustCheck permissions that must be checked in order for + * the test to pass + * @param mayCheck permissions that may be checked during the test + * but are not required in order for the test to pass + * @param isHalting whether to throw a SuccessException + * when the final permission is checked + */ + protected void prepareChecks(Permission[] mustCheck, + Permission[] mayCheck, + boolean isHalting) + { + this.mayCheck = mayCheck; + this.mustCheck = mustCheck; + this.checked = new boolean[mustCheck.length]; + this.isHalting = isHalting; + } + + /** + * Check that this permission is one that we should be checking. + * + * @param perm the permission to be checked + * @throws SuccessException if all mustCheck + * permissions have been checked and isHalting + * is true. + * @throws SecurityException if none of the mustCheck + * or mayCheck permissions implies + * perm. + */ + public void checkPermission(Permission perm) throws SecurityException + { + if (harness != null) + harness.debug("checkPermission(" + perm + ")"); + + boolean matched = false; + for (int i = 0; i < mustCheck.length; i++) { + if (mustCheck[i].implies(perm)) + matched = checked[i] = true; + } + + if (!matched) { + for (int i = 0; i < mayCheck.length; i++) { + if (mayCheck[i].implies(perm)) + matched = true; + } + } + + if (!matched) { + harness.debug("unexpected check: " + perm); + + if (mustCheck.length != 0) { + StringBuffer expected = new StringBuffer(); + for (int i = 0; i < mustCheck.length; i++) + expected.append(' ').append(mustCheck[i]); + harness.debug("expected: mustCheck:" + expected.toString()); + } + + if (mayCheck.length != 0) { + StringBuffer expected = new StringBuffer(); + for (int i = 0; i < mayCheck.length; i++) + expected.append(' ').append(mayCheck[i]); + harness.debug("expected: mayCheck:" + expected.toString()); + } + + throw new SecurityException("unexpected check: " + perm); + } + + if (isHalting) { + boolean allChecked = true; + for (int i = 0; i < checked.length; i++) { + if (!checked[i]) + allChecked = false; + } + if (allChecked) + throw successException; + } } - private boolean checkContext() + /** + * Check that all mustCheck permissions were checked, + * calling TestHarness.check() with the result. + */ + public void checkAllChecked() { - Class[] stack = getClassContext(); - // stack[0] is this class. - // stack[1] is another method in TestSecurityManager. - // stack[2] is the class that inspired the security check. - // We apply a fairly simple test. - // First, we skip any frames after stack[2] that come from the - // same class as stack[2]. This lets us skip implementation - // details of that class. Then if the next stack element is - // a testlet, we fail. Otherwise, we pass. This way things like - // class initializers automatically pass. - // This is a bogus approach. More work here is needed. - int i; - for (i = 3; i < stack.length && stack[i] == stack[2]; ++i) - ; - return (i >= stack.length - || stack[i].getName().indexOf("gnu.testlet") == -1); + boolean allChecked = true; + for (int i = 0; i < checked.length; i++) { + if (!checked[i]) { + harness.debug("Unchecked permission: " + mustCheck[i]); + allChecked = false; + } + } + + harness.check(allChecked); } } Index: gnu/testlet/java/awt/Graphics2D/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Graphics2D/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/awt/Graphics2D/security.java 21 Jun 2006 08:13:04 -0000 1.1 +++ gnu/testlet/java/awt/Graphics2D/security.java 27 Jun 2006 12:20:53 -0000 @@ -34,7 +34,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -51,7 +51,7 @@ Permission[] readDisplayPixels = new Permission[] { new AWTPermission("readDisplayPixels")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -64,7 +64,7 @@ } catch (UnsupportedOperationException ex) { } - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); Index: gnu/testlet/java/awt/Robot/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Robot/security.java,v retrieving revision 1.3 diff -u -r1.3 security.java --- gnu/testlet/java/awt/Robot/security.java 13 Jun 2006 14:01:31 -0000 1.3 +++ gnu/testlet/java/awt/Robot/security.java 27 Jun 2006 12:20:53 -0000 @@ -31,7 +31,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -48,7 +48,7 @@ Permission[] readProperty = new Permission[] { new PropertyPermission("*", "read")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -57,7 +57,7 @@ try { sm.prepareChecks(createRobot, readProperty); new Robot(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -69,7 +69,7 @@ try { sm.prepareChecks(createRobot, readProperty); new Robot(gd); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); Index: gnu/testlet/java/awt/Toolkit/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Toolkit/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/awt/Toolkit/security.java 20 Jun 2006 11:42:58 -0000 1.1 +++ gnu/testlet/java/awt/Toolkit/security.java 27 Jun 2006 12:20:53 -0000 @@ -34,7 +34,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -63,7 +63,7 @@ Permission[] accessEventQueue = new Permission[] { new AWTPermission("accessEventQueue")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -72,7 +72,7 @@ try { sm.prepareChecks(listenToAllAWTEvents); toolkit.addAWTEventListener(listener, AWTEvent.KEY_EVENT_MASK); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -84,7 +84,7 @@ try { sm.prepareChecks(listenToAllAWTEvents); toolkit.removeAWTEventListener(listener); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -94,35 +94,31 @@ // throwpoint: java.awt.Toolkit-getPrintJob(Frame, String, Properties) harness.checkPoint("getPrintJob(3-arg)"); try { - sm.prepareChecks(queuePrintJob, true); + sm.prepareHaltingChecks(queuePrintJob); toolkit.getPrintJob(frame, "Test job", props); harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: java.awt.Toolkit-getPrintJob(Frame, String, JobAttributes, PageAttributes) harness.checkPoint("getPrintJob(4-arg)"); try { - sm.prepareChecks(queuePrintJob, true); + sm.prepareHaltingChecks(queuePrintJob); toolkit.getPrintJob(frame, "Test job", jobattrs, pageattrs); harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: java.awt.Toolkit-getSystemClipboard @@ -130,7 +126,7 @@ try { sm.prepareChecks(accessClipboard); toolkit.getSystemClipboard(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -142,7 +138,7 @@ try { sm.prepareChecks(accessEventQueue); toolkit.getSystemEventQueue(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); Index: gnu/testlet/java/awt/Window/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/awt/Window/security.java,v retrieving revision 1.3 diff -u -r1.3 security.java --- gnu/testlet/java/awt/Window/security.java 13 Jun 2006 14:01:31 -0000 1.3 +++ gnu/testlet/java/awt/Window/security.java 27 Jun 2006 12:20:53 -0000 @@ -30,7 +30,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -44,7 +44,7 @@ Permission[] showWindowWithoutWarningBanner = new Permission[] { new AWTPermission("showWindowWithoutWarningBanner")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -53,7 +53,7 @@ try { sm.prepareChecks(showWindowWithoutWarningBanner); new Window(frame); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -65,7 +65,7 @@ try { sm.prepareChecks(showWindowWithoutWarningBanner); new Window(window); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -77,7 +77,7 @@ try { sm.prepareChecks(showWindowWithoutWarningBanner); new Window(window, gc); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); Index: gnu/testlet/java/io/File/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/File/security.java,v retrieving revision 1.11 diff -u -r1.11 security.java --- gnu/testlet/java/io/File/security.java 3 Feb 2006 10:21:46 -0000 1.11 +++ gnu/testlet/java/io/File/security.java 27 Jun 2006 12:20:53 -0000 @@ -2,8 +2,10 @@ // Copyright (C) 2003 Red Hat, Inc. // Copyright (C) 2004 Stephen Crawley. +// Copyright (C) 2005, 2006 Red Hat, Inc. // Written by Tom Tromey // Extensively modified by Stephen Crawley +// Further modified by Gary Benson // This file is part of Mauve. @@ -33,7 +35,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -83,11 +85,11 @@ Permission tmpdirPropPerm = new PropertyPermission("java.io.tmpdir", "read"); - TestSecurityManager2 sm = new TestSecurityManager2(harness); - // Keep a record of created temp files so we can delete them later. File tf1 = null; File tf2 = null; + + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -96,7 +98,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirWritePerm}, noPerms); tmpdir.canWrite(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -108,7 +110,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); tmpdir.canRead(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -120,7 +122,7 @@ try { sm.prepareChecks(new Permission[]{tmpfileWritePerm}, noPerms); tmpfile.createNewFile(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -132,7 +134,7 @@ try { sm.prepareChecks(new Permission[]{tmpfileDeletePerm}, noPerms); tmpfile.delete(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -144,7 +146,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); tmpdir.list(null); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -156,7 +158,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); tmpdir.list(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -168,7 +170,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); tmpdir.listFiles(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -180,7 +182,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); tmpdir.listFiles((FilenameFilter) null); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -193,7 +195,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); tmpdir.listFiles((FileFilter) null); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -207,7 +209,7 @@ sm.prepareChecks(new Permission[]{tmpallWritePerm}, new Permission[]{tmpdirPropPerm}); tf1 = File.createTempFile("pfx", "sfx"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -219,7 +221,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirallWritePerm}, noPerms); tf2 = File.createTempFile("pfx", "sfx", tmpdir); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -231,7 +233,7 @@ try { sm.prepareChecks(new Permission[]{tmpdir2WritePerm}, noPerms); tmpdir2.setReadOnly(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -244,7 +246,7 @@ try { sm.prepareChecks(new Permission[]{tmpdir2DeletePerm}, noPerms); tmpdir2.delete(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -257,7 +259,7 @@ sm.prepareChecks(new Permission[]{rootReadPerm}, noPerms); File[] roots = File.listRoots(); harness.check(roots.length >= 1, "File.listRoots()"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -271,7 +273,7 @@ tmpfile2WritePerm}, noPerms); tmpfile.renameTo(tmpfile2); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -283,7 +285,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirWritePerm}, noPerms); tmpdir.setLastModified(0); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -295,7 +297,7 @@ try { sm.prepareChecks(new Permission[]{tmpdirDeletePerm}, noPerms); tmpdir.deleteOnExit(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (Exception ex) { harness.debug(ex); @@ -315,7 +317,7 @@ // throwpoint: TODO: java.io.File-mkdirs // throwpoint: TODO: java.io.File-setLastModified-FILE } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "outer handler - unexpected exception"); } Index: gnu/testlet/java/io/FileInputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/FileInputStream/security.java,v retrieving revision 1.6 diff -u -r1.6 security.java --- gnu/testlet/java/io/FileInputStream/security.java 26 Jun 2006 09:35:09 -0000 1.6 +++ gnu/testlet/java/io/FileInputStream/security.java 27 Jun 2006 12:20:53 -0000 @@ -28,7 +28,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -42,7 +42,7 @@ Permission[] fdPerm = new Permission[] { new RuntimePermission("readFileDescriptor")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -51,7 +51,7 @@ try { sm.prepareChecks(perm); new FileInputStream(file); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -63,7 +63,7 @@ try { sm.prepareChecks(perm); new FileInputStream(path); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -75,14 +75,14 @@ try { sm.prepareChecks(fdPerm); new FileInputStream(FileDescriptor.in); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); harness.check(false, "Unexpected check"); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } Index: gnu/testlet/java/io/FileOutputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/FileOutputStream/security.java,v retrieving revision 1.6 diff -u -r1.6 security.java --- gnu/testlet/java/io/FileOutputStream/security.java 3 Feb 2006 10:21:46 -0000 1.6 +++ gnu/testlet/java/io/FileOutputStream/security.java 27 Jun 2006 12:20:53 -0000 @@ -1,4 +1,4 @@ -// Copyright (C) 2005 Red Hat, Inc. +// Copyright (C) 2005, 2006 Red Hat, Inc. // Written by Gary Benson // This file is part of Mauve. @@ -28,7 +28,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -44,8 +44,7 @@ Permission wperm = new FilePermission(path, "write"); Permission fdPerm = new RuntimePermission("writeFileDescriptor"); - TestSecurityManager2 sm = new TestSecurityManager2(harness); - + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -54,7 +53,7 @@ try { sm.prepareChecks(new Permission[] {wperm}, new Permission[] {rperm}); new FileOutputStream(file); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -67,7 +66,7 @@ try { sm.prepareChecks(new Permission[] {wperm}, new Permission[] {rperm}); new FileOutputStream(file, i == 1); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -80,7 +79,7 @@ try { sm.prepareChecks(new Permission[] {wperm}, new Permission[] {rperm}); new FileOutputStream(path); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -93,7 +92,7 @@ try { sm.prepareChecks(new Permission[] {wperm}, new Permission[] {rperm}); new FileOutputStream(path, i == 1); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -106,14 +105,14 @@ try { sm.prepareChecks(new Permission[] {fdPerm}); new FileOutputStream(FileDescriptor.out); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); harness.check(false, "Unexpected check"); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } Index: gnu/testlet/java/io/ObjectInputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/ObjectInputStream/security.java,v retrieving revision 1.3 diff -u -r1.3 security.java --- gnu/testlet/java/io/ObjectInputStream/security.java 3 Feb 2006 10:21:46 -0000 1.3 +++ gnu/testlet/java/io/ObjectInputStream/security.java 27 Jun 2006 12:20:53 -0000 @@ -27,7 +27,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -44,7 +44,7 @@ Permission[] noPerms = new Permission[] {}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -53,7 +53,7 @@ try { sm.prepareChecks(enableSubclassImplementation); new TestObjectInputStream(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -65,7 +65,7 @@ try { sm.prepareChecks(noPerms); teststream.testEnableResolveObject(false); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -74,7 +74,7 @@ try { sm.prepareChecks(enableSubstitution); teststream.testEnableResolveObject(true); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -85,7 +85,7 @@ sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } Index: gnu/testlet/java/io/ObjectOutputStream/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/ObjectOutputStream/security.java,v retrieving revision 1.3 diff -u -r1.3 security.java --- gnu/testlet/java/io/ObjectOutputStream/security.java 3 Feb 2006 10:21:46 -0000 1.3 +++ gnu/testlet/java/io/ObjectOutputStream/security.java 27 Jun 2006 12:20:53 -0000 @@ -27,7 +27,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -44,7 +44,7 @@ Permission[] noPerms = new Permission[] {}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -53,7 +53,7 @@ try { sm.prepareChecks(enableSubclassImplementation); new TestObjectOutputStream(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -65,7 +65,7 @@ try { sm.prepareChecks(noPerms); teststream.testEnableReplaceObject(false); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -74,7 +74,7 @@ try { sm.prepareChecks(enableSubstitution); teststream.testEnableReplaceObject(true); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -85,7 +85,7 @@ sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } Index: gnu/testlet/java/io/RandomAccessFile/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/RandomAccessFile/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/io/RandomAccessFile/security.java 3 Feb 2006 10:21:46 -0000 1.2 +++ gnu/testlet/java/io/RandomAccessFile/security.java 27 Jun 2006 12:20:53 -0000 @@ -1,4 +1,4 @@ -// Copyright (C) 2005 Red Hat, Inc. +// Copyright (C) 2005, 2006 Red Hat, Inc. // Written by Gary Benson // This file is part of Mauve. @@ -30,7 +30,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -56,8 +56,7 @@ String[] modes = new String[] {"r", "rw", "rws", "rwd"}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); - + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -81,7 +80,7 @@ try { sm.prepareChecks(mustCheck, mayCheck); raf = new RandomAccessFile(file, mode); - sm.checkAllChecked(harness); + sm.checkAllChecked(); if (mode == "r") ensureUnwritable(harness, raf); } @@ -95,7 +94,7 @@ try { sm.prepareChecks(mustCheck, mayCheck); raf = new RandomAccessFile(path, mode); - sm.checkAllChecked(harness); + sm.checkAllChecked(); if (mode == "r") ensureUnwritable(harness, raf); } @@ -105,7 +104,7 @@ } } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } Index: gnu/testlet/java/lang/Class/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Class/security.java,v retrieving revision 1.4 diff -u -r1.4 security.java --- gnu/testlet/java/lang/Class/security.java 6 Apr 2006 13:05:06 -0000 1.4 +++ gnu/testlet/java/lang/Class/security.java 27 Jun 2006 12:20:53 -0000 @@ -1,4 +1,4 @@ -// Copyright (C) 2005 Red Hat, Inc. +// Copyright (C) 2005, 2006 Red Hat, Inc. // Written by Gary Benson // This file is part of Mauve. @@ -29,7 +29,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -76,7 +76,7 @@ Permission[] getProtectionDomain = new Permission[] { new RuntimePermission("getProtectionDomain")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -85,7 +85,7 @@ try { sm.prepareChecks(getClassLoader); Class.forName("java.lang.Class", false, null); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -97,7 +97,7 @@ try { sm.prepareChecks(getClassLoader); testClass.getClassLoader(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -109,7 +109,7 @@ try { sm.prepareChecks(noChecks); Thread.class.getClassLoader(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -124,7 +124,7 @@ try { sm.prepareChecks(getProtectionDomain); testClass.getProtectionDomain(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -133,7 +133,7 @@ try { sm.prepareChecks(getProtectionDomain); getClass().getProtectionDomain(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -160,13 +160,13 @@ Security.setProperty("package.access", oldrestrictions); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } } - private void getMemberChecks(TestHarness harness, TestSecurityManager2 sm, + private void getMemberChecks(TestHarness harness, TestSecurityManager sm, Class testClass, boolean declared, Permission[] mustCheck) { @@ -184,7 +184,7 @@ testClass.getDeclaredClasses(); else testClass.getClasses(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -203,7 +203,7 @@ testClass.getDeclaredFields(); else testClass.getFields(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -222,7 +222,7 @@ testClass.getDeclaredMethods(); else testClass.getMethods(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -241,7 +241,7 @@ testClass.getDeclaredConstructors(); else testClass.getConstructors(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -274,7 +274,7 @@ catch (NoSuchFieldException e) { exists = false; } - sm.checkAllChecked(harness); + sm.checkAllChecked(); harness.check(exists == (j > level)); } } @@ -307,7 +307,7 @@ catch (NoSuchMethodException e) { exists = false; } - sm.checkAllChecked(harness); + sm.checkAllChecked(); harness.check(exists == (j > level && k > 0)); } } @@ -342,7 +342,7 @@ catch (NoSuchMethodException e) { exists = false; } - sm.checkAllChecked(harness); + sm.checkAllChecked(); harness.check(exists == (i > level)); } } @@ -422,7 +422,7 @@ // checks no permissions if memberType is Member.PUBLIC. This class // changes this, allowing us to test get{Field,Method,Constructor}. // No other tests should use this class. - private static class TestSecurityManager3 extends TestSecurityManager2 + private static class TestSecurityManager3 extends TestSecurityManager { TestSecurityManager3(TestHarness harness) { Index: gnu/testlet/java/lang/ClassLoader/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/ClassLoader/security.java,v retrieving revision 1.3 diff -u -r1.3 security.java --- gnu/testlet/java/lang/ClassLoader/security.java 3 Feb 2006 10:21:46 -0000 1.3 +++ gnu/testlet/java/lang/ClassLoader/security.java 27 Jun 2006 12:20:53 -0000 @@ -28,7 +28,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -61,7 +61,7 @@ Permission[] getClassLoader = new Permission[] { new RuntimePermission("getClassLoader")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -70,7 +70,7 @@ try { sm.prepareChecks(createClassLoader); new TestClassLoader(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -82,7 +82,7 @@ try { sm.prepareChecks(createClassLoader); new TestClassLoader(ourLoader); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -94,7 +94,7 @@ try { sm.prepareChecks(getClassLoader); getSystemClassLoaderTest.invoke(null, new Object[] {}); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -106,7 +106,7 @@ try { sm.prepareChecks(getClassLoader); getParentTest.invoke(null, new Object[] {ourLoader}); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -117,7 +117,7 @@ sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } Index: gnu/testlet/java/lang/Runtime/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Runtime/security.java,v retrieving revision 1.5 diff -u -r1.5 security.java --- gnu/testlet/java/lang/Runtime/security.java 27 Jun 2006 10:08:13 -0000 1.5 +++ gnu/testlet/java/lang/Runtime/security.java 27 Jun 2006 12:20:53 -0000 @@ -26,7 +26,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -63,7 +63,7 @@ Permission[] loadLibrary_path = new Permission[] { new RuntimePermission("loadLibrary." + library_path)}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -72,7 +72,7 @@ try { sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(sCommand).waitFor(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -84,7 +84,7 @@ try { sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(sCommand, null).waitFor(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -96,7 +96,7 @@ try { sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(sCommand, null, null).waitFor(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -108,7 +108,7 @@ try { sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(aCommand).waitFor(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -120,7 +120,7 @@ try { sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(aCommand, null).waitFor(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -132,7 +132,7 @@ try { sm.prepareChecks(executeCommand, modifyThreadOrGroup); runtime.exec(aCommand, null, null).waitFor(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -142,26 +142,24 @@ // throwpoint: java.lang.Runtime-exit harness.checkPoint("exit"); try { - sm.prepareChecks(exitVM, true); + sm.prepareHaltingChecks(exitVM); runtime.exit(0); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } - + // throwpoint: java.lang.Runtime-runFinalizersOnExit harness.checkPoint("runFinalizersOnExit"); try { sm.prepareChecks(exitVM); Runtime.runFinalizersOnExit(false); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -173,7 +171,7 @@ try { sm.prepareChecks(shutdownHooks); runtime.addShutdownHook(thread); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -185,7 +183,7 @@ try { sm.prepareChecks(shutdownHooks); runtime.removeShutdownHook(thread); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -195,42 +193,38 @@ // throwpoint: java.lang.Runtime-load harness.checkPoint("load"); try { - sm.prepareChecks(loadLibrary_name, true); + sm.prepareHaltingChecks(loadLibrary_name); runtime.load(library_name); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: java.lang.Runtime-loadLibrary harness.checkPoint("loadLibrary"); try { - sm.prepareChecks(loadLibrary_path, true); + sm.prepareHaltingChecks(loadLibrary_path); runtime.loadLibrary(library_path); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } } finally { sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } Index: gnu/testlet/java/lang/SecurityManager/thread.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/SecurityManager/thread.java,v retrieving revision 1.2 diff -u -r1.2 thread.java --- gnu/testlet/java/lang/SecurityManager/thread.java 31 Jan 2006 15:00:55 -0000 1.2 +++ gnu/testlet/java/lang/SecurityManager/thread.java 27 Jun 2006 12:20:53 -0000 @@ -1,4 +1,4 @@ -// Copyright (C) 2005, Red Hat, Inc. +// Copyright (C) 2005, 2006 Red Hat, Inc. // // This file is part of Mauve. // @@ -25,7 +25,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class thread implements Testlet { @@ -52,16 +52,16 @@ thread = new Thread(group, "dummy"); // Check we're checking - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); sm.prepareChecks(new Permission[] { new RuntimePermission("modifyThread")}); sm.checkAccess(thread); - sm.checkAllChecked(harness); + sm.checkAllChecked(); sm.prepareChecks(new Permission[] { new RuntimePermission("modifyThreadGroup")}); sm.checkAccess(group); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } } Index: gnu/testlet/java/lang/System/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/System/security.java,v retrieving revision 1.4 diff -u -r1.4 security.java --- gnu/testlet/java/lang/System/security.java 3 Feb 2006 10:21:47 -0000 1.4 +++ gnu/testlet/java/lang/System/security.java 27 Jun 2006 12:20:53 -0000 @@ -26,7 +26,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -82,25 +82,23 @@ Permission[] setSecurityManager = new Permission[] { new RuntimePermission("setSecurityManager")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); // throwpoint: java.lang.System-exit harness.checkPoint("exit"); try { - sm.prepareChecks(exitVM, true); + sm.prepareHaltingChecks(exitVM); System.exit(0); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: java.lang.System-runFinalizersOnExit @@ -108,7 +106,7 @@ try { sm.prepareChecks(exitVM); System.runFinalizersOnExit(false); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -118,35 +116,31 @@ // throwpoint: java.lang.System-load harness.checkPoint("load"); try { - sm.prepareChecks(loadLibrary_name, true); + sm.prepareHaltingChecks(loadLibrary_name); System.load(library_name); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: java.lang.System-loadLibrary harness.checkPoint("loadLibrary"); try { - sm.prepareChecks(loadLibrary_path, true); + sm.prepareHaltingChecks(loadLibrary_path); System.loadLibrary(library_path); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: TODO: java.lang.System-getenv() @@ -156,7 +150,7 @@ try { sm.prepareChecks(readVariable); System.getenv(a_variable); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -165,7 +159,7 @@ try { sm.prepareChecks(readNonVariable); System.getenv(not_a_variable); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -177,7 +171,7 @@ try { sm.prepareChecks(readWriteAllProperties); System.getProperties(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -189,7 +183,7 @@ try { sm.prepareChecks(readWriteAllProperties); System.setProperties(properties); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -201,7 +195,7 @@ try { sm.prepareChecks(readProperty); System.getProperty(a_property); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -210,7 +204,7 @@ try { sm.prepareChecks(readNonProperty); System.getProperty(not_a_property); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -222,7 +216,7 @@ try { sm.prepareChecks(readProperty); System.getProperty(a_property, "quadrant"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -231,7 +225,7 @@ try { sm.prepareChecks(readNonProperty); System.getProperty(not_a_property, "blade"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -243,7 +237,7 @@ try { sm.prepareChecks(setIO); System.setIn(System.in); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -255,7 +249,7 @@ try { sm.prepareChecks(setIO); System.setOut(System.out); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -267,7 +261,7 @@ try { sm.prepareChecks(setIO); System.setErr(System.err); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -279,7 +273,7 @@ try { sm.prepareChecks(writeProperty); System.setProperty(a_property, properties.getProperty(a_property)); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -288,7 +282,7 @@ try { sm.prepareChecks(writeNonProperty); System.setProperty(not_a_property, "hello mum"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -302,7 +296,7 @@ try { sm.prepareChecks(setSecurityManager); System.setSecurityManager(sm); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -313,7 +307,7 @@ sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } Index: gnu/testlet/java/lang/Thread/insecurity.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Thread/insecurity.java,v retrieving revision 1.2 diff -u -r1.2 insecurity.java --- gnu/testlet/java/lang/Thread/insecurity.java 27 Jun 2006 09:58:34 -0000 1.2 +++ gnu/testlet/java/lang/Thread/insecurity.java 27 Jun 2006 12:20:54 -0000 @@ -24,7 +24,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class insecurity implements Testlet { @@ -35,7 +35,7 @@ try { harness.checkPoint("setup"); - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); // The default SecurityManager.checkAccess(Thread) method should // only check permissions when the thread in question is a system @@ -79,7 +79,7 @@ try { sm.prepareChecks(noChecks); testThread.checkAccess(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -91,7 +91,7 @@ try { sm.prepareChecks(noChecks); testThread.interrupt(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -103,7 +103,7 @@ try { sm.prepareChecks(noChecks); testThread.suspend(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -115,7 +115,7 @@ try { sm.prepareChecks(noChecks); testThread.resume(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -128,7 +128,7 @@ int priority = testThread.getPriority(); sm.prepareChecks(noChecks); testThread.setPriority(priority); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -140,7 +140,7 @@ try { sm.prepareChecks(noChecks); testThread.setName("a test thread"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -152,7 +152,7 @@ try { sm.prepareChecks(noChecks); testThread.setDaemon(false); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -164,7 +164,7 @@ try { sm.prepareChecks(stopThread); testThread.stop(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -176,7 +176,7 @@ try { sm.prepareChecks(stopThread); testThread.stop(threadDeath); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -186,7 +186,7 @@ try { sm.prepareChecks(stopThread); testThread.stop(notThreadDeath); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -216,7 +216,7 @@ new Thread(nonSystemGroup, "test thread"); break; } - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -228,7 +228,7 @@ sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } @@ -238,7 +238,7 @@ public static class SysTestRunner implements Runnable { private TestHarness harness; - private TestSecurityManager2 sm; + private TestSecurityManager sm; private static Runnable runnable = new Runnable() { @@ -247,7 +247,7 @@ } }; - public SysTestRunner(TestHarness harness, TestSecurityManager2 sm) + public SysTestRunner(TestHarness harness, TestSecurityManager sm) { this.harness = harness; this.sm = sm; @@ -261,7 +261,7 @@ try { sm.prepareChecks(noChecks); Thread.enumerate(new Thread[0]); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -290,7 +290,7 @@ new Thread(runnable, "test thread"); break; } - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); Index: gnu/testlet/java/lang/Thread/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/Thread/security.java,v retrieving revision 1.4 diff -u -r1.4 security.java --- gnu/testlet/java/lang/Thread/security.java 9 May 2006 09:34:02 -0000 1.4 +++ gnu/testlet/java/lang/Thread/security.java 27 Jun 2006 12:20:54 -0000 @@ -28,7 +28,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -52,7 +52,7 @@ Method getContextClassLoaderTest = testClass.getMethod( "testGetContextClassLoader", new Class[] {Thread.class}); - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); // The default SecurityManager.checkAccess(Thread) method only // checks permissions when the thread in question is a system @@ -108,7 +108,7 @@ try { sm.prepareChecks(getClassLoader); getContextClassLoaderTest.invoke(null, new Object[] {testThread}); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -121,7 +121,7 @@ ClassLoader loader = testThread.getContextClassLoader(); sm.prepareChecks(setContextClassLoader); testThread.setContextClassLoader(loader); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -133,7 +133,7 @@ try { sm.prepareChecks(modifyThread); testThread.checkAccess(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -145,7 +145,7 @@ try { sm.prepareChecks(modifyThread); testThread.interrupt(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -157,7 +157,7 @@ try { sm.prepareChecks(modifyThread); testThread.suspend(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -169,7 +169,7 @@ try { sm.prepareChecks(modifyThread); testThread.resume(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -182,7 +182,7 @@ int priority = testThread.getPriority(); sm.prepareChecks(modifyThread); testThread.setPriority(priority); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -194,7 +194,7 @@ try { sm.prepareChecks(modifyThread); testThread.setName("a test thread"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -206,7 +206,7 @@ try { sm.prepareChecks(modifyThread); testThread.setDaemon(false); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -218,7 +218,7 @@ try { sm.prepareChecks(stopThread); testThread.stop(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -226,19 +226,17 @@ } try { - sm.prepareChecks(modifyThread, true); + sm.prepareHaltingChecks(modifyThread); if (we_are_gnu_classpath) Thread.currentThread().stop(); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: java.lang.Thread-stop(Throwable) @@ -246,7 +244,7 @@ try { sm.prepareChecks(stopThread); testThread.stop(threadDeath); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -256,7 +254,7 @@ try { sm.prepareChecks(stopThread); testThread.stop(notThreadDeath); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -264,35 +262,31 @@ } try { - sm.prepareChecks(modifyThread, true); + sm.prepareHaltingChecks(modifyThread); if (we_are_gnu_classpath) Thread.currentThread().stop(threadDeath); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } try { - sm.prepareChecks(stopThread, true); + sm.prepareHaltingChecks(stopThread); if (we_are_gnu_classpath) Thread.currentThread().stop(notThreadDeath); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // The modifyThreadGroup tests get run in a system thread. @@ -321,7 +315,7 @@ new Thread(systemGroup, "test thread"); break; } - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -333,7 +327,7 @@ sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } @@ -349,7 +343,7 @@ public static class SysTestRunner implements Runnable { private TestHarness harness; - private TestSecurityManager2 sm; + private TestSecurityManager sm; private static Runnable runnable = new Runnable() { @@ -358,7 +352,7 @@ } }; - public SysTestRunner(TestHarness harness, TestSecurityManager2 sm) + public SysTestRunner(TestHarness harness, TestSecurityManager sm) { this.harness = harness; this.sm = sm; @@ -372,7 +366,7 @@ try { sm.prepareChecks(modifyThreadGroup); Thread.enumerate(new Thread[0]); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -401,7 +395,7 @@ new Thread(runnable, "test thread"); break; } - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); Index: gnu/testlet/java/lang/ThreadGroup/insecurity.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/ThreadGroup/insecurity.java,v retrieving revision 1.2 diff -u -r1.2 insecurity.java --- gnu/testlet/java/lang/ThreadGroup/insecurity.java 27 Jun 2006 09:54:43 -0000 1.2 +++ gnu/testlet/java/lang/ThreadGroup/insecurity.java 27 Jun 2006 12:20:54 -0000 @@ -24,7 +24,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class insecurity implements Testlet { @@ -49,7 +49,7 @@ testThread.start(); testThread.join(); } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } @@ -75,7 +75,7 @@ Permission[] noChecks = new Permission[0]; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -85,7 +85,7 @@ try { sm.prepareChecks(noChecks); new ThreadGroup("test"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -98,7 +98,7 @@ try { sm.prepareChecks(noChecks); new ThreadGroup(testGroup, "test"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -110,7 +110,7 @@ try { sm.prepareChecks(noChecks); testGroup.checkAccess(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -123,7 +123,7 @@ try { sm.prepareChecks(noChecks); testGroup.enumerate(new Thread[0]); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -137,7 +137,7 @@ try { sm.prepareChecks(noChecks); testGroup.enumerate(new Thread[0], i == 1); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -151,7 +151,7 @@ try { sm.prepareChecks(noChecks); testGroup.enumerate(new ThreadGroup[0]); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -165,7 +165,7 @@ try { sm.prepareChecks(noChecks); testGroup.enumerate(new ThreadGroup[0], i == 1); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -178,7 +178,7 @@ try { sm.prepareChecks(noChecks); nonSystemGroup.getParent(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -190,7 +190,7 @@ try { sm.prepareChecks(noChecks); testGroup.setDaemon(false); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -203,7 +203,7 @@ int priority = testGroup.getMaxPriority(); sm.prepareChecks(noChecks); testGroup.setMaxPriority(priority); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -215,7 +215,7 @@ try { sm.prepareChecks(noChecks); nonSystemGroup.suspend(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -227,7 +227,7 @@ try { sm.prepareChecks(noChecks); nonSystemGroup.resume(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -239,7 +239,7 @@ try { sm.prepareChecks(noChecks); nonSystemGroup.interrupt(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -251,7 +251,7 @@ try { sm.prepareChecks(noChecks); nonSystemGroup.stop(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -262,7 +262,7 @@ sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } Index: gnu/testlet/java/lang/ThreadGroup/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/ThreadGroup/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/lang/ThreadGroup/security.java 5 May 2006 12:26:24 -0000 1.2 +++ gnu/testlet/java/lang/ThreadGroup/security.java 27 Jun 2006 12:20:54 -0000 @@ -24,7 +24,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -47,7 +47,7 @@ testThread.start(); testThread.join(); } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } @@ -81,7 +81,7 @@ new RuntimePermission("modifyThread"), new RuntimePermission("stopThread")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -90,7 +90,7 @@ try { sm.prepareChecks(modifyThreadGroup); new ThreadGroup("test"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -102,7 +102,7 @@ try { sm.prepareChecks(modifyThreadGroup); new ThreadGroup(testGroup, "test"); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -114,7 +114,7 @@ try { sm.prepareChecks(modifyThreadGroup); testGroup.checkAccess(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -126,7 +126,7 @@ try { sm.prepareChecks(modifyThreadGroup); testGroup.enumerate(new Thread[0]); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -139,7 +139,7 @@ try { sm.prepareChecks(modifyThreadGroup); testGroup.enumerate(new Thread[0], i == 1); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -152,7 +152,7 @@ try { sm.prepareChecks(modifyThreadGroup); testGroup.enumerate(new ThreadGroup[0]); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -165,7 +165,7 @@ try { sm.prepareChecks(modifyThreadGroup); testGroup.enumerate(new ThreadGroup[0], i == 1); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -178,7 +178,7 @@ try { sm.prepareChecks(modifyThreadGroup); nonSystemGroup.getParent(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -190,7 +190,7 @@ try { sm.prepareChecks(modifyThreadGroup); testGroup.setDaemon(false); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -203,7 +203,7 @@ int priority = testGroup.getMaxPriority(); sm.prepareChecks(modifyThreadGroup); testGroup.setMaxPriority(priority); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -213,35 +213,31 @@ // throwpoint: java.lang.ThreadGroup-suspend harness.checkPoint("suspend"); try { - sm.prepareChecks(modifyThreadGroup, modifyThread, true); + sm.prepareHaltingChecks(modifyThreadGroup, modifyThread); testGroup.suspend(); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: java.lang.ThreadGroup-resume harness.checkPoint("resume"); try { - sm.prepareChecks(modifyThreadGroup, modifyThread, true); + sm.prepareHaltingChecks(modifyThreadGroup, modifyThread); testGroup.resume(); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: TODO: java.lang.ThreadGroup-destroy @@ -253,35 +249,31 @@ // throwpoint: java.lang.ThreadGroup-interrupt harness.checkPoint("interrupt"); try { - sm.prepareChecks(modifyThreadGroup, modifyThread, true); + sm.prepareHaltingChecks(modifyThreadGroup, modifyThread); testGroup.interrupt(); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } // throwpoint: java.lang.ThreadGroup-stop harness.checkPoint("stop"); try { - sm.prepareChecks(modifyThreadGroup, stopThread, true); + sm.prepareHaltingChecks(modifyThreadGroup, stopThread); testGroup.stop(); - harness.check(false, "shouldn't be reached"); + harness.check(false); } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } catch (SecurityException ex) { - if (ex.getMessage().equals(TestSecurityManager2.successMessage)) { - harness.check(true); - } - else { - harness.debug(ex); - harness.check(false, "unexpected check"); - } + harness.debug(ex); + harness.check(false, "unexpected check"); } } finally { @@ -297,7 +289,7 @@ try { sm.prepareChecks(modifyThreadGroup); nonSystemGroup.destroy(); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -308,14 +300,14 @@ sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } } } - public static class SpecialSecurityManager extends TestSecurityManager2 + public static class SpecialSecurityManager extends TestSecurityManager { public SpecialSecurityManager(TestHarness harness) { Index: gnu/testlet/java/lang/reflect/AccessibleObject/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/lang/reflect/AccessibleObject/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/lang/reflect/AccessibleObject/security.java 21 Jun 2006 10:02:08 -0000 1.1 +++ gnu/testlet/java/lang/reflect/AccessibleObject/security.java 27 Jun 2006 12:20:54 -0000 @@ -30,7 +30,7 @@ import gnu.testlet.Testlet; import gnu.testlet.TestHarness; -import gnu.testlet.TestSecurityManager2; +import gnu.testlet.TestSecurityManager; public class security implements Testlet { @@ -84,7 +84,7 @@ Permission[] suppressAccessChecks = new Permission[] { new ReflectPermission("suppressAccessChecks")}; - TestSecurityManager2 sm = new TestSecurityManager2(harness); + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -94,7 +94,7 @@ try { sm.prepareChecks(suppressAccessChecks); objects[i].setAccessible(true); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -109,7 +109,7 @@ harness.check(false); } catch (SecurityException ex) { - sm.checkAllChecked(harness); + sm.checkAllChecked(); } // throwpoint: java.lang.reflect.AccessibleObject-setAccessible(AccessibleObject[], boolean) @@ -117,7 +117,7 @@ try { sm.prepareChecks(suppressAccessChecks); AccessibleObject.setAccessible(objects, true); - sm.checkAllChecked(harness); + sm.checkAllChecked(); } catch (SecurityException ex) { harness.debug(ex); @@ -128,7 +128,7 @@ sm.uninstall(); } } - catch (Throwable ex) { + catch (Exception ex) { harness.debug(ex); harness.check(false, "Unexpected exception"); } From gbenson@redhat.com Tue Jun 27 15:18:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 27 Jun 2006 15:18:00 -0000 Subject: FYI: Fix RunnerProcess.removeSecurityManager() Message-ID: <20060627151756.GE3645@redhat.com> Hi all, This commit fixes RunnerProcess.removeSecurityManager() to use the new test security manager rather than the old one. I also added a warning message if it does find stray test security managers installed. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1743 diff -u -r1.1743 ChangeLog --- ChangeLog 27 Jun 2006 12:23:37 -0000 1.1743 +++ ChangeLog 27 Jun 2006 15:13:25 -0000 @@ -1,3 +1,7 @@ +2006-06-27 Gary Benson + + * RunnerProcess.java (removeSecurityManager): Updated. + 2006-06-27 Gary Benson * gnu/testlet/TestSecurityManager.java: Replaced with a Index: RunnerProcess.java =================================================================== RCS file: /cvs/mauve/mauve/RunnerProcess.java,v retrieving revision 1.8 diff -u -r1.8 RunnerProcess.java --- RunnerProcess.java 19 Jun 2006 22:07:37 -0000 1.8 +++ RunnerProcess.java 27 Jun 2006 15:13:25 -0000 @@ -743,12 +743,13 @@ private void removeSecurityManager() { - SecurityManager m = System.getSecurityManager(); - if (m instanceof TestSecurityManager) + while (true) { - TestSecurityManager tsm = (TestSecurityManager) m; - tsm.setRunChecks(false); - System.setSecurityManager(null); + SecurityManager sm = System.getSecurityManager(); + if (!(sm instanceof TestSecurityManager)) + break; + debug("warning: TestSecurityManager was not uninstalled"); + ((TestSecurityManager) sm).uninstall(); } } From david.gilbert@object-refinery.com Tue Jun 27 15:58:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 27 Jun 2006 15:58:00 -0000 Subject: FYI: Component.setName() - new test Message-ID: <44A1559A.2020306@object-refinery.com> This patch (committed) adds a test for the setName() method in the Component class: 2006-06-27 David Gilbert * gnu/testlet/java/awt/Component/setName.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From fitzsim@redhat.com Tue Jun 27 16:05:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Tue, 27 Jun 2006 16:05:00 -0000 Subject: RFC: add "not-a-test" tag to several tests In-Reply-To: <1151340576.2557.3.camel@elsschot.wildebeest.org> References: <1151080291.25174.104.camel@tony.toronto.redhat.com> <1151331641.3361.8.camel@localhost.localdomain> <1151332775.2701.16.camel@elsschot.wildebeest.org> <44A00DF9.9040306@redhat.com> <1151340576.2557.3.camel@elsschot.wildebeest.org> Message-ID: <44A15734.8030708@redhat.com> Mark Wielaard wrote: > On Mon, 2006-06-26 at 12:40 -0400, Thomas Fitzsimmons wrote: >> Mark Wielaard wrote: >>> They make it possible to use >>> RunnerProcess just as you could use SimpleTestHarness (e.g. echo >>> gnu.testlet.some.test | runtime RunnerProcess) by just returning when >>> stdin is empty (and in.readLine() returns null). >> This can already be done using the current Harness: >> >> jamvm Harness gnu.testlet.some.test >> >> Harness also supports specifying multiple tests: >> >> jamvm Harness gnu/testlet/java/awt/Frame/size1.java >> gnu/testlet/javax/swing/JTable/addColumn.java > > I know, but that is a terrible way for debugging. Hunting down a crasher > bug for example is really, really awkward using the Harness since it > does way too many things. When examining tests (especially under gdb) > for debugging you need to be able to run them just through the > RunnerProcess to make sure you are looking at just the thing that fails. > It works nicely with that one-liner patch though, so it isn't really > another way to run tests, it is just to make sure you can run the tests > by hand as if the Harness would run them. Why don't we just print the VM command-line invocation as part of Harness's output? Then you could simply copy-n-paste that to gdb --args. Tom From david.gilbert@object-refinery.com Tue Jun 27 16:28:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 27 Jun 2006 16:28:00 -0000 Subject: FYI: Point.setLocation() additional checks Message-ID: <44A15C8B.3060604@object-refinery.com> This patch (committed) adds a few extra checks: 2006-06-27 David Gilbert * gnu/testlet/java/awt/Point/setLocation.java (test): Added new checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From mark@klomp.org Tue Jun 27 16:38:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 27 Jun 2006 16:38:00 -0000 Subject: RFC: add "not-a-test" tag to several tests In-Reply-To: <44A15734.8030708@redhat.com> References: <1151080291.25174.104.camel@tony.toronto.redhat.com> <1151331641.3361.8.camel@localhost.localdomain> <1151332775.2701.16.camel@elsschot.wildebeest.org> <44A00DF9.9040306@redhat.com> <1151340576.2557.3.camel@elsschot.wildebeest.org> <44A15734.8030708@redhat.com> Message-ID: <1151426293.2555.79.camel@elsschot.wildebeest.org> Hi, On Tue, 2006-06-27 at 12:05 -0400, Thomas Fitzsimmons wrote: > > I know, but that is a terrible way for debugging. Hunting down a crasher > > bug for example is really, really awkward using the Harness since it > > does way too many things. When examining tests (especially under gdb) > > for debugging you need to be able to run them just through the > > RunnerProcess to make sure you are looking at just the thing that fails. > > It works nicely with that one-liner patch though, so it isn't really > > another way to run tests, it is just to make sure you can run the tests > > by hand as if the Harness would run them. > > Why don't we just print the VM command-line invocation as part of Harness's > output? Then you could simply copy-n-paste that to gdb --args. Sure as long as what gets invoked is really just the testcase and nothing else. We use Mauve for low level tests of both the core library and the runtimes so we really don't want too much things like Sockets or fancy reflection constructs in the TestRunner itself. Cheers, Mark From abalkiss@redhat.com Tue Jun 27 19:04:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Tue, 27 Jun 2006 19:04:00 -0000 Subject: RFC: Harness with no busy-waiting In-Reply-To: <1151397675.2555.6.camel@elsschot.wildebeest.org> References: <1151350073.3361.12.camel@localhost.localdomain> <1151397675.2555.6.camel@elsschot.wildebeest.org> Message-ID: <1151435040.25174.111.camel@tony.toronto.redhat.com> On Tue, 2006-06-27 at 10:41 +0200, Mark Wielaard wrote: > Hi Anthony, > > On Mon, 2006-06-26 at 15:27 -0400, Anthony Balkissoon wrote: > > This removes the busy waiting from the Harness and replaces it with > > blocking read() calls using Sockets with specified timeouts. > > > > This is RFC because I'd like it to be tested to see if it speeds things > > up as much as Mark's workaround before it is checked in. > > I don't really like this design. It puts even more stuff inside the > RunnerProcess which really should be as simple as possible so you can > easily run and debug it. Otherwise you might be trying to debug the > infrastructure and not the test itself. And by adding Sockets you a also > make it very hard/impossible to run single tests without the Harness to > really debug them. Please just use normal streams for communication > between the RunnerProcess and whatever calls it. And add a old-fashion > timeout with Object.wait()/notify() to the Harness, or if you want > something more fancy there add a nio.channel.Selector. But please don't > make the RunnerProcess depend on too much infrastructure. > > Cheers, > > Mark > Okay, here's a second attempt, no Sockets, no tricks. Still RFC. Comments? 2006-06-27 Anthony Balkissoon * Harness.java: (bcp_timeout): Removed this field. (testIsHung): Likewise. (runner_lock): Likewise. (getClasspathInstallString): Return an empty string instead of null when no bootclasspath is detected. (getBootClassPath): Removed the TimeoutWatcher and replaced the busy waiting with a blocking readLine(). (runTest): Redesigned to replace busy waiting with blocking readLine() call. (TimeoutWatcher.run): If the timeout occurs, kill the RunnerProcess and restart it instead of notifying the Harness and letting the Harness do the work. (DetectBootclasspath.main): If the bootclasspath isn't detectable, return a String saying so. * RunnerProcess.java: (FAILED_TO_LOAD_DESCRIPTION): New field. (UNCAUGHT_EXCEPTION_DESCRIPTION): Likewise. (main): If the testname is null, call System.exit. (runtest): Set the description earlier to avoid NPE. Handle loading exceptions and uncaught exceptions better. (runAndReport): Handle loading exceptions and uncaught exceptions. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: RemoveBusyWait2.diff Type: text/x-patch Size: 16170 bytes Desc: not available URL: From abalkiss@redhat.com Tue Jun 27 19:11:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Tue, 27 Jun 2006 19:11:00 -0000 Subject: small Makefile patch Message-ID: <1151435465.25174.113.camel@tony.toronto.redhat.com> This patch removes a reference to the no-longer-existent gnu/testlet/TestSecurityManager2.java. 2006-06-27 Anthony Balkissoon * Makefile.am: Removed reference to gnu/testlet/TestSecurityManager2.java which no longer exists. * Makefile.in: Regenerated. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: MakefilePatchTestSecMan.diff Type: text/x-patch Size: 543 bytes Desc: not available URL: From abalkiss@redhat.com Tue Jun 27 19:32:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Tue, 27 Jun 2006 19:32:00 -0000 Subject: RFC: Harness with no busy-waiting In-Reply-To: <1151435040.25174.111.camel@tony.toronto.redhat.com> References: <1151350073.3361.12.camel@localhost.localdomain> <1151397675.2555.6.camel@elsschot.wildebeest.org> <1151435040.25174.111.camel@tony.toronto.redhat.com> Message-ID: <1151436740.25174.116.camel@tony.toronto.redhat.com> > Okay, here's a second attempt, no Sockets, no tricks. Still RFC. > Comments? By the way, this patch includes a known regression, any System.err.print statements inside of tests will not be echoed. This will be fixed soon, if the overall patch is approved. --Tony From abalkiss@redhat.com Tue Jun 27 20:54:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Tue, 27 Jun 2006 20:54:00 -0000 Subject: RFC: Harness with no busy-waiting In-Reply-To: <1151436740.25174.116.camel@tony.toronto.redhat.com> References: <1151350073.3361.12.camel@localhost.localdomain> <1151397675.2555.6.camel@elsschot.wildebeest.org> <1151435040.25174.111.camel@tony.toronto.redhat.com> <1151436740.25174.116.camel@tony.toronto.redhat.com> Message-ID: <1151441664.25174.118.camel@tony.toronto.redhat.com> This is committed with a very small change, the actual patch it attached to this message. --Tony On Tue, 2006-06-27 at 15:32 -0400, Anthony Balkissoon wrote: > > Okay, here's a second attempt, no Sockets, no tricks. Still RFC. > > Comments? > > By the way, this patch includes a known regression, any System.err.print > statements inside of tests will not be echoed. This will be fixed soon, > if the overall patch is approved. > > --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: RemoveBusyWait4.diff Type: text/x-patch Size: 16904 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed Jun 28 10:09:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 28 Jun 2006 10:09:00 -0000 Subject: FYI: DefaultTableColumnModel test updates Message-ID: <44A2553E.7090708@object-refinery.com> This patch (committed) updates the tests for the DefaultTableColumnModel class (I made these changes some time ago, but never got around to committing them). Following a minor patch to GNU Classpath this morning, all these tests pass: 2006-06-28 David Gilbert * gnu/testlet/javax/swing/table/DefaultTableColumnModel/addColumn.java (test): Check that no listeners are added to the column, * gnu/testlet/javax/swing/table/DefaultTableColumnModel/constructor.java (test): Call new test methods, (testGeneral): Code from original test method, (testChangeEventInitialization): Checks for initialization of changeEvent, * gnu/testlet/javax/swing/table/DefaultTableColumnModel/getColumn.java (test): Add checks for bad arguments, * gnu/testlet/javax/swing/table/DefaultTableColumnModel/getColumnSelectionAllowed: Minor reformat, * gnu/testlet/javax/swing/table/DefaultTableColumnModel/getTotalColumnWidth.java: New test, * gnu/testlet/javax/swing/table/DefaultTableColumnModel/MyDefaultTableColumnModel.java: New support class, * gnu/testlet/javax/swing/table/DefaultTableColumnModel/removeColumn.java (test): Add a check for column not in model, * gnu/testlet/javax/swing/table/DefaultTableColumnModel/setSelectionModel.java (test): Added new listener checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jun 28 10:51:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 28 Jun 2006 10:51:00 -0000 Subject: FYI: JScrollBar and JSplitPane - getActionMap() tests Message-ID: <44A25F24.6060409@object-refinery.com> This patch (committed) adds tests for the getActionMap() method in the JScrollBar and JSplitPane classes: 2006-06-28 David Gilbert * gnu/testlet/javax/swing/JScrollBar/getActionMap.java: New test, * gnu/testlet/javax/swing/JSplitPane/getActionMap.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jun 28 10:57:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 28 Jun 2006 10:57:00 -0000 Subject: FYI: Component.setMin/Max/PreferredSize() tests Message-ID: <44A26099.50504@object-refinery.com> This patch (committed) adds new tests for the Component class: 2006-06-28 David Gilbert * gnu/testlet/java/awt/Component/setMaximumSize.java: New test, * gnu/testlet/java/awt/Component/setMinimumSize.java: New test, * gnu/testlet/java/awt/Component/setPreferredSize.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jun 28 13:08:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 28 Jun 2006 13:08:00 -0000 Subject: FYI: JComponent - new tests Message-ID: <44A27F51.7050809@object-refinery.com> This patch (committed) adds some new tests for the JComponent class: 2006-06-28 David Gilbert * gnu/testlet/javax/swing/JComponent/getComponentPopupMenu.java: New test, * gnu/testlet/javax/swing/JComponent/setComponentPopupMenu.java: New test, * gnu/testlet/javax/swing/JComponent/setInheritsPopupMenu.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jun 28 14:31:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 28 Jun 2006 14:31:00 -0000 Subject: FYI: JComponent/VetoableChangeSupport Message-ID: <44A292C0.9020702@object-refinery.com> This patch (committed) adds new tests for the VetoableChangeListener support in the JComponent class: 2006-06-28 David Gilbert * gnu/testlet/java/beans/VetoableChangeSupport/addVetoableChangeListener.java: New test, * gnu/testlet/javax/swing/JComponent/addVetoableChangeListener.java: New test, * gnu/testlet/javax/swing/JComponent/getListeners.java (MyVetoableChangeListener): New inner class, (test): Extended to check for VetoableChangeListeners, * gnu/testlet/javax/swing/JComponent/getVetoableChangeListener.java: New test, * gnu/testlet/javax/swing/JComponent/removeVetoableChangeListener.java: New test. I already committed a patch to GNU Classpath to make these tests pass. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jun 28 14:59:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 28 Jun 2006 14:59:00 -0000 Subject: FYI: JComponent - 2 new tests Message-ID: <44A29938.6010809@object-refinery.com> This patch (committed) adds two new tests for the JComponent class: 2006-06-28 David Gilbert * gnu/testlet/javax/swing/JComponent/getVerifyInputWhenFocusTarget.java: New test, * gnu/testlet/javax/swing/JComponent/setVerifyInputWhenFocusTarget.java: New test. A patch to make GNU Classpath pass these tests will follow. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Thu Jun 29 16:15:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 29 Jun 2006 16:15:00 -0000 Subject: FYI: More JComponent tests Message-ID: <44A3FCB7.7060003@object-refinery.com> This patch (committed) adds some more tests for JComponent: 2006-06-29 David Gilbert * gnu/testlet/javax/swing/JComponent/getActionForKeyStroke.java: New test, * gnu/testlet/javax/swing/JComponent/getRegisteredKeyStrokes.java: New test, * gnu/testlet/javax/swing/JComponent/registerKeyboardAction.java: New test, * gnu/testlet/javax/swing/JComponent/setDefaultLocale.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Thu Jun 29 16:27:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 29 Jun 2006 16:27:00 -0000 Subject: FYI: JMenuBar - new tests Message-ID: <44A3FF65.7000306@object-refinery.com> This patch (committed) adds some tests for the JMenuBar class: 2006-06-29 David Gilbert * gnu/testlet/javax/swing/JMenuBar/getActionMap.java: New test, * gnu/testlet/javax/swing/JMenuBar/getHelpMenu.java: New test, * gnu/testlet/javax/swing/JMenuBar/setHelpMenu.java: New test, * gnu/testlet/javax/swing/JMenuBar/setMargin.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From abalkiss@redhat.com Thu Jun 29 17:19:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Thu, 29 Jun 2006 17:19:00 -0000 Subject: RunnerProcess ignore abstract classes Message-ID: <1151601573.25174.126.camel@tony.toronto.redhat.com> This is a fix written by Raif (sorry for the delay Raif, I thought you had committed this) that marks abstract classes as NOT_A_TEST_DESCRIPTION instead of trying to instantiate them and reporting a failure. Note, these files SHOULD be marked "not-a-test" but this little patch is a nice way of dealing with them regardless of whether or not they are properly tagged. 2006-06-29 Anthony Balkissoon * RunnerProcess.java: (runtest): Check if the class is abstract (and therefore not a test) and mark it as NOT_A_TEST_DESCRIPTION if so. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: IgnoreAbstract.diff Type: text/x-patch Size: 888 bytes Desc: not available URL: From abalkiss@redhat.com Thu Jun 29 18:34:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Thu, 29 Jun 2006 18:34:00 -0000 Subject: More not-a-test marking Message-ID: <1151606013.25174.130.camel@tony.toronto.redhat.com> Marked some abstract classes as not-a-test. 2006-06-29 Anthony Balkissoon * gnu/testlet/org/omg/CORBA/ORB/RF11/A_except1Helper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/A_except2Helper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/BHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/B_exceptHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_ObjectHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_anyHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_booleanHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_charHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_doubleHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_floatHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_longHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_octetHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_shortHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_stringHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_ulongHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_array_e_ushortHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_exceptHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_ObjectHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_anyHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_booleanHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_charHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_doubleHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_floatHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_longHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_octetHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_shortHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_stringHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_ulongHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_sequence_e_ushortHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_structHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/C_unionHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/D_d_BHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/D_d_booleanHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/D_d_charHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/D_d_longHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/D_d_shortHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/D_d_ulongHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/D_d_ushortHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/D_exceptHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/E_arrayHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/E_exceptHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/E_sequenceHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/E_structHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/E_unionHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/F_array_e_c_structHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/F_array_e_c_unionHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/F_except1Helper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/F_except2Helper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/F_except3Helper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/F_sequence_e_c_structHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/F_sequence_e_c_unionHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/F_structHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/F_unionHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/G_array_e_e_structHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/G_array_e_e_unionHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/G_exceptHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/G_sequence_e_e_structHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/G_sequence_e_e_unionHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/G_structHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/G_unionHelper.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/_rf11ImplBase.java, * gnu/testlet/org/omg/CORBA/ORB/RF11/rf11Helper.java, * gnu/testlet/org/omg/CORBA/ORB/communication/_comTesterImplBase.java, * gnu/testlet/org/omg/CORBA/ORB/communication/nodeHelper.java, * gnu/testlet/org/omg/CORBA/ORB/communication/ourUserExceptionHelper.java, * gnu/testlet/org/omg/CORBA/ORB/communication/passThisHelper.java, * gnu/testlet/org/omg/CORBA/ORB/communication/returnThisHelper.java, * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/GreetingsHelper.java, * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/Info.java, * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/InfoHelper.java, * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/_GreetingsImplBase.java, * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/cmInfo.java, * gnu/testlet/org/omg/CORBA_2_3/ORB/Valtype/cmInfoHelper.java, * gnu/testlet/org/omg/DynamicAny/DynAny/Iona/TestEnumHelper.java, * gnu/testlet/org/omg/DynamicAny/DynAny/Iona/TestStructHelper.java, * gnu/testlet/org/omg/PortableServer/POA/TestHelper.java, * gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardHelper.java, * gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardPOA.java, * gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardServerHelper.java, * gnu/testlet/org/omg/PortableServer/POA/TestLocationForwardServerPOA.java, * gnu/testlet/org/omg/PortableServer/POA/TestPOA.java, * gnu/testlet/org/omg/PortableServer/POAOperations/communication/ourUserExceptionHelper.java, * gnu/testlet/org/omg/PortableServer/POAOperations/communication/poa_comTesterHelper.java, * gnu/testlet/org/omg/PortableServer/POAOperations/communication/poa_comTesterPOA.java, * gnu/testlet/org/omg/PortableServer/POAOperations/communication/remotePoaControlHelper.java, * gnu/testlet/org/omg/PortableServer/POAOperations/communication/remotePoaControlPOA.java: Marked as not-a-test. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: NotATest3.diff Type: text/x-patch Size: 56474 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Jun 30 09:18:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 30 Jun 2006 09:18:00 -0000 Subject: FYI: TextArea and TextField constructors - new tests Message-ID: <44A4EC6E.9030009@object-refinery.com> This patch (committed) adds some checks for the constructors in the TextArea and TextField classes, which I wrote while looking over a proposed patch from Tania Bento: 2006-06-30 David Gilbert * gnu/testlet/java/awt/TextArea/constructors.java: New test, * gnu/testlet/java/awt/TextField/constructors.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Fri Jun 30 09:27:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 30 Jun 2006 09:27:00 -0000 Subject: FYI: TextArea.constructors - minor fix Message-ID: <44A4EE71.5070308@object-refinery.com> This patch (committed) fixes a small error in my previous patch: 2006-06-30 David Gilbert * gnu/testlet/java/awt/TextArea/constructors.java (test): Call testConstructor5(). Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From tbento@redhat.com Fri Jun 30 18:18:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 30 Jun 2006 18:18:00 -0000 Subject: FYI: TextArea (new tests) Message-ID: <1151691517.2268.115.camel@toad.toronto.redhat.com> Hey, This patch (committed) contains 4 new tests: testInvalidConstructorValues tests invalid values for either rows, columns and/or scrollbarVisibility are passed to the constructor, testAppendText tests the appendText method, testInsertText tests the insertText method, and testReplaceText tests the replaceText. Here's the changelog entry: 2006-06-30 Tania Bento * gnu/testlet/java/awt/TextArea/testAppendText.java: New test. * gnu/testlet/java/awt/TextArea/testInsertText.java: New test. * gnu/testlet/java/awt/TextArea/testInvalidConstructorValues: New test. * gnu/testlet/java/awt/TextArea/testReplaceText.java : New test. Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 8759 bytes Desc: not available URL: From mark@klomp.org Fri Jun 30 23:08:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Fri, 30 Jun 2006 23:08:00 -0000 Subject: RFC: Harness with no busy-waiting In-Reply-To: <1151435040.25174.111.camel@tony.toronto.redhat.com> References: <1151350073.3361.12.camel@localhost.localdomain> <1151397675.2555.6.camel@elsschot.wildebeest.org> <1151435040.25174.111.camel@tony.toronto.redhat.com> Message-ID: <1151708906.5318.10.camel@localhost.localdomain> Hi Anthony, On Tue, 2006-06-27 at 15:04 -0400, Anthony Balkissoon wrote: > Okay, here's a second attempt, no Sockets, no tricks. I like it thanks! I did have two small issues that took me a while to track down. Sometimes the readLine() would throw an IOException after the process was destroyed so I made an IOException do the same thing thing as if the readLine() returned null. And sometimes there was a race condition between the setting up a new RunnerProcess and the TimeoutWatcher destroying the old one (the Process.destroy() could take some time). So I added the Process as an explicit field of the TimeoutWatcher so that it would only destroy the Process it is watching. 2006-06-30 Mark Wielaard * Harness.java (initProcess): Initialize TimeoutWatcher with runnerProcess. (runAllTests): Treat IOException as timeout. (TimeoutWatcher.runnerProcess): New field. (TimeoutWatcher.run): Close streams of runnerProcess. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: Harness.patch Type: text/x-patch Size: 2090 bytes Desc: not available URL: From mark@klomp.org Wed Jul 5 00:09:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Wed, 05 Jul 2006 00:09:00 -0000 Subject: builder StdBuild clean after install Message-ID: <1152058133.22121.14.camel@elsschot.wildebeest.org> Hi, We were running out of space on builder.classpath.org because we seem to be building a lot more stuff on it now. The machine has only 10GB disk space for everything (and a gcc source, build and install is already larger than 2GB). So I added a make clean after the make install in StdBuild to reclaim some space. This patch also removes the special make flags because cacao cannot handle those. See http://b2.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=27 2006-07-04 Mark Wielaard * scripts/StdBuild: Add cacao, make clean and don't use special make flags. Committed and installed on builder. If you are working on builder please do post patches to the list so others know what changed on the machine. A read-only checkout of the scripts is available in /home/cpdev/cvs/ Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: clean.patch Type: text/x-patch Size: 905 bytes Desc: not available URL: From a.hughes@dcs.shef.ac.uk Wed Jul 5 08:37:00 2006 From: a.hughes@dcs.shef.ac.uk (Andrew John Hughes) Date: Wed, 05 Jul 2006 08:37:00 -0000 Subject: builder StdBuild clean after install In-Reply-To: <1152058133.22121.14.camel@elsschot.wildebeest.org> References: <1152058133.22121.14.camel@elsschot.wildebeest.org> Message-ID: <3F0B9512-2C46-44E4-A1E1-E07489360CD8@dcs.shef.ac.uk> On 5 Jul 2006, at 01:08, Mark Wielaard wrote: > Hi, > > We were running out of space on builder.classpath.org because we > seem to > be building a lot more stuff on it now. The machine has only 10GB disk > space for everything (and a gcc source, build and install is already > larger than 2GB). So I added a make clean after the make install in > StdBuild to reclaim some space. This patch also removes the special > make > flags because cacao cannot handle those. > See http://b2.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi? > id=27 > > 2006-07-04 Mark Wielaard > > * scripts/StdBuild: Add cacao, make clean and don't use > special > make flags. > > Committed and installed on builder. > > If you are working on builder please do post patches to the list so > others know what changed on the machine. A read-only checkout of the > scripts is available in /home/cpdev/cvs/ > > Cheers, > > Mark > --- ../cvs/builder/scripts/StdBuild 2006-06-19 15:59:18.000000000 > +0000 > +++ scripts/StdBuild 2006-07-04 23:55:02.000000000 +0000 > @@ -16,7 +16,7 @@ > > target= > extra= > -for d in trunk gcjx-branch devo gcc src rhug classpath gnu-crypto > emacs kawa monotone jessie jamvm; do > +for d in trunk gcjx-branch gcj-eclipse devo gcc src rhug classpath > gnu-crypto emacs kawa monotone jessie jamvm cacao; do > if test -d $d; then > here=$(pwd) > src=$d > @@ -91,9 +91,14 @@ > $confargs \ > $extra > > -make CFLAGS=-g CPPFLAGS=-g CXXFLAGS=-g GCJFLAGS=-g $target > +#make CFLAGS=-g CPPFLAGS=-g CXXFLAGS=-g GCJFLAGS=-g $target > +make $target > > -make CFLAGS=-g CPPFLAGS=-g CXXFLAGS=-g GCJFLAGS=-g install) 2>&1 > +#make CFLAGS=-g CPPFLAGS=-g CXXFLAGS=-g GCJFLAGS=-g install > +make install > + > +# Clean up some space, but don't remove install, it might be used > later > +make clean) 2>&1 > > echo $? > Status) | tee Log.Std > I guess that rules out what I was trying to do then -- adding mine and Tromey's GCC branches to the build. Thanks, -- Andrew :) From mark@klomp.org Wed Jul 5 10:16:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Wed, 05 Jul 2006 10:16:00 -0000 Subject: builder StdBuild clean after install In-Reply-To: <3F0B9512-2C46-44E4-A1E1-E07489360CD8@dcs.shef.ac.uk> References: <1152058133.22121.14.camel@elsschot.wildebeest.org> <3F0B9512-2C46-44E4-A1E1-E07489360CD8@dcs.shef.ac.uk> Message-ID: <1152094215.2577.32.camel@elsschot.wildebeest.org> Hi Andrew, On Wed, 2006-07-05 at 09:31 +0100, Andrew John Hughes wrote: > On 5 Jul 2006, at 01:08, Mark Wielaard wrote: > > We were running out of space on builder.classpath.org because we > > seem to > > be building a lot more stuff on it now. The machine has only 10GB disk > > space for everything (and a gcc source, build and install is already > > larger than 2GB). So I added a make clean after the make install in > > StdBuild to reclaim some space. > > I guess that rules out what I was trying to do then -- adding mine > and Tromey's GCC branches to the build. Aha, that is why we were suddenly out of disk space! :) You can certainly add them, but be careful of the amount of space left on the machine and please do add the scripts to the mauve cvs module so others can see what is/can be build. There is now just 1GB free. Unfortunately the make clean trick doesn't seem to work for gcc since that step can fail. We probably need to replace it with make clean || true to make sure it doesn't kill the whole build step. Cheers, Mark From david.gilbert@object-refinery.com Wed Jul 5 10:39:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 05 Jul 2006 10:39:00 -0000 Subject: FYI: New InputMap tests Message-ID: <44AB96BE.2030601@object-refinery.com> This patch (committed) adds tests for most of the methods in the javax.swing.InputMap class: 2006-07-05 David Gilbert * gnu/testlet/javax/swing/InputMap/allKeys.java: New test, * gnu/testlet/javax/swing/InputMap/clear.java: New test, * gnu/testlet/javax/swing/InputMap/constructor.java: New test, * gnu/testlet/javax/swing/InputMap/get.java: New test, * gnu/testlet/javax/swing/InputMap/getParent.java: New test, * gnu/testlet/javax/swing/InputMap/keys.java: New test, * gnu/testlet/javax/swing/InputMap/put.java: New test, * gnu/testlet/javax/swing/InputMap/remove.java: New test, * gnu/testlet/javax/swing/InputMap/setParent.java: New test, * gnu/testlet/javax/swing/InputMap/size.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From mark@klomp.org Wed Jul 5 10:42:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Wed, 05 Jul 2006 10:42:00 -0000 Subject: builder StdBuild clean after install In-Reply-To: <1152094215.2577.32.camel@elsschot.wildebeest.org> References: <1152058133.22121.14.camel@elsschot.wildebeest.org> <3F0B9512-2C46-44E4-A1E1-E07489360CD8@dcs.shef.ac.uk> <1152094215.2577.32.camel@elsschot.wildebeest.org> Message-ID: <1152095792.2577.39.camel@elsschot.wildebeest.org> On Wed, 2006-07-05 at 12:10 +0200, Mark Wielaard wrote: > Unfortunately the make clean trick doesn't seem to work for gcc since > that step can fail. We probably need to replace it with make clean || > true to make sure it doesn't kill the whole build step. So I installed: 2006-07-05 Mark Wielaard * scripts/StdBuild: Try make -k clean || make -k distclean || true to really clean up build tree. Lets see how that goes. It should give us some more space back. Cheers, Mark Index: StdBuild =================================================================== RCS file: /cvs/mauve/builder/scripts/StdBuild,v retrieving revision 1.2 diff -u -r1.2 StdBuild --- StdBuild 5 Jul 2006 00:09:46 -0000 1.2 +++ StdBuild 5 Jul 2006 10:35:49 -0000 @@ -97,8 +97,8 @@ #make CFLAGS=-g CPPFLAGS=-g CXXFLAGS=-g GCJFLAGS=-g install make install -# Clean up some space, but don't remove install, it might be used later -make clean) 2>&1 +# Clean up some space, but don't remove inStall, it might be used later +make -k clean || make -k distclean || true) 2>&1 echo $? > Status) | tee Log.Std From abalkiss@redhat.com Wed Jul 5 14:38:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 05 Jul 2006 14:38:00 -0000 Subject: Harness addition, System.err handling is back Message-ID: <1152043806.25174.144.camel@tony.toronto.redhat.com> This patch puts back functionality to handle data on the error stream within test files. This was removed when the busy waiting was removed and is now reimplemented in a non-busy waiting manner. 2006-07-04 Anthony Balkissoon * Harness.java: (runner_in_err): Removed this field. (runner_esp): New field. (restartESP): New field. (finalize): Removed reference to runner_in_err. (initProcess): Removed reference to runner_in_err and created a new ErrorStreamPrinter. (runTest): Restart the ErrorStreamPrinter if an IOException was caught during the last test run. (ErrorStreamPrinter): New class. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: ErrorStreamWriter.diff Type: text/x-patch Size: 3488 bytes Desc: not available URL: From a.hughes@dcs.shef.ac.uk Wed Jul 5 15:34:00 2006 From: a.hughes@dcs.shef.ac.uk (Andrew John Hughes) Date: Wed, 05 Jul 2006 15:34:00 -0000 Subject: builder StdBuild clean after install In-Reply-To: <1152094215.2577.32.camel@elsschot.wildebeest.org> References: <1152058133.22121.14.camel@elsschot.wildebeest.org> <3F0B9512-2C46-44E4-A1E1-E07489360CD8@dcs.shef.ac.uk> <1152094215.2577.32.camel@elsschot.wildebeest.org> Message-ID: On 5 Jul 2006, at 11:10, Mark Wielaard wrote: > Hi Andrew, > > On Wed, 2006-07-05 at 09:31 +0100, Andrew John Hughes wrote: >> On 5 Jul 2006, at 01:08, Mark Wielaard wrote: >>> We were running out of space on builder.classpath.org because we >>> seem to >>> be building a lot more stuff on it now. The machine has only 10GB >>> disk >>> space for everything (and a gcc source, build and install is already >>> larger than 2GB). So I added a make clean after the make install in >>> StdBuild to reclaim some space. >> >> I guess that rules out what I was trying to do then -- adding mine >> and Tromey's GCC branches to the build. > > Aha, that is why we were suddenly out of disk space! :) > > You can certainly add them, but be careful of the amount of space left > on the machine and please do add the scripts to the mauve cvs > module so > others can see what is/can be build. There is now just 1GB free. > Unfortunately the make clean trick doesn't seem to work for gcc since > that step can fail. We probably need to replace it with make clean || > true to make sure it doesn't kill the whole build step. > > Cheers, > > Mark > Yes, it's my bad; I think we'll keep with just mine in that case, as at the moment they are identical and I'll merge in any changes Tom makes (hopefully). I was confused as to the CVS module. I knew about it, but the builder scripts don't appear to be a checkout of this -- correct me if I'm wrong. Cheers, -- Andrew :) Postgraduate Student Verification and Testing Group Department of Computer Science University of Sheffield From mark@klomp.org Wed Jul 5 16:58:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Wed, 05 Jul 2006 16:58:00 -0000 Subject: builder StdBuild clean after install In-Reply-To: References: <1152058133.22121.14.camel@elsschot.wildebeest.org> <3F0B9512-2C46-44E4-A1E1-E07489360CD8@dcs.shef.ac.uk> <1152094215.2577.32.camel@elsschot.wildebeest.org> Message-ID: <1152118673.6853.13.camel@elsschot.wildebeest.org> Hi Andrew, On Wed, 2006-07-05 at 16:34 +0100, Andrew John Hughes wrote: > I think we'll keep with just mine in that case, as > at the moment they are identical and I'll merge in any changes Tom > makes (hopefully). It would indeed be good to have an autobuild of the new ecj-gcj work. Thanks for looking into it. > I was confused as to the CVS module. I knew about it, but the > builder scripts don't appear to be a checkout > of this -- correct me if I'm wrong. No you are correct. There wasn't really much plan or thought behind the current setup. But it looks like copying files from the checkout into the actual scripts dir is actually a bit confusing and means people go and change the files in the scripts directory directly. I just wanted to make sure that any change to cvs was deliberately and explicitly added to the builder setup (with someone looking at the change and seeing it was really good). We can probably make the scripts directory on builder a direct anonymous checkout of mauve cvs and trust that the changes in the mauve repository are good. Cheers, Mark From tromey@redhat.com Wed Jul 5 17:16:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Wed, 05 Jul 2006 17:16:00 -0000 Subject: builder StdBuild clean after install In-Reply-To: <1152118673.6853.13.camel@elsschot.wildebeest.org> References: <1152058133.22121.14.camel@elsschot.wildebeest.org> <3F0B9512-2C46-44E4-A1E1-E07489360CD8@dcs.shef.ac.uk> <1152094215.2577.32.camel@elsschot.wildebeest.org> <1152118673.6853.13.camel@elsschot.wildebeest.org> Message-ID: Mark> We can probably make the scripts directory on builder Mark> a direct anonymous checkout of mauve cvs and trust that the changes in Mark> the mauve repository are good. Yes, I think this is the best plan. In particular I don't want people to be checking things to the builder module as 'cpdev' -- it is better to have a little accountability so we can ask folks to fix up problems they introduce. Tom From abalkiss@redhat.com Wed Jul 5 17:46:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 05 Jul 2006 17:46:00 -0000 Subject: Harness fixlet Message-ID: <1152121600.31031.3.camel@tony.toronto.redhat.com> Small fix for yesterday's ErrorStreamPrinter commit. If a test times out the ESP needs to be restarted. 2006-07-05 Anthony Balkissoon * Harness.java: (ErrorStreamPrinter.run): If the readLine() returns null restart the error stream printer. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: ErrorStreamWriterFix.diff Type: text/x-patch Size: 821 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Jul 7 11:57:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 07 Jul 2006 11:57:00 -0000 Subject: FYI: MetalIconFactory tests Message-ID: <44AE4C07.1050607@object-refinery.com> This patch (committed) updates most of the icon tests to check that the UIResource interface is implemented: 2006-07-07 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getCheckBoxIcon.java (test): Add check for UIResource, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getCheckBoxMenuItemIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getFileChooserDetailViewIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getFileChooserHomeFolderIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getFileChooserListViewIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getFileChooserNewFolderIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getFileChooserUpFolderIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getHorizontalSliderThumbIcon.java (test): Add check for UIResource, change test for cached result, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getInternalFrameAltMaximizeIcon.java (test): Add check for UIResource, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getInternalFrameCloseIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getInternalFrameDefaultMenuIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getInternalFrameMaximizeIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getInternalFrameMinimizeIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getMenuArrowIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getMenuItemArrowIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getRadioButtonIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getRadioButtonMenuItemIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getTreeComputerIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getTreeControlIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getTreeFloppyDriveIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getTreeFolderIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getTreeHardDriveIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getTreeLeafIcon.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/MetalIconFactory/getVerticalSliderThumbIcon.java (test): Add check for UIResource, change test for cached result. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From kennke@aicas.com Fri Jul 7 12:01:00 2006 From: kennke@aicas.com (Roman Kennke) Date: Fri, 07 Jul 2006 12:01:00 -0000 Subject: New Component tests Message-ID: <44AE4CE6.3040003@aicas.com> Here come two new tests that back up a recent patch for Component. 2006-07-07 Roman Kennke * gnu/testlet/java/awt/Component/setFont.java: New file. * gnu/testlet/java/awt/Component/isValid.java: New file. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: setFont.java Type: text/x-java Size: 2346 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: isValid.java Type: text/x-java Size: 1648 bytes Desc: not available URL: From kennke@aicas.com Fri Jul 7 12:10:00 2006 From: kennke@aicas.com (Roman Kennke) Date: Fri, 07 Jul 2006 12:10:00 -0000 Subject: FYI: New Container test Message-ID: <44AE4EF7.1020708@aicas.com> This new test backs up a change that I made in Classpath recently. 2006-07-07 Roman Kennke * gnu/testlet/java/awt/Container/setLayout.java: New file. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: setLayout.java Type: text/x-java Size: 2294 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Jul 7 13:39:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 07 Jul 2006 13:39:00 -0000 Subject: FYI: BasicArrowButton test updates Message-ID: <44AE63FB.5000205@object-refinery.com> This patch (committed) adds some more checks for the getMax/Min/PreferredSize() methods: 2006-07-07 David Gilbert * gnu/testlet/javax/swing/plaf/basic/BasicArrowButton/getMaximumSize.java (test): Check modification of return value, * gnu/testlet/javax/swing/plaf/basic/BasicArrowButton/getMinimumSize.java (test): Likewise, * gnu/testlet/javax/swing/plaf/basic/BasicArrowButton/getPreferredSize.java (test): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Fri Jul 7 15:40:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 07 Jul 2006 15:40:00 -0000 Subject: FYI: AbstractButton.setRolloverIcon - new test Message-ID: <44AE807B.90904@object-refinery.com> This patch (committed) adds a couple of new tests for the AbstractButton class: 2006-07-07 David Gilbert * gnu/testlet/javax/swing/AbstractButton/setRolloverIcon.java: New test, * gnu/testlet/javax/swing/AbstractButton/setRolloverSelectedIcon.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Fri Jul 7 16:23:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 07 Jul 2006 16:23:00 -0000 Subject: FYI: AbstractButton.setHorizontal/VerticalAlignment() tests Message-ID: <44AE8A92.9030201@object-refinery.com> This patch (committed) adds a couple of new tests for the AbstractButton class: 2006-07-07 David Gilbert * gnu/testlet/javax/swing/AbstractButton/setHorizontalAlignment.java: New test, * gnu/testlet/javax/swing/AbstractButton/setVerticalAlignment.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From tbento@redhat.com Fri Jul 7 20:09:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 07 Jul 2006 20:09:00 -0000 Subject: FYI: GetName test for java.awt Classes Message-ID: <1152302943.2268.176.camel@toad.toronto.redhat.com> Hey, This mauve test checks that name is generated in the same way as Sun's. 2006-07-07 Tania Bento * gnu/testlet/java/awt/testName.java: New test. Cheers, Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 7015 bytes Desc: not available URL: From mark@klomp.org Sat Jul 8 21:17:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sat, 08 Jul 2006 21:17:00 -0000 Subject: FYI [builder] push timeout to 3 minutes Message-ID: <1152393429.5641.26.camel@localhost.localdomain> Hi, I pushed the timeout on builder to 3 minutes to see if that makes some crypto tests pass. 2006-07-08 Mark Wielaard * scripts/Mauve: Push timeout to 3 minutes. Committed and installed, Mark --- Mauve 19 Jun 2006 15:59:18 -0000 1.1.1.1 +++ Mauve 8 Jul 2006 20:38:13 -0000 @@ -24,7 +24,7 @@ #./configure --with-ecj-jar=/home/cpdev/Nightly/ && ./configure --with-ecj-jar=/home/cpdev/Nightly/ecj/ecj.jar && make && -xvfb-run jamvm -Xnocompact Harness gnu.testlet -vm jamvm -showpasses -timeout 120000 +xvfb-run jamvm -Xnocompact Harness gnu.testlet -vm jamvm -showpasses -timeout 180000 ) # Report "mauve -vs- jamvm" $? Log.Std -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From mark@klomp.org Sun Jul 9 17:53:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 09 Jul 2006 17:53:00 -0000 Subject: FYi: TimerWatcher race fix Message-ID: <1152467601.15533.4.camel@localhost.localdomain> Hi, I found a race in the TimerWatcher. It has an isAlive() method and the runTest() method would check that to see whether to start() or reset() it. Since there is a small window where isAlive() could return false, but the Thread was already started I made reset() do the check itself. 2006-07-07 Mark Wielaard * Harness.java (runTest): Just reset runner_watcher. (TimerWatcher.started): New boolean field. (TimerWatcher.start): Removed method. (TimerWatcher.isAlive): Removed method. (reset): Start Thread if not yet started. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: patch Type: text/x-patch Size: 2132 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From david.gilbert@object-refinery.com Mon Jul 10 05:19:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 10 Jul 2006 05:19:00 -0000 Subject: FYI: New javax.swing tests Message-ID: <44B1F11D.1010804@object-refinery.com> This patch (committed) adds some new tests: 2006-07-10 David Gilbert * gnu/testlet/javax/swing/AbstractButton/setHorizontalTextPosition.java: New file, * gnu/testlet/javax/swing/AbstractButton/setVerticalTextPosition.java: New file, * gnu/testlet/javax/swing/Timer/setDelay.java: New file, * gnu/testlet/javax/swing/Timer/setInitialDelay.java: New file, * gnu/testlet/javax/swing/ToolTipManager/setDismissDelay.java: New file, * gnu/testlet/javax/swing/ToolTipManager/setInitialDelay.java: New file, * gnu/testlet/javax/swing/ToolTipManager/setReshowDelay.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From mwringe@redhat.com Mon Jul 10 15:51:00 2006 From: mwringe@redhat.com (Matthew Wringe) Date: Mon, 10 Jul 2006 15:51:00 -0000 Subject: FYI: New Security Engine getInstance Test Message-ID: <1152546701.2606.8.camel@toque.toronto.redhat.com> This patch, commited, adds a new test to java.security.Engine.getInstance. This new test checks that algorithm names are being accepted as case insensitive. Thanks, Matt Wringe. Changelog: 2006-07-10 Matt Wringe * gnu/testlet/java/security/Engine/getInstance.java (testAlgorithmCase): New Test. Tests algorithm name case insensitivity. -------------- next part -------------- A non-text attachment was scrubbed... Name: Mauve-getInstance.patch Type: text/x-patch Size: 5533 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Jul 11 09:38:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 11 Jul 2006 09:38:00 -0000 Subject: FYI: BufferedImage constructor tests Message-ID: <44B371A9.7060309@object-refinery.com> This patch (committed) adds some checks for the BufferedImage(int, int, int) constructor, to cover a fix I committed to GNU Classpath earlier today: 2006-07-11 David Gilbert * gnu/testlet/java/awt/image/BufferedImage/constructors.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Tue Jul 11 09:42:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 11 Jul 2006 09:42:00 -0000 Subject: FYI: Reinstate SRCDIR Message-ID: <20060711094210.GA3720@redhat.com> Hi all, This commit reinstates the SRCDIR autoconf substitution, which was lost in a previous commit. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1782 diff -u -r1.1782 ChangeLog --- ChangeLog 11 Jul 2006 09:36:54 -0000 1.1782 +++ ChangeLog 11 Jul 2006 09:40:23 -0000 @@ -1,3 +1,8 @@ +2006-07-11 Gary Benson + + * configure.in: Reinstated SRCDIR. + * configure: Regenerated. + 2006-07-11 David Gilbert * gnu/testlet/java/awt/image/BufferedImage/constructors.java: New file. Index: configure.in =================================================================== RCS file: /cvs/mauve/mauve/configure.in,v retrieving revision 1.19 diff -u -r1.19 configure.in --- configure.in 14 Jun 2006 19:28:27 -0000 1.19 +++ configure.in 11 Jul 2006 09:40:23 -0000 @@ -53,6 +53,8 @@ JAVAC=${JAVAC-javac} AC_SUBST(JAVAC) +SRCDIR=`(cd $srcdir; pwd)` +AC_SUBST(SRCDIR) dnl Specify the tempdir. AC_ARG_WITH(tmpdir, Index: configure =================================================================== RCS file: /cvs/mauve/mauve/configure,v retrieving revision 1.31 diff -u -r1.31 configure --- configure 14 Jun 2006 19:28:27 -0000 1.31 +++ configure 11 Jul 2006 09:40:24 -0000 @@ -272,7 +272,7 @@ PACKAGE_BUGREPORT= ac_unique_file="gnu/testlet/Testlet.java" -ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CHECK_PATH_SEPARATOR CHECK_FILE_SEPARATOR CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE TEST_JAVA EMMA ECJ_JAR AUTO_COMPILE JAVA JAVAC TMPDIR MAIL_HOST LIBOBJS LTLIBOBJS' +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar build build_cpu build_vendor build_os host host_cpu host_vendor host_os CHECK_PATH_SEPARATOR CHECK_FILE_SEPARATOR CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE TEST_JAVA EMMA ECJ_JAR AUTO_COMPILE JAVA JAVAC SRCDIR TMPDIR MAIL_HOST LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. @@ -2955,6 +2955,8 @@ JAVAC=${JAVAC-javac} +SRCDIR=`(cd $srcdir; pwd)` + # Check whether --with-tmpdir or --without-tmpdir was given. @@ -3702,6 +3704,7 @@ s,@AUTO_COMPILE@,$AUTO_COMPILE,;t t s,@JAVA@,$JAVA,;t t s,@JAVAC@,$JAVAC,;t t +s,@SRCDIR@,$SRCDIR,;t t s,@TMPDIR@,$TMPDIR,;t t s,@MAIL_HOST@,$MAIL_HOST,;t t s,@LIBOBJS@,$LIBOBJS,;t t From gbenson@redhat.com Tue Jul 11 10:52:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 11 Jul 2006 10:52:00 -0000 Subject: FYI: TestSecurityManager enhancement Message-ID: <20060711105215.GC3720@redhat.com> Hi again, This commit makes the test security manager inhibit checks except within testcases. It relies on the fact that all testcases must begin with a call to prepareChecks() and end either when checkAllChecked() is called or when checkPermission() throws an exception. Because it is known when testcases start and end, we can inhibit checking outside of testcases. This stops the security manager stomping on GCJ's line number process, as well allowing a bunch of hacks to be removed. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1783 diff -u -r1.1783 ChangeLog --- ChangeLog 11 Jul 2006 09:40:52 -0000 1.1783 +++ ChangeLog 11 Jul 2006 09:54:21 -0000 @@ -1,3 +1,13 @@ +2006-07-11 Gary Benson + + * gnu/testlet/TestSecurityManager.java: Add new "enabled" flag. + (install): Disable self before setting security manager. + (uninstall): Likewise. + (prepareChecks): Enable self after preparing checks. + (checkPermission): Don't check unless enabled, and disable self + before throwing exceptions. + (checkAllChecked): Disable self before checking. + 2006-07-11 Gary Benson * configure.in: Reinstated SRCDIR. Index: gnu/testlet/TestSecurityManager.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/TestSecurityManager.java,v retrieving revision 1.2 diff -u -r1.2 TestSecurityManager.java --- gnu/testlet/TestSecurityManager.java 27 Jun 2006 12:23:38 -0000 1.2 +++ gnu/testlet/TestSecurityManager.java 11 Jul 2006 09:54:21 -0000 @@ -23,8 +23,6 @@ package gnu.testlet; import java.security.Permission; -import java.security.SecurityPermission; -import java.util.PropertyPermission; /** * A security manager for testing that security checks are performed. @@ -66,6 +64,11 @@ private Permission[] mayCheck; /** + * Whether we are enabled or not. + */ + private boolean enabled; + + /** * Must-check permissions are flagged as they are checked. */ private boolean[] checked; @@ -115,12 +118,7 @@ throw new IllegalStateException("already installed"); oldManager = oldsm; - // On some JVMs, setting the security manager for the first time - // triggers some initialization that reads system properties. - prepareChecks(noChecks, new Permission[] { - new SecurityPermission("getProperty.*"), - new PropertyPermission("*", "read")}); - + enabled = false; System.setSecurityManager(this); } @@ -134,9 +132,7 @@ if (oldsm != this) throw new IllegalStateException("not installed"); - prepareChecks(noChecks, new Permission[] { - new RuntimePermission("setSecurityManager")}); - + enabled = false; System.setSecurityManager(oldManager); } @@ -213,8 +209,10 @@ { this.mayCheck = mayCheck; this.mustCheck = mustCheck; - this.checked = new boolean[mustCheck.length]; this.isHalting = isHalting; + + checked = new boolean[mustCheck.length]; + enabled = true; } /** @@ -230,6 +228,9 @@ */ public void checkPermission(Permission perm) throws SecurityException { + if (!enabled) + return; + if (harness != null) harness.debug("checkPermission(" + perm + ")"); @@ -247,6 +248,8 @@ } if (!matched) { + enabled = false; + harness.debug("unexpected check: " + perm); if (mustCheck.length != 0) { @@ -272,8 +275,10 @@ if (!checked[i]) allChecked = false; } - if (allChecked) + if (allChecked) { + enabled = false; throw successException; + } } } @@ -283,6 +288,8 @@ */ public void checkAllChecked() { + enabled = false; + boolean allChecked = true; for (int i = 0; i < checked.length; i++) { if (!checked[i]) { From david.gilbert@object-refinery.com Tue Jul 11 14:41:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 11 Jul 2006 14:41:00 -0000 Subject: FYI: ButtonGroup tests Message-ID: <44B3B895.4040908@object-refinery.com> This patch (committed) adds some new tests for the ButtonGroup class: 2006-07-11 David Gilbert * gnu/testlet/javax/swing/ButtonGroup/add.java: New file, * gnu/testlet/javax/swing/ButtonGroup/constructor.java: New file, * gnu/testlet/javax/swing/ButtonGroup/getButtonCount.java: New file, * gnu/testlet/javax/swing/ButtonGroup/getElements.java: New file, * gnu/testlet/javax/swing/ButtonGroup/getSelection.java: New file, * gnu/testlet/javax/swing/ButtonGroup/isSelected.java: New file, * gnu/testlet/javax/swing/ButtonGroup/remove.java: New file, * gnu/testlet/javax/swing/ButtonGroup/setSelected.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Tue Jul 11 15:15:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 11 Jul 2006 15:15:00 -0000 Subject: FYI: DefaultBoundedRangeModel test updates Message-ID: <44B3C0BF.7000708@object-refinery.com> This patch (committed) adds a new test for basic serialization of the DefaultBoundedRangeModel class (to cover a fix committed to GNU Classpath earlier today), and renames an existing test (because it had the same name as the class being tested, which gets in the way for other tests): 2006-07-11 David Gilbert * gnu/testlet/javax/swing/DefaultBoundedRangeModel/DefaultBoundedRangeModel.java: Renamed general.java, * gnu/testlet/javax/swing/DefaultBoundedRangeModel/general.java: New file, * gnu/testlet/javax/swing/DefaultBoundedRangeModel/serialization.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From mwringe@redhat.com Tue Jul 11 16:12:00 2006 From: mwringe@redhat.com (Matthew Wringe) Date: Tue, 11 Jul 2006 16:12:00 -0000 Subject: FYI: New TestOfCipherInit test Message-ID: <1152634316.25864.4.camel@toque.toronto.redhat.com> This patch, already commited, adds a new test to gnu.javax.crypto.jce.TestOfCipherEngineInit. This tests the initialization of a Cipher with an IVParameterSpec. Thanks, Matt Wringe. 2006-07-11 Matt Wringe * gnu/testlet/gnu/javax/crypto/jce/TestOfCipherEngineInit.java (testInitWithIVParameterSpec): New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: Crypto-TestOfCipherEngineInit.diff Type: text/x-patch Size: 5264 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Jul 11 17:05:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 11 Jul 2006 17:05:00 -0000 Subject: FYI: JTable - new tests Message-ID: <44B3DA6E.40902@object-refinery.com> This patch (committed) adds a couple of tests to cover changes I committed to GNU Classpath CVS earlier today: 2006-07-11 David Gilbert * gnu/testlet/javax/swing/JTable/setColumnSelectionAllowed.java: New test, * gnu/testlet/javax/swing/JTable/setRowSelectionAllowed.java: Likewise. Regards, Dave From neugens@limasoftware.net Tue Jul 11 18:37:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Tue, 11 Jul 2006 18:37:00 -0000 Subject: RFC: new mauve test Message-ID: <1152643151.2630.5.camel@localhost.localdomain> This patch introduces a new mauve test used to prove the correctness of the my clone patch for CubicSegment. This is not a complete test for the whole class, just a test for clone. If you find it useful, I'll commit. Also, I'm a bit unsure about the class tag, so if you know a better one, please tell me. Ciao, Mario 2006-07-11 Mario Torre * gnu/testlet/java/awt/java2d/CubicSegmentTest.java: New test. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve_java2d_clone_2006-07-11.patch Type: text/x-patch Size: 3021 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Questa ? una parte del messaggio firmata digitalmente URL: From mwringe@redhat.com Tue Jul 11 19:27:00 2006 From: mwringe@redhat.com (Matthew Wringe) Date: Tue, 11 Jul 2006 19:27:00 -0000 Subject: FYI: New TestOfSecretKeySpec Message-ID: <1152646039.25864.11.camel@toque.toronto.redhat.com> Hi, The attached file, already committed, adds tests for javax.crypto.spec.SecretKeySpec. It is currently not a complete coverage test, and only tests the equals() method. Thanks, Matt Wringe Changelog: 2006-07-11 Matt Wringe * gnu/testlet/javax/crypto/spec/TestOfSecretKeySpec.java: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: TestOfSecretKeySpec.java Type: text/x-java Size: 3572 bytes Desc: not available URL: From mark@klomp.org Tue Jul 11 21:39:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 11 Jul 2006 21:39:00 -0000 Subject: RFC: new mauve test In-Reply-To: <1152643151.2630.5.camel@localhost.localdomain> References: <1152643151.2630.5.camel@localhost.localdomain> Message-ID: <1152653758.5640.37.camel@localhost.localdomain> Hi Mario, On Tue, 2006-07-11 at 20:39 +0200, Mario Torre wrote: > This patch introduces a new mauve test used to prove the correctness of > the my clone patch for CubicSegment. > > This is not a complete test for the whole class, just a test for clone. > > If you find it useful, I'll commit. In general I would recommend trying to find a way to test through some public non-implementation class (maybe BasicStroke or Area), that way the test will keep working even when the class is renamed or moved to some other implementation package. > Also, I'm a bit unsure about the class tag, so if you know a better one, > please tell me. Use Tags: GNU if it is a GNU specific implementation test. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From david.gilbert@object-refinery.com Thu Jul 13 11:28:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 13 Jul 2006 11:28:00 -0000 Subject: FYI: SampleModel - new tests Message-ID: <44B62E6E.2040602@object-refinery.com> This patch (committed) adds some tests for the SampleModel class: 2006-07-13 David Gilbert * gnu/testlet/java/awt/image/SampleModel/createDataBuffer.java: New file, * gnu/testlet/java/awt/image/SampleModel/getPixel.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/getPixels.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/getSample.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/getSampleDouble.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/getSampleFloat.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/getSamples.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/getSampleSize.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/setPixel.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/setPixels.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/setSample.java: Likewise, * gnu/testlet/java/awt/image/SampleModel/setSamples.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From tbento@redhat.com Thu Jul 13 16:04:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 13 Jul 2006 16:04:00 -0000 Subject: FYI: New test for Component's invalidate() Message-ID: <1152806692.14745.13.camel@toad.toronto.redhat.com> Hey, I just added one more test for the invalidate() method in Component.java. Cheers, Tania 2006-07-13 Tania Bento * gnu/testlet/java/awt/Component/invalidate.java (test2): Added new test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1488 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Jul 13 16:04:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 13 Jul 2006 16:04:00 -0000 Subject: FYI: SinglePixelPackedSampleModel - extended test Message-ID: <44B66F17.3030405@object-refinery.com> This patch (committed) extends a test for the SinglePixelPackedSampleModel class, to cover a bug that I just fixed in GNU Classpath CVS: 2006-07-13 David Gilbert * gnu/testlet/java/awt/image/SinglePixelPackedSampleModel/getSampleSize.java (test): Moved existing test code to test1(), now calls test1() and test2(); (test1): New method, (test2): New method. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Thu Jul 13 16:46:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 13 Jul 2006 16:46:00 -0000 Subject: FYI: MultiPixelPackedSampleModel - new tests Message-ID: <44B67924.3030406@object-refinery.com> This patch (committed) adds some new tests for the MultiPixelPackedSampleModel class: 2006-07-13 David Gilbert * gnu/testlet/java/awt/image/MultiPixelPackedSample/constructors.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSample/createCompatibleSampleModel.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSample/createDataBuffer.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSample/equals.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Fri Jul 14 10:19:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 14 Jul 2006 10:19:00 -0000 Subject: FYI: Minor File throwpoint tests cleanup Message-ID: <20060714101934.GC18211@redhat.com> Hi all, This commit removes some old junk from the File throwpoint tests. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1797 diff -u -r1.1797 ChangeLog --- ChangeLog 14 Jul 2006 04:54:22 -0000 1.1797 +++ ChangeLog 14 Jul 2006 10:13:09 -0000 @@ -1,3 +1,7 @@ +2006-07-14 Gary Benson + + * gnu/testlet/java/io/File/security.java: Remove dummy mayCheck stuff. + 2006-07-14 raif * gnu/testlet/gnu/javax/crypto/kwa/TestOfAESKeyWrap.java: New test. Index: gnu/testlet/java/io/File/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/File/security.java,v retrieving revision 1.12 diff -u -r1.12 security.java --- gnu/testlet/java/io/File/security.java 27 Jun 2006 12:23:38 -0000 1.12 +++ gnu/testlet/java/io/File/security.java 14 Jul 2006 10:13:09 -0000 @@ -52,9 +52,6 @@ File tmpfile2 = new File(tmpdir, "testfile2"); harness.check(tmpfile2.delete() || !tmpfile2.exists()); - Permission[] noPerms = new Permission[1]; - noPerms[0] = new RuntimePermission("shutdownHooks"); - Permission tmpdirReadPerm = new FilePermission(tmpdir.toString(), "read"); Permission tmpdirWritePerm = @@ -96,7 +93,7 @@ // throwpoint: java.io.File-canWrite-DIR harness.checkPoint("dir.canWrite"); try { - sm.prepareChecks(new Permission[]{tmpdirWritePerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirWritePerm}); tmpdir.canWrite(); sm.checkAllChecked(); } @@ -108,7 +105,7 @@ // throwpoint: java.io.File-canRead-DIR harness.checkPoint("dir.canRead"); try { - sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirReadPerm}); tmpdir.canRead(); sm.checkAllChecked(); } @@ -120,7 +117,7 @@ // throwpoint: java.io.File-createNewFile harness.checkPoint("file.createNewFile"); try { - sm.prepareChecks(new Permission[]{tmpfileWritePerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpfileWritePerm}); tmpfile.createNewFile(); sm.checkAllChecked(); } @@ -132,7 +129,7 @@ // throwpoint: java.io.File-delete-FILE harness.checkPoint("file.delete"); try { - sm.prepareChecks(new Permission[]{tmpfileDeletePerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpfileDeletePerm}); tmpfile.delete(); sm.checkAllChecked(); } @@ -144,7 +141,7 @@ // throwpoint: java.io.File-list(FilenameFilter) harness.checkPoint("dir.list(null)"); try { - sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirReadPerm}); tmpdir.list(null); sm.checkAllChecked(); } @@ -156,7 +153,7 @@ // throwpoint: java.io.File-list harness.checkPoint("dir.list()"); try { - sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirReadPerm}); tmpdir.list(); sm.checkAllChecked(); } @@ -168,7 +165,7 @@ // throwpoint: java.io.File-listFiles harness.checkPoint("dir.listFiles()"); try { - sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirReadPerm}); tmpdir.listFiles(); sm.checkAllChecked(); } @@ -180,7 +177,7 @@ // throwpoint: java.io.File-listFiles(FilenameFilter) harness.checkPoint("dir.listFiles(FilenameFilter)"); try { - sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirReadPerm}); tmpdir.listFiles((FilenameFilter) null); sm.checkAllChecked(); } @@ -193,7 +190,7 @@ // throwpoint: java.io.File-listFiles(FileFilter) harness.checkPoint("dir.listFiles(FileFilter)"); try { - sm.prepareChecks(new Permission[]{tmpdirReadPerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirReadPerm}); tmpdir.listFiles((FileFilter) null); sm.checkAllChecked(); } @@ -219,7 +216,7 @@ // throwpoint: java.io.File-createTempFile(String, String, File) harness.checkPoint("createTempFile(3-args)"); try { - sm.prepareChecks(new Permission[]{tmpdirallWritePerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirallWritePerm}); tf2 = File.createTempFile("pfx", "sfx", tmpdir); sm.checkAllChecked(); } @@ -231,7 +228,7 @@ // throwpoint: java.io.File-setReadOnly-DIR harness.checkPoint("dir.setReadOnly"); try { - sm.prepareChecks(new Permission[]{tmpdir2WritePerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdir2WritePerm}); tmpdir2.setReadOnly(); sm.checkAllChecked(); } @@ -244,7 +241,7 @@ // Make sure we remove the read only temp dir harness.checkPoint("dir.delete"); try { - sm.prepareChecks(new Permission[]{tmpdir2DeletePerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdir2DeletePerm}); tmpdir2.delete(); sm.checkAllChecked(); } @@ -256,7 +253,7 @@ // throwpoint: java.io.File-listRoots harness.checkPoint("listRoots()"); try { - sm.prepareChecks(new Permission[]{rootReadPerm}, noPerms); + sm.prepareChecks(new Permission[]{rootReadPerm}); File[] roots = File.listRoots(); harness.check(roots.length >= 1, "File.listRoots()"); sm.checkAllChecked(); @@ -270,8 +267,7 @@ harness.checkPoint("file.renameTo"); try { sm.prepareChecks(new Permission[]{tmpfileWritePerm, - tmpfile2WritePerm}, - noPerms); + tmpfile2WritePerm}); tmpfile.renameTo(tmpfile2); sm.checkAllChecked(); } @@ -283,7 +279,7 @@ // throwpoint: java.io.File-setLastModified-DIR harness.checkPoint("dir.setLastModified()"); try { - sm.prepareChecks(new Permission[]{tmpdirWritePerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirWritePerm}); tmpdir.setLastModified(0); sm.checkAllChecked(); } @@ -295,7 +291,7 @@ // throwpoint: java.io.File-deleteOnExit-DIR harness.checkPoint("dir.deleteOnExit()"); try { - sm.prepareChecks(new Permission[]{tmpdirDeletePerm}, noPerms); + sm.prepareChecks(new Permission[]{tmpdirDeletePerm}); tmpdir.deleteOnExit(); sm.checkAllChecked(); } From david.gilbert@object-refinery.com Fri Jul 14 13:55:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 14 Jul 2006 13:55:00 -0000 Subject: FYI: MultiPixelPackedSampleModel.createDataBuffer() test updated Message-ID: <44B7A289.4000003@object-refinery.com> This patch (committed) extends the test for MultiPixelPackedSampleModel.createDataBuffer(): 2006-07-14 David Gilbert * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/createDataBuffer.java (test): Added new checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Fri Jul 14 14:15:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 14 Jul 2006 14:15:00 -0000 Subject: FYI: MultiPixelPackedSampleModel - new tests Message-ID: <44B7A74D.7040309@object-refinery.com> This patch (committed) adds new tests for the MultiPixelPackedSampleModel class: 2006-07-14 David Gilbert * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/createSubsetSampleModel.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getBitOffset.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getDataBitOffset.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getOffset.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getPixel.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getPixelBitStride.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getSample.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getSampleSize.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getScanlineStride.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getTransferType.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/hashCode.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/setPixel.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/setSample.java: New test. Regards, Dave From mwringe@redhat.com Fri Jul 14 14:17:00 2006 From: mwringe@redhat.com (Matthew Wringe) Date: Fri, 14 Jul 2006 14:17:00 -0000 Subject: FYI: Update to TestOfCipherEngineInit Message-ID: <1152886654.25864.79.camel@toque.toronto.redhat.com> Hi, I have updated the TestOfCipherEngineInit.testInitWithIvParameterSpec to properly fail when expected exceptions do not occur. The following patch has already been commited. Thanks, Matt Wringe Changelog: 2006-07-14 Matt Wringe * gnu/testlet/gnu/javax/crypto/jce/TestOfCipherEngineInit.java (testInitWithIVParameterSpec): Properly fail when expected exception does not occur. -------------- next part -------------- A non-text attachment was scrubbed... Name: Mauve-TestOfCipherEngineInit.patch Type: text/x-patch Size: 3128 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Jul 14 16:23:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 14 Jul 2006 16:23:00 -0000 Subject: FYI: MultiPixelPackedSampleModel - new tests Message-ID: <44B7C51A.6050409@object-refinery.com> This patch (committed) adds a couple more tests for the MultiPixelPackedSampleModel class: 2006-07-14 David Gilbert * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getDataElements.java: New test, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/setDataElements.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From cn-develop@gmx.net Fri Jul 14 21:00:00 2006 From: cn-develop@gmx.net (Carsten Neumann) Date: Fri, 14 Jul 2006 21:00:00 -0000 Subject: RFC: Test for java.lang.StrictMath#cbrt Message-ID: <44B805FF.3030100@gmx.net> Hi, attached is a new test for the cbrt method of StrictMath. This file should probably be placed as gnu/testlet/java/lang/StrictMath/cbrt.java which I can't add since I don't have write access to the cvs, hence this is not a proper patch, just the file, sorry. Please comment and/or commit. Thanks, Carsten 2006-07-14 Carsten Neumann * gnu/testlet/java/lang/StrictMath/cbrt.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: cbrt.java Type: text/x-java Size: 2212 bytes Desc: not available URL: From tromey@redhat.com Fri Jul 14 21:14:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Fri, 14 Jul 2006 21:14:00 -0000 Subject: RFC: Test for java.lang.StrictMath#cbrt In-Reply-To: <44B805FF.3030100@gmx.net> References: <44B805FF.3030100@gmx.net> Message-ID: >>>>> "Carsten" == Carsten Neumann writes: Carsten> Please comment and/or commit. Let's set you up with commit access so you can check it in yourself. Tom From sven@physto.se Sun Jul 16 04:30:00 2006 From: sven@physto.se (Sven de Marothy) Date: Sun, 16 Jul 2006 04:30:00 -0000 Subject: UUID tests. Message-ID: <1153024184.2832.7.camel@qcplx01.physto.se> I commited a java.util.UUID impl. Here's a full set of tests (AFAIK), we pass them all. /Sven -------------- next part -------------- A non-text attachment was scrubbed... Name: UUID.java Type: text/x-java Size: 11198 bytes Desc: not available URL: From sven@physto.se Sun Jul 16 04:31:00 2006 From: sven@physto.se (Sven de Marothy) Date: Sun, 16 Jul 2006 04:31:00 -0000 Subject: UUID tests. oops In-Reply-To: <1153024184.2832.7.camel@qcplx01.physto.se> References: <1153024184.2832.7.camel@qcplx01.physto.se> Message-ID: <1153024279.2832.10.camel@qcplx01.physto.se> Whoops, my brain wasn't with my, I attached the impl and not the tests. Here are the tests. They go in the java.util.UUID package as expected. /Sven On Sun, 2006-07-16 at 06:29 +0200, Sven de Marothy wrote: > I commited a java.util.UUID impl. > > Here's a full set of tests (AFAIK), we pass them all. > > /Sven -------------- next part -------------- A non-text attachment was scrubbed... Name: TestAll.java Type: text/x-java Size: 8168 bytes Desc: not available URL: From david.gilbert@object-refinery.com Mon Jul 17 14:02:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 17 Jul 2006 14:02:00 -0000 Subject: FYI: More java.awt.image.* tests Message-ID: <44BB9878.2030402@object-refinery.com> This patch (committed) adds/updates some tests for the SampleModel classes: 2006-07-17 David Gilbert * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/getBitOffset.java (test): Added new checks, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/setDataElements.java (test): Call new test methods, (testBadTransferArray): New method, (testNullTransferArray): New method, * gnu/testlet/java/awt/image/MultiPixelPackedSampleModel/setSample.java (test): Call new test methods, (testTYPE_USHORT): New method, (testTYPE_BYTE): New method, * gnu/testlet/java/awt/image/SampleModel/getPixel.java (testMethod1): Add new checks, * gnu/testlet/java/awt/image/SampleModel/getPixels.java (test): Call new test method, (testMethod1MultiPixelPackedSampleModel): New method, * gnu/testlet/java/awt/image/SinglePixelPackedSampleModel.java (test2): Added new check. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Mon Jul 17 16:35:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 17 Jul 2006 16:35:00 -0000 Subject: FYI: ComponentSampleModel - new tests Message-ID: <44BBBC5B.9050504@object-refinery.com> This patch (committed) adds some new tests for the ComponentSampleModel class: 2006-07-17 David Gilbert * gnu/testlet/java/awt/image/ComponentSampleModel/constructors.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/createDataBuffer.java: New file * gnu/testlet/java/awt/image/ComponentSampleModel/equals.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/hashCode.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/MyComponentSampleModel.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Tue Jul 18 11:48:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 18 Jul 2006 11:48:00 -0000 Subject: FYI: Fix File.deleteOnExit() throwpoint check Message-ID: <20060718114818.GC3038@redhat.com> Hi all, This commit fixes the File.deleteOnExit() throwpoint check on Classpath, which performs some privileged checks that were not being allowed. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1806 diff -u -r1.1806 ChangeLog --- ChangeLog 17 Jul 2006 16:34:25 -0000 1.1806 +++ ChangeLog 18 Jul 2006 11:45:09 -0000 @@ -1,3 +1,7 @@ +2006-07-18 Gary Benson + + * gnu/testlet/java/io/File/security.java: Fix deleteOnExit test. + 2006-07-17 David Gilbert * gnu/testlet/java/awt/image/ComponentSampleModel/constructors.java: New file, Index: gnu/testlet/java/io/File/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/File/security.java,v retrieving revision 1.13 diff -u -r1.13 security.java --- gnu/testlet/java/io/File/security.java 14 Jul 2006 10:13:56 -0000 1.13 +++ gnu/testlet/java/io/File/security.java 18 Jul 2006 11:45:09 -0000 @@ -82,6 +82,11 @@ Permission tmpdirPropPerm = new PropertyPermission("java.io.tmpdir", "read"); + Permission modifyThreadGroup = + new RuntimePermission("modifyThreadGroup"); + Permission shutdownHooks = + new RuntimePermission("shutdownHooks"); + // Keep a record of created temp files so we can delete them later. File tf1 = null; File tf2 = null; @@ -291,7 +296,8 @@ // throwpoint: java.io.File-deleteOnExit-DIR harness.checkPoint("dir.deleteOnExit()"); try { - sm.prepareChecks(new Permission[]{tmpdirDeletePerm}); + sm.prepareChecks(new Permission[]{tmpdirDeletePerm}, + new Permission[]{modifyThreadGroup, shutdownHooks}); tmpdir.deleteOnExit(); sm.checkAllChecked(); } From david.gilbert@object-refinery.com Tue Jul 18 16:59:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 18 Jul 2006 16:59:00 -0000 Subject: FYI: More tests for java.awt.image.* Message-ID: <44BD1357.6050609@object-refinery.com> This patch (committed) adds a number of new tests for java.awt.image.*: 2006-07-18 David Gilbert * gnu/testlet/java/awt/image/ByteLookupTable/constructors.java: New test, * gnu/testlet/java/awt/image/ByteLookupTable/getTable.java: New test, * gnu/testlet/java/awt/image/ComponentSampleModel/constructors.java (testDefensiveCopies): Check m2 not m, * gnu/testlet/java/awt/image/ComponentSampleModel/createDataBuffer.java (test): Call new methods, (testSingleBand): New method, (testMultiBand): New method, * gnu/testlet/java/awt/image/ComponentSampleModel/getOffset.java: New test, * gnu/testlet/java/awt/image/ComponentSampleModel/getPixel.java: New test, * gnu/testlet/java/awt/image/ComponentSampleModel/getSample.java: New test, * gnu/testlet/java/awt/image/ComponentSampleModel/getSampleDouble.java: New test, * gnu/testlet/java/awt/image/ComponentSampleModel/getSampleFloat.java: New test, * gnu/testlet/java/awt/image/LookupOp/constructor.java: New test, * gnu/testlet/java/awt/image/LookupOp/createCompatibleDestRaster.java: New test, * gnu/testlet/java/awt/image/LookupOp/getBounds2D.java: New test, * gnu/testlet/java/awt/image/LookupOp/getPoint2D.java: New test, * gnu/testlet/java/awt/image/LookupOp/getRenderingHints.java: New test, * gnu/testlet/java/awt/image/LookupOp/getTable.java: New test, * gnu/testlet/java/awt/image/LookupTable/constructor.java: New test, * gnu/testlet/java/awt/image/LookupTable/getNumComponents.java: New test, * gnu/testlet/java/awt/image/LookupTable/getOffset.java: New test, * gnu/testlet/java/awt/image/LookupTable/MyLookupTable.java: New class, * gnu/testlet/java/awt/image/ShortLookupTable/constructors.java: New test, * gnu/testlet/java/awt/image/ShortLookupTable/getTable.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From fkung@redhat.com Tue Jul 18 18:20:00 2006 From: fkung@redhat.com (Francis Kung) Date: Tue, 18 Jul 2006 18:20:00 -0000 Subject: FYI: JComboBox tests Message-ID: <1153246825.2463.9.camel@to-fcjpp2.toronto.redhat.com> This patch (committed) expands the robot tests with JComboBox. 2006-07-18 Francis Kung * gnu/testlet/javax/swing/JComboBox/ComboRobot.java: organized imports (combo): Added item to combo box. (testCombo): Added additional tests for key selector. Francis -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-jcombobox.diff Type: text/x-patch Size: 2821 bytes Desc: not available URL: From fkung@redhat.com Tue Jul 18 18:34:00 2006 From: fkung@redhat.com (Francis Kung) Date: Tue, 18 Jul 2006 18:34:00 -0000 Subject: FYI: JComboBox tests In-Reply-To: <1153246825.2463.9.camel@to-fcjpp2.toronto.redhat.com> References: <1153246825.2463.9.camel@to-fcjpp2.toronto.redhat.com> Message-ID: <1153247681.2463.15.camel@to-fcjpp2.toronto.redhat.com> Sorry for the extra mail - meant to include this in the last commit. Adds editable-combobox tests to the robot tests. 2006-07-18 Francis Kung * gnu/testlet/javax/swing/JComboBox/ComboRobot.java (testCombo): Added parameter for editable comboboxes (test): Added iteration for editable comboboxes. Francis On Tue, 2006-07-18 at 14:20 -0400, Francis Kung wrote: > This patch (committed) expands the robot tests with JComboBox. > > 2006-07-18 Francis Kung > > * gnu/testlet/javax/swing/JComboBox/ComboRobot.java: organized > imports > (combo): Added item to combo box. > (testCombo): Added additional tests for key selector. > > > Francis > -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-jcombobox2.diff Type: text/x-patch Size: 3181 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Jul 18 22:01:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 18 Jul 2006 22:01:00 -0000 Subject: FYI: LookupTable test fix Message-ID: <44BD6802.2040704@object-refinery.com> This patch (committed) marks the MyLookupTable class as 'not-a-test'. 2006-07-18 David Gilbert * gnu/testlet/java/awt/image/LookupTable/MyLookupTable.java: Changed tag to 'not-a-test'. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jul 19 04:29:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 19 Jul 2006 04:29:00 -0000 Subject: FYI: ComponentSampleModel - new tests Message-ID: <44BDC2BE.5050507@object-refinery.com> This patch (committed) adds some new tests for the ComponentSampleModel class: 2006-07-19 David Gilbert * gnu/testlet/java/awt/image/ComponentSampleModel/createCompatibleSampleModel.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/createSubsetSampleModel.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/getBandOffsets.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/getDataElements.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/getNumDataElements.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/getPixel.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/getPixels.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/getPixelStride.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/getSamples.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/getSampleSize.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/getScanlineStride.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/setDataElements.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/setPixel.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/setPixels.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/setSample.java: New file, * gnu/testlet/java/awt/image/ComponentSampleModel/setSamples.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jul 19 05:19:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 19 Jul 2006 05:19:00 -0000 Subject: FYI: ComponentSampleModel - test updates Message-ID: <44BDCE93.6030901@object-refinery.com> This patch (committed) updates a couple of tests for the ComponentSampleModel class: 2006-07-19 David Gilbert * gnu/testlet/java/awt/image/ComponentSampleModel/constructors.java (testConstructor2): Added checks, * gnu/testlet/java/awt/image/ComponentSampleModel/getPixel.java (testMethod1): Restore IllegalArgumentException checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Wed Jul 19 15:10:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 19 Jul 2006 15:10:00 -0000 Subject: FYI: ConvolveOp - new tests Message-ID: <44BE4B50.4030801@object-refinery.com> This patch (committed) adds some new tests for the ConvolveOp class: 2006-07-19 David Gilbert * gnu/testlet/java/awt/image/ConvolveOp/filter.java: New test, * gnu/testlet/java/awt/image/ConvolveOp/getBounds2D.java: New test, * gnu/testlet/java/awt/image/ConvolveOp/getEdgeCondition.java: New test, * gnu/testlet/java/awt/image/ConvolveOp/getPoint2D.java: New test, * gnu/testlet/java/awt/image/ConvolveOp/getRenderingHints.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From cn-develop@gmx.net Thu Jul 20 19:23:00 2006 From: cn-develop@gmx.net (Carsten Neumann) Date: Thu, 20 Jul 2006 19:23:00 -0000 Subject: RFC: Test for java.lang.StrictMath#cbrt In-Reply-To: <44B805FF.3030100@gmx.net> References: <44B805FF.3030100@gmx.net> Message-ID: <44BFD83C.90006@gmx.net> Hi, i commited this on 2006-07-20 as 2006-07-20 Carsten Neumann * gnu/testlet/java/lang/StrictMath/cbrt.java: New test. Carsten Neumann wrote: > Hi, > > attached is a new test for the cbrt method of StrictMath. > This file should probably be placed as > gnu/testlet/java/lang/StrictMath/cbrt.java > which I can't add since I don't have write access to the cvs, hence this > is not a proper patch, just the file, sorry. > > Please comment and/or commit. > > Thanks, > Carsten > > 2006-07-14 Carsten Neumann > > * gnu/testlet/java/lang/StrictMath/cbrt.java: New test. > > -------------- next part -------------- A non-text attachment was scrubbed... Name: java.lang.StrictMath.cbrt-2006-07-20.diff Type: text/x-patch Size: 2698 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Jul 21 03:10:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 21 Jul 2006 03:10:00 -0000 Subject: FYI: Kernel.java - new tests Message-ID: <44C05341.7090506@object-refinery.com> This patch (committed) adds some tests for the Kernel class: 2006-07-21 David Gilbert * gnu/testlet/java/awt/image/Kernel/constructor.java: New test, * gnu/testlet/java/awt/image/Kernel/getHeight.java: New test, * gnu/testlet/java/awt/image/Kernel/getKernelData.java: New test, * gnu/testlet/java/awt/image/Kernel/getWidth.java: New test, * gnu/testlet/java/awt/image/Kernel/getXOrigin.java: New test, * gnu/testlet/java/awt/image/Kernel/getYOrigin.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From cn-develop@gmx.net Sat Jul 22 14:49:00 2006 From: cn-develop@gmx.net (Carsten Neumann) Date: Sat, 22 Jul 2006 14:49:00 -0000 Subject: FYI: java.lang.StrictMath.expm1 new test Message-ID: <44C23B08.6010107@gmx.net> Hi, this (commited) patch adds a new test for expm1(double) Cheers, Carsten 2006-07-22 Carsten Neumann * gnu/testlet/java/lang/StrictMath/expm1.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: java.lang.StrictMath.expm1-2006-07-22.diff Type: text/x-patch Size: 4166 bytes Desc: not available URL: From david.gilbert@object-refinery.com Sun Jul 23 05:14:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Sun, 23 Jul 2006 05:14:00 -0000 Subject: FYI: Kernel.constructor() test update Message-ID: <44C31347.9070103@object-refinery.com> This patch (committed) relaxes the test for the constructor in the Kernel class to allow an IllegalArgumentException for a negative height or width. The required behaviour isn't specified, but matching the reference implementation's NegativeArraySizeException doesn't seem necessary - relaxing this test allows GNU Classpath to pass the test: 2006-07-23 David Gilbert * gnu/testlet/java/awt/image/Kernel/constructor.java (test): Allow IllegalArgumentException for null width or height. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From mark@klomp.org Sun Jul 23 12:49:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 23 Jul 2006 12:49:00 -0000 Subject: [builder] Add plugins, local-sockets, collections and qt-peer to default configure Message-ID: <1153658951.2943.41.camel@dijkstra.wildebeest.org> Hi, After fixing some of these configure options for the upcoming classpath release I thought it would be a good idea to add them to the default autobuilder: 2006-07-23 Mark Wielaard * scripts/Classpath: Remove --enable-gtk-cairo. Add --enable-plugin, --enable-collections, --enable-local-sockets and --enable-qt-peer. cairo is the default now. Committed, Mark diff -u -r1.2 Classpath --- scripts/Classpath 19 Jun 2006 19:53:33 -0000 1.2 +++ scripts/Classpath 23 Jul 2006 12:48:54 -0000 @@ -47,7 +47,9 @@ exec > Log 2>&1 ../classpath/configure --prefix=$(cd ../jikes-install && pwd) \ - --with-jikes --enable-gtk-cairo --enable-xmlj --enable-Werror && + --with-jikes --enable-xmlj --enable-Werror \ + --enable-plugin --enable-collections --enable-local-sockets \ + --enable-qt-peer && make all install ) cp jikes-build/lib/glibj.zip /var/www/dist/glibj-latest.zip From casey.s.marshall@gmail.com Sun Jul 23 21:35:00 2006 From: casey.s.marshall@gmail.com (Casey Marshall) Date: Sun, 23 Jul 2006 21:35:00 -0000 Subject: FYI: test for DecimalFormat.format(BigInteger) Message-ID: Hi. This adds a test for whether or not DecimalFormat formats BigInteger properly (see PR 28462). 2006-07-23 Casey Marshall * gnu/testlet/java/text/DecimalFormat/format.java (test): call `testBigInteger' too. (testBigInteger): new method. ### Eclipse Workspace Patch 1.0 #P mauve Index: gnu/testlet/java/text/DecimalFormat/format.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/DecimalFormat/ format.java,v retrieving revision 1.9 diff -u -r1.9 format.java --- gnu/testlet/java/text/DecimalFormat/format.java 7 Dec 2005 14:44:36 -0000 1.9 +++ gnu/testlet/java/text/DecimalFormat/format.java 23 Jul 2006 21:24:20 -0000 @@ -27,6 +27,7 @@ import gnu.testlet.TestHarness; import gnu.testlet.Testlet; +import java.math.BigInteger; import java.text.DecimalFormat; import java.util.Locale; @@ -37,6 +38,7 @@ testGeneral(harness); testRounding(harness); testMiscellaneous(harness); + testBigInteger(harness); } public void apply (TestHarness harness, DecimalFormat df, String pattern) @@ -210,4 +212,20 @@ Locale.setDefault(original); } + + /** + * See PR 28462. + */ + private void testBigInteger(TestHarness harness) + { + Locale orig = Locale.getDefault(); + Locale.setDefault(Locale.US); + harness.checkPoint("BigInteger format"); + String expect = "123,456,789,012,345,678,901,234,567,890"; + BigInteger bi = new BigInteger("123456789012345678901234567890", 10); + + DecimalFormat df = new DecimalFormat(); + harness.check(df.format(bi), expect); + Locale.setDefault(orig); + } } -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 478 bytes Desc: This is a digitally signed message part URL: From neugens@limasoftware.net Mon Jul 24 00:59:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Mon, 24 Jul 2006 00:59:00 -0000 Subject: FYI: new tests for DecimalFormat.format Message-ID: <1153702958.2688.17.camel@localhost.localdomain> I have added a couple of tests for NaN and Infinity. I also reformatted the class as my eclipse started to mess all the indentation. Changelog: 2006-07-24 Mario Torre * gnu/testlet/java/text/DecimalFormat/format.java: class reformatted. (test): added two new tests: testNaN and testInfinity. (testInfinity): new test. (testNaN): new test. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve_decimal_format.patch Type: text/x-patch Size: 11583 bytes Desc: not available URL: From cn-develop@gmx.net Mon Jul 24 17:19:00 2006 From: cn-develop@gmx.net (Carsten Neumann) Date: Mon, 24 Jul 2006 17:19:00 -0000 Subject: FYI: StrictMath.cosh new test, cbrt update Message-ID: <44C50110.4030504@gmx.net> This committed patch adds a new test and adds the ability to print the expected values by running the main method of cbrt.java on the RI (the other StrictMath tests already have this). Cheers, Carsten 2006-07-24 Carsten Neumann * gnu/testlet/java/lang/StrictMath/cosh.java: New test. * gnu/testlet/java/lang/StrictMath/cbrt.java (main): New method. -------------- next part -------------- A non-text attachment was scrubbed... Name: java.lang.StrictMath-2006-07-24.diff Type: text/x-patch Size: 4822 bytes Desc: not available URL: From mark@klomp.org Mon Jul 24 22:59:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Mon, 24 Jul 2006 22:59:00 -0000 Subject: FYI: Little cleanup Message-ID: <1153779889.31881.7.camel@hermans.wildebeest.org> Hi, Here are some small cleanups that helped me when going through the mauve results recently: 2006-07-23 Mark Wielaard * gnu/testlet/javax/swing/JSpinner/constructors.java: Remove println. * gnu/testlet/javax/swing/text/DefaultEditorKit/getActions.java: Likewise. * gnu/testlet/javax/swing/text/AbstractDocument/filterTest.java: Add extra debug output on exception. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: cleanups.patch Type: text/x-patch Size: 3865 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Jul 25 08:23:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 25 Jul 2006 08:23:00 -0000 Subject: FYI: java.awt.Component.properties.java - test fix Message-ID: <44C5D51F.5070101@object-refinery.com> This patch (committed) fixes a broken test for the Component class: 2006-07-25 David Gilbert * gnu/testlet/java/awt/Component/properties.java (test): 'name' property should fire an event. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Tue Jul 25 09:24:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 25 Jul 2006 09:24:00 -0000 Subject: FYI: TabSet and TabStop - new tests Message-ID: <44C5E385.70400@object-refinery.com> This patch (committed) adds some new tests for the TabSet and TabStop classes: 2006-07-25 David Gilbert * gnu/testlet/javax/swing/text/TabSet/constructor.java: New test, * gnu/testlet/javax/swing/text/TabSet/equals.java: New test, * gnu/testlet/javax/swing/text/TabSet/getTab.java: New test, * gnu/testlet/javax/swing/text/TabSet/getTabCount.java: New test, * gnu/testlet/javax/swing/text/TabSet/getTabIndex.java: New test, * gnu/testlet/javax/swing/text/TabSet/getTabIndexAfter.java: New test, * gnu/testlet/javax/swing/text/TabSet/toString.java: New test, * gnu/testlet/javax/swing/text/TabStop/constructor.java: New test, * gnu/testlet/javax/swing/text/TabStop/toString.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Tue Jul 25 16:01:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Tue, 25 Jul 2006 16:01:00 -0000 Subject: FYI: AccessController.getContext() checks Message-ID: <20060725160059.GA3715@redhat.com> Hi all, This commit adds some basic checks for AccessController.getContext(). I'd like to have made it more complete, but I can't really see how to and all the reflection is making my head ache. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1827 diff -u -r1.1827 ChangeLog --- ChangeLog 25 Jul 2006 09:23:22 -0000 1.1827 +++ ChangeLog 25 Jul 2006 15:57:37 -0000 @@ -1,3 +1,7 @@ +2006-07-25 Gary Benson + + * gnu/testlet/java/security/AccessController/contexts.java: New test. + 2006-07-25 David Gilbert * gnu/testlet/javax/swing/text/TabSet/constructor.java: New test, Index: gnu/testlet/java/security/AccessController/contexts.java =================================================================== RCS file: gnu/testlet/java/security/AccessController/contexts.java diff -N gnu/testlet/java/security/AccessController/contexts.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/security/AccessController/contexts.java 25 Jul 2006 15:57:37 -0000 @@ -0,0 +1,239 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.security.AccessController; + +import java.io.File; +import java.io.FileInputStream; +import java.io.FileOutputStream; +import java.io.FilePermission; +import java.lang.reflect.Constructor; +import java.lang.reflect.Field; +import java.lang.reflect.Method; +import java.net.URL; +import java.net.URLClassLoader; +import java.security.AccessController; +import java.security.AccessControlContext; +import java.security.Permission; +import java.security.PermissionCollection; +import java.security.ProtectionDomain; +import java.util.Enumeration; +import java.util.LinkedList; +import java.util.jar.JarEntry; +import java.util.jar.JarOutputStream; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; + +// In this test we load three different instances of ourself from +// three different jarfiles with three different classloaders. Each +// classloader has a different protection domain in which that +// classloader's jarfile is readable. Some context-hopping is done, +// and we determine success by checking our protection domains to see +// which jarfile read permissions we find. + +public class contexts implements Testlet +{ + public void test(TestHarness harness) + { + // The bits where we access protection domains is Classpath-specific. + if (System.getProperty("gnu.classpath.version") == null) + return; + + File jars[] = new File[] {null, null}; + try { + harness.checkPoint("setup"); + + // Make jarfiles containing this class and its dependencies + String base = new File(harness.getTempDirectory(), "ac").getPath(); + + jars[0] = new File(base + "1.jar"); + JarOutputStream jos = new JarOutputStream(new FileOutputStream(jars[0])); + copyClass(harness.getSourceDirectory(), jos, getClass()); + copyClass(harness.getSourceDirectory(), jos, TestHarness.class); + copyClass(harness.getSourceDirectory(), jos, TestObject.class); + jos.close(); + + for (int i = 1; i < jars.length; i++) { + jars[i] = new File(base + (i + 1) + ".jar"); + copyFile(jars[0], jars[i]); + } + + // Create instances of ourself loaded from different loaders + TestObject testObjects[] = new TestObject[jars.length]; + for (int i = 0; i < jars.length; i++) { + Class testClass = new URLClassLoader(new URL[] { + jars[i].toURL()}, null).loadClass(getClass().getName()); + harness.check( + getClass().getClassLoader() != testClass.getClassLoader()); + Constructor c = testClass.getConstructor(new Class[] {String.class}); + testObjects[i] = new TestObject(c.newInstance(new Object[] {base})); + } + + // Run the tests + test(harness, testObjects[0], testObjects[1]); + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + finally { + for (int i = 0; i < jars.length; i++) { + if (jars[i].exists()) + jars[i].delete(); + } + } + } + + // Copy a classfile and its dependencies into a jarfile + private static void copyClass(String srcdir, JarOutputStream jos, Class cls) + throws Exception + { + String relpath = cls.getName().replace(".", File.separator) + ".class"; + + File file = new File(srcdir, relpath); + if (file.exists()) { + byte[] bytes = new byte[(int) file.length()]; + FileInputStream fis = new FileInputStream(file); + fis.read(bytes); + fis.close(); + + jos.putNextEntry(new JarEntry(relpath)); + jos.write(bytes, 0, bytes.length); + } + + Class superclass = cls.getSuperclass(); + if (superclass != null) + copyClass(srcdir, jos, superclass); + Class[] interfaces = cls.getInterfaces(); + for (int i = 0; i < interfaces.length; i++) + copyClass(srcdir, jos, interfaces[i]); + } + + // Make a copy of a file + private static void copyFile(File src, File dst) throws Exception + { + byte[] bytes = new byte[(int) src.length()]; + FileInputStream fis = new FileInputStream(src); + fis.read(bytes); + fis.close(); + + FileOutputStream fos = new FileOutputStream(dst); + fos.write(bytes); + fos.close(); + } + + // Constructor for the main object that Mauve creates + public contexts() + { + } + + // Constructor for the sub-objects that the main object creates + private String base = null; + public contexts(String base) + { + this.base = base; + } + + // Wrapper to hide the pain of reflection + private static class TestObject + { + private Object object; + + public TestObject(Object object) + { + this.object = object; + } + + public String[] listJarsOf(TestObject other) throws Exception + { + Method method = object.getClass().getMethod( + "listJarsOf", new Class[] {Object.class}); + return (String[]) method.invoke(object, new Object[] {other.object}); + } + } + + public String[] listJarsOf(Object object) throws Exception + { + Method method = object.getClass().getMethod("listJars", new Class[0]); + return (String[]) method.invoke(object, new Object[0]); + } + + public String[] listJars() throws Exception + { + AccessControlContext ctx = AccessController.getContext(); + // XXX start of classpath-specific code + Field field = ctx.getClass().getDeclaredField("protectionDomains"); + field.setAccessible(true); + ProtectionDomain[] domains = (ProtectionDomain[]) field.get(ctx); + // XXX end of classpath-specific code + + LinkedList jars = new LinkedList(); + for (int i = 0; i < domains.length; i++) { + PermissionCollection perms = domains[i].getPermissions(); + for (Enumeration e = perms.elements(); e.hasMoreElements() ;) { + Permission p = (Permission) e.nextElement(); + if (!(p instanceof FilePermission)) + continue; + String path = p.getName(); + if (path.length() == base.length() + 5 + && path.startsWith(base) + && Character.isDigit(path.charAt(base.length())) + && path.endsWith(".jar")) + jars.add(path); + } + } + return (String[]) jars.toArray(new String[jars.size()]); + } + + // Perform the tests + private static void test( + TestHarness harness, TestObject caller, TestObject callee) + throws Exception + { + // Each object should see only its own jar when listing itself + harness.checkPoint("self-listing"); + + String[] jars = caller.listJarsOf(caller); + harness.check(jars.length == 1); + String caller_jar = jars[0]; + + jars = callee.listJarsOf(callee); + harness.check(jars.length == 1); + String callee_jar = jars[0]; + + harness.check(!caller_jar.equals(callee_jar)); + + // When one object calls another's lister both object's jars + // should be visible. + harness.checkPoint("straight other-listing"); + + jars = caller.listJarsOf(callee); + boolean caller_seen = false; + boolean callee_seen = false; + for (int i = 0; i < jars.length; i++) { + if (jars[i].equals(caller_jar)) + caller_seen = true; + else if (jars[i].equals(callee_jar)) + callee_seen = true; + } + harness.check(jars.length == 2 && caller_seen && callee_seen); + } +} From mark@klomp.org Tue Jul 25 23:09:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 25 Jul 2006 23:09:00 -0000 Subject: FYI: remove trailing chars from FAIL lines Message-ID: <1153868963.3039.45.camel@dijkstra.wildebeest.org> Hi, To make it easier for a regression tester to see changes between PASS and FAIL lines they have to be as similar as possible. This patch removes some trailing chars in a couple of places. If everything is setup right then every PASS and FAIL line should only have ": " and the (short) test class name on them now. 2006-07-25 Mark Wielaard * Harness.java: Remove all trailing chars from FAIL output. * RunnerProcess.java: Likewise. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: FAIL.patch Type: text/x-patch Size: 2514 bytes Desc: not available URL: From casey.s.marshall@gmail.com Wed Jul 26 00:11:00 2006 From: casey.s.marshall@gmail.com (Casey Marshall) Date: Wed, 26 Jul 2006 00:11:00 -0000 Subject: FYI: PKITS tests. In-Reply-To: References: Message-ID: <1139ECD9-1670-45C8-B2EC-104ED9BF099D@gmail.com> I've checked in the PKITS test suite classes and test data, like I mentioned I would. There are a huge number of files in this checkin, and a lot of them are binary, so I'll omit a patch here. You can look at the test classes in gnu/testlet/java/security/cert/ pkix/pkits; the certificate and CRL test data are in the subdirs data/ certs and data/crls, respectively. Thanks. -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 478 bytes Desc: This is a digitally signed message part URL: From tbento@redhat.com Wed Jul 26 14:05:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 26 Jul 2006 14:05:00 -0000 Subject: FYI: List.java tests Message-ID: <1153922734.2282.19.camel@toad.toronto.redhat.com> Hey, This test tests some methods in List.java Tania 2006-07-25 Tania Bento * gnu/testlet/java/awt/List/testSelected.java: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 12773 bytes Desc: not available URL: From theBohemian@gmx.net Wed Jul 26 15:22:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Wed, 26 Jul 2006 15:22:00 -0000 Subject: FYI: a new JTAbbedPane test Message-ID: <44C788B0.5060705@gmx.net> Hi, the attached patch adds a small test for JTabbedPane.remove. ChangeLog: 2006-07-25 Robert Schuster * gnu/testlet/javax/swing/JTabbedPane/remove.java: New test. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-jtp-remove.diff Type: text/x-patch Size: 3449 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 253 bytes Desc: OpenPGP digital signature URL: From mark@klomp.org Wed Jul 26 20:19:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Wed, 26 Jul 2006 20:19:00 -0000 Subject: FYI: Harness.TimeoutWatcher should handly Object.wait(timeout) early return. Message-ID: <1153945143.9399.62.camel@dijkstra.wildebeest.org> Hi, Sometimes Object.wait(timeout) can return early. This seems to happen a lot with cacao. And seems to be allowed. So we need to keep track of the actual wait time left. 2006-07-26 Mark Wielaard * Harness.java (TimeoutWatcher.run): Keep track of timeout wait time left. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: Harness-timeout.patch Type: text/x-patch Size: 1321 bytes Desc: not available URL: From roman@kennke.org Wed Jul 26 21:06:00 2006 From: roman@kennke.org (Roman Kennke) Date: Wed, 26 Jul 2006 21:06:00 -0000 Subject: FYI: New KeyboardFocusManager tests Message-ID: <44C7D92E.9070407@kennke.org> Here come a couple of KeyboardFocusManager related tests that back up my latest patch, and show that we are overly restrictive wrt SecurityExceptions here. 2006-07-26 Roman Kennke * gnu/testlet/java/awt/KeyboardFocusManager/TestKeyboardFocusManager.java, * gnu/testlet/java/awt/KeyboardFocusManager/getFocusOwner.java, * gnu/testlet/java/awt/KeyboardFocusManager/getGlobalFocusOwner.java, * gnu/testlet/java/awt/KeyboardFocusManager/getGlobalPermanentFocusOwner.java: New tests. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2268 bytes Desc: not available URL: From abalkiss@redhat.com Wed Jul 26 21:39:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 26 Jul 2006 21:39:00 -0000 Subject: Exception line number fix Message-ID: <1153949932.2457.71.camel@tony.toronto.redhat.com> Roman pointed out that the line number we were returning as the FAIL line number didn't always make sense. This patch fixes the problem. 2006-07-26 Anthony Balkissoon * RunnerProcess.java: (exceptionDetails): Line number doesn't need to come from the test() method, removed that "if". --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: ExceptionLineNumber.diff Type: text/x-patch Size: 626 bytes Desc: not available URL: From tromey@redhat.com Thu Jul 27 15:53:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Thu, 27 Jul 2006 15:53:00 -0000 Subject: Patch: FYI: test case for PR 28486 Message-ID: <17608.57359.457294.199042@localhost.localdomain> I'm checking this in. This is a test case derived from PR 28486. Tom 2006-07-27 Tom Tromey PR classpath/28486: * gnu/testlet/java/net/URL/URLTest.java (test_Basics): Added 'equals' test. Index: gnu/testlet/java/net/URL/URLTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/URL/URLTest.java,v retrieving revision 1.18 diff -u -r1.18 URLTest.java --- gnu/testlet/java/net/URL/URLTest.java 28 Feb 2006 23:52:56 -0000 1.18 +++ gnu/testlet/java/net/URL/URLTest.java 27 Jul 2006 15:52:36 -0000 @@ -114,8 +114,11 @@ harness.check (url.getFile(), "/index.html"); harness.check (url.equals(new URL("http://sources.redhat.com/index.html"))); - URL url1 = new URL ( "http", "sources.redhat.com", 80, "index.html"); + URL url1 = new URL ( "http", "sources.redhat.com", 80, "/index.html"); harness.check (url1.getPort(), 80); + harness.check(url.equals(url1)); + harness.check(url1.toExternalForm(), + "http://sources.redhat.com:80/index.html"); } catch ( MalformedURLException e ){ harness.fail(" Error in test_Basics - 16 " + From neugens@limasoftware.net Thu Jul 27 23:23:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Thu, 27 Jul 2006 23:23:00 -0000 Subject: FIY: new tests for DecimalFormat Message-ID: <1154042813.2642.8.camel@localhost.localdomain> These tests, committed, are used to check some combination of the setMaximumIntegerDigits and setMaximumFractionDigits parameters in DecimalFormat. The goal of these tests is to have compatibility with the RI, though I have to admit that sometimes the RI does weird things... The test should fail on the current classpath, but not on the implementation I'm currently working on. 2006-07-28 Mario Torre * gnu/testlet/java/text/DecimalFormat/format.java (test): Added new test 'testMaximumDigits'. (testMaximumDigits): New test for some configuration of setMaximumIntegerDigits and setMaximumFractionDigits. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve_decimal_format.patch Type: text/x-patch Size: 1860 bytes Desc: not available URL: From kennke@aicas.com Fri Jul 28 10:55:00 2006 From: kennke@aicas.com (Roman Kennke) Date: Fri, 28 Jul 2006 10:55:00 -0000 Subject: FYI: Component.getLocationOnScreen() test Message-ID: <44C9ECFD.8090105@aicas.com> This tests if my new iterative approach to getLocationOnScreen() is ok, wrt to having intermediate lightweight components that override getLocationOnScreen() in weird ways. Yes it is, and the recursive approach is actually wrong. 2006-07-28 Roman Kennke * gnu/testlet/java/awt/Component/getLocationOnScreen.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2841 bytes Desc: not available URL: From kennke@aicas.com Fri Jul 28 11:04:00 2006 From: kennke@aicas.com (Roman Kennke) Date: Fri, 28 Jul 2006 11:04:00 -0000 Subject: FYI: Cleanup of the javax.swing.text tests Message-ID: <44C9EF2C.2030107@aicas.com> Here comes some cleanup that I did in the javax.swing.text tests, as well as a couple of new tests that have been lying around on my HD. 2006-07-28 Roman Kennke * gnu/testlet/javax/swing/text/AbstractDocument/getDocumentProperties.java: Removed debug output. * gnu/testlet/javax/swing/text/AbstractDocument/BranchElement/getElementIndex.java: New test. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure4.java: Changed tests to do check(x, y) rather than check(x == y), so that the wrong value gets recognized by Mauve. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/ElementStructure8.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/StyledDocument2.java: Likewise. * gnu/testlet/javax/swing/text/DefaultStyledDocument/ElementBuffer/insert.java (testNewlines2): New test. * gnu/testlet/javax/swing/text/FlowView/FlowStrategy/TestView.java: New helper class. * gnu/testlet/javax/swing/text/FlowView/FlowStrategy/adjustRow.java: New test. * gnu/testlet/javax/swing/text/FlowView/TestFlowView.java: Fixed. * gnu/testlet/javax/swing/text/PlainDocument/getRootElements.java: Fixed test. * gnu/testlet/javax/swing/text/Utilities/getBreakLocation.java: New test. * gnu/testlet/javax/swing/text/View/getMaximumSpan.java: Added comment. * gnu/testlet/javax/swing/text/html/parser/ParserDelegator/parsingTester.java: Fixed test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 43835 bytes Desc: not available URL: From gbenson@redhat.com Fri Jul 28 13:39:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 28 Jul 2006 13:39:00 -0000 Subject: FYI: AccessController.getContext() checks extended Message-ID: <20060728133943.GF3675@redhat.com> Hi all, This commit extends the AccessController.getContext() checks I wrote on Tuesday. The original test checked that the returned context contained all protection domains in the call stack. With this commit it also checks that the returned context does not contain protection domains masked by calls to AccessController.doPrivileged(). This is actually what I was trying to achieve the other day before the lethal cocktail of heat, reflection and the AccessController Javadoc overcame me. Cheers, Gary PS If there's a competition for the most insane testcase then this is my entry. -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1839 diff -u -r1.1839 ChangeLog --- ChangeLog 28 Jul 2006 11:03:22 -0000 1.1839 +++ ChangeLog 28 Jul 2006 13:27:52 -0000 @@ -1,3 +1,10 @@ +2006-07-28 Gary Benson + + * gnu/testlet/java/security/AccessController/contexts.java + (copyClass): Copy inner classes too. + (callListJarsOf, callPrivilegedListJarsOf): New methods. + (test): Extend to test AccessController.doPrivileged(). + 2006-07-28 Roman Kennke * gnu/testlet/javax/swing/text/AbstractDocument/getDocumentProperties.java: Index: gnu/testlet/java/security/AccessController/contexts.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/security/AccessController/contexts.java,v retrieving revision 1.1 diff -u -r1.1 contexts.java --- gnu/testlet/java/security/AccessController/contexts.java 25 Jul 2006 15:58:20 -0000 1.1 +++ gnu/testlet/java/security/AccessController/contexts.java 28 Jul 2006 13:27:52 -0000 @@ -22,6 +22,7 @@ import java.io.File; import java.io.FileInputStream; +import java.io.FileFilter; import java.io.FileOutputStream; import java.io.FilePermission; import java.lang.reflect.Constructor; @@ -33,6 +34,7 @@ import java.security.AccessControlContext; import java.security.Permission; import java.security.PermissionCollection; +import java.security.PrivilegedAction; import java.security.ProtectionDomain; import java.util.Enumeration; import java.util.LinkedList; @@ -45,9 +47,9 @@ // In this test we load three different instances of ourself from // three different jarfiles with three different classloaders. Each // classloader has a different protection domain in which that -// classloader's jarfile is readable. Some context-hopping is done, -// and we determine success by checking our protection domains to see -// which jarfile read permissions we find. +// classloader's jarfile is readable. All kinds of context-hopping is +// performed, and we infer which protection domains are in our stack +// by seeing which jarfile read permissions we can see. public class contexts implements Testlet { @@ -57,7 +59,7 @@ if (System.getProperty("gnu.classpath.version") == null) return; - File jars[] = new File[] {null, null}; + File jars[] = new File[] {null, null, null}; try { harness.checkPoint("setup"); @@ -68,7 +70,6 @@ JarOutputStream jos = new JarOutputStream(new FileOutputStream(jars[0])); copyClass(harness.getSourceDirectory(), jos, getClass()); copyClass(harness.getSourceDirectory(), jos, TestHarness.class); - copyClass(harness.getSourceDirectory(), jos, TestObject.class); jos.close(); for (int i = 1; i < jars.length; i++) { @@ -88,7 +89,7 @@ } // Run the tests - test(harness, testObjects[0], testObjects[1]); + test(harness, testObjects); } catch (Exception ex) { harness.debug(ex); @@ -106,17 +107,34 @@ private static void copyClass(String srcdir, JarOutputStream jos, Class cls) throws Exception { - String relpath = cls.getName().replace(".", File.separator) + ".class"; + File root = new File(srcdir, cls.getName().replace(".", File.separator)); + final String rootpath = root.getPath(); + int chop = srcdir.length() + File.separator.length(); + + File dir = root.getParentFile(); + if (dir.isDirectory()) { + File[] files = dir.listFiles(new FileFilter() { + public boolean accept(File file) { + String path = file.getPath(); + if (path.endsWith(".class")) { + path = path.substring(0, path.length() - 6); + if (path.equals(rootpath)) + return true; + if (path.startsWith(rootpath + "$")) + return true; + } + return false; + } + }); + for (int i = 0; i < files.length; i++) { + byte[] bytes = new byte[(int) files[i].length()]; + FileInputStream fis = new FileInputStream(files[i]); + fis.read(bytes); + fis.close(); - File file = new File(srcdir, relpath); - if (file.exists()) { - byte[] bytes = new byte[(int) file.length()]; - FileInputStream fis = new FileInputStream(file); - fis.read(bytes); - fis.close(); - - jos.putNextEntry(new JarEntry(relpath)); - jos.write(bytes, 0, bytes.length); + jos.putNextEntry(new JarEntry(files[i].getPath().substring(chop))); + jos.write(bytes, 0, bytes.length); + } } Class superclass = cls.getSuperclass(); @@ -168,6 +186,24 @@ "listJarsOf", new Class[] {Object.class}); return (String[]) method.invoke(object, new Object[] {other.object}); } + + public String[] callListJarsOf(TestObject caller, TestObject callee) + throws Exception + { + Method method = object.getClass().getMethod( + "callListJarsOf", new Class[] {Object.class, Object.class}); + return (String[]) method.invoke( + object, new Object[] {caller.object, callee.object}); + } + + public String[] callPrivilegedListJarsOf( + TestObject caller, TestObject callee) throws Exception + { + Method method = object.getClass().getMethod( + "callPrivilegedListJarsOf", new Class[] {Object.class, Object.class}); + return (String[]) method.invoke( + object, new Object[] {caller.object, callee.object}); + } } public String[] listJarsOf(Object object) throws Exception @@ -176,6 +212,38 @@ return (String[]) method.invoke(object, new Object[0]); } + public String[] callListJarsOf(Object caller, Object callee) + throws Exception + { + Method method = caller.getClass().getMethod( + "listJarsOf", new Class[] {Object.class}); + return (String[]) method.invoke(caller, new Object[] {callee}); + } + + public String[] callPrivilegedListJarsOf(Object caller, Object callee) + throws Exception + { + Method method = caller.getClass().getMethod( + "privilegedListJarsOf", new Class[] {Object.class}); + return (String[]) method.invoke(caller, new Object[] {callee}); + } + + public String[] privilegedListJarsOf(final Object object) throws Exception + { + final Method method = object.getClass().getMethod( + "listJars", new Class[0]); + return (String[]) AccessController.doPrivileged(new PrivilegedAction() { + public Object run() { + try { + return method.invoke(object, new Object[0]); + } + catch (Exception e) { + return e; + } + } + }); + } + public String[] listJars() throws Exception { AccessControlContext ctx = AccessController.getContext(); @@ -204,36 +272,74 @@ } // Perform the tests - private static void test( - TestHarness harness, TestObject caller, TestObject callee) + private static void test(TestHarness harness, TestObject[] objects) throws Exception { - // Each object should see only its own jar when listing itself + // Each object should see only its own protection domain harness.checkPoint("self-listing"); - String[] jars = caller.listJarsOf(caller); - harness.check(jars.length == 1); - String caller_jar = jars[0]; - - jars = callee.listJarsOf(callee); - harness.check(jars.length == 1); - String callee_jar = jars[0]; + String[] jars = new String[objects.length]; + for (int i = 0; i < objects.length; i++) { + String[] result = objects[i].listJarsOf(objects[i]); + harness.check(result.length == 1); + jars[i] = result[0]; + } + for (int i = 0; i < objects.length; i++) { + for (int j = i + 1; j < objects.length; j++) + harness.check(!jars[i].equals(jars[j])); + } + + // When one object calls another both objects' protection domains + // should be present. + harness.checkPoint("straight other-listing"); - harness.check(!caller_jar.equals(callee_jar)); + boolean[] seen = new boolean[jars.length]; + String[] result = objects[0].listJarsOf(objects[1]); + harness.check(result.length == 2); + for (int i = 0; i < seen.length; i++) { + seen[i] = false; + for (int j = 0; j < result.length; j++) { + if (result[j].equals(jars[i])) { + harness.check(!seen[i]); + seen[i] = true; + } + } + } + harness.check(seen[0] && seen[1] && !seen[2]); - // When one object calls another's lister both object's jars - // should be visible. - harness.checkPoint("straight other-listing"); + // When one object calls another that calls another all three + // objects' protection domains should be present. + harness.checkPoint("straight other-other-listing"); + + result = objects[0].callListJarsOf(objects[1], objects[2]); + harness.check(result.length == 3); + for (int i = 0; i < seen.length; i++) { + seen[i] = false; + for (int j = 0; j < result.length; j++) { + if (result[j].equals(jars[i])) { + harness.check(!seen[i]); + seen[i] = true; + } + } + } + harness.check(seen[0] && seen[1] && seen[2]); - jars = caller.listJarsOf(callee); - boolean caller_seen = false; - boolean callee_seen = false; - for (int i = 0; i < jars.length; i++) { - if (jars[i].equals(caller_jar)) - caller_seen = true; - else if (jars[i].equals(callee_jar)) - callee_seen = true; + // When one object calls another that uses doPrivileged to call + // a third then the first object's protection domain should not + // be present. + harness.checkPoint("privileged other-other-listing"); + + result = objects[0].callPrivilegedListJarsOf(objects[1], objects[2]); + harness.check(result.length == 2); + for (int i = 0; i < seen.length; i++) { + seen[i] = false; + for (int j = 0; j < result.length; j++) { + if (result[j].equals(jars[i])) { + harness.check(!seen[i]); + seen[i] = true; + } + } } - harness.check(jars.length == 2 && caller_seen && callee_seen); + harness.check(!seen[0] && seen[1] && seen[2]); } } From abalkiss@redhat.com Fri Jul 28 15:07:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Fri, 28 Jul 2006 15:07:00 -0000 Subject: List test update Message-ID: <1154099245.2457.119.camel@tony.toronto.redhat.com> 2006-07-28 Anthony Balkissoon * gnu/testlet/java/awt/List/testSelected.java: Added more checks. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: ListSelectedUpdate.diff Type: text/x-patch Size: 1747 bytes Desc: not available URL: From cn-develop@gmx.net Sat Jul 29 13:40:00 2006 From: cn-develop@gmx.net (Carsten Neumann) Date: Sat, 29 Jul 2006 13:40:00 -0000 Subject: FYI: StrictMath.sinh new test Message-ID: <44CB6566.9070504@gmx.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 subject says it all. Cheers, Carsten 2006-07-29 Carsten Neumann * gnu/testlet/java/lang/StrictMath/sinh.java: New test. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFEy2Vmd4NEZjs4PvgRArtfAKDLgGmMW+fLipNkGAw8fRWTof552wCeL62b OWNANIEk2pJ7dBu6zTtvShM= =Ar7W -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: java.lang.StrictMath.sinh.diff Type: text/x-patch Size: 3477 bytes Desc: not available URL: From mark@klomp.org Sun Jul 30 20:22:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 30 Jul 2006 20:22:00 -0000 Subject: FYI: GregorianCalendar test for months with 6 weeks Message-ID: <1154290920.4853.24.camel@dijkstra.wildebeest.org> Hi, This tests that even when isLinient is false you can set the week of a month to 5 or 6 if the month actually has that many weeks. 2006-07-30 Mark Wielaard * gnu/testlet/java/util/GregorianCalendar/setWeekOfMonth.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: setWeekOfMonth.java Type: text/x-java Size: 2520 bytes Desc: not available URL: From csm@gnu.org Sun Jul 30 22:34:00 2006 From: csm@gnu.org (Casey Marshall) Date: Sun, 30 Jul 2006 22:34:00 -0000 Subject: FYI: new JSSE tests Message-ID: <2C3B40D1-F812-4CE8-AC5F-2AE3183190F2@gnu.org> This adds tests for the new version of Jessie, which is still pending to be merged back into the generics branch. 2006-07-30 Casey Marshall * gnu/testlet/javax/net/ssl/SSLContext/TestDefaultInit.java, * gnu/testlet/javax/net/ssl/SSLContext/TestGetInstance.java, * gnu/testlet/javax/net/ssl/SSLEngine/AbstractEngineTest.java, * gnu/testlet/javax/net/ssl/SSLEngine/SimplePSKKeyManager.java, * gnu/testlet/javax/net/ssl/SSLEngine/SimpleX509KeyManager.java, * gnu/testlet/javax/net/ssl/SSLEngine/SimpleX509TrustManager.java, * gnu/testlet/javax/net/ssl/SSLEngine/TestGNUHandshake.java, * gnu/testlet/javax/net/ssl/SSLEngine/TestHandshake.java, * gnu/testlet/javax/net/ssl/SSLEngine/TestNoCiphersuites.java, * gnu/testlet/javax/net/ssl/SSLEngine/TestNoProtocols.java: New tests. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 20060730.patch.txt URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: PGP.sig Type: application/pgp-signature Size: 478 bytes Desc: This is a digitally signed message part URL: From kennke@aicas.com Tue Aug 1 13:19:00 2006 From: kennke@aicas.com (Roman Kennke) Date: Tue, 01 Aug 2006 13:19:00 -0000 Subject: FYI: New JTree test Message-ID: <44CF547C.2000408@aicas.com> Added this regression test for Classpath bug #28534. 2006-08-01 Roman Kennke * gnu/testlet/javax/swing/JTree/getCellRenderer.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1912 bytes Desc: not available URL: From tbento@redhat.com Tue Aug 1 16:54:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 01 Aug 2006 16:54:00 -0000 Subject: FYI: New Choice test Message-ID: <1154451284.2282.73.camel@toad.toronto.redhat.com> Hey, Wrote a new mauve test for the remove(int) method in Choice.java. 2006-08-01 Tania Bento * gnu/testlet/java/awt/Choice/remove.java: New test. Cheers, Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3752 bytes Desc: not available URL: From roman@kennke.org Tue Aug 1 20:50:00 2006 From: roman@kennke.org (Roman Kennke) Date: Tue, 01 Aug 2006 20:50:00 -0000 Subject: FYI: New BasicOptionPaneUI Message-ID: <44CFBE87.8000704@kennke.org> Another regression test for a reported bug in Classpath. 2006-08-01 Roman Kennke * gnu/testlet/javax/swing/plaf/basic/BasicOptionPaneUI/PropertyChangeHandler/propertyChange.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3850 bytes Desc: not available URL: From cn-develop@gmx.net Wed Aug 2 18:19:00 2006 From: cn-develop@gmx.net (Carsten Neumann) Date: Wed, 02 Aug 2006 18:19:00 -0000 Subject: FYI: New StrictMath.tanh test Message-ID: <44D0ECBA.6080108@gmx.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Added a test for the tanh function. Cheers, Carsten 2006-08-02 Carsten Neumann * gnu/testlet/java/lang/StrictMath/tanh.java: New test. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE0Oy5d4NEZjs4PvgRAs5BAKCT3deR0A77o1GAp+9xPbVVYVkRyQCeNnI3 uxh6l5WkjoLDpPEpivlEZiM= =4qei -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: java.lang.StrictMath.tanh.diff Type: text/x-patch Size: 3392 bytes Desc: not available URL: From fkung@redhat.com Wed Aug 2 18:30:00 2006 From: fkung@redhat.com (Francis Kung) Date: Wed, 02 Aug 2006 18:30:00 -0000 Subject: FYI: Image op tests Message-ID: <1154543411.1236.36.camel@toycar.toronto.redhat.com> This patch (committed) adds a number of tests to java.awt.AffineTransformOp and BandCombineOp Francis 2006-08-02 Francis Kung * gnu/testlet/java/awt/image/AffineTransformOp/constructors.java, * gnu/testlet/java/awt/image/AffineTransformOp/createCompatibleDestImage.java, * gnu/testlet/java/awt/image/AffineTransformOp/filterImage.java, * gnu/testlet/java/awt/image/AffineTransformOp/filterRaster.java, * gnu/testlet/java/awt/image/AffineTransformOp/getBounds2D.java, * gnu/testlet/java/awt/image/AffineTransformOp/getPoint2D.java, * gnu/testlet/java/awt/image/BandCombineOp/constructors.java, * gnu/testlet/java/awt/image/BandCombineOp/createCompatibleDestRaster.java, * gnu/testlet/java/awt/image/BandCombineOp/filter.java, * gnu/testlet/java/awt/image/BandComgineOp/getBounds2D.java, * gnu/testlet/java/awt/image/BandCombineOp/getPoint2D.java, -------------- next part -------------- A non-text attachment was scrubbed... Name: imageop.diff Type: text/x-patch Size: 48740 bytes Desc: not available URL: From fkung@redhat.com Wed Aug 2 18:34:00 2006 From: fkung@redhat.com (Francis Kung) Date: Wed, 02 Aug 2006 18:34:00 -0000 Subject: FYI: Image op tests In-Reply-To: <1154543411.1236.36.camel@toycar.toronto.redhat.com> References: <1154543411.1236.36.camel@toycar.toronto.redhat.com> Message-ID: <1154543691.1236.37.camel@toycar.toronto.redhat.com> Sorry, meant to say java.awt.image.AffineTransformOp and java.awt.image.BandCombineOp, with 2006-08-02 Francis Kung * gnu/testlet/java/awt/image/AffineTransformOp/constructors.java, * gnu/testlet/java/awt/image/AffineTransformOp/createCompatibleDestImage.java, * gnu/testlet/java/awt/image/AffineTransformOp/filterImage.java, * gnu/testlet/java/awt/image/AffineTransformOp/filterRaster.java, * gnu/testlet/java/awt/image/AffineTransformOp/getBounds2D.java, * gnu/testlet/java/awt/image/AffineTransformOp/getPoint2D.java, * gnu/testlet/java/awt/image/BandCombineOp/constructors.java, * gnu/testlet/java/awt/image/BandCombineOp/createCompatibleDestRaster.java, * gnu/testlet/java/awt/image/BandCombineOp/filter.java, * gnu/testlet/java/awt/image/BandComgineOp/getBounds2D.java, * gnu/testlet/java/awt/image/BandCombineOp/getPoint2D.java: New tests. Francis On Wed, 2006-08-02 at 14:30 -0400, Francis Kung wrote: > This patch (committed) adds a number of tests to > java.awt.AffineTransformOp and BandCombineOp > > Francis > > > 2006-08-02 Francis Kung > > * gnu/testlet/java/awt/image/AffineTransformOp/constructors.java, > * > gnu/testlet/java/awt/image/AffineTransformOp/createCompatibleDestImage.java, > * gnu/testlet/java/awt/image/AffineTransformOp/filterImage.java, > * gnu/testlet/java/awt/image/AffineTransformOp/filterRaster.java, > * gnu/testlet/java/awt/image/AffineTransformOp/getBounds2D.java, > * gnu/testlet/java/awt/image/AffineTransformOp/getPoint2D.java, > * gnu/testlet/java/awt/image/BandCombineOp/constructors.java, > * > gnu/testlet/java/awt/image/BandCombineOp/createCompatibleDestRaster.java, > * gnu/testlet/java/awt/image/BandCombineOp/filter.java, > * gnu/testlet/java/awt/image/BandComgineOp/getBounds2D.java, > * gnu/testlet/java/awt/image/BandCombineOp/getPoint2D.java, > From cn-develop@gmx.net Wed Aug 2 18:41:00 2006 From: cn-develop@gmx.net (Carsten Neumann) Date: Wed, 02 Aug 2006 18:41:00 -0000 Subject: FYI: Fixed comment in StrictMath tests Message-ID: <44D0F1BF.50409@gmx.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Just noted a copy & paste bug in a comment, this fixes it. Cheers, Carsten 2006-08-02 Carsten Neumann * gnu/testlet/java/lang/StrictMath/tanh.java: Fixed comment. * gnu/testlet/java/lang/StrictMath/cosh.java: Likewise. * gnu/testlet/java/lang/StrictMath/sinh.java: Likewise. * gnu/testlet/java/lang/StrictMath/expm1.java: Likewise. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE0PG+d4NEZjs4PvgRArT4AKDGZDUUbJJviWYl2l6SMOAiNHexEACdG/Sx 30/cRqhjLeCJvHPmU60on24= =hIQP -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: StrictMath.comment-fix.diff Type: text/x-patch Size: 2614 bytes Desc: not available URL: From david.gilbert@object-refinery.com Wed Aug 2 19:47:00 2006 From: david.gilbert@object-refinery.com (Dave Gilbert) Date: Wed, 02 Aug 2006 19:47:00 -0000 Subject: FYI: Image op tests In-Reply-To: <1154543411.1236.36.camel@toycar.toronto.redhat.com> References: <1154543411.1236.36.camel@toycar.toronto.redhat.com> Message-ID: <44D100E8.6080703@object-refinery.com> Francis Kung wrote: >This patch (committed) adds a number of tests to >java.awt.AffineTransformOp and BandCombineOp > > > Excellent! >+ >+// You should have received a copy of the GNU General Public License >+// along with Mauve; see the file COPYING. If not, write to >+// the Free Software Foundation, 59 Temple Place - Suite 330, >+// Boston, MA 02111-1307, USA. */ > > That is the old address for the FSF. Regards, Dave From langel@redhat.com Wed Aug 2 20:01:00 2006 From: langel@redhat.com (Lillian Angel) Date: Wed, 02 Aug 2006 20:01:00 -0000 Subject: FYI: New DropTarget and DragSource tests Message-ID: <1154548846.8184.83.camel@tow.toronto.redhat.com> A bunch of new tests for DropTarget and DragSource classes. 2006-08-02 Lillian Angel * gnu/testlet/java/awt/dnd/DragSource/Constructors.java, * gnu/testlet/java/awt/dnd/DragSource/CreateDragGestureRecognizerTest.java, * gnu/testlet/java/awt/dnd/DragSource/FlavourMapTest.java, * gnu/testlet/java/awt/dnd/DragSource/getDragThresholdTest.java, * gnu/testlet/java/awt/dnd/DragSource/isDragImageSupportedTest.java, * gnu/testlet/java/awt/dnd/DropTarget/Constructors.java: New tests. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 13994 bytes Desc: not available URL: From fkung@redhat.com Thu Aug 3 17:44:00 2006 From: fkung@redhat.com (Francis Kung) Date: Thu, 03 Aug 2006 17:44:00 -0000 Subject: FYI: Image op tests In-Reply-To: <44D100E8.6080703@object-refinery.com> References: <1154543411.1236.36.camel@toycar.toronto.redhat.com> <44D100E8.6080703@object-refinery.com> Message-ID: <1154627057.1236.47.camel@toycar.toronto.redhat.com> On Wed, 2006-08-02 at 20:45 +0100, Dave Gilbert wrote: > That is the old address for the FSF. Oops, I just copied the notice off another file. Fixed now. Thanks, Francis 2006-08-03 Francis Kung * gnu/testlet/java/awt/image/AffineTransformOp/constructors.java, * gnu/testlet/java/awt/image/AffineTransformOp/createCompatibleDestImage.java, * gnu/testlet/java/awt/image/AffineTransformOp/filterImage.java, * gnu/testlet/java/awt/image/AffineTransformOp/filterRaster.java, * gnu/testlet/java/awt/image/AffineTransformOp/getBounds2D.java, * gnu/testlet/java/awt/image/AffineTransformOp/getPoint2D.java, * gnu/testlet/java/awt/image/BandCombineOp/constructors.java, * gnu/testlet/java/awt/image/BandCombineOp/createCompatibleDestRaster.java, * gnu/testlet/java/awt/image/BandCombineOp/filter.java, * gnu/testlet/java/awt/image/BandComgineOp/getBounds2D.java, * gnu/testlet/java/awt/image/BandCombineOp/getPoint2D.java: Fixed GPL notice. From cn-develop@gmx.net Thu Aug 3 18:32:00 2006 From: cn-develop@gmx.net (Carsten Neumann) Date: Thu, 03 Aug 2006 18:32:00 -0000 Subject: FYI: StrictMath tests, test NaN return value Message-ID: <44D2412F.3010306@gmx.net> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, this adds testing of the return value for NaN input to the StrictMath methods cbrt, cosh, expm1, sinh and tanh. The RI returns the argument (not necessarily the Double.NaN constant). These tests currently fail, will work on this next. Cheers, Carsten 2006-08-03 Carsten Neumann * gnu/testlet/java/lang/StrictMath/cbrt.java (NaNValues): New field. (testInputValues): New method. (testNaNValues): New method. (test): call testInputValues and testNaNValues. * gnu/testlet/java/lang/StrictMath/cosh.java (NaNValues): New field. (testInputValues): New method (testNaNValues): New method. (test): call testInputValues and testNaNValues. * gnu/testlet/java/lang/StrictMath/expm1.java (NaNValues): New field. (testInputValues): New method. (testNaNValues): New method. (test): call testInputValues and testNaNValues. * gnu/testlet/java/lang/StrictMath/sinh.java (NaNValues): New field. (testInputValues): New method. (testNaNValues): New method. (test): call testInputValues and testNaNValues. * gnu/testlet/java/lang/StrictMath/tanh.java (NaNValues): New field. (testInputValues): New method. (testNaNValues): New method. (test): call testInputValues and testNaNValues. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFE0kEvd4NEZjs4PvgRAlYkAJ9Z/q+JPisyqiSesNI1Q9Nl5agHtQCgsj8P kgN8pNJKcvLMQsE2MMTK+8A= =eGCq -----END PGP SIGNATURE----- -------------- next part -------------- A non-text attachment was scrubbed... Name: StrictMath.NaN-tests.diff Type: text/x-patch Size: 7406 bytes Desc: not available URL: From abalkiss@redhat.com Fri Aug 4 20:31:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Fri, 04 Aug 2006 20:31:00 -0000 Subject: Failure/exception line number fix Message-ID: <1154723492.14423.44.camel@tony.toronto.redhat.com> Lillian pointed out that when inner classes are involved the Harness was returning incorrect line numbers for failures/exceptions. This patch fixes the problem. 2006-08-04 Anthony Balkissoon * RunnerProcess.java: (getStackTraceString): Return the first line number in the stack trace that is in the Mauve test file that was run. (exceptionDetails): Likewise. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: LineNumberFix.diff Type: text/x-patch Size: 1411 bytes Desc: not available URL: From csm@gnu.org Sun Aug 6 21:09:00 2006 From: csm@gnu.org (Casey Marshall) Date: Sun, 06 Aug 2006 21:09:00 -0000 Subject: FYI: new direct buffer test Message-ID: <44D65A68.8030503@gnu.org> This adds some tests for a couple bugs found in our direct ByteBuffer implementation. 2006-08-06 C. Scott Marshall * java/nio/ByteBuffer/TestAllocateDirect.java: new test. Thanks. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: TestAllocateDirect.patch URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 541 bytes Desc: OpenPGP digital signature URL: From langel@redhat.com Tue Aug 8 15:48:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 08 Aug 2006 15:48:00 -0000 Subject: FYI: New DnD test Message-ID: <1155052083.20248.3.camel@tow.toronto.redhat.com> This test uses the Robot class to perform a drag and drop. It currently fails on Classpath. 2006-08-08 Lillian Angel * gnu/testlet/java/awt/dnd/DnDTest.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 8628 bytes Desc: not available URL: From langel@redhat.com Tue Aug 8 15:50:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 08 Aug 2006 15:50:00 -0000 Subject: FYI: New DnD test In-Reply-To: <1155052083.20248.3.camel@tow.toronto.redhat.com> References: <1155052083.20248.3.camel@tow.toronto.redhat.com> Message-ID: <1155052211.20248.7.camel@tow.toronto.redhat.com> 2006-08-08 Lillian Angel * gnu/testlet/java/awt/dnd/DnDTest.java (doDnD): Removed FIXME. On Tue, 2006-08-08 at 11:48 -0400, Lillian Angel wrote: > This test uses the Robot class to perform a drag and drop. It currently > fails on Classpath. > > 2006-08-08 Lillian Angel > > * gnu/testlet/java/awt/dnd/DnDTest.java: New test. > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 656 bytes Desc: not available URL: From tromey@redhat.com Wed Aug 9 19:00:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Wed, 09 Aug 2006 19:00:00 -0000 Subject: Patch: FYI: PR 28658 test Message-ID: I'm checking this in. This is the test case from PR 28658. Tom 2006-08-09 Tom Tromey PR classpath/28658: * gnu/testlet/java/text/SimpleDateFormat/regress.java (test): Added regression test. Index: gnu/testlet/java/text/SimpleDateFormat/regress.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/text/SimpleDateFormat/regress.java,v retrieving revision 1.11 diff -u -r1.11 regress.java --- gnu/testlet/java/text/SimpleDateFormat/regress.java 19 Apr 2006 17:41:58 -0000 1.11 +++ gnu/testlet/java/text/SimpleDateFormat/regress.java 9 Aug 2006 18:16:31 -0000 @@ -118,5 +118,19 @@ sdf.setTimeZone(TimeZone.getTimeZone("America/New_York")); someTime = 1098968427000L; // 04-10-28 14:00:27 GMT harness.check(sdf.format(new Date(someTime)), "04-10-28 09:00:27 -0400"); + + harness.checkPoint("PR 28658"); + sdf = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy", Locale.US); + try + { + Date d1 = sdf.parse("Sun Nov 6 08:49:37 1994"); + Date d2 = sdf.parse("Sun Nov 6 08:49:37 1994"); + harness.check(d1, d2); + } + catch (ParseException _) + { + harness.debug(_); + harness.check(false); + } } } From langel@redhat.com Thu Aug 10 15:12:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 10 Aug 2006 15:12:00 -0000 Subject: Patch: New DragSourceContext Test Message-ID: <1155222765.20248.28.camel@tow.toronto.redhat.com> 2006-08-10 Lillian Angel * gnu/testlet/java/awt/dnd/DragSourceContext/Constructor.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 5828 bytes Desc: not available URL: From langel@redhat.com Thu Aug 10 19:51:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 10 Aug 2006 19:51:00 -0000 Subject: FYI: New Dnd test Message-ID: <1155239473.20248.34.camel@tow.toronto.redhat.com> Small test for DropTargetContext 2006-08-10 Lillian Angel * gnu/testlet/java/awt/dnd/DropTargetContext/DropTargetContextTest.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1798 bytes Desc: not available URL: From ddaney@avtrex.com Fri Aug 11 20:05:00 2006 From: ddaney@avtrex.com (David Daney) Date: Fri, 11 Aug 2006 20:05:00 -0000 Subject: FYI: Rewrite some HttpURLConnection tests. Message-ID: <44DCE2D7.1070903@avtrex.com> I just committed this change to the TestHttpServer to make it a bit more flexable. The two tests that use it were changed so that they work with the changed version. All this in preperation for a new test to be committed real soon now. 2006-08-11 David Daney * gnu/testlet/java/net/HttpURLConnection/TestHttpServer.java: Rewrote. * gnu/testlet/java/net/HttpURLConnection/responseCodeTest.java (test): Rewrote to use new TestHttpServer. (Factory): New inner class. (Handler): New inner class. (test_ResponseCode): Use new server. * gnu/testlet/java/net/HttpURLConnection/responseHeadersTest.java (test): Rewrote to use new TestHttpServer. (Factory): New inner class. (Handler): New inner class. (test_MultiHeaders): Use new server. (test_LowerUpperCaseHeaders): Use new server. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mauve.d URL: From ddaney@avtrex.com Fri Aug 11 20:12:00 2006 From: ddaney@avtrex.com (David Daney) Date: Fri, 11 Aug 2006 20:12:00 -0000 Subject: FYI: New test: java/net/HttpURLConnection/reuseConnection Message-ID: <44DCE487.6000705@avtrex.com> I just committed this new test. It will fail on classpath (see PR 28580). I am working a a patch to classpath to fix the problem. 2006-08-11 David Daney * gnu/testlet/java/net/HttpURLConnection/reuseConnection.java: New test. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mauve.d URL: From fkung@redhat.com Fri Aug 11 21:05:00 2006 From: fkung@redhat.com (Francis Kung) Date: Fri, 11 Aug 2006 21:05:00 -0000 Subject: Image Op tests Message-ID: <1155330297.13543.14.camel@toycar.toronto.redhat.com> I've updated and expanded the AffineTransformOp and BandCombineOp tests from last week. Many of these tests currently fail, but I will be submitting a Classpath patch shortly. Regards, Francis 2006-08-11 Francis Kung * gnu/testlet/java/awt/image/AffineTransformOp/createCompatibleDestImage.java (colorModelTest): New method. (simpleTest): New method. (test): Added more tests and split into two methods. * gnu/testlet/java/awt/image/AffineTransformOp/createCompatibleDestRaster.java: New file. * gnu/testlet/java/awt/image/AffineTransformOp/filterImage.java (test): Removed a bad test. (testDefaults): Added more tests. (testTransform): Removed. * gnu/testlet/java/awt/image/AffineTransformOp/filterRaster.java (test): Removed a bad test. (testDefaults): Added more tests. (testTransform): Removed. * gnu/testlet/java/awt/image/AffineTransformOp/getPoint2D.java (testIdentity): Added more tests. * gnu/testlet/java/awt/image/BandCombineOp/constructors.java (basicTest): New method. (emptyMatrix): New method. (invalidMatrix): New method. (test): Added more tests and split into multiple methods. * gnu/testlet/java/awt/image/BandCombineOp/createCompatibleDestRaster.java: (basicTest): New method. (impossibleTets): New method. (test): Added more tests and split into multiple methods. (test2): New method. (test3): New method. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauveops.diff Type: text/x-patch Size: 34540 bytes Desc: not available URL: From langel@redhat.com Mon Aug 14 17:57:00 2006 From: langel@redhat.com (Lillian Angel) Date: Mon, 14 Aug 2006 17:57:00 -0000 Subject: Patch: DnDTest addition Message-ID: <1155578221.20248.62.camel@tow.toronto.redhat.com> I added a couple more checks to the DnDTest. 2006-08-13 Lillian Angel * gnu/testlet/java/awt/dnd/DnDTest.java: Added more fields (test): Added more checks. (actionPerformed): Set appropriate field to true; (dragExit): Likewise. (dropActionChanged): Likewise. (dragExit): Likewise. (dropActionChanged): Likewise. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1934 bytes Desc: not available URL: From kennke@aicas.com Tue Aug 15 09:49:00 2006 From: kennke@aicas.com (Roman Kennke) Date: Tue, 15 Aug 2006 09:49:00 -0000 Subject: FYI: New Vector tests Message-ID: <44E1986A.3030203@aicas.com> I added 2 tests for Vector that check that removeAll() and retainAll() accept null arguments when the Vector is empty. 2006-08-15 Roman Kennke * gnu/testlet/java/util/Vector/removeAll.java: New test. * gnu/testlet/java/util/Vector/retainAll.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4040 bytes Desc: not available URL: From langel@redhat.com Tue Aug 15 15:39:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 15 Aug 2006 15:39:00 -0000 Subject: Patch: DnDTest fix Message-ID: <1155656359.20248.78.camel@tow.toronto.redhat.com> Another small fix 2006-08-13 Lillian Angel * gnu/testlet/java/awt/dnd/DnDTest.java: (MouseThread.run): Reformatted and set unsuccessful field to true in catch-block. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2386 bytes Desc: not available URL: From langel@redhat.com Tue Aug 15 20:33:00 2006 From: langel@redhat.com (Lillian Angel) Date: Tue, 15 Aug 2006 20:33:00 -0000 Subject: FYI: New DnD Test Message-ID: <1155674011.20248.82.camel@tow.toronto.redhat.com> Added a new test. 2006-08-13 Lillian Angel * gnu/testlet/java/awt/dnd/DropTargetDragEvent/Constructors.java: New Test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3402 bytes Desc: not available URL: From fkung@redhat.com Tue Aug 15 21:21:00 2006 From: fkung@redhat.com (Francis Kung) Date: Tue, 15 Aug 2006 21:21:00 -0000 Subject: FYI: java.awt.image.ColorConvertOp Message-ID: <1155676872.2468.61.camel@toycar.toronto.redhat.com> The attached patch (committed) adds a number of tests for the ColorConvertOp class. Many currently fail on Classpath, I'll be fixing those soon. Cheers, Francis 2006-08-15 Francis Kung * gnu/testlet/java/awt/image/ColorConvertOp/constructors.java, * gnu/testlet/java/awt/image/ColorConvertOp/createCompatibleDestImage.java, * gnu/testlet/java/awt/image/ColorConvertOp/createCompatibleDestRaster.java, * gnu/testlet/java/awt/image/ColorConvertOp/filterImage.java, * gnu/testlet/java/awt/image/ColorConvertOp/filterRaster.java, * gnu/testlet/java/awt/image/ColorConvertOp/getBounds2D.java, * gnu/testlet/java/awt/image/ColorConvertOp/getPoint2D.java: New tests. -------------- next part -------------- A non-text attachment was scrubbed... Name: ColorConvertOp.diff Type: text/x-patch Size: 50658 bytes Desc: not available URL: From stephane@mikaty.net Wed Aug 16 07:02:00 2006 From: stephane@mikaty.net (Stephane Mikaty) Date: Wed, 16 Aug 2006 07:02:00 -0000 Subject: FYI: New XPath Test Message-ID: <1155711728.7219.19.camel@localhost.localdomain> This test checks that the result of an XPathConstants.NODESET evaluation returns an implementation of org.w3c.dom.NodeList. This test currently fails on classpath. 2006-08-10 Stephane Mikaty * gnu/testlet/javax/xml/xpath/XPath.java: New test. Index: gnu/testlet/javax/xml/xpath/XPath.java =================================================================== RCS file: gnu/testlet/javax/xml/xpath/XPath.java diff -N gnu/testlet/javax/xml/xpath/XPath.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/javax/xml/xpath/XPath.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,70 @@ +// Tags: JDK1.5 +// +// Copyright (C) 2006 Stephane Mikay +// +// This file is part of Mauve. +// +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. +// +// Mauve is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to the +// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +// 02110-1301 USA. + +package gnu.testlet.javax.xml.xpath; + +import java.io.StringReader; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import javax.xml.namespace.QName; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathExpressionException; +import javax.xml.xpath.XPathFactory; + +import org.w3c.dom.NodeList; +import org.xml.sax.InputSource; + +/** + * JSR 206 (JAXP 1.3) XPath Tests + */ +public class XPath implements Testlet { + + public void test( TestHarness harness ) { + try { + // According to the JAXP 1.3 spec Chapter 13 Section 2.2.4 + // The XPath 1.0 NodeSet data type Maps to Java org.w3c.dom.NodeList + harness.checkPoint( "jaxp-1.3-ch13s2.2.4" ); + harness.check( nodeset( "//*", "" ) instanceof NodeList ); + } catch ( XPathExpressionException e ) { + harness.debug( e ); + harness.check( false ); + } + } + + private Object nodeset( String expr, String document ) + throws XPathExpressionException { + return eval( expr, document, XPathConstants.NODESET ); + } + + private Object eval( String expr, String document, QName returnType ) + throws XPathExpressionException { + final XPathFactory factory = XPathFactory.newInstance(); + final javax.xml.xpath.XPath xpath = factory.newXPath(); + return xpath.evaluate( expr, source( document ), returnType ); + } + + private InputSource source( String xml ) { + return new InputSource( new StringReader( xml ) ); + } + +} -- Stephane Mikaty OpenPGP Key ID: 0x17F0E3F5 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From abalkiss@redhat.com Wed Aug 16 18:53:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 16 Aug 2006 18:53:00 -0000 Subject: Harness update - look for "Uses" and "not-a-test" tags Message-ID: <1155754419.2542.34.camel@tony.toronto.redhat.com> Edwin Steiner reported that Mauve wasn't handling the "Uses" tag properly and that was causing some tests to fail unexpectedly. This patch handles that. Also, since this requires reading the java files, I looked for "not-a-test" tags at the same time (this was already handled, but this way we won't have to look through the file twice). 2006-08-16 Anthony Balkissoon * Harness.java: (processFolder): Look for "Uses" tag and "not-a-test" tag and handle them appropriately. (processSingleTest): Likewise. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: HarnessLookForUses.diff Type: text/x-patch Size: 8632 bytes Desc: not available URL: From abalkiss@redhat.com Wed Aug 16 18:58:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 16 Aug 2006 18:58:00 -0000 Subject: java.security.Engine.getInstance fix Message-ID: <1155754695.2542.37.camel@tony.toronto.redhat.com> The "Uses" tag in this file pointed to "MauveDigest" which the Harness cannot understand. The Uses tags should point to files (with or without the ".java" or ".class" extensions) relative to the current directory. 2006-08-16 Anthony Balkissoon * gnu/testlet/java/security/Engine/getInstance.java: Fixed Uses tag. -Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: getInstanceUsesFix.diff Type: text/x-patch Size: 574 bytes Desc: not available URL: From abalkiss@redhat.com Wed Aug 16 19:01:00 2006 From: abalkiss@redhat.com (Anthony Balkissoon) Date: Wed, 16 Aug 2006 19:01:00 -0000 Subject: Harness debug statement removed Message-ID: <1155754853.2542.39.camel@tony.toronto.redhat.com> Accidentally left a debug prinltn in. It's gone now. 2006-08-16 Anthony Balkissoon * Harness.java: Removed debug statement. --Tony -------------- next part -------------- A non-text attachment was scrubbed... Name: HarnessRemoveSysOut.diff Type: text/x-patch Size: 705 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Aug 17 12:05:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 17 Aug 2006 12:05:00 -0000 Subject: FYI: New Calendar tests Message-ID: <44E45BEC.8060408@object-refinery.com> This patch (committed) adds a couple of tests (mainly to check the handling of null arguments): 2006-08-17 David Gilbert * gnu/testlet/java/util/Calendar/getInstance.java: New test, * gnu/testlet/java/util/Calendar/setTime.java: Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From langel@redhat.com Thu Aug 17 15:20:00 2006 From: langel@redhat.com (Lillian Angel) Date: Thu, 17 Aug 2006 15:20:00 -0000 Subject: FYI: New DnD test Message-ID: <1155828031.20248.105.camel@tow.toronto.redhat.com> 2006-08-17 Lillian Angel * gnu/testlet/java/awt/dnd/DropTargetDropEvent/Constructors.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3503 bytes Desc: not available URL: From fkung@redhat.com Fri Aug 18 19:48:00 2006 From: fkung@redhat.com (Francis Kung) Date: Fri, 18 Aug 2006 19:48:00 -0000 Subject: FYI: Expanded ColorConvertOp tests Message-ID: <1155930465.2545.3.camel@toycar.toronto.redhat.com> Hi, The following patch, committed, expands some of the ColorConvertOp tests. Regards, Francis 2006-08-18 Francis Kung * gnu/testlet/java/awt/image/ColorConvertOp/createCompatibleDestImage.java: (colorModelTest): Expand tests. (profileTest): Expand tests. (test): Clean up looping. * gnu/testlet/java/awt/image/ColorConvertOp/createCompatibleDestRaster.java: (colorModelTest): Expand tests. (profileTest): Expand tests. (test): Clean up looping. * gnu/testlet/java/awt/image/ColorConvertOp/filterImage.java: (test3): Remove test of feature that is not implemented yet. -------------- next part -------------- A non-text attachment was scrubbed... Name: ColorConvertOp.diff Type: text/x-patch Size: 18056 bytes Desc: not available URL: From neugens@limasoftware.net Mon Aug 21 18:42:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Mon, 21 Aug 2006 18:42:00 -0000 Subject: FYI: New tests for DecimalFormat Message-ID: <1156186005.2720.17.camel@localhost.localdomain> Hi have added a couple of test for DecimalFormat, these are some special cases, like, for example decimals that can be formatted with integers (i.e. 1.0) or that start without the integer portion (like .5). Changelog: 2006-08-18 Mario Torre * gnu/testlet/java/text/DecimalFormat/parse.java (test): added new tests. * gnu/testlet/java/text/DecimalFormat/applyPattern.java (test): fixed checkpoint for "grouping" test. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve_decimal_format.patch Type: text/x-patch Size: 2995 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Questa ? una parte del messaggio firmata digitalmente URL: From tbento@redhat.com Tue Aug 22 19:19:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 22 Aug 2006 19:19:00 -0000 Subject: FYI: MenuShortcut Message-ID: <1156274371.1386.25.camel@toothpaste.toronto.redhat.com> Hey, This new mauve test (committed) tests the toString method in java.awt.MenuShortcut. Here's the ChangeLog entry: 2006-08-22 Tania Bento * gnu/testlet/java/awt/MenuShortcut/testToString: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 12144 bytes Desc: not available URL: From tbento@redhat.com Wed Aug 23 19:36:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 23 Aug 2006 19:36:00 -0000 Subject: FYI: Color Message-ID: <1156361802.1386.34.camel@toothpaste.toronto.redhat.com> Hey, This new mauve file (committed) tests the brighter method in the Color class. Tania 2006-08-23 Tania Bento * gnu/testlet/java/awt/ColorClass/brighter: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2989 bytes Desc: not available URL: From tbento@redhat.com Wed Aug 23 19:39:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 23 Aug 2006 19:39:00 -0000 Subject: FYI: Color In-Reply-To: <1156361802.1386.34.camel@toothpaste.toronto.redhat.com> References: <1156361802.1386.34.camel@toothpaste.toronto.redhat.com> Message-ID: <1156361985.1386.38.camel@toothpaste.toronto.redhat.com> Oh, I forgot to mention that the for loop should go up to 255 and not 3, but we run out of memory. Tania On Wed, 2006-08-23 at 15:36 -0400, Tania Bento wrote: > Hey, > > This new mauve file (committed) tests the brighter method in the Color > class. > > Tania > > 2006-08-23 Tania Bento > > * gnu/testlet/java/awt/ColorClass/brighter: New file. > From tbento@redhat.com Thu Aug 24 18:12:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 24 Aug 2006 18:12:00 -0000 Subject: FYI: List.java Message-ID: <1156443104.1386.52.camel@toothpaste.toronto.redhat.com> Hey, This new mauve file (committed) tests the setMultipleMode(boolean) method in java.awt.List. Cheers, Tania 2006-08-24 Tania Bento * gnu/testlet/java/awt/List/testSetMultipleMode: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3509 bytes Desc: not available URL: From fkung@redhat.com Thu Aug 24 19:01:00 2006 From: fkung@redhat.com (Francis Kung) Date: Thu, 24 Aug 2006 19:01:00 -0000 Subject: ConvolveOp tests Message-ID: <1156446087.3635.11.camel@toycar.toronto.redhat.com> Hi, This patch, already committed, adds a number of tests for java.awt.image.ConvolveOp as well as touching up some ColorConvertOp tests. Cheers, Francis 2006-08-24 Francis Kung * gnu/testlet/java/awt/image/ColorConvertOp/createCompatibleDestImage.java: (colorModelTest): Add tests for value of transferType. (simpleTest): Add tests for value of transferType. * gnu/testlet/java/awt/image/ConvolveOp/createCompatibleDestImage.java, * gnu/testlet/java/awt/image/ConvolveOp/createCompatibleDestRaster.java, * gnu/testlet/java/awt/image/ConvolveOp/filterImage.java: New tests. * gnu/testlet/java/awt/image/ConvolveOp/filter.java: Renamed to filterRaster.java. * gnu/testlet/java/awt/image/ConvolveOp/filterRaster.java: Renamed from filter.java. -------------- next part -------------- A non-text attachment was scrubbed... Name: ConvolveOp.diff Type: text/x-patch Size: 52792 bytes Desc: not available URL: From stephane@mikaty.net Fri Aug 25 06:17:00 2006 From: stephane@mikaty.net (Stephane Mikaty) Date: Fri, 25 Aug 2006 06:17:00 -0000 Subject: XPath test still not commited? Message-ID: <1156486644.6511.15.camel@localhost.localdomain> The XPath test i submitted on August 16 has still not been committed. As this was my first submission to this list, It's quite possible I did something wrong. Can anyone let me know what the status is? Thanks -- Stephane Mikaty OpenPGP Key ID: 0x17F0E3F5 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From mark@klomp.org Fri Aug 25 08:51:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Fri, 25 Aug 2006 08:51:00 -0000 Subject: XPath test still not commited? In-Reply-To: <1156486644.6511.15.camel@localhost.localdomain> References: <1156486644.6511.15.camel@localhost.localdomain> Message-ID: <1156495890.3007.6.camel@dijkstra.wildebeest.org> Hi Stephane, On Fri, 2006-08-25 at 08:17 +0200, Stephane Mikaty wrote: > The XPath test i submitted on August 16 has still not been committed. As > this was my first submission to this list, It's quite possible I did > something wrong. Can anyone let me know what the status is? Sorry, I was hoping Chris could take a look. But I forgot he was on vacation. Chris, if you are back, could you take a look at: http://sourceware.org/ml/mauve-patches/2006/msg00614.html Thanks, Mark From dog@bluezoo.org Fri Aug 25 12:02:00 2006 From: dog@bluezoo.org (Chris Burdess) Date: Fri, 25 Aug 2006 12:02:00 -0000 Subject: XPath test still not commited? In-Reply-To: <1156495890.3007.6.camel@dijkstra.wildebeest.org> References: <1156486644.6511.15.camel@localhost.localdomain> <1156495890.3007.6.camel@dijkstra.wildebeest.org> Message-ID: <20060825120148.GA31979@bluezoo.org> Mark Wielaard wrote: > > The XPath test i submitted on August 16 has still not been committed. As > > this was my first submission to this list, It's quite possible I did > > something wrong. Can anyone let me know what the status is? > > Sorry, I was hoping Chris could take a look. But I forgot he was on > vacation. Chris, if you are back, could you take a look at: > http://sourceware.org/ml/mauve-patches/2006/msg00614.html I don't know much about Mauve, but the JAXP part looks correct. -- Chris Burdess From neugens@limasoftware.net Fri Aug 25 12:19:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Fri, 25 Aug 2006 12:19:00 -0000 Subject: XPath test still not commited? In-Reply-To: <20060825120148.GA31979@bluezoo.org> References: <1156486644.6511.15.camel@localhost.localdomain> <1156495890.3007.6.camel@dijkstra.wildebeest.org> <20060825120148.GA31979@bluezoo.org> Message-ID: <1156508632.3562.3.camel@localhost.localdomain> Il giorno ven, 25/08/2006 alle 13.01 +0100, Chris Burdess ha scritto: > Mark Wielaard wrote: > > > The XPath test i submitted on August 16 has still not been committed. As > > > this was my first submission to this list, It's quite possible I did > > > something wrong. Can anyone let me know what the status is? > > > > Sorry, I was hoping Chris could take a look. But I forgot he was on > > vacation. Chris, if you are back, could you take a look at: > > http://sourceware.org/ml/mauve-patches/2006/msg00614.html > > I don't know much about Mauve, but the JAXP part looks correct. Hi! The mauve part is ok (but the test still fails). Ciao, Mario -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ From gbenson@redhat.com Fri Aug 25 13:57:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 25 Aug 2006 13:57:00 -0000 Subject: FYI: SocketPermission unquoted IPv6 address tests Message-ID: <20060825135736.GC3789@redhat.com> Hi all, This commit adds checks that unquoted IPv6 addresses are handled correctly by java.net.SocketPermission's constructor. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1888 diff -u -r1.1888 ChangeLog --- ChangeLog 24 Aug 2006 19:00:04 -0000 1.1888 +++ ChangeLog 25 Aug 2006 13:54:24 -0000 @@ -1,3 +1,8 @@ +2006-08-25 Gary Benson + + * gnu/testlet/java/net/SocketPermission/argument.java: Also test + unquoted IPv6 addresses. + 2006-08-24 Francis Kung * gnu/testlet/java/awt/image/ColorConvertOp/createCompatibleDestImage.java: Index: gnu/testlet/java/net/SocketPermission/argument.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/argument.java,v retrieving revision 1.1 diff -u -r1.1 argument.java --- gnu/testlet/java/net/SocketPermission/argument.java 19 Jan 2006 14:05:35 -0000 1.1 +++ gnu/testlet/java/net/SocketPermission/argument.java 25 Aug 2006 13:54:24 -0000 @@ -45,6 +45,12 @@ new Test("[1080::8:800:200C:417A]", true), new Test("[::192.9.5.5]", true), new Test("[:FFFF:129.144.52.38]", true), // XXX try broken addresses + + new Test("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", true), + new Test("3ffe:2a00:100:7031::1", false), + new Test("1080::8:800:200C:417A", false), + new Test("::192.9.5.5", false), + new Test(":FFFF:129.144.52.38", false), }; private Test[] ports = new Test[] { From gbenson@redhat.com Fri Aug 25 15:24:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 25 Aug 2006 15:24:00 -0000 Subject: FYI: Improved SocketPermission implies tests Message-ID: <20060825152425.GD3789@redhat.com> Hi again, I was poking around in the java.net.SocketPermission.implies() test and I realised that while it tested ports and actions extensively there was little checking of hosts. No longer! Cheers, Gary PS we fail all but the most trivial of these :( -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1889 diff -u -r1.1889 ChangeLog --- ChangeLog 25 Aug 2006 13:54:55 -0000 1.1889 +++ ChangeLog 25 Aug 2006 15:20:50 -0000 @@ -1,3 +1,8 @@ +2006-08-25 Gary Benson + + gnu/testlet/java/net/SocketPermission/implies.java: + Add many more host checks, and catch exceptions within checks. + 2006-08-25 Gary Benson * gnu/testlet/java/net/SocketPermission/argument.java: Also test Index: gnu/testlet/java/net/SocketPermission/implies.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/implies.java,v retrieving revision 1.3 diff -u -r1.3 implies.java --- gnu/testlet/java/net/SocketPermission/implies.java 19 Jan 2006 13:59:49 -0000 1.3 +++ gnu/testlet/java/net/SocketPermission/implies.java 25 Aug 2006 15:20:50 -0000 @@ -20,16 +20,87 @@ package gnu.testlet.java.net.SocketPermission; +import java.net.InetAddress; import java.net.SocketPermission; +import java.net.UnknownHostException; import gnu.testlet.Testlet; import gnu.testlet.TestHarness; public class implies implements Testlet { + static String redhat_com_addr = null; + static { + try { + redhat_com_addr = + InetAddress.getByName("www.redhat.com").getHostAddress(); + } + catch (UnknownHostException e) { + } + } + private Test[] hosts = new Test[] { new Test("", "", true), - new Test("localhost", "localhost", true), // XXX need more! + new Test("localhost", "localhost", true), + new Test("127.0.0.1", "localhost", true), + new Test("localhost", "127.0.0.1", true), + new Test("www.redhat.com", "www.redhat.com", true), + new Test("*.redhat.com", "www.redhat.com", true), + new Test("www.redhat.com", "*.redhat.com", false), + new Test(redhat_com_addr, redhat_com_addr, true), + new Test("www.redhat.com", redhat_com_addr, true), + new Test(redhat_com_addr, "www.redhat.com", true), + new Test("*.redhat.com", redhat_com_addr, true), + new Test(redhat_com_addr, "*.redhat.com", false), + new Test("209.132.177.50", "209.132.177.51", false), + new Test("209.132.177.50", "209.132.178.50", false), + new Test("209.132.177.50", "209.131.177.50", false), + new Test("209.132.177.50", "208.132.177.50", false), + // full uncompressed IPv6 addresses + new Test("[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", + "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", true), + new Test("[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", + "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", true), + new Test("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", + "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", true), + new Test("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", + "FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", true), + new Test("[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", + "[fedc:ba98:7654:3210:fedc:ba98:7654:3210]", true), + new Test("[FEDC:Bb98:7654:3210:FEDC:BA98:7654:3210]", + "[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", false), + // compressed IPv6 addresses + new Test("[1080:0:0:0:8:800:200C:417A]", + "[1080:0000:0:0:8:800:200C:417A]", true), + new Test("[1080::8:800:200C:417A]", "[1080::8:800:200C:417A]", true), + new Test("[1080::8:800:200C:417A]", "[1080::8:800:200C:417a]", true), + new Test("[1080::8:800:200C:417A]", "[1080:0:0:0:8:800:200C:417A]", true), + new Test("[1080:0:0:0:8:800:200C:417A]", "[1080::8:800:200C:417A]", true), + new Test("[1080::8:800:200C:417B]", "[1080:0:0:0:8:800:200C:417A]", false), + new Test("[1080:0:0:0:8:800:200C:417A]", "[1080::8:800:200C:417B]", false), + new Test("[FF01::101]", "[FF01:0:0:0:0:0:0:101]", true), + new Test("[FF01:0:0:0:0:0:0:101]", "[FF01::101]", true), + new Test("[::1]", "[0:0:0:0:0:0:0:1]", true), + new Test("[0:0:0:0:0:0:0:1]", "[::1]", true), + new Test("[::]", "[0:0:0:0:0:0:0:0]", true), + new Test("[0:0:0:0:0:0:0:0]", "[::]", true), + // alternative IPv6 addresses + new Test("[0:0:0:0:0:0:13.1.68.3]", "[0:0:0:0:0:0:13.1.68.3]", true), + new Test("[::13.1.68.3]", "[0:0:0:0:0:0:13.1.68.3]", true), + new Test("[0:0:0:0:0:0:13.1.68.3]", "[::13.1.68.3]", true), + new Test("[::13.1.68.3]", "[::13.1.68.3]", true), + new Test("[::13.1.68.3]", "[::D01:4403]", true), + new Test("[::D01:4403]", "[::13.1.68.3]", true), + new Test("[::D01:4403]", "[::D01:4403]", true), + new Test("[::D01:4403]", "[0:0:0:0:0:0:13.1.68.3]", true), + new Test("[0:0:0:0:0:0:13.1.68.3]", "[::D01:4403]", true), + new Test("[0:0:0:0:0:FFFF:129.144.52.38]", + "[0:0:0:0:0:FFFF:129.144.52.38]", true), + new Test("[::FFFF:129.144.52.38]", "[0:0:0:0:0:FFFF:129.144.52.38]", true), + new Test("[0:0:0:0:0:FFFF:129.144.52.38]", "[::FFFF:129.144.52.38]", true), + new Test("[::FFFF:129.144.52.38]", "[::FFFF:129.144.52.38]", true), + new Test("[::13.1.68.3]", "[::FFFF:13.1.68.3]", false), + new Test("[::FFFF:13.1.68.3]", "[::13.1.68.3]", false), }; private Test[] ports = new Test[] { @@ -109,6 +180,7 @@ public void test(TestHarness harness) { harness.checkPoint("hostport checking"); + harness.check(redhat_com_addr != null); for (int i = 0; i < hosts.length; i++) { for (int j = 0; j < ports.length; j++) { @@ -117,7 +189,14 @@ SocketPermission px = new SocketPermission(test.x, "connect"); SocketPermission py = new SocketPermission(test.y, "connect"); - harness.check(px.implies(py) == test.expect); + try { + harness.check(px.implies(py) == test.expect, test.x + " should" + + (test.expect ? "" : " not") + " imply " + test.y); + } + catch (Exception e) { + harness.check(false, test.x + " implies " + test.y + " failed"); + harness.debug(e); + } } } From neugens@limasoftware.net Tue Aug 29 17:36:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Tue, 29 Aug 2006 17:36:00 -0000 Subject: FYI: some new DecimalFormat tests Message-ID: <1156873250.2772.5.camel@localhost.localdomain> My work on classpath is going really slow these days, but at least I found the time to add a couple more tests... Ciao, Mario Changelog: 2006-08-29 Mario Torre * gnu/testlet/java/text/DecimalFormat/formatExp.java (test): added new tests. * gnu/testlet/java/text/DecimalFormat/parse.java (test): added new tests. * gnu/testlet/java/text/DecimalFormat/format.java (testGeneral): added new tests. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: decimal_format_mauve_2006_08_29.patch Type: text/x-patch Size: 5617 bytes Desc: not available URL: From stephane@mikaty.net Tue Aug 29 20:55:00 2006 From: stephane@mikaty.net (Stephane Mikaty) Date: Tue, 29 Aug 2006 20:55:00 -0000 Subject: XPath test still not commited? In-Reply-To: <1156508632.3562.3.camel@localhost.localdomain> References: <1156486644.6511.15.camel@localhost.localdomain> <1156495890.3007.6.camel@dijkstra.wildebeest.org> <20060825120148.GA31979@bluezoo.org> <1156508632.3562.3.camel@localhost.localdomain> Message-ID: <1156884944.29647.10.camel@localhost.localdomain> Thanks for the feedback, So the test is basically OK. What's the next step to get it committed? On Fri, 2006-08-25 at 14:23 +0200, Mario Torre wrote: > Il giorno ven, 25/08/2006 alle 13.01 +0100, Chris Burdess ha scritto: > > Mark Wielaard wrote: > > > > The XPath test i submitted on August 16 has still not been committed. As > > > > this was my first submission to this list, It's quite possible I did > > > > something wrong. Can anyone let me know what the status is? > > > > > > Sorry, I was hoping Chris could take a look. But I forgot he was on > > > vacation. Chris, if you are back, could you take a look at: > > > http://sourceware.org/ml/mauve-patches/2006/msg00614.html > > > > I don't know much about Mauve, but the JAXP part looks correct. > > Hi! > > The mauve part is ok (but the test still fails). > > Ciao, > Mario -- Stephane Mikaty OpenPGP Key ID: 0x17F0E3F5 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: From neugens@limasoftware.net Wed Aug 30 00:03:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Wed, 30 Aug 2006 00:03:00 -0000 Subject: FIY: XPath commited In-Reply-To: <1156884944.29647.10.camel@localhost.localdomain> References: <1156486644.6511.15.camel@localhost.localdomain> <1156495890.3007.6.camel@dijkstra.wildebeest.org> <20060825120148.GA31979@bluezoo.org> <1156508632.3562.3.camel@localhost.localdomain> <1156884944.29647.10.camel@localhost.localdomain> Message-ID: <1156896522.2772.13.camel@localhost.localdomain> Il giorno mar, 29/08/2006 alle 22.55 +0200, Stephane Mikaty ha scritto: > Thanks for the feedback, > > So the test is basically OK. > What's the next step to get it committed? I have committed the attached patch for Stephane: 2006-08-10 Stephane Mikaty * gnu/testlet/javax/xml/xpath/XPath.java: New test. Ciao, Mario -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: xpath.patch Type: text/x-patch Size: 2835 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Questa ? una parte del messaggio firmata digitalmente URL: From kennke@aicas.com Wed Aug 30 15:25:00 2006 From: kennke@aicas.com (Roman Kennke) Date: Wed, 30 Aug 2006 15:25:00 -0000 Subject: FYI: New ZoneView tests Message-ID: <44F5ADBA.6040802@aicas.com> This is a bunch of tests for the javax.swing.text.ZoneView class, which tests all of the original ZoneView methods (not yet those that override methods from superclasses). 2006-08-29 Roman Kennke * gnu/testlet/javax/swing/text/ZoneView/TestView.java, * gnu/testlet/javax/swing/text/ZoneView/TestZoneView.java: New helper classes. * gnu/testlet/javax/swing/text/ZoneView/constructor.java, * gnu/testlet/javax/swing/text/ZoneView/createZone.java, * gnu/testlet/javax/swing/text/ZoneView/getMaxZonesLoaded.java, * gnu/testlet/javax/swing/text/ZoneView/getMaximumZoneSize.java, * gnu/testlet/javax/swing/text/ZoneView/isZoneLoaded.java, * gnu/testlet/javax/swing/text/ZoneView/setMaxZonesLoaded.java, * gnu/testlet/javax/swing/text/ZoneView/setMaximumZoneSize.java, * gnu/testlet/javax/swing/text/ZoneView/unloadZone.java, * gnu/testlet/javax/swing/text/ZoneView/zoneWasLoaded.java: New tests. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 26455 bytes Desc: not available URL: From kennke@aicas.com Wed Aug 30 20:04:00 2006 From: kennke@aicas.com (Roman Kennke) Date: Wed, 30 Aug 2006 20:04:00 -0000 Subject: FYI: More ZoneView tests Message-ID: <44F5EF14.10302@aicas.com> Here comes more ZoneView tests that test the 2 new methods that I just implemented in Classpath. 2006-08-29 Roman Kennke * gnu/testlet/javax/swing/text/ZoneView/TestZoneView.java (getViewIndexAtPosition): Overridden to make public. (loadChildren): Likewise. (getViewFactory): Overridden to provide a ViewFactory. * gnu/testlet/javax/swing/text/ZoneView/getViewIndexAtPosition.java: New tests. * gnu/testlet/javax/swing/text/ZoneView/loadChildren.java: New tests. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 8539 bytes Desc: not available URL: From gbenson@redhat.com Thu Aug 31 09:43:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 31 Aug 2006 09:43:00 -0000 Subject: FYI: SocketPermission argument tests tweak Message-ID: <20060831094331.GB3742@redhat.com> Hi all, This commit makes the SocketPermission argument tests' messages more meaningful. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1896 diff -u -r1.1896 ChangeLog --- ChangeLog 31 Aug 2006 09:28:18 -0000 1.1896 +++ ChangeLog 31 Aug 2006 09:31:10 -0000 @@ -1,3 +1,8 @@ +2006-08-31 Gary Benson + + * gnu/testlet/java/net/SocketPermission/argument.java: + More meaningful failure messages. + 2006-08-29 Roman Kennke * gnu/testlet/javax/swing/text/ZoneView/TestZoneView.java Index: gnu/testlet/java/net/SocketPermission/argument.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/argument.java,v retrieving revision 1.2 diff -u -r1.2 argument.java --- gnu/testlet/java/net/SocketPermission/argument.java 25 Aug 2006 13:54:59 -0000 1.2 +++ gnu/testlet/java/net/SocketPermission/argument.java 31 Aug 2006 09:31:10 -0000 @@ -101,7 +101,8 @@ success = false; } - harness.check(success == test.expect); + harness.check(success == test.expect, test.hostport + " should " + + (test.expect ? "be ok" : "fail")); } } } From gbenson@redhat.com Thu Aug 31 10:35:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 31 Aug 2006 10:35:00 -0000 Subject: FYI: SocketPermission argument tests bugfix Message-ID: <20060831103524.GC3742@redhat.com> Hi again, This commit fixes a pair of broken IPv6 addresses. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1897 diff -u -r1.1897 ChangeLog --- ChangeLog 31 Aug 2006 09:42:19 -0000 1.1897 +++ ChangeLog 31 Aug 2006 10:32:39 -0000 @@ -1,3 +1,8 @@ +2006-08-31 Gary Benson + + * gnu/testlet/java/net/SocketPermission/argument.java: + Fix a pair of broken addresses. + 2006-08-31 Gary Benson * gnu/testlet/java/net/SocketPermission/argument.java: Index: gnu/testlet/java/net/SocketPermission/argument.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/argument.java,v retrieving revision 1.3 diff -u -r1.3 argument.java --- gnu/testlet/java/net/SocketPermission/argument.java 31 Aug 2006 09:42:19 -0000 1.3 +++ gnu/testlet/java/net/SocketPermission/argument.java 31 Aug 2006 10:32:39 -0000 @@ -44,13 +44,13 @@ new Test("[3ffe:2a00:100:7031::1]", true), new Test("[1080::8:800:200C:417A]", true), new Test("[::192.9.5.5]", true), - new Test("[:FFFF:129.144.52.38]", true), // XXX try broken addresses + new Test("[::FFFF:129.144.52.38]", true), // XXX try broken addresses new Test("FEDC:BA98:7654:3210:FEDC:BA98:7654:3210", true), new Test("3ffe:2a00:100:7031::1", false), new Test("1080::8:800:200C:417A", false), new Test("::192.9.5.5", false), - new Test(":FFFF:129.144.52.38", false), + new Test("::FFFF:129.144.52.38", false), }; private Test[] ports = new Test[] { From gbenson@redhat.com Fri Sep 1 08:33:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 01 Sep 2006 08:33:00 -0000 Subject: FYI: Even more SocketPermission tests Message-ID: <20060901083305.GB3836@redhat.com> Hi all, This commit adds checks that IPv6-mapped IPv4 addresses imply their normal IPv4 counterparts. Every day I find more things that SocketPermission is supposed to do :( Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1898 diff -u -r1.1898 ChangeLog --- ChangeLog 31 Aug 2006 10:33:47 -0000 1.1898 +++ ChangeLog 1 Sep 2006 08:29:29 -0000 @@ -1,3 +1,8 @@ +2006-09-01 Gary Benson + + * gnu/testlet/java/net/SocketPermission/implies.java: + Check that IPv6-mapped IPv4 addresses imply their counterparts. + 2006-08-31 Gary Benson * gnu/testlet/java/net/SocketPermission/argument.java: Index: gnu/testlet/java/net/SocketPermission/implies.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/implies.java,v retrieving revision 1.4 diff -u -r1.4 implies.java --- gnu/testlet/java/net/SocketPermission/implies.java 25 Aug 2006 15:22:00 -0000 1.4 +++ gnu/testlet/java/net/SocketPermission/implies.java 1 Sep 2006 08:29:29 -0000 @@ -101,6 +101,15 @@ new Test("[::FFFF:129.144.52.38]", "[::FFFF:129.144.52.38]", true), new Test("[::13.1.68.3]", "[::FFFF:13.1.68.3]", false), new Test("[::FFFF:13.1.68.3]", "[::13.1.68.3]", false), + // IPv6-mapped IPv4 addresses + new Test("[::FFFF:13.1.68.3]", "13.1.68.3", true), + new Test("13.1.68.3", "[::FFFF:13.1.68.3]", true), + new Test("[::FFFF:D01:4403]", "13.1.68.3", true), + new Test("13.1.68.3", "[::FFFF:D01:4403]", true), + new Test("[::13.1.68.3]", "13.1.68.3", false), + new Test("13.1.68.3", "[::13.1.68.3]", false), + new Test("[::D01:4403]", "13.1.68.3", false), + new Test("13.1.68.3", "[::D01:4403]", false), }; private Test[] ports = new Test[] { From david.gilbert@object-refinery.com Mon Sep 4 09:02:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 04 Sep 2006 09:02:00 -0000 Subject: FYI: Rectangle.setRect() test updated Message-ID: <44FBEBAA.9000604@object-refinery.com> This patch (committed) adds some additional checks for the setRect() method: 2006-09-04 David Gilbert * gnu/testlet/java/awt/Rectangle/setRect.java (test): Added new checks for input rounding. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From fkung@redhat.com Tue Sep 5 15:57:00 2006 From: fkung@redhat.com (Francis Kung) Date: Tue, 05 Sep 2006 15:57:00 -0000 Subject: FYI: LookupOp tests Message-ID: <1157471841.12454.7.camel@toddy.toronto.redhat.com> Hi, This patch (committed) adds a number of tests for the LookupOp and *LookupTable classes. Some tests are currently commented out, as there's a nitty-gritty type of incompatibility between Sun's implementation and Classpath and I don't know if it's something we'll fix (storing alpha info as band #3 instead of #4 for ARGB)... I'm going to bring it up on the Classpath patches list. Cheers, Francis -------------- next part -------------- A non-text attachment was scrubbed... Name: LookupOp.diff Type: text/x-patch Size: 51141 bytes Desc: not available URL: From fkung@redhat.com Tue Sep 5 16:04:00 2006 From: fkung@redhat.com (Francis Kung) Date: Tue, 05 Sep 2006 16:04:00 -0000 Subject: FYI: LookupOp tests In-Reply-To: <1157471841.12454.7.camel@toddy.toronto.redhat.com> References: <1157471841.12454.7.camel@toddy.toronto.redhat.com> Message-ID: <1157472273.12454.8.camel@toddy.toronto.redhat.com> Sorry, forgot the changelog... committed as: 2006-09-05 Francis Kung * gnu/testlet/java/awt/image/ByteLookupTable/lookupPixel.java (test): Test for failures. (testFailure): Test out of bounds failures. * gnu/testlet/java/awt/image/LookupOp/createCompatibleDestImage.java: New test. * gnu/testlet/java/awt/image/LookupOp/createCompatibleDestRaster.java (test): Check additional properties. * gnu/testlet/java/awt/image/LookupOp/filterImage.java: New test. * gnu/testlet/java/awt/image/LookupOp/filterRaster.java: New test. * gnu/testlet/java/awt/image/ShortLookupTable/lookupPixel.java (test): Test for failures. (testFailure): Test out of bounds failures. On Tue, 2006-09-05 at 11:57 -0400, Francis Kung wrote: > Hi, > > This patch (committed) adds a number of tests for the LookupOp and > *LookupTable classes. > > Some tests are currently commented out, as there's a nitty-gritty type > of incompatibility between Sun's implementation and Classpath and I > don't know if it's something we'll fix (storing alpha info as band #3 > instead of #4 for ARGB)... I'm going to bring it up on the Classpath > patches list. > > Cheers, > Francis > > From fkung@redhat.com Tue Sep 5 16:18:00 2006 From: fkung@redhat.com (Francis Kung) Date: Tue, 05 Sep 2006 16:18:00 -0000 Subject: FYI: LookupOp tests In-Reply-To: <1157472273.12454.8.camel@toddy.toronto.redhat.com> References: <1157471841.12454.7.camel@toddy.toronto.redhat.com> <1157472273.12454.8.camel@toddy.toronto.redhat.com> Message-ID: <1157473113.12454.15.camel@toddy.toronto.redhat.com> One other wrinkle that I forgot to mention (sorry for the extra email!) is that one of the tests, gnu/testlet/java/awt/image/LookupOp/filterRaster, outright crashes Sun's VM. I've coded in a check such that the test doesn't run on Sun, but will run when testing Classpath; I don't know how else to handle this, but I'm open to suggestions if there's something better. Cheers, Francis On Tue, 2006-09-05 at 12:04 -0400, Francis Kung wrote: > Sorry, forgot the changelog... committed as: > > 2006-09-05 Francis Kung > > * gnu/testlet/java/awt/image/ByteLookupTable/lookupPixel.java > (test): Test for failures. > (testFailure): Test out of bounds failures. > * gnu/testlet/java/awt/image/LookupOp/createCompatibleDestImage.java: > New test. > * gnu/testlet/java/awt/image/LookupOp/createCompatibleDestRaster.java > (test): Check additional properties. > * gnu/testlet/java/awt/image/LookupOp/filterImage.java: > New test. > * gnu/testlet/java/awt/image/LookupOp/filterRaster.java: > New test. > * gnu/testlet/java/awt/image/ShortLookupTable/lookupPixel.java > (test): Test for failures. > (testFailure): Test out of bounds failures. > > On Tue, 2006-09-05 at 11:57 -0400, Francis Kung wrote: > > Hi, > > > > This patch (committed) adds a number of tests for the LookupOp and > > *LookupTable classes. > > > > Some tests are currently commented out, as there's a nitty-gritty type > > of incompatibility between Sun's implementation and Classpath and I > > don't know if it's something we'll fix (storing alpha info as band #3 > > instead of #4 for ARGB)... I'm going to bring it up on the Classpath > > patches list. > > > > Cheers, > > Francis > > > > > From david.gilbert@object-refinery.com Wed Sep 6 11:20:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 06 Sep 2006 11:20:00 -0000 Subject: FYI: MetalLookAndFeel.getDefaults() test updated Message-ID: <44FEAF12.4000301@object-refinery.com> This patch (committed) updates the checks for font settings in the MetalLookAndFeel class: 2006-09-06 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java (TestTheme.getControlTextFont): New method, (TestTheme.getMenuTextFont): Likewise, (test): Updated checks for font settings. I have a patch for GNU Classpath to fix the failing checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Wed Sep 6 12:06:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 06 Sep 2006 12:06:00 -0000 Subject: FYI: SocketPermission.implies() tweaks Message-ID: <20060906120645.GA24282@redhat.com> Hi all, This commit fixes the SocketPermission.implies() tests when hostport is an empty string. Oh, and I fixed a comment... Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1903 diff -u -r1.1903 ChangeLog --- ChangeLog 6 Sep 2006 11:18:59 -0000 1.1903 +++ ChangeLog 6 Sep 2006 12:04:07 -0000 @@ -1,3 +1,8 @@ +2006-09-06 Gary Benson + + * gnu/testlet/java/net/SocketPermission/implies.java: Correctly + test cases with empty hostport strings. Also fixed a comment. + 2006-09-06 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalLookAndFeel/getDefaults.java Index: gnu/testlet/java/net/SocketPermission/implies.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/implies.java,v retrieving revision 1.5 diff -u -r1.5 implies.java --- gnu/testlet/java/net/SocketPermission/implies.java 1 Sep 2006 08:30:01 -0000 1.5 +++ gnu/testlet/java/net/SocketPermission/implies.java 6 Sep 2006 12:04:07 -0000 @@ -40,7 +40,7 @@ } private Test[] hosts = new Test[] { - new Test("", "", true), + new Test("", "", false), new Test("localhost", "localhost", true), new Test("127.0.0.1", "localhost", true), new Test("localhost", "127.0.0.1", true), @@ -101,7 +101,7 @@ new Test("[::FFFF:129.144.52.38]", "[::FFFF:129.144.52.38]", true), new Test("[::13.1.68.3]", "[::FFFF:13.1.68.3]", false), new Test("[::FFFF:13.1.68.3]", "[::13.1.68.3]", false), - // IPv6-mapped IPv4 addresses + // IPv4-mapped IPv6 addresses new Test("[::FFFF:13.1.68.3]", "13.1.68.3", true), new Test("13.1.68.3", "[::FFFF:13.1.68.3]", true), new Test("[::FFFF:D01:4403]", "13.1.68.3", true), @@ -237,7 +237,10 @@ { x = host.x + port.x; y = host.y + port.y; - expect = host.expect && port.expect; + if (x.length() == 0 && y.length() == 0) + expect = true; + else + expect = host.expect && port.expect; } } From david.gilbert@object-refinery.com Wed Sep 6 15:31:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Wed, 06 Sep 2006 15:31:00 -0000 Subject: FYI: Some UIManager tests Message-ID: <44FEE9C2.2070802@object-refinery.com> This patch (committed) adds some new tests for the UIManager class: 2006-09-06 David Gilbert * gnu/testlet/javax/swing/UIManager/getBoolean.java: New file, * gnu/testlet/javax/swing/UIManager/getBorder.java: Likewise, * gnu/testlet/javax/swing/UIManager/getColor.java: Likewise, * gnu/testlet/javax/swing/UIManager/getDimension.java: Likewise, * gnu/testlet/javax/swing/UIManager/getFont.java: Likewise, * gnu/testlet/javax/swing/UIManager/getIcon.java: Likewise, * gnu/testlet/javax/swing/UIManager/getInsets.java: Likewise, * gnu/testlet/javax/swing/UIManager/getInt.java: Likewise, * gnu/testlet/javax/swing/UIManager/getString.java: Likewise. I have a GNU Classpath patch that fixes the failing tests. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From fkung@redhat.com Wed Sep 6 16:00:00 2006 From: fkung@redhat.com (Francis Kung) Date: Wed, 06 Sep 2006 16:00:00 -0000 Subject: FYI: RescaleOp tests Message-ID: <1157558399.12454.21.camel@toddy.toronto.redhat.com> Hi, The following tests have been committed for the java.awt.image.RescaleOp package. Cheers, Francis 2006-09-06 Francis Kung * gnu/testlet/java/awt/image/RescaleOp/constructors.java, * gnu/testlet/java/awt/image/RescaleOp/createCompatibleDestImage.java, * gnu/testlet/java/awt/image/RescaleOp/createCompatibleDestRaster.java, * gnu/testlet/java/awt/image/RescaleOp/filterImage.java, * gnu/testlet/java/awt/image/RescaleOp/filterRaster.java, * gnu/testlet/java/awt/image/RescaleOp/getBounds2D.java, * gnu/testlet/java/awt/image/RescaleOp/getNumFactors.java, * gnu/testlet/java/awt/image/RescaleOp/getOffsets.java, * gnu/testlet/java/awt/image/RescaleOp/getPoint2D.java, * gnu/testlet/java/awt/image/RescaleOp/getRenderingHints.java, * gnu/testlet/java/awt/image/RescaleOp/getScaleFactors.java: New files. -------------- next part -------------- A non-text attachment was scrubbed... Name: RescaleOp.diff Type: text/x-patch Size: 49541 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Sep 7 09:25:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 07 Sep 2006 09:25:00 -0000 Subject: FYI: MetalScrollBarUI - additional checks Message-ID: <44FFE597.1080806@object-refinery.com> This patch adds some new checks for the MetalScrollBarUI class. The setting of the scrollBarWidth field at the right time is important to make the JGoodies PlasticLookAndFeel work on GNU Classpath: 2006-09-07 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalScrollBarUI/constructor.java (test): Add a check for the default value of the scrollBarWidth field, * gnu/testlet/javax/swing/plaf/metal/MetalScrollBarUI/installDefaults.java: New file, * gnu/testlet/javax/swing/plaf/metal/MetalScrollBarUI/MyMetalScrollBarUI.java (MyMetalScrollBarUI): Call super(), (installDefaults): New method, (setScrollbar): Likewise, (getScrollBarWidthField): Likewise. I have a patch for GNU Classpath to make these new checks all pass. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Thu Sep 7 10:01:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 07 Sep 2006 10:01:00 -0000 Subject: FYI: More SocketPermission tests Message-ID: <20060907084218.GD3758@redhat.com> Every day I find a new way to write IP addresses... -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1906 diff -u -r1.1906 ChangeLog --- ChangeLog 6 Sep 2006 16:00:32 -0000 1.1906 +++ ChangeLog 7 Sep 2006 08:38:36 -0000 @@ -1,3 +1,7 @@ +2006-09-06 Gary Benson + + * gnu/testlet/java/net/SocketPermission/implies.java: More tests. + 2006-09-06 Francis Kung * gnu/testlet/java/awt/image/RescaleOp/constructors.java, Index: gnu/testlet/java/net/SocketPermission/implies.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/implies.java,v retrieving revision 1.6 diff -u -r1.6 implies.java --- gnu/testlet/java/net/SocketPermission/implies.java 6 Sep 2006 12:04:37 -0000 1.6 +++ gnu/testlet/java/net/SocketPermission/implies.java 7 Sep 2006 08:38:36 -0000 @@ -110,6 +110,16 @@ new Test("13.1.68.3", "[::13.1.68.3]", false), new Test("[::D01:4403]", "13.1.68.3", false), new Test("13.1.68.3", "[::D01:4403]", false), + // Unconventional IPv4 addresses + new Test("13.1.68.3", "13.1.17411", true), + new Test("13.1.17411", "13.1.68.3", true), + new Test("13.1.68.3", "13.82947", true), + new Test("13.82947", "13.1.68.3", true), + new Test("13.1.68.3", "13.82947", true), + new Test("13.1.68.3", + String.valueOf((13 << 24) + (1 << 16) + (68 << 8) + 3), true), + new Test(String.valueOf((13 << 24) + (1 << 16) + (68 << 8) + 3), + "13.1.68.3", true), }; private Test[] ports = new Test[] { From gbenson@redhat.com Fri Sep 8 08:58:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 08 Sep 2006 08:58:00 -0000 Subject: FYI: Removed InetAddress tests Message-ID: <20060908085823.GB3761@redhat.com> Hi all, This commit removes some tests that check functionality that no class library except Classpath implements (and that only for a few more minutes...) Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1908 diff -u -r1.1908 ChangeLog --- ChangeLog 7 Sep 2006 09:23:13 -0000 1.1908 +++ ChangeLog 8 Sep 2006 08:53:18 -0000 @@ -1,3 +1,8 @@ +2006-09-08 Gary Benson + + * gnu/testlet/java/net/InetAddress/getAllByName.java: Do not test + for whitespace-stripping of hostnames. + 2006-09-07 David Gilbert * gnu/testlet/javax/swing/plaf/metal/MetalScrollBarUI/constructor.java Index: gnu/testlet/java/net/InetAddress/getAllByName.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/InetAddress/getAllByName.java,v retrieving revision 1.2 diff -u -r1.2 getAllByName.java --- gnu/testlet/java/net/InetAddress/getAllByName.java 2 Jan 2006 14:02:58 -0000 1.2 +++ gnu/testlet/java/net/InetAddress/getAllByName.java 8 Sep 2006 08:53:18 -0000 @@ -43,7 +43,7 @@ harness.fail(x.toString()); } - // getAllByName("") also should return the loopback address + // so should getAllByName("") try { InetAddress[] addr = InetAddress.getAllByName(""); @@ -56,47 +56,5 @@ { harness.fail(x.toString()); } - - // so should getAllByName(" ") - try - { - InetAddress[] addr = InetAddress.getAllByName(" "); - harness.check(addr != null); - InetAddress loopback = addr[0]; - harness.check(loopback != null); - harness.check(loopback.isLoopbackAddress()); - } - catch (UnknownHostException x) - { - harness.fail(x.toString()); - } - - // so should getAllByName("localhost") - try - { - InetAddress[] addr = InetAddress.getAllByName("localhost"); - harness.check(addr != null); - InetAddress loopback = addr[0]; - harness.check(loopback != null); - harness.check(loopback.isLoopbackAddress()); - } - catch (UnknownHostException x) - { - harness.fail(x.toString()); - } - - // so should getAllByName(" localhost ") - try - { - InetAddress[] addr = InetAddress.getAllByName(" localhost "); - harness.check(addr != null); - InetAddress loopback = addr[0]; - harness.check(loopback != null); - harness.check(loopback.isLoopbackAddress()); - } - catch (UnknownHostException x) - { - harness.fail(x.toString()); - } } } From csm@gnu.org Sat Sep 9 22:25:00 2006 From: csm@gnu.org (Casey Marshall) Date: Sat, 09 Sep 2006 22:25:00 -0000 Subject: FYI: NetworkInterface tests Message-ID: <45033F42.9030001@gnu.org> This adds an internal consistency check for java.net.NetworkInterface, which tests if: - you get the same interface if you use getByName and getByAddress for all interfaces returned by getNetworkInterfaces. - there's only one interface with each given name returned by getNetworkInterfaces. - getNetworkInterfaces returns at least one interface. - each interface returned has at least one address. I'm also removing a bogus check from the existing getByName test: it assumes that there is an interface named "lo" on the system, which isn't true. On OS X the loopback interface is called "lo0". We can't make assumptions about how network interfaces are named. 2006-09-09 Casey Marshall * gnu/testlet/java/net/NetworkInterface/Consistency.java: new test. * gnu/testlet/java/net/NetworkInterface/getByName.java (test): don't test for interfaces named "lo". -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: netif.patch URL: From david.gilbert@object-refinery.com Mon Sep 11 11:26:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 11 Sep 2006 11:26:00 -0000 Subject: FYI: AttributedCharacterIterator/AttributedString - new tests Message-ID: <450547FE.8030802@object-refinery.com> This patch (committed) adds some new checks that I wrote while looking at PR29010: 2006-09-11 David Gilbert * gnu/testlet/java/text/AttributedCharacterIterator/getRunLimit.java: New test, * gnu/testlet/java/text/AttributedString/constructors.java (testConstructor3): Added new checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Mon Sep 11 14:18:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Mon, 11 Sep 2006 14:18:00 -0000 Subject: FYI: AttributedCharacterIterator - new tests Message-ID: <45057052.3070507@object-refinery.com> This patch (committed) adds some new tests for the AttributedCharacterIterator: 2006-09-11 David Gilbert * gnu/testlet/java/text/AttributedCharacterIterator/getRunLimit.java (test1): Added checks, * gnu/testlet/java/text/AttributedCharacterIterator/Attribute/toString.java: New test. I've already committed a patch to GNU Classpath CVS to fix the failing checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Tue Sep 12 11:11:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 12 Sep 2006 11:11:00 -0000 Subject: FYI: OceanTheme.addCustomEntriesToTable() - new test Message-ID: <45069610.5000003@object-refinery.com> This patch (committed) adds a new test: 2006-09-12 David Gilbert * gnu/testlet/javax/swing/plaf/metal/OceanTheme/addCustomEntriesToTable.java: New test. I've already committed a patch to GNU Classpath to fix the one failing check in this test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Tue Sep 12 14:09:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 12 Sep 2006 14:09:00 -0000 Subject: FYI: DefaultMetalTheme - added checks for 'swing.boldMetal' setting Message-ID: <4506BFB3.4000104@object-refinery.com> This patch (committed) adds checks for the 'swing.boldMetal' setting: 2006-09-12 David Gilbert * gnu/testlet/javax/swing/plaf/metal/DefaultMetalTheme/getControlTextFont.java (test): Add checks for 'swing.boldMetal' UI default setting, * gnu/testlet/javax/swing/plaf/metal/DefaultMetalTheme/getMenuTextFont.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/DefaultMetalTheme/getSubTextFont.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/DefaultMetalTheme/getSystemTextFont.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/DefaultMetalTheme/getUserTextFont.java (test): Likewise, * gnu/testlet/javax/swing/plaf/metal/DefaultMetalTheme/getWindowTitleFont.java (test): Likewise. I have a patch for GNU Classpath to make these checks pass which I will commit shortly. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From edwin.steiner@gmx.net Tue Sep 12 14:53:00 2006 From: edwin.steiner@gmx.net (Edwin Steiner) Date: Tue, 12 Sep 2006 14:53:00 -0000 Subject: Harness patch - do not try to compile dependencies if given '-compile no' Message-ID: <20060912145311.GA3464@localhost.localdomain> Hi! I ran into a problem when using Harness with '-compile no': If there is a "Uses:" line in a testlet, Harness tries to compile the dependency unconditionally. (This fails in my case as there is no working compiler on the system.) The attached patch modifies compileTest so it only checks if the .class file is available if auto-compilation is turned off. Cheers, -Edwin -------------- next part -------------- Index: Harness.java =================================================================== RCS file: /cvs/mauve/mauve/Harness.java,v retrieving revision 1.25 diff -u -p -r1.25 Harness.java --- Harness.java 16 Aug 2006 19:00:18 -0000 1.25 +++ Harness.java 12 Sep 2006 14:47:25 -0000 @@ -1224,8 +1224,19 @@ public class Harness // it as a test failure. try { - compileString = compileStringBase + " " + testName; - result = compile(); + if (compileTests) + { + compileString = compileStringBase + " " + testName; + result = compile(); + } + else + { + String classfilename = testName.replaceAll("\\.java$", ".class"); + File classfile = new File(classfilename); + + if (classfile.exists()) + return 0; + } } catch (Exception e) { From fkung@redhat.com Wed Sep 13 15:31:00 2006 From: fkung@redhat.com (Francis Kung) Date: Wed, 13 Sep 2006 15:31:00 -0000 Subject: FYI: RescaleOp fixlet Message-ID: <1158161434.12454.100.camel@toddy.toronto.redhat.com> Hi, The attached patch, already committed, updates (and fixes) sample value generation in the RescaleOp test. Cheers, Francis 2006-09-13 Francis Kung * gnu/testlet/java/awt/image/RescaleOp/filterRaster.java (simpleTests): Remove hard-coded max sample value. -------------- next part -------------- A non-text attachment was scrubbed... Name: RescaleOp.diff Type: text/x-patch Size: 1064 bytes Desc: not available URL: From tbento@redhat.com Wed Sep 13 18:19:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 13 Sep 2006 18:19:00 -0000 Subject: FYI: JTable Message-ID: <1158171546.12061.50.camel@toothpaste.toronto.redhat.com> Hey, This new test file (committed) tests the width of the cellRect, when the getCellRect method from javax.swing.JTable is called. 2006-09-13 Tania Bento * gnu/testlet/javax/swing/JTable/getCellRect.java: New test. Cheers, Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3415 bytes Desc: not available URL: From gbenson@redhat.com Thu Sep 14 08:12:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 14 Sep 2006 08:12:00 -0000 Subject: FYI: SocketPermission tweak Message-ID: <20060914081216.GA3837@redhat.com> Hi all, This commit changes one of the IP addresses in the SocketPermission implies tests. For some reason one of the addresses I randomly chose takes an age to resolve, so I changed it. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1917 diff -u -r1.1917 ChangeLog --- ChangeLog 13 Sep 2006 20:26:08 -0000 1.1917 +++ ChangeLog 14 Sep 2006 08:09:31 -0000 @@ -1,3 +1,7 @@ +2006-09-14 Gary Benson + + * gnu/testlet/java/net/SocketPermission/implies.java: Tweak. + 2006-09-13 Tania Bento * gnu/testlet/javax/swing/JTable/getCellRect.java: Fixed documentation. Index: gnu/testlet/java/net/SocketPermission/implies.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/implies.java,v retrieving revision 1.7 diff -u -r1.7 implies.java --- gnu/testlet/java/net/SocketPermission/implies.java 7 Sep 2006 08:39:57 -0000 1.7 +++ gnu/testlet/java/net/SocketPermission/implies.java 14 Sep 2006 08:09:31 -0000 @@ -54,7 +54,7 @@ new Test(redhat_com_addr, "*.redhat.com", false), new Test("209.132.177.50", "209.132.177.51", false), new Test("209.132.177.50", "209.132.178.50", false), - new Test("209.132.177.50", "209.131.177.50", false), + new Test("209.132.177.50", "209.130.177.50", false), new Test("209.132.177.50", "208.132.177.50", false), // full uncompressed IPv6 addresses new Test("[FEDC:BA98:7654:3210:FEDC:BA98:7654:3210]", From david.gilbert@object-refinery.com Thu Sep 14 10:48:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 14 Sep 2006 10:48:00 -0000 Subject: FYI: java.awt.Menu.insert() - new test Message-ID: <4509337E.8090407@object-refinery.com> This patch (committed) adds a new test: 2006-09-14 David Gilbert * gnu/testlet/java/awt/Menu/insert.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From mark@klomp.org Tue Sep 19 10:32:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Tue, 19 Sep 2006 10:32:00 -0000 Subject: New Logger.getParent() test Message-ID: <1158661970.2965.12.camel@dijkstra.wildebeest.org> Hi, Here is a new test for util.logging that tests whether the parent is setup correctly for a new Logger. 2006-09-19 Mark Wielaard * gnu/testlet/java/util/logging/Logger/getParent.java: New test. Committed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: getParent.java Type: text/x-java Size: 1754 bytes Desc: not available URL: From david.gilbert@object-refinery.com Tue Sep 19 15:18:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Tue, 19 Sep 2006 15:18:00 -0000 Subject: FYI: AbstractButton subclasses - tests for model and UI delegate initialisation Message-ID: <45100A00.3070701@object-refinery.com> This patch (committed) adds tests to check the initialisation of the model and UI delegates in the AbstractButton subclasses: 2006-09-19 David Gilbert * gnu/testlet/javax/swing/JButton/model.java: New test, * gnu/testlet/javax/swing/JButton/uidelegate.java: Likewise, * gnu/testlet/javax/swing/JCheckBox/model.java: Likewise, * gnu/testlet/javax/swing/JCheckBox/uidelegate.java: Likewise, * gnu/testlet/javax/swing/JCheckBoxMenuItem/model.java: Likewise, * gnu/testlet/javax/swing/JCheckBoxMenuItem/uidelegate.java: Likewise, * gnu/testlet/javax/swing/JMenu/model.java: Likewise, * gnu/testlet/javax/swing/JMenu/uidelegate.java: Likewise, * gnu/testlet/javax/swing/JMenuItem/model.java: Likewise, * gnu/testlet/javax/swing/JMenuItem/uidelegate.java: Likewise, * gnu/testlet/javax/swing/JRadioButton/model.java: Likewise, * gnu/testlet/javax/swing/JRadioButton/uidelegate.java: Likewise, * gnu/testlet/javax/swing/JRadioButtonMenuItem/model.java: Likewise, * gnu/testlet/javax/swing/JRadioButtonMenuItem/uidelegate.java: Likewise, * gnu/testlet/javax/swing/JToggleButton/model.java: Likewise, * gnu/testlet/javax/swing/JToggleButton/uidelegate.java: Likewise. I put these together while investigating a bug in GNU Classpath that shows up when running Swing apps with the LiquidLookAndFeel. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From ddaney@avtrex.com Wed Sep 20 18:14:00 2006 From: ddaney@avtrex.com (David Daney) Date: Wed, 20 Sep 2006 18:14:00 -0000 Subject: FYI: New HttpURLConnection test... Message-ID: <451184E0.6080800@avtrex.com> I just committed this new test. It will fail on classpath, see PR classpath/28661. I plan on committing the classpath fix shortly. 2006-09-20 David Daney * gnu/testlet/java/net/HttpURLConnection/TestHttpServer.java (ConnectionHandler.getHeaderFromList): New method. * gnu/testlet/java/net/HttpURLConnection/postHeaders.java: New test. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: mauve.d URL: From tbento@redhat.com Thu Sep 21 17:12:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 21 Sep 2006 17:12:00 -0000 Subject: FYI: JTable In-Reply-To: <1158858523.2703.43.camel@toothpaste.toronto.redhat.com> References: <1158171546.12061.50.camel@toothpaste.toronto.redhat.com> <1158858523.2703.43.camel@toothpaste.toronto.redhat.com> Message-ID: <1158858742.2703.45.camel@toothpaste.toronto.redhat.com> I just noticed that the expected value of a test case was incorrect. I changed it to the correct value and and committed it. 2006-09-21 Tania Bento * gnu/testlet/javax/swing/JTable/getCellRect.java: Changed expected value of one test case. On Wed, 2006-09-13 at 14:19 -0400, Tania Bento wrote: > > Hey, > > > > This new test file (committed) tests the width of the cellRect, when the > > getCellRect method from javax.swing.JTable is called. > > > > 2006-09-13 Tania Bento > > > > * gnu/testlet/javax/swing/JTable/getCellRect.java: New test. > > > > Cheers, > > Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 725 bytes Desc: not available URL: From csm@gnu.org Thu Sep 21 23:28:00 2006 From: csm@gnu.org (Casey Marshall) Date: Thu, 21 Sep 2006 23:28:00 -0000 Subject: FYI: Selector test for empty selects Message-ID: <45132030.2040603@gnu.org> This tests if Selector behaves correctly if select() is called with no channels registered (it should return 0). 2006-09-21 Casey Marshall * gnu/testlet/java/nio/channels/Selector/testEmptySelect.java: new test. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: testEmptySelect.patch URL: From gbenson@redhat.com Fri Sep 22 10:49:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 22 Sep 2006 10:49:00 -0000 Subject: FYI: TestSecurityManager enhancement Message-ID: <20060922104900.GE3792@redhat.com> Hi all, This commit makes the test security manager compare permissions using p1.equals(p2) instead of p1.implies(p2). This ensures that we are testing that the permission we are checking is exactly the permission we expected. This is necessary for most of the networking tests. InetAddresss.getCanonicalHostName(), for example is supposed to check on the canonical hostname -- not the address -- yet testing using implies would happily allow either. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1924 diff -u -r1.1924 ChangeLog --- ChangeLog 21 Sep 2006 23:29:34 -0000 1.1924 +++ ChangeLog 22 Sep 2006 10:35:10 -0000 @@ -1,3 +1,11 @@ +2006-09-22 Gary Benson + + * gnu/testlet/TestSecurityManager.java: + Compare permissions using equals() rather than implies(). + Provide a way for tests to specify that they need implies(). + * gnu/testlet/java/io/File/security.java: + Use implies() comparisons for temp file tests. + 2006-09-21 Casey Marshall * gnu/testlet/java/nio/channels/Selector/testEmptySelect.java: Index: gnu/testlet/TestSecurityManager.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/TestSecurityManager.java,v retrieving revision 1.3 diff -u -r1.3 TestSecurityManager.java --- gnu/testlet/TestSecurityManager.java 11 Jul 2006 09:55:00 -0000 1.3 +++ gnu/testlet/TestSecurityManager.java 22 Sep 2006 10:35:10 -0000 @@ -93,6 +93,21 @@ private final SuccessException successException = new SuccessException(); /** + * How should permissions be compared? + */ + private int compare; + + /** + * Compare permissions using p1.equals(p2). + */ + public static final int EQUALS = 1; + + /** + * Compare permissions using p1.implies(p2). + */ + public static final int IMPLIES = 2; + + /** * An empty list of checks, for convenience. */ private final Permission[] noChecks = new Permission[0]; @@ -213,9 +228,42 @@ checked = new boolean[mustCheck.length]; enabled = true; + compare = EQUALS; + } + + /** + * Under normal circumstances permissions are compared using + * p1.equals(p2) to ensure that the permission being + * checked is exactly the permission that is expected. Sometimes it + * is not possible to know in advance the exact permission that will + * be checked -- the best you can do is some kind of wildcard -- and + * in such cases tests can specify that permissions should be + * compared using p1.implies(p2) using this method. + * + * @param style the desired comparison style (EQUALS or + * IMPLIES). + */ + public void setComparisonStyle(int style) + { + compare = style; } /** + * Compare two permissions. + */ + private boolean permissionsMatch(Permission p1, Permission p2) + { + switch (compare) { + case EQUALS: + return p1.equals(p2); + case IMPLIES: + return p1.implies(p2); + default: + throw new IllegalArgumentException(); + } + } + + /** * Check that this permission is one that we should be checking. * * @param perm the permission to be checked @@ -223,7 +271,7 @@ * permissions have been checked and isHalting * is true. * @throws SecurityException if none of the mustCheck - * or mayCheck permissions implies + * or mayCheck permissions matches * perm. */ public void checkPermission(Permission perm) throws SecurityException @@ -236,13 +284,13 @@ boolean matched = false; for (int i = 0; i < mustCheck.length; i++) { - if (mustCheck[i].implies(perm)) + if (permissionsMatch(mustCheck[i], perm)) matched = checked[i] = true; } if (!matched) { for (int i = 0; i < mayCheck.length; i++) { - if (mayCheck[i].implies(perm)) + if (permissionsMatch(mayCheck[i], perm)) matched = true; } } Index: gnu/testlet/java/io/File/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/io/File/security.java,v retrieving revision 1.14 diff -u -r1.14 security.java --- gnu/testlet/java/io/File/security.java 18 Jul 2006 11:49:18 -0000 1.14 +++ gnu/testlet/java/io/File/security.java 22 Sep 2006 10:35:10 -0000 @@ -210,6 +210,7 @@ try { sm.prepareChecks(new Permission[]{tmpallWritePerm}, new Permission[]{tmpdirPropPerm}); + sm.setComparisonStyle(TestSecurityManager.IMPLIES); tf1 = File.createTempFile("pfx", "sfx"); sm.checkAllChecked(); } @@ -222,6 +223,7 @@ harness.checkPoint("createTempFile(3-args)"); try { sm.prepareChecks(new Permission[]{tmpdirallWritePerm}); + sm.setComparisonStyle(TestSecurityManager.IMPLIES); tf2 = File.createTempFile("pfx", "sfx", tmpdir); sm.checkAllChecked(); } From david.gilbert@object-refinery.com Fri Sep 22 11:16:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 22 Sep 2006 11:16:00 -0000 Subject: FYI: JTable and SizeSequence - new tests Message-ID: <4513C60C.2020205@object-refinery.com> This patch (committed) adds a couple of tests for the JTable class and updates one test for the SizeSequence class: 2006-09-22 David Gilbert * gnu/testlet/javax/swing/SizeSequence/getSize.java (test): Check indices out of bounds, * gnu/testlet/javax/swing/JTable/getRowHeight.java: New test, * gnu/testlet/javax/swing/JTable/setRowHeight.java: New test. I have a small GNU Classpath patch for the SizeSequence class that will fix the failing checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Fri Sep 22 11:46:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 22 Sep 2006 11:46:00 -0000 Subject: FYI: Throwpoint checks for java.net.InetAddress Message-ID: <20060922114614.GF3792@redhat.com> Hi again, This commit adds throwpoint checks for java.net.InetAddress. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1926 diff -u -r1.1926 ChangeLog --- ChangeLog 22 Sep 2006 11:14:28 -0000 1.1926 +++ ChangeLog 22 Sep 2006 11:43:37 -0000 @@ -1,3 +1,7 @@ +2006-09-22 Gary Benson + + * gnu/testlet/java/net/InetAddress/security.java: New test. + 2006-09-22 David Gilbert * gnu/testlet/javax/swing/SizeSequence/getSize.java Index: gnu/testlet/java/net/InetAddress/security.java =================================================================== RCS file: gnu/testlet/java/net/InetAddress/security.java diff -N gnu/testlet/java/net/InetAddress/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/InetAddress/security.java 22 Sep 2006 11:43:37 -0000 @@ -0,0 +1,119 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.InetAddress; + +import java.net.InetAddress; +import java.net.SocketPermission; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + InetAddress localhost = InetAddress.getLocalHost(); + String hostname = localhost.getHostName(); + harness.check(!hostname.equals(localhost.getHostAddress())); + byte[] hostaddr = localhost.getAddress(); + + Permission[] checkConnect = new Permission[] { + new SocketPermission(hostname, "resolve")}; + + TestSecurityManager sm = new TestSecurityManager(harness); + try { + sm.install(); + + // throwpoint: java.net.InetAddress-getHostName() + harness.checkPoint("getHostName"); + try { + sm.prepareChecks(checkConnect); + InetAddress.getByAddress(hostaddr).getHostName(); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.InetAddress-getCanonicalHostName() + harness.checkPoint("getCanonicalHostName"); + try { + sm.prepareChecks(checkConnect); + InetAddress.getByAddress(hostaddr).getCanonicalHostName(); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.InetAddress-getByName() + harness.checkPoint("getByName"); + try { + sm.prepareChecks(checkConnect); + InetAddress.getByName(hostname); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.InetAddress-getAllByName() + harness.checkPoint("getAllByName"); + try { + sm.prepareChecks(checkConnect); + InetAddress.getAllByName(hostname); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.InetAddress-getLocalHost() + harness.checkPoint("getLocalHost"); + try { + sm.prepareChecks(checkConnect); + InetAddress.getLocalHost(); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From david.gilbert@object-refinery.com Fri Sep 22 13:45:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 22 Sep 2006 13:45:00 -0000 Subject: FYI: JTable.getCellRect() - additional checks Message-ID: <4513E8EB.3070403@object-refinery.com> This patch (committed) adds some new checks to the existing test: 2006-09-22 David Gilbert * gnu/testlet/javax/swing/JTable/getCellRect.java (test): Added new checks. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From gbenson@redhat.com Fri Sep 22 14:19:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 22 Sep 2006 14:19:00 -0000 Subject: FYI: Extra SocketPermission argument test Message-ID: <20060922141908.GJ3792@redhat.com> Hi again, This commit tests for the bug that http://tinyurl.com/mqgwn fixes. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1929 diff -u -r1.1929 ChangeLog --- ChangeLog 22 Sep 2006 13:27:42 -0000 1.1929 +++ ChangeLog 22 Sep 2006 14:16:00 -0000 @@ -1,3 +1,9 @@ +2006-09-22 Gary Benson + + * gnu/testlet/java/net/SocketPermission/argument.java: + Check that unquoted IPv6 addresses with one-digit first + components are not incorrectly flagged as errors. + 2006-09-22 David Gilbert * gnu/testlet/javax/swing/JTable/getCellRect.java Index: gnu/testlet/java/net/SocketPermission/argument.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/SocketPermission/argument.java,v retrieving revision 1.4 diff -u -r1.4 argument.java --- gnu/testlet/java/net/SocketPermission/argument.java 31 Aug 2006 10:33:47 -0000 1.4 +++ gnu/testlet/java/net/SocketPermission/argument.java 22 Sep 2006 14:16:00 -0000 @@ -51,6 +51,7 @@ new Test("1080::8:800:200C:417A", false), new Test("::192.9.5.5", false), new Test("::FFFF:129.144.52.38", false), + new Test("0:0:0:0:0:0:0:1", true), }; private Test[] ports = new Test[] { From gbenson@redhat.com Fri Sep 22 14:26:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 22 Sep 2006 14:26:00 -0000 Subject: FYI: Throwpoint checks for java.net.NetworkInterface Message-ID: <20060922142614.GK3792@redhat.com> Hi again, This commit adds throwpoint checks for java.net.NetworkInterface. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1930 diff -u -r1.1930 ChangeLog --- ChangeLog 22 Sep 2006 14:16:42 -0000 1.1930 +++ ChangeLog 22 Sep 2006 14:23:47 -0000 @@ -1,3 +1,7 @@ +2006-09-22 Gary Benson + + * gnu/testlet/java/net/NetworkInterface/security.java: New test. + 2006-09-22 Gary Benson * gnu/testlet/java/net/SocketPermission/argument.java: Index: gnu/testlet/java/net/NetworkInterface/security.java =================================================================== RCS file: gnu/testlet/java/net/NetworkInterface/security.java diff -N gnu/testlet/java/net/NetworkInterface/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/NetworkInterface/security.java 22 Sep 2006 14:23:47 -0000 @@ -0,0 +1,86 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.NetworkInterface; + +import java.net.InetAddress; +import java.net.NetworkInterface; +import java.net.SocketPermission; +import java.security.Permission; +import java.util.Enumeration; +import java.util.Iterator; +import java.util.LinkedList; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + LinkedList list = new LinkedList(); + for (Enumeration e = NetworkInterface.getNetworkInterfaces(); + e.hasMoreElements(); ) { + NetworkInterface nif = (NetworkInterface) e.nextElement(); + for (Enumeration f = nif.getInetAddresses(); f.hasMoreElements(); ) + list.add(f.nextElement()); + } + harness.check(!list.isEmpty()); + + Permission[] checks = new Permission[list.size()]; + for (int i = 0; i < list.size(); i++) { + InetAddress addr = (InetAddress) list.get(i); + checks[i] = new SocketPermission(addr.getHostAddress(), "resolve"); + } + + TestSecurityManager sm = new TestSecurityManager(harness); + try { + sm.install(); + + // throwpoint: java.net.NetworkInterface-getInetAddresses + harness.checkPoint("getInetAddresses"); + try { + sm.prepareChecks(checks); + for (Enumeration e = NetworkInterface.getNetworkInterfaces(); + e.hasMoreElements(); ) { + NetworkInterface nif = (NetworkInterface) e.nextElement(); + nif.getInetAddresses(); + } + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } +} From tromey@redhat.com Fri Sep 22 19:01:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Fri, 22 Sep 2006 19:01:00 -0000 Subject: Patch: FYI: PR 29178 test Message-ID: This is the test case from PR 29178. Tom 2006-09-22 Tom Tromey PR libgcj/29178: * gnu/testlet/java/nio/charset/Charset/canEncode.java: New file. Index: gnu/testlet/java/nio/charset/Charset/canEncode.java =================================================================== RCS file: gnu/testlet/java/nio/charset/Charset/canEncode.java diff -N gnu/testlet/java/nio/charset/Charset/canEncode.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/nio/charset/Charset/canEncode.java 1 Jan 1970 00:00:00 -0000 @@ -0,0 +1,42 @@ +/* canEncode.java -- test canEncode method + Copyright (C) 2006 Red Hat, Inc. +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.4 + +package gnu.testlet.java.nio.charset.Charset; + +import java.nio.charset.Charset; +import java.nio.charset.CharsetEncoder; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +public class canEncode implements Testlet { + + public canEncode() { + } + + public void test(TestHarness harness) { + // Regression test for PR 29178. + CharsetEncoder enc = Charset.forName("US-ASCII").newEncoder(); + harness.check(!enc.canEncode('\u00e4')); + } +} From neugens@limasoftware.net Fri Sep 22 20:27:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Fri, 22 Sep 2006 20:27:00 -0000 Subject: FYI: DecimalFormat update Message-ID: <1158957238.2727.34.camel@vtigertest.nirvana.limasoftware.net> These are a couple of test used to check the new (not yet finalized) DecimalFormat class. 2006-09-22 Mario Torre * gnu/testlet/java/text/DecimalFormat/toPattern14.java: new file; this test is an update of toPattern for 1.4. * gnu/testlet/java/text/DecimalFormat/parse.java (test): small fix to the last test to help debugging: now uses the mauve check(results, expected) method. * gnu/testlet/java/text/DecimalFormat/MaximumAndMinimumDigits.java: new file. * gnu/testlet/java/text/DecimalFormat/getPositivePrefix.java (test): new tests * gnu/testlet/java/text/DecimalFormat/formatExp.java (test): new test added. Mario -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Proud GNU Classpath developer: http://www.classpath.org/ Read About us at: http://planet.classpath.org Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve_DecimalFormat-09-22-2006.patch Type: text/x-patch Size: 12365 bytes Desc: not available URL: From fkung@redhat.com Mon Sep 25 15:34:00 2006 From: fkung@redhat.com (Francis Kung) Date: Mon, 25 Sep 2006 15:34:00 -0000 Subject: FYI: coerceData tests Message-ID: <1159198443.2238.82.camel@toddy.toronto.redhat.com> Hi, The following patch (committed) adds tests for the ColorModel.coerceData methods. Cheers, Francis 2006-09-25 Francis Kung From tbento@redhat.com Tue Sep 26 19:09:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 26 Sep 2006 19:09:00 -0000 Subject: FYI: Rectangle constructor tests1 Message-ID: <1159297740.22639.23.camel@toothpaste.toronto.redhat.com> Hey, I have written a test (committed) for the Rectangle constructors and fixed the constructor regressions. I will be committing these regressions. I forgot to do a cvs diff before committing this file, so I just attached the file below. Sorry about that. 2006-09-26 Tania Bento * gnu/testlet/java/awt/Rectangle/constructors.java: New test. Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 6394 bytes Desc: not available URL: From neugens@limasoftware.net Wed Sep 27 14:51:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Wed, 27 Sep 2006 14:51:00 -0000 Subject: FYI: Preference test update Message-ID: <1159369055.2764.18.camel@vtigertest.nirvana.limasoftware.net> This adds a test for the latest updates in the GConf preference backend. I have also reformatted the test a bit. 2006-09-27 Mario Torre * gnu/testlet/java/util/prefs/PreferenceTest.java: code reformat. (testSpecialCharacters): new test. (test): enable use of new test. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Proud GNU Classpath developer: http://www.classpath.org/ Read About us at: http://planet.classpath.org Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-gconf-2006-09-27.patch Type: text/x-patch Size: 27242 bytes Desc: not available URL: From tbento@redhat.com Thu Sep 28 20:30:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 28 Sep 2006 20:30:00 -0000 Subject: FYI: More JTable constructor tests Message-ID: <1159475401.22639.37.camel@toothpaste.toronto.redhat.com> This adds more tests for the JTable constructor. Mainly, more tests with regards to JTable's default properties have been added. 2006-09-28 Tania Bento * gnu/testlet/javax/swing/JTable/constructors.java (cellProperties): New test. (selectionProperties): New test. (editingProperties): New test. (columnModelProperties): New test. (selectionModelProperties): New test. (linesNotNeeded): New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 9704 bytes Desc: not available URL: From tromey@redhat.com Fri Sep 29 01:18:00 2006 From: tromey@redhat.com (Tom Tromey) Date: Fri, 29 Sep 2006 01:18:00 -0000 Subject: Patch: FYI: update IdentityHashMap test Message-ID: This updates the IdentityHashMap test to check the result of remove(). Tom 2006-09-28 Tom Tromey * gnu/testlet/java/util/IdentityHashMap/simple.java (test): Check results of remove(). Index: gnu/testlet/java/util/IdentityHashMap/simple.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/util/IdentityHashMap/simple.java,v retrieving revision 1.2 diff -u -r1.2 simple.java --- gnu/testlet/java/util/IdentityHashMap/simple.java 18 Feb 2002 16:22:25 -0000 1.2 +++ gnu/testlet/java/util/IdentityHashMap/simple.java 29 Sep 2006 01:15:28 -0000 @@ -54,7 +54,11 @@ // Now remove some elements and recheck. harness.checkPoint ("remove"); for (int i = 0; i < 1000; i += 2) - map.remove (is[i]); + { + Object v = map.remove (is[i]); + harness.check(v, vs[i]); + } + harness.checkPoint("post remove"); for (int i = 1; i < 1000; i += 2) { Object k = map.get (is[i]); From julian.oppermann@aicas.de Fri Sep 29 09:38:00 2006 From: julian.oppermann@aicas.de (Julian Oppermann) Date: Fri, 29 Sep 2006 09:38:00 -0000 Subject: Patch: XML-reports incomplete (in case of check(Object,Object)) Message-ID: <451CE9A3.1070603@aicas.de> Hi, in class RunnerProcess I found the following issue: If check(Object,Object) is called and the object are not equal, this is written to stdout but the not appended to currentResult and in consequence, this failure appears not in the '-xmlout'-report. Regards, Julian -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: RunnerProcess.patch URL: From fkung@redhat.com Mon Oct 2 19:59:00 2006 From: fkung@redhat.com (Francis Kung) Date: Mon, 02 Oct 2006 19:59:00 -0000 Subject: FYI: Graphics.clearRect test Message-ID: <1159819180.2238.141.camel@toddy.toronto.redhat.com> Hi, This patch, already committed, adds a test for the Graphics.clearRect() method. Regards, Francis 2006-10-02 Francis Kung * gnu/testlet/java/awt/Graphics/clearRect.java: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: clearRect.diff Type: text/x-patch Size: 3786 bytes Desc: not available URL: From roman.kennke@aicas.com Wed Oct 4 15:33:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Wed, 04 Oct 2006 15:33:00 -0000 Subject: FYI: New VariableHeightLayoutCache test Message-ID: <1159975996.23462.2.camel@localhost> I added a test for VariableHeightLayoutCache.getBounds(). 2006-10-04 Roman Kennke * gnu/testlet/javax/swing/tree/VariableHeightLayoutCache/getBounds.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2671 bytes Desc: not available URL: From gbenson@redhat.com Thu Oct 5 13:19:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 05 Oct 2006 13:19:00 -0000 Subject: FYI: InetAddress throwpoint comment fixes Message-ID: <20061005131849.GB3919@redhat.com> Hi all, This commit fixes some comments in the InetAddress throwpoint tests. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1940 diff -u -r1.1940 ChangeLog --- ChangeLog 4 Oct 2006 15:32:42 -0000 1.1940 +++ ChangeLog 5 Oct 2006 13:09:15 -0000 @@ -1,3 +1,7 @@ +2006-10-05 Gary Benson + + * gnu/testlet/java/net/InetAddress/security.java: Comment fixes. + 2006-10-04 Roman Kennke * gnu/testlet/javax/swing/tree/VariableHeightLayoutCache/getBounds.java: Index: gnu/testlet/java/net/InetAddress/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/InetAddress/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/net/InetAddress/security.java 22 Sep 2006 11:44:09 -0000 1.1 +++ gnu/testlet/java/net/InetAddress/security.java 5 Oct 2006 13:09:15 -0000 @@ -47,7 +47,7 @@ try { sm.install(); - // throwpoint: java.net.InetAddress-getHostName() + // throwpoint: java.net.InetAddress-getHostName harness.checkPoint("getHostName"); try { sm.prepareChecks(checkConnect); @@ -59,7 +59,7 @@ harness.check(false, "unexpected check"); } - // throwpoint: java.net.InetAddress-getCanonicalHostName() + // throwpoint: java.net.InetAddress-getCanonicalHostName harness.checkPoint("getCanonicalHostName"); try { sm.prepareChecks(checkConnect); @@ -71,7 +71,7 @@ harness.check(false, "unexpected check"); } - // throwpoint: java.net.InetAddress-getByName() + // throwpoint: java.net.InetAddress-getByName harness.checkPoint("getByName"); try { sm.prepareChecks(checkConnect); @@ -83,7 +83,7 @@ harness.check(false, "unexpected check"); } - // throwpoint: java.net.InetAddress-getAllByName() + // throwpoint: java.net.InetAddress-getAllByName harness.checkPoint("getAllByName"); try { sm.prepareChecks(checkConnect); @@ -95,7 +95,7 @@ harness.check(false, "unexpected check"); } - // throwpoint: java.net.InetAddress-getLocalHost() + // throwpoint: java.net.InetAddress-getLocalHost harness.checkPoint("getLocalHost"); try { sm.prepareChecks(checkConnect); From gbenson@redhat.com Thu Oct 5 14:46:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Thu, 05 Oct 2006 14:46:00 -0000 Subject: FYI: Throwpoint checks for java.net.Socket Message-ID: <20061005144556.GC3919@redhat.com> Hi again, This commit adds throwpoint checks for java.net.Socket. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1941 diff -u -r1.1941 ChangeLog --- ChangeLog 5 Oct 2006 13:17:14 -0000 1.1941 +++ ChangeLog 5 Oct 2006 14:44:11 -0000 @@ -1,3 +1,7 @@ +2006-10-05 Gary Benson + + * gnu/testlet/java/net/Socket/security.java: New test. + 2006-10-05 Gary Benson * gnu/testlet/java/net/InetAddress/security.java: Comment fixes. Index: gnu/testlet/java/net/Socket/security.java =================================================================== RCS file: gnu/testlet/java/net/Socket/security.java diff -N gnu/testlet/java/net/Socket/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/Socket/security.java 5 Oct 2006 14:44:11 -0000 @@ -0,0 +1,197 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.Socket; + +import java.net.InetAddress; +import java.net.NetPermission; +import java.net.ServerSocket; +import java.net.Socket; +import java.net.SocketException; +import java.net.SocketPermission; +import java.security.Permission; +import java.util.PropertyPermission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + InetAddress inetaddr = InetAddress.getByName(null); + String hostname = inetaddr.getHostName(); + String hostaddr = inetaddr.getHostAddress(); + harness.check(!hostname.equals(hostaddr)); + + ServerSocket socket = new ServerSocket(0, 50, inetaddr); + int hostport = socket.getLocalPort(); + + Permission[] checkConnect = new Permission[] { + new SocketPermission(hostaddr + ":" + hostport, "connect")}; + + Permission[] checkResolveConnect = new Permission[] { + new SocketPermission(hostname, "resolve"), + new SocketPermission(hostaddr + ":" + hostport, "connect")}; + + Permission[] checkSelectorProvider = new Permission[] { + new RuntimePermission("selectorProvider")}; + + Permission[] checkSetFactory = new Permission[] { + new RuntimePermission("setFactory")}; + + TestSecurityManager sm = new TestSecurityManager(harness); + try { + sm.install(); + + // throwpoint: java.net.Socket-Socket(InetAddress, int) + harness.checkPoint("Socket(InetAddress, int)"); + try { + sm.prepareChecks(checkConnect, checkSelectorProvider); + new Socket(inetaddr, hostport).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.Socket-Socket(String, int) + harness.checkPoint("Socket(String, int)"); + try { + sm.prepareChecks(checkConnect, checkSelectorProvider); + new Socket(hostaddr, hostport).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkResolveConnect, checkSelectorProvider); + new Socket(hostname, hostport).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.Socket-Socket(InetAddress, int, boolean) + harness.checkPoint("Socket(InetAddress, int, boolean)"); + for (int i = 0; i < 2; i++) { + try { + sm.prepareChecks(checkConnect, checkSelectorProvider); + new Socket(inetaddr, hostport, i == 0).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.net.Socket-Socket(String, int, boolean) + harness.checkPoint("Socket(String, int, boolean)"); + for (int i = 0; i < 2; i++) { + try { + sm.prepareChecks(checkConnect, checkSelectorProvider); + new Socket(hostaddr, hostport, i == 0).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkResolveConnect, checkSelectorProvider); + new Socket(hostname, hostport, i == 0).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + } + + // throwpoint: java.net.Socket-Socket(InetAddress,int,InetAddress,int) + harness.checkPoint("Socket(InetAddress, int, InetAddress, int)"); + try { + sm.prepareChecks(checkConnect, checkSelectorProvider); + new Socket(inetaddr, hostport, inetaddr, 0).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.Socket-Socket(String, int, InetAddress, int) + harness.checkPoint("Socket(String, int, InetAddress, int)"); + try { + sm.prepareChecks(checkConnect, checkSelectorProvider); + new Socket(hostaddr, hostport, inetaddr, 0).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkResolveConnect, checkSelectorProvider); + new Socket(hostname, hostport, inetaddr, 0).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: TODO: java.net.Socket-Socket(Proxy) + + // throwpoint: java.net.Socket-setSocketImplFactory + harness.checkPoint("setSocketImplFactory"); + try { + sm.prepareHaltingChecks(checkSetFactory); + Socket.setSocketImplFactory(null); + harness.check(false); + } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Exception e) { + harness.debug(e); + harness.check(false, "Unexpected exception"); + } + } +} From david.gilbert@object-refinery.com Fri Oct 6 08:28:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 06 Oct 2006 08:28:00 -0000 Subject: FYI: Calendar.getInstance() - new checks Message-ID: <45261399.5050702@object-refinery.com> This patch (committed) adds some checks for the Calendar.getInstance() methods: 2006-10-06 David Gilbert * gnu/testlet/java/util/Calendar/getInstance.java: (testMethod1): Added check for new instance, (testMethod2): Likewise, (testMethod3): Likewise, (testMethod4): Likewise. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From roman.kennke@aicas.com Fri Oct 6 10:43:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Fri, 06 Oct 2006 10:43:00 -0000 Subject: FYI: Mauve goes JUnit Message-ID: <1160131384.6614.17.camel@localhost> Here comes an implementation of the core JUnit API (junit.framework + some bits) for running JUnit tests inside the Mauve Harness. As an example I prepared the harmony testsuite a little (I only moved the tests into the gnu.testlet namespace so that the Harness can find it): http://kennke.org/~roman/harmony-swing-awt.jar This is the Swing/AWT testsuite that has been prepared by David and moved into the gnu.testlet namespace. You can run single tests like you are used from Mauve, e.g.: jamvm Harness test.javax.swing.AbstractButtonTest This patch not only allows integration of existing JUnit tests, you can now write new tests in JUnit style if you like. This has some advantages, like having setUp() and tearDown() called, some kind of standard named test methods etc. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 55804 bytes Desc: not available URL: From roman.kennke@aicas.com Mon Oct 9 13:36:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 09 Oct 2006 13:36:00 -0000 Subject: FYI: New JSplitPane / UI tests Message-ID: <1160400971.4565.18.camel@localhost> This tests some methods in the JSplitPane and its UI class. 2006-10-09 Roman Kennke * gnu/testlet/javax/swing/JSplitPane/getDividerLocation.java, * gnu/testlet/javax/swing/plaf/basic/BasicSplitPaneUI/getDividerLocation.java, * gnu/testlet/javax/swing/plaf/basic/BasicSplitPaneUI/BasicHorizontalLayoutManager/layoutContainer.java: New tests. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 7956 bytes Desc: not available URL: From gbenson@redhat.com Mon Oct 9 14:56:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Mon, 09 Oct 2006 14:56:00 -0000 Subject: FYI: Throwpoint checks for java.net.ServerSocket Message-ID: <20061009145559.GB3809@redhat.com> Hi again, This commit adds throwpoint checks for java.net.ServerSocket. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1947 diff -u -r1.1947 ChangeLog --- ChangeLog 9 Oct 2006 13:35:47 -0000 1.1947 +++ ChangeLog 9 Oct 2006 14:53:57 -0000 @@ -1,3 +1,7 @@ +2006-10-09 Gary Benson + + * gnu/testlet/java/net/ServerSocket/security.java: New test. + 2006-10-09 Roman Kennke * gnu/testlet/javax/swing/JSplitPane/getDividerLocation.java, Index: gnu/testlet/java/net/ServerSocket/security.java =================================================================== RCS file: gnu/testlet/java/net/ServerSocket/security.java diff -N gnu/testlet/java/net/ServerSocket/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/ServerSocket/security.java 9 Oct 2006 14:53:57 -0000 @@ -0,0 +1,183 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.ServerSocket; + +import java.net.InetAddress; +import java.net.BindException; +import java.net.ServerSocket; +import java.net.Socket; +import java.net.SocketPermission; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + InetAddress inetaddr = InetAddress.getByName(null); + String hostname = inetaddr.getHostName(); + String hostaddr = inetaddr.getHostAddress(); + harness.check(!hostname.equals(hostaddr)); + + ServerSocket ssocket = new ServerSocket(0, 50, inetaddr); + int sport = ssocket.getLocalPort(); + Socket csocket = new Socket(inetaddr, sport, inetaddr, 0); + int cport = csocket.getLocalPort(); + + Permission[] checkListen80 = new Permission[] { + new SocketPermission(hostname + ":80", "listen")}; + + Permission[] checkListen1024plus = new Permission[] { + new SocketPermission(hostname + ":1024-", "listen")}; + + Permission[] checkAccept = new Permission[] { + new SocketPermission(hostaddr + ":" + cport, "accept")}; + + Permission[] checkSelectorProvider = new Permission[] { + new RuntimePermission("selectorProvider")}; + + Permission[] checkSetFactory = new Permission[] { + new RuntimePermission("setFactory")}; + + TestSecurityManager sm = new TestSecurityManager(harness); + try { + sm.install(); + + // throwpoint: java.net.ServerSocket-ServerSocket(int) + harness.checkPoint("ServerSocket(int)"); + try { + sm.prepareChecks(checkListen80, checkSelectorProvider); + try { + new ServerSocket(80).close(); + } + catch (BindException e) { + } + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkListen1024plus, checkSelectorProvider); + new ServerSocket(0).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.ServerSocket-ServerSocket(int, int) + harness.checkPoint("ServerSocket(int, int)"); + try { + sm.prepareChecks(checkListen80, checkSelectorProvider); + try { + new ServerSocket(80, 50).close(); + } + catch (BindException e) { + } + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkListen1024plus, checkSelectorProvider); + new ServerSocket(0, 50).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.ServerSocket-ServerSocket(int, int,InetAddress) + harness.checkPoint("ServerSocket(int, int, InetAddress)"); + try { + sm.prepareChecks(checkListen80, checkSelectorProvider); + try { + new ServerSocket(80, 50, inetaddr).close(); + } + catch (BindException e) { + } + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkListen1024plus, checkSelectorProvider); + new ServerSocket(0, 50, inetaddr).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.ServerSocket-accept + harness.checkPoint("accept"); + try { + sm.prepareChecks(checkAccept, checkSelectorProvider); + ssocket.accept().close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.ServerSocket-setSocketFactory + harness.checkPoint("setSocketFactory"); + try { + sm.prepareHaltingChecks(checkSetFactory); + ServerSocket.setSocketFactory(null); + harness.check(false); + } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + csocket.close(); + ssocket.close(); + } + } + catch (Exception e) { + harness.debug(e); + harness.check(false, "Unexpected exception"); + } + } +} From roman@kennke.org Tue Oct 10 20:22:00 2006 From: roman@kennke.org (Roman Kennke) Date: Tue, 10 Oct 2006 20:22:00 -0000 Subject: FYI: Fix JTree.isRowSelected() test Message-ID: <1160346821.10926.9.camel@localhost> This test tested for the wrong method (getRowForPath() instead of the correct getPathForRow() method) and I added an additional check to see if isPathSelected() is called during isRowSelected(). 2006-10-09 Roman Kennke * gnu/testlet/javax/swing/JTree/isRowSelected.java (TestTree.isPathSelected): New overridden method for testing. (TestTree.getRowForPath): Removed. (TestTree.getPathForRow): New overridden method for testing. (isPathSelectedCalled): New field. (getPathForRowCalled): Renamed old getRowForPathCalled field. (test): Include new isPathSelected() test. (testGetRowForPath): Renamed method and check getPathForRow() instead of getRowForPath(). (testCallIsRowSelected): New test method. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3815 bytes Desc: not available URL: From roman@kennke.org Tue Oct 10 20:23:00 2006 From: roman@kennke.org (Roman Kennke) Date: Tue, 10 Oct 2006 20:23:00 -0000 Subject: FYI: New JTree.isRowSelected() test Message-ID: <1160345837.10926.0.camel@localhost> This new test tests that JTree.isRowSelected() has to delegate the call to the tree selection model. 2006-10-09 Roman Kennke * gnu/testlet/javax/swing/JTree/isRowSelected.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3597 bytes Desc: not available URL: From neugens@limasoftware.net Tue Oct 10 22:12:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Tue, 10 Oct 2006 22:12:00 -0000 Subject: New DecimalFormat tests Message-ID: <1160518813.2667.5.camel@vtigertest.nirvana.limasoftware.net> There are a couple of new tests here. Most notably there is a new test for this bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23996 This should be fixes (I hope) in my last patch (not yet submitted to HEAD), but still needs testing. Mario 2006-10-11 Mario Torre * gnu/testlet/java/text/DecimalFormat/format.java (PR23996): Test for PR23996. (test): Enable PR23996 test. (testGeneral): new test. * gnu/testlet/java/text/DecimalFormat/applyPattern.java (test): test added. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Proud GNU Classpath developer: http://www.classpath.org/ Read About us at: http://planet.classpath.org Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-decimalformat-2006-10-11.patch Type: text/x-patch Size: 2515 bytes Desc: not available URL: From neugens@limasoftware.net Tue Oct 10 22:35:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Tue, 10 Oct 2006 22:35:00 -0000 Subject: FYI: New DecimalFormat tests In-Reply-To: <1160518813.2667.5.camel@vtigertest.nirvana.limasoftware.net> References: <1160518813.2667.5.camel@vtigertest.nirvana.limasoftware.net> Message-ID: <1160520181.2667.21.camel@vtigertest.nirvana.limasoftware.net> Il giorno mer, 11/10/2006 alle 00.20 +0200, Mario Torre ha scritto: > There are a couple of new tests here. Ooops sorry, here follows the correct Changelog and patch (the PR23996 has a file of its own): 2006-10-11 Mario Torre * gnu/testlet/java/text/DecimalFormat/PR23996.java: Test for PR23996. * gnu/testlet/java/text/DecimalFormat/format.java (testGeneral): new test. * gnu/testlet/java/text/DecimalFormat/applyPattern.java (test): test added. Mario -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Proud GNU Classpath developer: http://www.classpath.org/ Read About us at: http://planet.classpath.org Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-decimalformat-2006-10-11.patch Type: text/x-patch Size: 3919 bytes Desc: not available URL: From gbenson@redhat.com Wed Oct 11 12:56:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 11 Oct 2006 12:56:00 -0000 Subject: FYI: Throwpoint checks for java.net.URLClassLoader Message-ID: <20061011125549.GC24565@redhat.com> Hi all, This commit adds throwpoint checks for java.net.URLClassLoader. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1949 diff -u -r1.1949 ChangeLog --- ChangeLog 10 Oct 2006 22:36:48 -0000 1.1949 +++ ChangeLog 11 Oct 2006 12:50:48 -0000 @@ -1,3 +1,7 @@ +2006-10-11 Gary Benson + + * gnu/testlet/java/net/URLClassLoader/security.java: New test. + 2006-10-11 Mario Torre * gnu/testlet/java/text/DecimalFormat/PR23996.java: Index: gnu/testlet/java/net/URLClassLoader/security.java =================================================================== RCS file: gnu/testlet/java/net/URLClassLoader/security.java diff -N gnu/testlet/java/net/URLClassLoader/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/URLClassLoader/security.java 11 Oct 2006 12:50:48 -0000 @@ -0,0 +1,101 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.URLClassLoader; + +import java.net.URL; +import java.net.URLClassLoader; +import java.net.URLStreamHandler; +import java.net.URLStreamHandlerFactory; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + ClassLoader loader = getClass().getClassLoader(); + URLStreamHandlerFactory ushf = new TestUSHFactory(); + + Permission[] createClassLoader = new Permission[] { + new RuntimePermission("createClassLoader")}; + + TestSecurityManager sm = new TestSecurityManager(harness); + try { + sm.install(); + + // throwpoint: java.net.URLClassLoader-URLClassLoader(URL[]) + harness.checkPoint("Constructor (1 arg)"); + try { + sm.prepareChecks(createClassLoader); + new URLClassLoader(new URL[0]); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.URLClassLoader-URLClassLoader(URL[], ClassLoader) + harness.checkPoint("Constructor (2 arg)"); + try { + sm.prepareChecks(createClassLoader); + new URLClassLoader(new URL[0], loader); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.URLClassLoader-URLClassLoader(URL[], ClassLoader, URLStreamHandlerFactory) + harness.checkPoint("Constructor (3 arg)"); + try { + sm.prepareChecks(createClassLoader); + new URLClassLoader(new URL[0], loader, ushf); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + private static class TestUSHFactory implements URLStreamHandlerFactory + { + public URLStreamHandler createURLStreamHandler(String protocol) + { + throw new RuntimeException("not implemented"); + } + } +} From gbenson@redhat.com Wed Oct 11 13:49:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 11 Oct 2006 13:49:00 -0000 Subject: FYI: Throwpoint checks for java.net.URL Message-ID: <20061011134859.GD24565@redhat.com> Hi again, This commit adds throwpoint checks for java.net.URL. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1950 diff -u -r1.1950 ChangeLog --- ChangeLog 11 Oct 2006 12:51:34 -0000 1.1950 +++ ChangeLog 11 Oct 2006 13:47:37 -0000 @@ -1,3 +1,7 @@ +2006-10-11 Gary Benson + + * gnu/testlet/java/net/URL/security.java: New test. + 2006-10-11 Gary Benson * gnu/testlet/java/net/URLClassLoader/security.java: New test. Index: gnu/testlet/java/net/URL/security.java =================================================================== RCS file: gnu/testlet/java/net/URL/security.java diff -N gnu/testlet/java/net/URL/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/URL/security.java 11 Oct 2006 13:47:37 -0000 @@ -0,0 +1,91 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.URL; + +import java.io.IOException; +import java.net.NetPermission; +import java.net.URL; +import java.net.URLConnection; +import java.net.URLStreamHandler; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + URLStreamHandler handler = new TestURLStreamHandler(); + + URL context = new URL("http://www.redhat.com/"); + + Permission[] specifyStreamHandler = new Permission[] { + new NetPermission("specifyStreamHandler")}; + + TestSecurityManager sm = new TestSecurityManager(harness); + try { + sm.install(); + + // throwpoint: java.net.URL-URL(String, String, int, String, URLStreamHandler) + harness.checkPoint("URL(String, String, int, String, URLStreamHandler)"); + try { + sm.prepareChecks(specifyStreamHandler); + new URL("redhat", "redhat.com", 23, "/red/hat/", handler); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.URL-URL(URL, String, URLStreamHandler) + harness.checkPoint("URL(String, String, int, String, URLStreamHandler)"); + try { + sm.prepareChecks(specifyStreamHandler); + new URL(context, "/red/hat/", handler); + sm.checkAllChecked(); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Exception ex) { + harness.debug(ex); + harness.check(false, "Unexpected exception"); + } + } + + private static class TestURLStreamHandler extends URLStreamHandler + { + public URLConnection openConnection(URL url) throws IOException + { + throw new RuntimeException("not implemented"); + } + } +} From gbenson@redhat.com Wed Oct 11 14:08:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Wed, 11 Oct 2006 14:08:00 -0000 Subject: FYI: Another throwpoint check java.net.URL In-Reply-To: <20061011134859.GD24565@redhat.com> References: <20061011134859.GD24565@redhat.com> Message-ID: <20061011140807.GE24565@redhat.com> Missed one :) -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1951 diff -u -r1.1951 ChangeLog --- ChangeLog 11 Oct 2006 13:48:21 -0000 1.1951 +++ ChangeLog 11 Oct 2006 14:05:43 -0000 @@ -1,3 +1,7 @@ +2006-10-11 Gary Benson + + * gnu/testlet/java/net/URL/security.java: Add a test I missed. + 2006-10-11 Gary Benson * gnu/testlet/java/net/URL/security.java: New test. Index: gnu/testlet/java/net/URL/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/URL/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/net/URL/security.java 11 Oct 2006 13:48:21 -0000 1.1 +++ gnu/testlet/java/net/URL/security.java 11 Oct 2006 14:05:43 -0000 @@ -43,6 +43,9 @@ Permission[] specifyStreamHandler = new Permission[] { new NetPermission("specifyStreamHandler")}; + Permission[] checkSetFactory = new Permission[] { + new RuntimePermission("setFactory")}; + TestSecurityManager sm = new TestSecurityManager(harness); try { sm.install(); @@ -70,6 +73,21 @@ harness.debug(ex); harness.check(false, "unexpected check"); } + + // throwpoint: java.net.URL-setURLStreamHandlerFactory + harness.checkPoint("setURLStreamHandlerFactory"); + try { + sm.prepareHaltingChecks(checkSetFactory); + URL.setURLStreamHandlerFactory(null); + harness.check(false); + } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } } finally { sm.uninstall(); From fitzsim@redhat.com Fri Oct 13 05:25:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Fri, 13 Oct 2006 05:25:00 -0000 Subject: FYI: fix DefaultComboBoxModel.setSelectedItem test Message-ID: <452F2348.4040406@redhat.com> Hi, I committed this fix. When setSelectedItem is passed an object that is not in the list, it simply returns without doing anything. Tom 2006-10-13 Thomas Fitzsimmons * gnu/testlet/javax/swing/DefaultComboBoxModel/setSelectedItem.java (test): Correct "item not in the list" case. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-defaultcomboboxmodel-set-selected-item.patch Type: text/x-patch Size: 1297 bytes Desc: not available URL: From roman.kennke@aicas.com Fri Oct 13 11:52:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Fri, 13 Oct 2006 11:52:00 -0000 Subject: FYI/RFC: Interactive GUI tests for Mauve Message-ID: <1160740344.4614.16.camel@localhost> Hi, (I'm CC'ing classpath@gnu.org as this might be of more general interest) This is a first implementation for visual interactive tests in Mauve. This allows to write testcases that require human interaction, for example: - to test specific rendering issues of Swing components - for complex issues that are not easily transformed in automated testcases, but are quite easy to check interactivly - quickly transform Swing testprograms from the bugdatabase into regression tests - and many more In order to write such an interactive test, subclass from gnu.testlet.VisualTestlet and implement the abstract methods. To run interactive tests: java Harness -interactive The -interactive flag tells the TestRunner to only perform interactive tests, leaving this flag away only performs only non-interactive tests. The test asks the tester on the console if the test passed or failed. I think that this is better than additional GUIness, because we are testing the GUI here, and need to run with a minimum of additional GUI stuff. This is slightly inconvenient, as it requires the tester to change between a Terminal and the test window. This adds an example test that I've written for a bug that I fixed this morning. Comments and improvements are welcome. 2006-10-03 Roman Kennke * Harness.java (InputPiperThread): New inner class. Forwards the input from the outside process to the inside (test) process. (initProcess): Set up piping. (printHelpMessage): Added description of -interactive option. * RunnerProcess.java (interactive): New field. This is set to true when we are running interactive tests only. (main): Interpret -interactive option. (runtest): Filter tests based on the -interactive flag. * gnu/testlet/VisualTestlet.java: New class. This is the base class for visual (interactive) tests. * gnu/testlet/javax/swing/JMenuItem/DragSelectTest.java: New interactive test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 18207 bytes Desc: not available URL: From tbento@redhat.com Fri Oct 13 17:41:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 13 Oct 2006 17:41:00 -0000 Subject: FYI: ScrollPane.setLayout test Message-ID: <1160761307.22639.121.camel@toothpaste.toronto.redhat.com> Hey, I will be committing this fix shortly. The method setLayout should never be called by ScrollPane, and if it is, an AWTError should be thrown. 2006-10-13 Tania Bento * gnu/testlet/java/awt/ScrollPane/testSetLayout.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1890 bytes Desc: not available URL: From roman.kennke@aicas.com Sat Oct 14 12:57:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Sat, 14 Oct 2006 12:57:00 -0000 Subject: FYI: New ToolTipManager regression test Message-ID: <1160830606.8037.1.camel@localhost> This is a new visual test that tests the ToolTipManager dynamic tooltip facility. This is a regression test for: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27957 2006-10-14 Roman Kennke * gnu/testlet/javax/swing/ToolTipManager/DynamicToolTipTest.java: New test. This is a regression test for http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27957 . /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2752 bytes Desc: not available URL: From roman.kennke@aicas.com Mon Oct 16 11:46:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 16 Oct 2006 11:46:00 -0000 Subject: FYI: New AccessibleJLabel tests Message-ID: <1160999175.5940.15.camel@localhost> This adds test for two methods in AccessibleJLabel. 2006-10-16 Roman Kennke * gnu/testlet/javax/swing/JLabel/AccessibleJLabel/getCharacterBounds.java, * gnu/testlet/javax/swing/JLabel/AccessibleJLabel/getIndexAtPoint.java: New tests. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 8450 bytes Desc: not available URL: From fkung@redhat.com Tue Oct 17 14:47:00 2006 From: fkung@redhat.com (Francis Kung) Date: Tue, 17 Oct 2006 14:47:00 -0000 Subject: FYI: Raster.createChild checks Message-ID: <1161096434.2227.3.camel@toddy.toronto.redhat.com> Hi, This patch adds some tests for Raster.createChild, WritableRaster.createWritableChild, and BufferedImage.getSubimage. Cheers, Francis 2006-10-17 Francis Kung * gnu/testlet/java/awt/image/BufferedImage/getSubimage.java, * gnu/testlet/java/awt/image/Raster/createChild.java, * gnu/testlet/java/awt/image/WritableRaster/createWritableChild.java: New tests. -------------- next part -------------- A non-text attachment was scrubbed... Name: rasterChild.diff Type: text/x-patch Size: 15396 bytes Desc: not available URL: From roman.kennke@aicas.com Tue Oct 17 15:24:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Tue, 17 Oct 2006 15:24:00 -0000 Subject: FYI: New TransferHandler test Message-ID: <1161098626.4769.12.camel@localhost> This tests the method TransferHandler.createTransferable(). 2006-10-17 Roman Kennke * gnu/testlet/javax/swing/TransferHandler/createTransferable.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 7575 bytes Desc: not available URL: From tbento@redhat.com Wed Oct 18 21:40:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 18 Oct 2006 21:40:00 -0000 Subject: FYI: CardLayout tests Message-ID: <1161207635.22639.163.camel@toothpaste.toronto.redhat.com> Hey, These two new mauve tests checks what happens when the maximumLayoutSize() and minimumLayoutSize() methods are called with null as its argument. In maximumLayoutSize(), a new Dimension with Integer.MAX_VALUE as its width and height values should be thrown and not a NullPointerException. However, minimumLayoutSize() remain as it is and throw a NullPointerException. I will be committing the fix in maximumLayoutSize() shortly. Tania 2006-10-18 Tania Bento * gnu/testlet/java/awt/CardLayout/testMaximumLayoutSize.java: New test. * gnu/testlet/java/awt/CardLayout/testMinimumLayoutSize.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3381 bytes Desc: not available URL: From theBohemian@gmx.net Thu Oct 19 08:45:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Thu, 19 Oct 2006 08:45:00 -0000 Subject: RFC: Add -vmextra switch Message-ID: <45373B2D.1090800@gmx.net> Hi all, I found it usefull to be able to run the test process with a tool like strace and modified Harness.java in order to make that possible. Is that OK for everyone? ChangeLog: 2006-10-19 Robert Schuster * Harness.java: Added vmExtra field. (setupHarness): Examine -vmextra argument. (initProcess): Use vmExtra field if non-null. * README: Added info about -vmextra switch. cya Robert -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-vmextra.diff Type: text/x-patch Size: 2336 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 253 bytes Desc: OpenPGP digital signature URL: From ddaney@avtrex.com Thu Oct 19 15:58:00 2006 From: ddaney@avtrex.com (David Daney) Date: Thu, 19 Oct 2006 15:58:00 -0000 Subject: RFC: Add -vmextra switch In-Reply-To: <45373B2D.1090800@gmx.net> References: <45373B2D.1090800@gmx.net> Message-ID: <4537A092.9060704@avtrex.com> Robert Schuster wrote: > Hi all, > I found it usefull to be able to run the test process with a tool like strace > and modified Harness.java in order to make that possible. > > Is that OK for everyone? > > ChangeLog: > > 2006-10-19 Robert Schuster > > * Harness.java: Added vmExtra field. > (setupHarness): Examine -vmextra argument. > (initProcess): Use vmExtra field if non-null. > * README: Added info about -vmextra switch. > > cya > Robert I like the idea, but I would call it something like 'vmprefix'. David Daney From fkung@redhat.com Thu Oct 19 20:36:00 2006 From: fkung@redhat.com (Francis Kung) Date: Thu, 19 Oct 2006 20:36:00 -0000 Subject: FYI: BufferedImage defaults Message-ID: <1161290189.2227.27.camel@toddy.toronto.redhat.com> Hi, This patch adds tests for the default image types in BufferedImage. Cheers, Francis 2006-10-19 Francis Kung * gnu/testlet/java/awt/image/BufferedImage/constants.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-BufferedImageTypes.diff Type: text/x-patch Size: 14866 bytes Desc: not available URL: From theBohemian@gmx.net Fri Oct 20 01:39:00 2006 From: theBohemian@gmx.net (Robert Schuster) Date: Fri, 20 Oct 2006 01:39:00 -0000 Subject: RFC: Add -vmprefix switch -- committed In-Reply-To: <4537A092.9060704@avtrex.com> References: <45373B2D.1090800@gmx.net> <4537A092.9060704@avtrex.com> Message-ID: <453828D9.6000103@gmx.net> Hi, I changed the naming to vmprefix and committed the patch. ChangeLog: 2006-10-20 Robert Schuster * Harness.java: Added vmExtra field. (setupHarness): Examine -vmprefix argument. (initProcess): Use vmPrefix field if non-null. * README: Added info about -vmprefix switch. cya Robert David Daney wrote: > Robert Schuster wrote: > >> Hi all, >> I found it usefull to be able to run the test process with a tool like >> strace >> and modified Harness.java in order to make that possible. >> >> Is that OK for everyone? >> >> ChangeLog: >> >> 2006-10-19 Robert Schuster >> >> * Harness.java: Added vmExtra field. >> (setupHarness): Examine -vmextra argument. >> (initProcess): Use vmExtra field if non-null. >> * README: Added info about -vmextra switch. >> >> cya >> Robert > > > I like the idea, but I would call it something like 'vmprefix'. > > David Daney > > -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-vmextra.diff Type: text/x-patch Size: 2346 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 253 bytes Desc: OpenPGP digital signature URL: From tbento@redhat.com Fri Oct 20 17:14:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 20 Oct 2006 17:14:00 -0000 Subject: FYI: Scrollbar tests Message-ID: <1161364451.22639.182.camel@toothpaste.toronto.redhat.com> Hey, I have written three new tests (committed) for Scrollbar that test the setValues(int,int,int,int), setBlockIncrement(int) and the setUnitIncrement(int) methods. One of the tests in setValues passes on the reference implementation but failes on Classpath. Cheers, Tania 2006-10-20 Tania Bento * gnu/testlet/java/awt/Scrollbar/testSetBlockIncrement: New test. * gnu/testlet/java/awt/Scrollbar/testSetValues.java: New test. * gnu/testlet/java/awt/Scrollbar/testSetUnitIncrement: New test -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 10797 bytes Desc: not available URL: From tbento@redhat.com Tue Oct 24 13:53:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 24 Oct 2006 13:53:00 -0000 Subject: FYI: More Scrollbar tests Message-ID: <1161698028.17015.2.camel@toothpaste.toronto.redhat.com> Hey, This patch (committed) adds some new tests to Scrollbar. Cheers, Tania 2006-10-24 Tania Bento * gnu/testlet/java/awt/Scrollbar/testSetValues: Added a new test. * gnu/testlet/java/awt/Scrollbar/testSetBlockIncrement: Added a new test. * gnu/testlet/java/awt/Scrollbar/testSetUnitIncrement: Added a new test. From tbento@redhat.com Wed Oct 25 20:19:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 25 Oct 2006 20:19:00 -0000 Subject: new FileDialog and Dialog tests Message-ID: <1161807534.17015.29.camel@toothpaste.toronto.redhat.com> Hey, This patch adds tests for java.awt.Dialog and java.awt.FileDialog. Cheers, Tania 2006-10-25 Tania Bento * gnu/testlet/java/awt/Dialog/defaultProperties.java: New test. * gnu/testlet/java/awt/FileDialog/defaultProperties.java: New test. * gnu/testlet/java/awt/FileDialog/setFile.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 11415 bytes Desc: not available URL: From roman@kennke.org Sat Oct 28 10:31:00 2006 From: roman@kennke.org (Roman Kennke) Date: Sat, 28 Oct 2006 10:31:00 -0000 Subject: FYI: New TransferHandler test Message-ID: <1162031425.7168.0.camel@localhost> This adds extensive test for TransferHandler.importData(). 2006-10-28 Roman Kennke * gnu/testlet/javax/swing/TransferHandler/importData.java: New test. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 5917 bytes Desc: not available URL: From roman.kennke@aicas.com Mon Oct 30 13:09:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Mon, 30 Oct 2006 13:09:00 -0000 Subject: FYI: New DataFlavor tests Message-ID: <1162213728.4708.0.camel@localhost> This adds two tests for DataFlavor.readExternal() and DataFlavor.writeExternal(). 2006-10-30 Roman Kennke * gnu/testlet/java/awt/datatransfer/DataFlavor/readExternal.java, * gnu/testlet/java/awt/datatransfer/DataFlavor/writeExternal.java: New tests. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 8332 bytes Desc: not available URL: From psj@harker.dyndns.org Mon Oct 30 19:49:00 2006 From: psj@harker.dyndns.org (Paul Jenner) Date: Mon, 30 Oct 2006 19:49:00 -0000 Subject: mauve build fix for VisualTestlet Message-ID: <1162237726.8716.2.camel@localhost.localdomain> Hi. "make" step was failing for me with clean checkout of mauve without the attached patch. Could someone please review and apply? For reference, ecj gave error: home/psj/software/install/bin/ecj -bootclasspath /home/psj/software/install/classpath-cvs/share/classpath/glibj.zip Harness.java RunnerProcess.java gnu/testlet/config.java gnu/testlet/TestHarness.java gnu/testlet/Testlet.java gnu/testlet/TestSecurityManager.java gnu/testlet/ResourceNotFoundException.java gnu/testlet/TestReport.java gnu/testlet/TestResult.java ---------- 1. ERROR in RunnerProcess.java (at line 32) import gnu.testlet.VisualTestlet; ^^^^^^^^^^^^^^^^^^^^^^^^^ The import gnu.testlet.VisualTestlet cannot be resolved ---------- 2. ERROR in RunnerProcess.java (at line 279) if (o instanceof VisualTestlet) ^^^^^^^^^^^^^ VisualTestlet cannot be resolved to a type ---------- 2 problems (2 errors)make: *** [harness] Error 255 Thanks, Paul -- Paul Jenner -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-VisualTestletbuildfix.patch Type: text/x-patch Size: 748 bytes Desc: not available URL: From tbento@redhat.com Tue Oct 31 19:27:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 31 Oct 2006 19:27:00 -0000 Subject: FYI: New JTextField test Message-ID: <1162322842.17015.74.camel@toothpaste.toronto.redhat.com> Hey, This adds one new test for javax.swing.JTextField.fireActionPerformed(). 2006-10-31 Tania Bento * gnu/testlet/javax/swing/JTextField/fireActionPerfomed: New test. Cheers, Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 3583 bytes Desc: not available URL: From tbento@redhat.com Wed Nov 1 14:33:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 01 Nov 2006 14:33:00 -0000 Subject: FYI: Added a new test for JTextField Message-ID: <1162391576.17015.82.camel@toothpaste.toronto.redhat.com> Hey, This adds one other test for javax.swing.JTextField.fireActionPerformed(). 2006-10-31 Tania Bento * gnu/testlet/javax/swing/JTextField/fireActionPerfomed: Added a new test. Cheers, Tania -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2475 bytes Desc: not available URL: From tbento@redhat.com Wed Nov 1 14:35:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 01 Nov 2006 14:35:00 -0000 Subject: FYI: Added a new test for JTextField In-Reply-To: <1162391576.17015.82.camel@toothpaste.toronto.redhat.com> References: <1162391576.17015.82.camel@toothpaste.toronto.redhat.com> Message-ID: <1162391702.17015.84.camel@toothpaste.toronto.redhat.com> Sorry.. Wrong date in the changelog entry. 2006-11-01 Tania Bento * gnu/testlet/javax/swing/JTextField/fireActionPerformed.java: Added a new test. On Wed, 2006-11-01 at 09:32 -0500, Tania Bento wrote: > Hey, > > This adds one other test for > javax.swing.JTextField.fireActionPerformed(). > > 2006-10-31 Tania Bento > > * gnu/testlet/javax/swing/JTextField/fireActionPerfomed: Added a > new test. > > Cheers, > Tania > From tbento@redhat.com Wed Nov 1 16:51:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 01 Nov 2006 16:51:00 -0000 Subject: FYI: New GridBagLayout test Message-ID: <1162399870.17015.87.camel@toothpaste.toronto.redhat.com> Hey, This adds a new test to java.awt.GridBagLayout.toString(). Cheers, Tania 2006-11-01 Tania Bento * gnu/testlet/java/awt/GridBagLayout/toString.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1672 bytes Desc: not available URL: From tbento@redhat.com Wed Nov 1 19:55:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 01 Nov 2006 19:55:00 -0000 Subject: FYI: New ScrollPaneAjustable test Message-ID: <1162410942.17015.97.camel@toothpaste.toronto.redhat.com> Hey, This adds a new test to java.awt.ScrollPaneAdjustable.paramString(). Cheers, Tania 2006-11-01 Tania Bento * gnu/testlet/java/awt/ScrollPaneAdjustable/paramString.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1932 bytes Desc: not available URL: From tbento@redhat.com Fri Nov 3 15:01:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 03 Nov 2006 15:01:00 -0000 Subject: FYI: New ComponentEvent test Message-ID: <1162566055.17015.167.camel@toothpaste.toronto.redhat.com> Hey, This adds a new test for java.awt.event.ComponentEvent.paramString(). Cheers, Tania 2006-11-03 Tania Bento * gnu/testlet/java/awt/event/ComponentEvent/paramString.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2282 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Nov 3 15:04:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 03 Nov 2006 15:04:00 -0000 Subject: FYI: New ComponentEvent test In-Reply-To: <1162566055.17015.167.camel@toothpaste.toronto.redhat.com> References: <1162566055.17015.167.camel@toothpaste.toronto.redhat.com> Message-ID: <454B5A55.2080206@object-refinery.com> Tania Bento wrote: > Hey, > > This adds a new test for java.awt.event.ComponentEvent.paramString(). > > Cheers, > Tania > > 2006-11-03 Tania Bento > > * gnu/testlet/java/awt/event/ComponentEvent/paramString.java: > New test. > > > > > ------------------------------------------------------------------------ > > Index: gnu/testlet/java/awt/event/ComponentEvent/paramString.java > =================================================================== > RCS file: gnu/testlet/java/awt/event/ComponentEvent/paramString.java > diff -N gnu/testlet/java/awt/event/ComponentEvent/paramString.java > --- /dev/null 1 Jan 1970 00:00:00 -0000 > +++ gnu/testlet/java/awt/event/ComponentEvent/paramString.java 3 Nov 2006 14:58:55 -0000 > @@ -0,0 +1,55 @@ > +/* paramString.java > + Copyright (C) 2006 RedHat > + > +This file is part of Mauve. > + > +Mauve is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2, or (at your option) > +any later version. > + > +Mauve is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with Mauve; see the file COPYING. If not, write to the > +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +*/ > + > +// Tags: 1.4 > My mind has gone blank on this but I thought I'd flag it anyway...does the tag need to be 'JDK1.4', or does '1.4' work as well? Regards, Dave From roman@kennke.org Fri Nov 3 15:10:00 2006 From: roman@kennke.org (Roman Kennke) Date: Fri, 03 Nov 2006 15:10:00 -0000 Subject: FYI: New ComponentEvent test In-Reply-To: <454B5A55.2080206@object-refinery.com> References: <1162566055.17015.167.camel@toothpaste.toronto.redhat.com> <454B5A55.2080206@object-refinery.com> Message-ID: <1162566627.6959.11.camel@localhost> Hi David, hi Tania, > > This adds a new test for java.awt.event.ComponentEvent.paramString(). > > > > Cheers, > > Tania > > > > 2006-11-03 Tania Bento > > > > * gnu/testlet/java/awt/event/ComponentEvent/paramString.java: > > New test. > > + > > +// Tags: 1.4 > > > > My mind has gone blank on this but I thought I'd flag it anyway...does > the tag need to be 'JDK1.4', or does '1.4' work as well? I think it should be JDKx.y. But the real question probably is, if that shouldn't really be JDK1.1? After all, this class and method have been present since JDK1.1. /Roman From tbento@redhat.com Fri Nov 3 15:19:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 03 Nov 2006 15:19:00 -0000 Subject: FYI: New ComponentEvent test In-Reply-To: <1162566627.6959.11.camel@localhost> References: <1162566055.17015.167.camel@toothpaste.toronto.redhat.com> <454B5A55.2080206@object-refinery.com> <1162566627.6959.11.camel@localhost> Message-ID: <1162567152.29838.8.camel@toothpaste.toronto.redhat.com> Hey, On Fri, 2006-11-03 at 16:10 +0100, Roman Kennke wrote: > Hi David, hi Tania, > > > > This adds a new test for java.awt.event.ComponentEvent.paramString(). > > > > > > Cheers, > > > Tania > > > > > > 2006-11-03 Tania Bento > > > > > > * gnu/testlet/java/awt/event/ComponentEvent/paramString.java: > > > New test. > > > > > + > > > +// Tags: 1.4 > > > > > > > My mind has gone blank on this but I thought I'd flag it anyway...does > > the tag need to be 'JDK1.4', or does '1.4' work as well? > > I think it should be JDKx.y. But the real question probably is, if that > shouldn't really be JDK1.1? After all, this class and method have been > present since JDK1.1. > > /Roman Sorry about that. I've changed the tag and committed the file again. Thanks, Tania 2006-11-03 Tania Bento * gnu/testlet/java/awt/event/ComponentEvent/paramString.java: Changed tag documentation to JDK1.1. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 572 bytes Desc: not available URL: From tbento@redhat.com Fri Nov 3 21:00:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 03 Nov 2006 21:00:00 -0000 Subject: FYI: New TextArea tests Message-ID: <1162587586.29838.17.camel@toothpaste.toronto.redhat.com> Hey, This adds a few new tests for: - java.awt.TextArea.getMinimumSize() - java.awt.TextArea.getMinimumSize(int, int) - java.awt.TextArea.getPreferredSize() - java.awt.TextArea.getPreferredSize(int, int) Cheers, Tania 2006-11-03 Tania Bento * gnu/testlet/java/awt/TextArea/getMinimumSize.java: New test. * gnu/testlet/java/awt/TextArea/getPreferredSize.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 10779 bytes Desc: not available URL: From tbento@redhat.com Mon Nov 6 18:01:00 2006 From: tbento@redhat.com (Tania Bento) Date: Mon, 06 Nov 2006 18:01:00 -0000 Subject: New TextField tests Message-ID: <1162836058.29838.32.camel@toothpaste.toronto.redhat.com> Hey, This adds a few new tests for: - java.awt.TextField.getMinimumSize() - java.awt.TextField.getMinimumSize(int) - java.awt.TextField.getPreferredSize() - java.awt.TextField.getPreferredSize(int) Cheers, Tania 2006-11-06 Tania Bento * gnu/testlet/java/awt/TextField/getMinimumSize.java: New test. * gnu/testlet/java/awt/TextField/getPreferredSize.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 10799 bytes Desc: not available URL: From tbento@redhat.com Mon Nov 6 20:12:00 2006 From: tbento@redhat.com (Tania Bento) Date: Mon, 06 Nov 2006 20:12:00 -0000 Subject: FYI: New TextComponent test Message-ID: <1162843951.29838.41.camel@toothpaste.toronto.redhat.com> Hey, This adds a new test for java.awt.TextComponent.setSelectionStart(int). Cheers, Tania 2006-11-06 Tania Bento * gnu/testlet/java/awt/TextComponent/setSelectionStart.java: New test -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2645 bytes Desc: not available URL: From tbento@redhat.com Tue Nov 7 16:51:00 2006 From: tbento@redhat.com (Tania Bento) Date: Tue, 07 Nov 2006 16:51:00 -0000 Subject: FYI: New FlowLayout test Message-ID: <1162918265.29838.56.camel@toothpaste.toronto.redhat.com> Hey, This adds a new test for java.awt.FlowLayout.minimumLayoutSize method. Cheers, Tania 2006-11-07 Tania Bento * gnu/testlet/java/awt/FlowLayout/minimumLayoutSize.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2324 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Nov 9 12:31:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 09 Nov 2006 12:31:00 -0000 Subject: FYI: SimpleBeanInfo tests Message-ID: <45531F6F.9070005@object-refinery.com> This patch (committed) adds tests for the methods in SimpleBeanInfo: 2006-11-09 David Gilbert * gnu/testlet/java/beans/SimpleBeanInfo/getAdditionalBeanInfo.java: New file, * gnu/testlet/java/beans/SimpleBeanInfo/getBeanDescriptor.java: New file, * gnu/testlet/java/beans/SimpleBeanInfo/getDefaultEventIndex.java: New file, * gnu/testlet/java/beans/SimpleBeanInfo/getDefaultPropertyIndex.java: New file, * gnu/testlet/java/beans/SimpleBeanInfo/getEventSetDescriptors.java: New file, * gnu/testlet/java/beans/SimpleBeanInfo/getIcon.java: New file, * gnu/testlet/java/beans/SimpleBeanInfo/loadImage.java: New file, * gnu/testlet/java/beans/SimpleBeanInfo/MySimpleBeanInfo.java: New file, * gnu/testlet/java/beans/SimpleBeanInfo/testImage1.gif: New file. All pass with GNU Classpath, except for the loadImage() test. I have a patch to fix that. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Thu Nov 9 16:57:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 09 Nov 2006 16:57:00 -0000 Subject: FYI: New BeanContextSupport tests Message-ID: <45535DE8.6000608@object-refinery.com> This patch (committed) adds some tests that I wrote while poking around in the java.beans.beancontext package: 2006-11-09 David Gilbert * gnu/testlet/java/beans/beancontext/BeanContextSupport/constructors.java: New test, * gnu/testlet/java/beans/beancontext/BeanContextSupport/getBeanContextPeer.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From tbento@redhat.com Thu Nov 9 19:15:00 2006 From: tbento@redhat.com (Tania Bento) Date: Thu, 09 Nov 2006 19:15:00 -0000 Subject: New JLabel test Message-ID: <1163099715.29838.68.camel@toothpaste.toronto.redhat.com> Hey, This patch adds some tests for javax.swing.JLabel's constructors. Cheers, Tania 2006-11-09 Tania Bento * gnu/testlet/javax/swing/JLabel/constructor.java: Added new tests. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 9022 bytes Desc: not available URL: From gbenson@redhat.com Fri Nov 10 11:30:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 10 Nov 2006 11:30:00 -0000 Subject: FYI: Socket and ServerSocket throwpoint check tweaks Message-ID: <20061110113033.GB3892@redhat.com> Hi all, This commit fixes a couple of minor things in the throwpoint checks for Socket and ServerSocket. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1986 diff -u -r1.1986 ChangeLog --- ChangeLog 9 Nov 2006 19:15:39 -0000 1.1986 +++ ChangeLog 10 Nov 2006 11:28:02 -0000 @@ -1,3 +1,12 @@ +2006-11-10 Gary Benson + + * gnu/testlet/java/net/ServerSocket/security.java: + Always use localhost regardless of the actual hostname + of the address being listened on. + + * gnu/testlet/java/net/Socket/security.java: + Removed an unused import. + 2006-11-09 Tania Bento * gnu/testlet/javax/swing/JLabel/constructor.java: Added new tests. Index: gnu/testlet/java/net/ServerSocket/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/ServerSocket/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/net/ServerSocket/security.java 9 Oct 2006 14:55:17 -0000 1.1 +++ gnu/testlet/java/net/ServerSocket/security.java 10 Nov 2006 11:28:02 -0000 @@ -20,8 +20,8 @@ package gnu.testlet.java.net.ServerSocket; -import java.net.InetAddress; import java.net.BindException; +import java.net.InetAddress; import java.net.ServerSocket; import java.net.Socket; import java.net.SocketPermission; @@ -39,9 +39,7 @@ harness.checkPoint("setup"); InetAddress inetaddr = InetAddress.getByName(null); - String hostname = inetaddr.getHostName(); String hostaddr = inetaddr.getHostAddress(); - harness.check(!hostname.equals(hostaddr)); ServerSocket ssocket = new ServerSocket(0, 50, inetaddr); int sport = ssocket.getLocalPort(); @@ -49,10 +47,10 @@ int cport = csocket.getLocalPort(); Permission[] checkListen80 = new Permission[] { - new SocketPermission(hostname + ":80", "listen")}; + new SocketPermission("localhost:80", "listen")}; Permission[] checkListen1024plus = new Permission[] { - new SocketPermission(hostname + ":1024-", "listen")}; + new SocketPermission("localhost:1024-", "listen")}; Permission[] checkAccept = new Permission[] { new SocketPermission(hostaddr + ":" + cport, "accept")}; Index: gnu/testlet/java/net/Socket/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/Socket/security.java,v retrieving revision 1.1 diff -u -r1.1 security.java --- gnu/testlet/java/net/Socket/security.java 5 Oct 2006 14:44:55 -0000 1.1 +++ gnu/testlet/java/net/Socket/security.java 10 Nov 2006 11:28:02 -0000 @@ -27,7 +27,6 @@ import java.net.SocketException; import java.net.SocketPermission; import java.security.Permission; -import java.util.PropertyPermission; import gnu.testlet.Testlet; import gnu.testlet.TestHarness; From gbenson@redhat.com Fri Nov 10 14:36:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 10 Nov 2006 14:36:00 -0000 Subject: FYI: Another Socket throwpoint check tweak Message-ID: <20061110143639.GE3892@redhat.com> Hi again, This commit removes a couple of unused imports from the Socket throwpoint check. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1987 diff -u -r1.1987 ChangeLog --- ChangeLog 10 Nov 2006 11:28:28 -0000 1.1987 +++ ChangeLog 10 Nov 2006 14:34:19 -0000 @@ -1,3 +1,8 @@ +2006-11-10 Gary Benson + + * gnu/testlet/java/net/Socket/security.java: + Removed more unused imports. + 2006-11-10 Gary Benson * gnu/testlet/java/net/ServerSocket/security.java: Index: gnu/testlet/java/net/Socket/security.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/Socket/security.java,v retrieving revision 1.2 diff -u -r1.2 security.java --- gnu/testlet/java/net/Socket/security.java 10 Nov 2006 11:28:28 -0000 1.2 +++ gnu/testlet/java/net/Socket/security.java 10 Nov 2006 14:34:19 -0000 @@ -21,10 +21,8 @@ package gnu.testlet.java.net.Socket; import java.net.InetAddress; -import java.net.NetPermission; import java.net.ServerSocket; import java.net.Socket; -import java.net.SocketException; import java.net.SocketPermission; import java.security.Permission; From david.gilbert@object-refinery.com Fri Nov 10 17:00:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Fri, 10 Nov 2006 17:00:00 -0000 Subject: FYI: Collections.sort() - new test Message-ID: <4554AFFE.90006@object-refinery.com> This patch (committed) adds a new test for the Collections.sort() methods: 2006-11-10 David Gilbert * gnu/testlet/java/util/Collections/sort.java: New file. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From david.gilbert@object-refinery.com Sat Nov 11 06:09:00 2006 From: david.gilbert@object-refinery.com (Dave Gilbert) Date: Sat, 11 Nov 2006 06:09:00 -0000 Subject: FYI: BeanContextSupport.getChildBeanContextChild() test Message-ID: <1163225331.4994.3.camel@localhost> This patch (committed) adds a new test: 2006-11-11 David Gilbert * gnu/testlet/java/beans/beancontext/BeanContextSupport/getChildBeanContextChild.java: New file, * gnu/testlet/java/beans/beancontext/BeanContextSupport/MyBeanContextSupport.java: New file. Regards, Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.txt Type: text/x-patch Size: 5022 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Nov 16 05:21:00 2006 From: david.gilbert@object-refinery.com (Dave Gilbert) Date: Thu, 16 Nov 2006 05:21:00 -0000 Subject: FYI: java.beans.DesignMode - new test Message-ID: <1163654476.4958.23.camel@localhost> This patch (committed) adds a small test: 2006-11-16 David Gilbert * gnu/testlet/java/beans/DesignMode/constants.java: New file. Regards, Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.txt Type: text/x-patch Size: 1575 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Nov 16 06:44:00 2006 From: david.gilbert@object-refinery.com (Dave Gilbert) Date: Thu, 16 Nov 2006 06:44:00 -0000 Subject: FYI: BeanContextSupport.setDesignTime() - new test Message-ID: <1163659447.4958.32.camel@localhost> This patch (committed) adds a new test: 2006-11-16 David Gilbert * gnu/testlet/java/beans/beancontext/BeanContextSupport/setDesignTime.java: New test. Regards, Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.txt Type: text/x-patch Size: 2509 bytes Desc: not available URL: From david.gilbert@object-refinery.com Thu Nov 16 09:34:00 2006 From: david.gilbert@object-refinery.com (Dave Gilbert) Date: Thu, 16 Nov 2006 09:34:00 -0000 Subject: FYI: BeanContextSupport - new tests Message-ID: <1163669660.4958.42.camel@localhost> I committed this patch: 2006-11-16 David Gilbert * gnu/testlet/java/beans/beancontext/BeanContextSupport/getChildBeanContextMembershipListener.java: New test, * gnu/testlet/java/beans/beancontext/BeanContextSupport/getChildPropertyChangeListener.java: New test, * gnu/testlet/java/beans/beancontext/BeanContextSupport/getChildSerializable.java: New test, * gnu/testlet/java/beans/beancontext/BeanContextSupport/getChildVetoableChangeListener.java: New test, * gnu/testlet/java/beans/beancontext/BeanContextSupport/getChildVisibility.java: New test, * gnu/testlet/java/beans/beancontext/BeanContextSupport/MyBeanContextSupport.java (getChildBeanContextMembershipListenerX): New method, (getChildPropertyChangeListenerX): New method, (getChildSerializableX): New method, (getChildVetoableChangeListenerX): New method, (getChildVisibilityX): New method. Regards, Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.txt Type: text/x-patch Size: 15466 bytes Desc: not available URL: From gbenson@redhat.com Fri Nov 17 15:22:00 2006 From: gbenson@redhat.com (Gary Benson) Date: Fri, 17 Nov 2006 15:22:00 -0000 Subject: FYI: Throwpoint checks for java.net.DatagramSocket Message-ID: <20061117152244.GB3741@redhat.com> Hi all, This commit adds throwpoint checks for java.net.DatagramSocket. Note that (with GCJ at least) the check in receive does not happen. Cheers, Gary -------------- next part -------------- Index: ChangeLog =================================================================== RCS file: /cvs/mauve/mauve/ChangeLog,v retrieving revision 1.1993 diff -u -r1.1993 ChangeLog --- ChangeLog 16 Nov 2006 09:32:50 -0000 1.1993 +++ ChangeLog 17 Nov 2006 15:17:00 -0000 @@ -1,3 +1,7 @@ +2006-11-17 Gary Benson + + * gnu/testlet/java/net/DatagramSocket/security.java: New test. + 2006-11-16 David Gilbert * gnu/testlet/java/beans/beancontext/BeanContextSupport/getChildBeanContextMembershipListener.java: New test, Index: gnu/testlet/java/net/DatagramSocket/security.java =================================================================== RCS file: gnu/testlet/java/net/DatagramSocket/security.java diff -N gnu/testlet/java/net/DatagramSocket/security.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/net/DatagramSocket/security.java 17 Nov 2006 15:17:00 -0000 @@ -0,0 +1,281 @@ +// Copyright (C) 2006 Red Hat, Inc. +// Written by Gary Benson + +// This file is part of Mauve. + +// Mauve is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2, or (at your option) +// any later version. + +// Mauve is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with Mauve; see the file COPYING. If not, write to +// the Free Software Foundation, 59 Temple Place - Suite 330, +// Boston, MA 02111-1307, USA. + +package gnu.testlet.java.net.DatagramSocket; + +import java.net.BindException; +import java.net.DatagramPacket; +import java.net.DatagramSocket; +import java.net.InetAddress; +import java.net.InetSocketAddress; +import java.net.SocketAddress; +import java.net.SocketPermission; +import java.security.Permission; + +import gnu.testlet.Testlet; +import gnu.testlet.TestHarness; +import gnu.testlet.TestSecurityManager; + +public class security implements Testlet +{ + public void test(TestHarness harness) + { + try { + harness.checkPoint("setup"); + + InetAddress inetaddr = InetAddress.getByName(null); + String hostaddr = inetaddr.getHostAddress(); + + DatagramSocket socket1 = new DatagramSocket(0, inetaddr); + DatagramSocket socket2 = new DatagramSocket(0, inetaddr); + DatagramSocket socket3 = new DatagramSocket(0, inetaddr); + DatagramSocket socket4 = new DatagramSocket(0, inetaddr); + + SocketAddress sock1addr = socket1.getLocalSocketAddress(); + InetAddress sock2addr = socket2.getLocalAddress(); + + byte[] sendbuf = new byte[16]; + DatagramPacket sendpack = new DatagramPacket( + sendbuf, sendbuf.length, socket3.getLocalSocketAddress()); + + byte[] recvbuf = new byte[sendbuf.length]; + DatagramPacket recvpack = new DatagramPacket(recvbuf, recvbuf.length); + + Permission[] checkResolve = new Permission[] { + new SocketPermission(hostaddr, "resolve")}; + + Permission[] checkListen80 = new Permission[] { + new SocketPermission("localhost:80", "listen")}; + + Permission[] checkListen1024plus = new Permission[] { + new SocketPermission("localhost:1024-", "listen")}; + + Permission[] checkConnect1 = new Permission[] { + new SocketPermission( + hostaddr + ":" + socket1.getLocalPort(), "connect")}; + + Permission[] checkAccept1 = new Permission[] { + new SocketPermission( + hostaddr + ":" + socket1.getLocalPort(), "accept")}; + + Permission[] checkConnect2 = new Permission[] { + new SocketPermission( + hostaddr + ":" + socket2.getLocalPort(), "connect")}; + + Permission[] checkAccept2 = new Permission[] { + new SocketPermission( + hostaddr + ":" + socket2.getLocalPort(), "accept")}; + + Permission[] checkConnect3 = new Permission[] { + new SocketPermission( + hostaddr + ":" + socket3.getLocalPort(), "connect")}; + + Permission[] checkAccept4 = new Permission[] { + new SocketPermission( + hostaddr + ":" + socket4.getLocalPort(), "accept")}; + + Permission[] checkSetFactory = new Permission[] { + new RuntimePermission("setFactory")}; + + TestSecurityManager sm = new TestSecurityManager(harness); + try { + sm.install(); + + // throwpoint: java.net.DatagramSocket-DatagramSocket() + harness.checkPoint("DatagramSocket()"); + try { + sm.prepareChecks(checkListen1024plus); + new DatagramSocket().close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.DatagramSocket-DatagramSocket(SocketAddress) + harness.checkPoint("DatagramSocket(SocketAddress)"); + try { + sm.prepareChecks(checkListen80); + try { + new DatagramSocket(new InetSocketAddress(inetaddr, 80)).close(); + } + catch (BindException e) { + } + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkListen1024plus); + new DatagramSocket(new InetSocketAddress(inetaddr, 0)).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.DatagramSocket-DatagramSocket(int) + harness.checkPoint("DatagramSocket(int)"); + try { + sm.prepareChecks(checkListen80); + try { + new DatagramSocket(80).close(); + } + catch (BindException e) { + } + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkListen1024plus); + new DatagramSocket(0).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.DatagramSocket-DatagramSocket(int, InetAddress) + harness.checkPoint("DatagramSocket(int, InetAddress)"); + try { + sm.prepareChecks(checkListen80); + try { + new DatagramSocket(80, inetaddr).close(); + } + catch (BindException e) { + } + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkListen1024plus); + new DatagramSocket(0, inetaddr).close(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.DatagramSocket-connect + harness.checkPoint("connect"); + try { + sm.prepareChecks(checkConnect1, checkAccept1); + socket2.connect(sock1addr); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + try { + sm.prepareChecks(checkConnect2, checkAccept2); + socket1.connect(sock2addr, socket2.getLocalPort()); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.DatagramSocket-send + harness.checkPoint("send"); + try { + sm.prepareChecks(checkConnect3); + socket4.send(sendpack); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.DatagramSocket-receive + harness.checkPoint("receive"); + try { + sm.prepareChecks(checkAccept4); + socket3.receive(recvpack); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.DatagramSocket-getLocalAddress + harness.checkPoint("getLocalAddress"); + try { + sm.prepareChecks(checkResolve); + socket1.getLocalAddress(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.DatagramSocket-getLocalSocketAddress + harness.checkPoint("getLocalSocketAddress"); + try { + sm.prepareChecks(checkResolve); + socket1.getLocalSocketAddress(); + sm.checkAllChecked(); + } + catch (SecurityException e) { + harness.debug(e); + harness.check(false, "unexpected check"); + } + + // throwpoint: java.net.Socket-setDatagramSocketImplFactory + harness.checkPoint("setDatagramSocketImplFactory"); + try { + sm.prepareHaltingChecks(checkSetFactory); + DatagramSocket.setDatagramSocketImplFactory(null); + harness.check(false); + } + catch (TestSecurityManager.SuccessException ex) { + harness.check(true); + } + catch (SecurityException ex) { + harness.debug(ex); + harness.check(false, "unexpected check"); + } + } + finally { + sm.uninstall(); + } + } + catch (Exception e) { + harness.debug(e); + harness.check(false, "Unexpected exception"); + } + } +} From tbento@redhat.com Mon Nov 20 19:51:00 2006 From: tbento@redhat.com (Tania Bento) Date: Mon, 20 Nov 2006 19:51:00 -0000 Subject: FYI: New JSlider Test Message-ID: <1164052307.29838.94.camel@toothpaste.toronto.redhat.com> Hey, This patch adds a new test to javax.swing.JSlider.setLabelTable(). Cheers, Tania 2006-11-20 Tania Bento * gnu/testlet/javax/swing/JSlider/setLabelTable.java: Added a new test. From tbento@redhat.com Mon Nov 20 19:52:00 2006 From: tbento@redhat.com (Tania Bento) Date: Mon, 20 Nov 2006 19:52:00 -0000 Subject: FYI: New JSlider Test In-Reply-To: <1164052307.29838.94.camel@toothpaste.toronto.redhat.com> References: <1164052307.29838.94.camel@toothpaste.toronto.redhat.com> Message-ID: <1164052344.29838.97.camel@toothpaste.toronto.redhat.com> Sorry... Forgot to attach the patch. Here it is. On Mon, 2006-11-20 at 14:51 -0500, Tania Bento wrote: > Hey, > > This patch adds a new test to javax.swing.JSlider.setLabelTable(). > > Cheers, > Tania > > 2006-11-20 Tania Bento > > * gnu/testlet/javax/swing/JSlider/setLabelTable.java: Added a > new test. > -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1530 bytes Desc: not available URL: From tbento@redhat.com Wed Nov 22 20:03:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 22 Nov 2006 20:03:00 -0000 Subject: JRootPane test Message-ID: <1164225796.29838.121.camel@toothpaste.toronto.redhat.com> Hey, This patch adds a test to javax.swing.JRootPane.setLayeredPane(). Cheers, Tania 2006-11-22 Tania Bento * gnu/testlet/javax/swing/JRootPane/setLayeredPane.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 1869 bytes Desc: not available URL: From tbento@redhat.com Wed Nov 22 20:04:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 22 Nov 2006 20:04:00 -0000 Subject: JRootPane test In-Reply-To: <1164225796.29838.121.camel@toothpaste.toronto.redhat.com> References: <1164225796.29838.121.camel@toothpaste.toronto.redhat.com> Message-ID: <1164225858.29838.122.camel@toothpaste.toronto.redhat.com> Sorry, forgot to add FYI to subject header. On Wed, 2006-11-22 at 15:03 -0500, Tania Bento wrote: > Hey, > > This patch adds a test to javax.swing.JRootPane.setLayeredPane(). > > Cheers, > Tania > > 2006-11-22 Tania Bento > > * gnu/testlet/javax/swing/JRootPane/setLayeredPane.java: New > test. > > > From david.gilbert@object-refinery.com Wed Nov 22 22:23:00 2006 From: david.gilbert@object-refinery.com (Dave Gilbert) Date: Wed, 22 Nov 2006 22:23:00 -0000 Subject: FYI: BeanContextSupport.toArray() - new test Message-ID: <1164234214.6539.7.camel@localhost> This patch (committed) adds a test for the toArray() methods in the BeanContextSupport class: 2006-11-22 David Gilbert * gnu/testlet/java/beans/beancontext/BeanContextSupport/toArray.java: New file. Regards, Dave -------------- next part -------------- ? diff.txt Index: gnu/testlet/java/beans/beancontext/BeanContextSupport/toArray.java =================================================================== RCS file: gnu/testlet/java/beans/beancontext/BeanContextSupport/toArray.java diff -N gnu/testlet/java/beans/beancontext/BeanContextSupport/toArray.java --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ gnu/testlet/java/beans/beancontext/BeanContextSupport/toArray.java 22 Nov 2006 22:19:46 -0000 @@ -0,0 +1,135 @@ +/* toArray.java -- some checks for the toArray() methods in the + BeanContextSupport class. + Copyright (C) 2006 David Gilbert +This file is part of Mauve. + +Mauve is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +Mauve is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with Mauve; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +*/ + +// Tags: JDK1.2 + +package gnu.testlet.java.beans.beancontext.BeanContextSupport; + +import gnu.testlet.TestHarness; +import gnu.testlet.Testlet; + +import java.beans.beancontext.BeanContextSupport; +import java.util.Arrays; +import java.util.List; + +public class toArray implements Testlet +{ + public void test(TestHarness harness) + { + testMethod1(harness); + testMethod2(harness); + } + + public void testMethod1(TestHarness harness) + { + harness.checkPoint("()"); + BeanContextSupport bcs = new BeanContextSupport(); + Object[] array = bcs.toArray(); + harness.check(array.length, 0); + BeanContextSupport child1 = new BeanContextSupport(); + bcs.add(child1); + array = bcs.toArray(); + harness.check(array.length, 1); + harness.check(array[0] == child1); + bcs.add("Child2"); + array = bcs.toArray(); + harness.check(array.length, 2); + // use a list to check membership, because the order is not guaranteed + List children = Arrays.asList(array); + harness.check(children.contains(child1)); + harness.check(children.contains("Child2")); + } + + public void testMethod2(TestHarness harness) + { + harness.checkPoint("(Object[])"); + BeanContextSupport bcs = new BeanContextSupport(); + + // try null + boolean pass = false; + try + { + bcs.toArray(null); + } + catch (NullPointerException e) + { + pass = true; + } + harness.check(pass); + + // try zero length array for zero children + Object[] array1 = new Object[0]; + Object[] array2 = bcs.toArray(array1); + harness.check(array2 == array1); + + // try array length 1 for zero children + array1 = new Object[1]; + array2 = bcs.toArray(array1); + harness.check(array2 == array1); + harness.check(array2[0], null); + + // try array length 0 for 1 child + BeanContextSupport child1 = new BeanContextSupport(); + bcs.add(child1); + array1 = new Object[0]; + array2 = bcs.toArray(array1); + harness.check(array2 != array1); + harness.check(array2.length, 1); + harness.check(array2[0], child1); + + // try array length 1 for 1 child + array1 = new Object[1]; + array2 = bcs.toArray(array1); + harness.check(array2 == array1); + harness.check(array2[0], child1); + + // try array length 2 for 1 child + array1 = new Object[2]; + array2 = bcs.toArray(array1); + harness.check(array2 == array1); + harness.check(array2[0], child1); + harness.check(array2[1], null); + + // try array length 2 for 2 children + bcs.add("Child 2"); + array1 = new Object[2]; + array2 = bcs.toArray(array1); + harness.check(array2 == array1); + // use a list to check membership, because the order is not guaranteed + List children = Arrays.asList(array2); + harness.check(children.contains(child1)); + harness.check(children.contains("Child 2")); + + // try an array of the wrong type + String[] array3 = new String[2]; + pass = false; + try + { + bcs.toArray(array3); + } + catch (ArrayStoreException e) + { + pass = true; + } + harness.check(pass); + } +} From david.gilbert@object-refinery.com Thu Nov 23 10:46:00 2006 From: david.gilbert@object-refinery.com (David Gilbert) Date: Thu, 23 Nov 2006 10:46:00 -0000 Subject: FYI: BeanContextSupport.serialize() - new test Message-ID: <45657AA5.10109@object-refinery.com> This patch (committed) adds a new test: 2006-11-23 David Gilbert * gnu/testlet/java/beans/beancontext/BeanContextSupport/MyBeanContextSupport.java (deserializeX): New method, (serializeX): New method, * gnu/testlet/java/beans/beancontext/BeanContextSupport/serialize.java: New test. Regards, Dave -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff.txt URL: From neugens@limasoftware.net Thu Nov 23 12:16:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Thu, 23 Nov 2006 12:16:00 -0000 Subject: FYI: few tests update. Message-ID: <1164284158.3120.24.camel@nirvana.limasoftware.net> Committed. 2006-11-23 Mario Torre * gnu/testlet/java/text/DecimalFormat/formatToCharacterIterator.java (test): Code reformatted, added test for Format.Field attributes. * gnu/testlet/java/text/DecimalFormat/formatExp.java (test): New tests. * gnu/testlet/java/text/DecimalFormat/applyPattern.java (test): fix broken test, plus explicity set the locale for the test. * gnu/testlet/javax/swing/text/InternationalFormatter/InternationalFormatterTest.java: fix test tag, moved to 1.4. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: 2006-11-23-mauve.patch Type: text/x-patch Size: 5503 bytes Desc: not available URL: From david.gilbert@object-refinery.com Fri Nov 24 04:34:00 2006 From: david.gilbert@object-refinery.com (Dave Gilbert) Date: Fri, 24 Nov 2006 04:34:00 -0000 Subject: FYI: BeanContextServicesSupport.getChildBeanContextServicesListener() - new test Message-ID: <1164342837.19494.3.camel@localhost> This patch (committed) adds a new test for the BeanContextServicesSupport class: 2006-11-24 David Gilbert * gnu/testlet/java/beans/beancontext/BeanContextServicesSupport/getChildBeanContextServicesListener.java: New file, * gnu/testlet/java/beans/beancontext/BeanContextServicesSupport/MyBeanContextServicesSupport.java: New file. Regards, Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.txt Type: text/x-patch Size: 4413 bytes Desc: not available URL: From tbento@redhat.com Fri Nov 24 21:15:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 24 Nov 2006 21:15:00 -0000 Subject: FYI: New TextHitInfo tests Message-ID: <1164402919.29838.134.camel@toothpaste.toronto.redhat.com> Hey, This patches adds a new test for each of the methods in java.awt.font.TextHitInfo. I will be committing the regressions shortly. Cheers, Tania 2006-11-24 Tania Bento * gnu/testlet/java/awt/font/TextHitInfo/afterOffset.java: New file. * gnu/testlet/java/awt/font/TextHitInfo/beforeOffset.java: New file. * gnu/testlet/java/awt/font/TextHitInfo/equals.java: New file. * gnu/testlet/java/awt/font/TextHitInfo/getCharIndex: New file. * gnu/testlet/java/awt/font/TextHitInfo/getInsertionIndex: New file. * gnu/testlet/java/awt/font/TextHitInfo/getOtherHit: New file. * gnu/testlet/java/awt/font/TextHitInfo/getoffsetHit: New file. * gnu/testlet/java/awt/font/TextHitInfo/hashCode: New file. * gnu/testlet/java/awt/font/TextHitInfo/isLeadingEdge.java: New file. * gnu/testlet/java/awt/font/TextHitInfo/leading.java: New file. * gnu/testlet/java/awt/font/TextHitInfo/toString.java: New file. * gnu/testlet/java/awt/font/TextHitInfo/trailing.java: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 23631 bytes Desc: not available URL: From psj@harker.dyndns.org Sat Nov 25 15:29:00 2006 From: psj@harker.dyndns.org (Paul Jenner) Date: Sat, 25 Nov 2006 15:29:00 -0000 Subject: mauve build fix for VisualTestlet In-Reply-To: <1162237726.8716.2.camel@localhost.localdomain> References: <1162237726.8716.2.camel@localhost.localdomain> Message-ID: <1164468535.29098.3.camel@localhost.localdomain> Hi list. Was it just me that needed this patch to build mauve from clean checkout? The build machinery looks broken to me without this patch but I may be missing something. Thanks, Paul On Mon, 2006-10-30 at 19:48 +0000, Paul Jenner wrote: > Hi. > > "make" step was failing for me with clean checkout of mauve without the > attached patch. > > Could someone please review and apply? > > For reference, ecj gave error: > > home/psj/software/install/bin/ecj > -bootclasspath /home/psj/software/install/classpath-cvs/share/classpath/glibj.zip Harness.java RunnerProcess.java gnu/testlet/config.java gnu/testlet/TestHarness.java gnu/testlet/Testlet.java gnu/testlet/TestSecurityManager.java gnu/testlet/ResourceNotFoundException.java gnu/testlet/TestReport.java gnu/testlet/TestResult.java > ---------- > 1. ERROR in RunnerProcess.java > (at line 32) > import gnu.testlet.VisualTestlet; > ^^^^^^^^^^^^^^^^^^^^^^^^^ > The import gnu.testlet.VisualTestlet cannot be resolved > ---------- > 2. ERROR in RunnerProcess.java > (at line 279) > if (o instanceof VisualTestlet) > ^^^^^^^^^^^^^ > VisualTestlet cannot be resolved to a type > ---------- > 2 problems (2 errors)make: *** [harness] Error 255 > > Thanks, > > Paul > -- Paul Jenner -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-VisualTestletbuildfix.patch Type: text/x-patch Size: 748 bytes Desc: not available URL: From mark@klomp.org Sun Nov 26 16:14:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 26 Nov 2006 16:14:00 -0000 Subject: builder: Added and updated scripts Message-ID: <1164557674.10461.31.camel@dijkstra.wildebeest.org> Hi, Seems lots of scripts were added and updated on builder, but the changes were never properly checked into CVS. 2006-11-26 Mark Wielaard * Build, Cacao, CacaoRelease, Check, Classpath, GcjEclipse, GcjEclipseJmx, GenericCp, Jamvm, Mauve, MauveCacao, MauveEMMA, MauveReleaseCacao, Settings, Update: Added and updated. Apologies for the somewhat lame ChangeLog entry. Not all changes were made by me. But I thought it a good idea to get all cleanups into CVS so everybody knows what is going on. Note that mauve runs and the comparision script on builder work again now. http://builder.classpath.org/mauve/mauvereport.cgi If you have access to builder and make a change to any of the auto-builder scripts please do post and checkin your changes into cvs. Thanks, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: new-updates-scripts.diff Type: text/x-patch Size: 15312 bytes Desc: not available URL: From mark@klomp.org Sun Nov 26 16:29:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 26 Nov 2006 16:29:00 -0000 Subject: mauve build fix for VisualTestlet In-Reply-To: <1164468535.29098.3.camel@localhost.localdomain> References: <1162237726.8716.2.camel@localhost.localdomain> <1164468535.29098.3.camel@localhost.localdomain> Message-ID: <1164558576.10461.35.camel@dijkstra.wildebeest.org> Hi Paul, On Sat, 2006-11-25 at 15:28 +0000, Paul Jenner wrote: > Was it just me that needed this patch to build mauve from clean > checkout? > > The build machinery looks broken to me without this patch but I may be > missing something. Weird that nobody else hit this. I just hit it on my local machine, but builder seems fine without this patch. But since that doesn't make sense at all I am just checking it in: 2006-11-26 Paul Jenner * Makefile.am (harness_files): Add VisualTestlet.java. * Makefile.in: Regenerated. Thanks, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From roman@kennke.org Sun Nov 26 19:00:00 2006 From: roman@kennke.org (Roman Kennke) Date: Sun, 26 Nov 2006 19:00:00 -0000 Subject: mauve build fix for VisualTestlet In-Reply-To: <1164558576.10461.35.camel@dijkstra.wildebeest.org> References: <1162237726.8716.2.camel@localhost.localdomain> <1164468535.29098.3.camel@localhost.localdomain> <1164558576.10461.35.camel@dijkstra.wildebeest.org> Message-ID: <1164567629.4691.0.camel@localhost> Hi there, > On Sat, 2006-11-25 at 15:28 +0000, Paul Jenner wrote: > > Was it just me that needed this patch to build mauve from clean > > checkout? > > > > The build machinery looks broken to me without this patch but I may be > > missing something. > > Weird that nobody else hit this. That's probably because Eclipse deals OK with this. Sorry for the problems... /Roman From mark@klomp.org Sun Nov 26 23:11:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Sun, 26 Nov 2006 23:11:00 -0000 Subject: FYI: Improve stack trace output a little Message-ID: <1164582695.10461.80.camel@dijkstra.wildebeest.org> Hi, We would only use the exception class name, but it is better to use the whole exception, including the message. 2006-11-26 Mark Wielaard * RunnerProcess.java (getStackTraceString): Use whole exception message, not just the class name. Committed, Mark diff -u -r1.15 RunnerProcess.java --- RunnerProcess.java 13 Oct 2006 11:45:42 -0000 1.15 +++ RunnerProcess.java 26 Nov 2006 23:09:10 -0000 @@ -395,7 +395,7 @@ private static String getStackTraceString(Throwable ex, String pad) { StackTraceElement[] st = ex.getStackTrace(); - StringBuffer sb = new StringBuffer(pad + ex.getClass().getName() + "\n"); + StringBuffer sb = new StringBuffer(pad + ex.toString() + "\n"); for (int i = 0; i < st.length; i++) sb.append(pad + "at " + st[i].toString() + "\n"); sb.setLength(sb.length() - 1); -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From mark@klomp.org Mon Nov 27 18:42:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Mon, 27 Nov 2006 18:42:00 -0000 Subject: FYI null Vector vs removeAll(null) and retainAll(null) Message-ID: <1164652954.30677.8.camel@dijkstra.wildebeest.org> Hi, As discussed on the classpath mailinglist these two checks seem a little too pedantic. So I have disabled them. 2006-11-27 Mark Wielaard * gnu/testlet/java/util/Vector/AcuniaVectorTest.java: Don't demand a NullPointerException when doing a removeAll(null) or a retainAll(null) on an empty Vector. Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: AcuniaVectorTest-remove-retain-empty.diff Type: text/x-patch Size: 1437 bytes Desc: not available URL: From fkung@redhat.com Mon Nov 27 21:47:00 2006 From: fkung@redhat.com (Francis Kung) Date: Mon, 27 Nov 2006 21:47:00 -0000 Subject: FYI: Raster child checks Message-ID: <1164664055.25606.45.camel@toddy.toronto.redhat.com> Hi, This patch adds a check to Raster.createChild, clarifying whether it returns a Raster or WritableRaster. Cheers, Francis 2006-11-27 Francis Kung * gnu/testlet/java/awt/image/Raster/createChild.java (createRaster): Add harness parameter, ensure that returned raster is not writable. (testData): Add check for class of child raster. * gnu/testlet/java/awt/image/Raster/MyRaster.java: New file. * gnu/testlet/java/awt/image/WritableRaster/createChild.java: New file. -------------- next part -------------- A non-text attachment was scrubbed... Name: rasterchild.diff Type: text/x-patch Size: 9469 bytes Desc: not available URL: From roman.kennke@aicas.com Tue Nov 28 12:37:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Tue, 28 Nov 2006 12:37:00 -0000 Subject: FYI: New JComponent.putClientProperty() test Message-ID: <1164717416.6844.1.camel@localhost> This adds a test for JComponent.putClientProperty() that tests if an event should be fired, when a property that is null has putClientProperty() called with null. No event should be fired in that case. This is different from the behaviour of PropertyChangeSupport which fires an event in that case. I also added a testcase for this. 2006-11-28 Roman Kennke * gnu/testlet/java/beans/PropertyChangeSupport/firePropertyChange.java: New test. * gnu/testlet/javax/swing/JComponent/putClientProperty.java: Added check for how setting a null property fires an event or not. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 4528 bytes Desc: not available URL: From roman.kennke@aicas.com Tue Nov 28 13:14:00 2006 From: roman.kennke@aicas.com (Roman Kennke) Date: Tue, 28 Nov 2006 13:14:00 -0000 Subject: FYI: fixed TitledBorder tests Message-ID: <1164719304.6844.8.camel@localhost> In the TitledBorder tests I believe we had a slight mistake. We were treating the font height to be equal to ascent+descent, which is not necessarily the case. In our case we really want to check for ascent +descent except for one case (BELOW_BOTTOM) where we have to include the line distance. The problem here is that line distance is really 0 for many fonts, so this is a corner case that is hard to test. But I'm quite certain that the tests are now correct and they PASS now both with Sun and Classpath. 2006-11-28 Roman Kennke * gnu/testlet/javax/swing/border/TitledBorder/getBorderInsets.java: Fixed test for differentiation between font ascent+descent and height. /Roman -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2604 bytes Desc: not available URL: From neugens@limasoftware.net Fri Dec 1 23:00:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Fri, 01 Dec 2006 23:00:00 -0000 Subject: FYI: new DecimalFormat tests Message-ID: <1165014031.3091.42.camel@nirvana.limasoftware.net> These added tests are needed to check our Locale handling. I've discovered that this is pretty broken atm, I'll try to figure out if it is only a problem of the locale bundles of there are problems also in the class code. 2006-12-01 Mario Torre * gnu/testlet/java/text/DecimalFormat/format.java (testGeneral): (testLocale): new tests. (test): enable new tests. Ciao, Mario -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: 2006-12-01-mauve.patch Type: text/x-patch Size: 2694 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: Questa ? una parte del messaggio firmata digitalmente URL: From tbento@redhat.com Wed Dec 6 14:48:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 06 Dec 2006 14:48:00 -0000 Subject: FYI: New CompoundBorder Test Message-ID: <1165416520.2680.2.camel@toothpaste.toronto.redhat.com> Hey, This adds a new test to javax.swing.border.CompoundBorder's isBorderOpaque method. Cheers, Tania 2006-12-06 Tania Bento * gnu/testlet/javax/swing/border/CompoundBorder.java: (isBorderOpaque): New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2143 bytes Desc: not available URL: From tbento@redhat.com Wed Dec 6 18:20:00 2006 From: tbento@redhat.com (Tania Bento) Date: Wed, 06 Dec 2006 18:20:00 -0000 Subject: FYI: CompoundBorder Message-ID: <1165429218.2680.17.camel@toothpaste.toronto.redhat.com> Hey, This patch adds new tests for CompoundBorder's isBorderOpaque() method. Cheers, Tania 2006-12-06 Tania Bento * gnu/testlet/javax/swing/border/CompoundBorder/isBorderOpaque.java: Added new tests. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2629 bytes Desc: not available URL: From fkung@redhat.com Wed Dec 6 18:32:00 2006 From: fkung@redhat.com (Francis Kung) Date: Wed, 06 Dec 2006 18:32:00 -0000 Subject: FYI: Rectangle2D.getBounds Message-ID: <1165429947.8335.1.camel@toddy.toronto.redhat.com> Hi, This adds a test for the Rectangle2D.getBounds method, specifically checking the results for the a "flat" rectangle. Cheers, Francis 2006-12-06 Francis Kung * gnu/testlet/java/awt/geom/Rectangle2D/getBounds.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-r2dgetbounds.diff Type: text/x-patch Size: 2481 bytes Desc: not available URL: From fitzsim@redhat.com Wed Dec 6 19:14:00 2006 From: fitzsim@redhat.com (Thomas Fitzsimmons) Date: Wed, 06 Dec 2006 19:14:00 -0000 Subject: FYI: new ScrollPane test Message-ID: <457716A5.5020106@redhat.com> Hi, I committed and expanded a new test: gnu/testlet/java/awt/ScrollPane/add.java in two separate commits. Patches attached. Tom 2006-12-05 Thomas Fitzsimmons * gnu/testlet/java/awt/ScrollPane/add.java: New test. 2006-12-06 Thomas Fitzsimmons * gnu/testlet/java/awt/ScrollPane/add.java: Expand test. -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-scrollpane-add.patch Type: text/x-patch Size: 1751 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: mauve-scrollpane-add-2.patch Type: text/x-patch Size: 1999 bytes Desc: not available URL: From neugens@limasoftware.net Thu Dec 7 16:29:00 2006 From: neugens@limasoftware.net (Mario Torre) Date: Thu, 07 Dec 2006 16:29:00 -0000 Subject: FYI: few updates Message-ID: <1165508965.3592.2.camel@nirvana.limasoftware.net> Few updates for DecimalFormat plus some starting tests for Collator. 2006-12-07 Mario Torre * gnu/testlet/java/text/RuleBasedCollator/CollatorTests.java (basicCompare): New class. (orderComparision): New Test (test): Default entry for tests. * gnu/testlet/java/text/RuleBasedCollator/VeryBasic.java (test): Removed debug output. * gnu/testlet/java/text/DecimalFormat/format.java (testLocale): Added tests case for locale other than US. -- Lima Software, SO.PR.IND. s.r.l. http://www.limasoftware.net/ pgp key: http://subkeys.pgp.net/ Please, support open standards: http://opendocumentfellowship.org/petition/ http://www.nosoftwarepatents.com/ -------------- next part -------------- A non-text attachment was scrubbed... Name: 2006-12-07-mauve.patch Type: text/x-patch Size: 6909 bytes Desc: not available URL: From mark@klomp.org Thu Dec 7 21:44:00 2006 From: mark@klomp.org (Mark Wielaard) Date: Thu, 07 Dec 2006 21:44:00 -0000 Subject: New URLTest Message-ID: <1165527867.3009.36.camel@dijkstra.wildebeest.org> Hi, Roman found a bug in classpath URLStreamHandler handling while writing/testing jgecko. This adds a test for this case. 2006-12-07 Mark Wielaard * gnu/testlet/java/net/URL/URLTest.java: Add test for jar base with full http spec. Committed, Mark Index: gnu/testlet/java/net/URL/URLTest.java =================================================================== RCS file: /cvs/mauve/mauve/gnu/testlet/java/net/URL/URLTest.java,v retrieving revision 1.19 diff -u -r1.19 URLTest.java --- gnu/testlet/java/net/URL/URLTest.java 27 Jul 2006 15:54:57 -0000 1.19 +++ gnu/testlet/java/net/URL/URLTest.java 7 Dec 2006 21:41:54 -0000 @@ -340,6 +340,17 @@ harness.check(false); harness.debug(_); } + + harness.checkPoint("jar base with full http spec"); + try { + URL base = new URL("jar:file:///test.jar!/foo/bar.txt"); + URL other = new URL(base, "http://planet.classpath.org/"); + harness.check(other.toString(), + "http://planet.classpath.org/"); + } catch (IOException _) { + harness.check(false); + harness.debug(_); + } } -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: From ddaney@avtrex.com Fri Dec 8 06:50:00 2006 From: ddaney@avtrex.com (David Daney) Date: Fri, 08 Dec 2006 06:50:00 -0000 Subject: FYI: New test for HTTP timeouts Message-ID: <45790B40.5000500@avtrex.com> This is the test for the HTTP read and connection timeout code I plan on committing to classpath. 2006-12-07 David Daney * gnu/testlet/java/net/HttpURLConnection/timeout.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: timeout.diff Type: text/x-patch Size: 7862 bytes Desc: not available URL: From tbento@redhat.com Fri Dec 8 16:33:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 08 Dec 2006 16:33:00 -0000 Subject: FYI: New ScrollPane Tests Message-ID: <1165595592.2661.4.camel@toothpaste.toronto.redhat.com> Hey, This adds a test for ScrollPane's getScrollPosition, setScrollPosition(int, int) and getScrollPosition(Point) method. Cheers, Tania 2006-12-08 Tania Bento * gnu/testlet/java/awt/ScrollPane/getScrollPosition.java: New test. * gnu/testlet/java/awt/ScrollPane/setScrollPosition.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 6136 bytes Desc: not available URL: From tbento@redhat.com Fri Dec 8 20:34:00 2006 From: tbento@redhat.com (Tania Bento) Date: Fri, 08 Dec 2006 20:34:00 -0000 Subject: FYI: Another New ScrollPane Test Message-ID: <1165610081.2661.16.camel@toothpaste.toronto.redhat.com> Hey, This adds a test for java.awt.ScrollPane's doLayout method. Cheers, Tania 2006-12-08 Tania Bento * gnu/testlet/java/awt/ScrollPane/doLayout.java: New test. -------------- next part -------------- A non-text attachment was scrubbed... Name: patch.diff Type: text/x-patch Size: 2019 bytes Desc: not available URL: From deadboy@stivbators.com Fri Dec 15 21:20:00 2006 From: deadboy@stivbators.com (deadboy@stivbators.com) Date: Fri, 15 Dec 2006 21:20:00 -0000 Subject: MESSAGE NOT DELIVERED: Fwd: Photo In-Reply-To: <200612152119.kBFLJtPj005773@host.kaliweb.com> References: <200612152119.kBFLJtPj005773@host.kaliweb.com> Message-ID: <200612152120.kBFLK7R3006057@host.kaliweb.com> Your message could not be delivered. The User is out of space. Please try to send your message again at a later time. From deadboy@stivbators.com Mon Dec 18 19:08:00 2006 From: deadboy@stivbators.com (deadboy@stivbators.com) Date: Mon, 18 Dec 2006 19:08:00 -0000 Subject: MESSAGE NOT DELIVERED: Re: In-Reply-To: <200612181907.kBIJ7dZq019622@host.kaliweb.com> References: <200612181907.kBIJ7dZq019622@host.kaliweb.com> Message-ID: <200612181907.kBIJ7odT019796@host.kaliweb.com> Your message could not be delivered. The User is out of space. Please try to send your message again at a later time.