[Mono-dev] [Patch] NameObjectCollectionBase, HttpCookieCollection

Juraj Skripsky js at hotfeet.ch
Sat Dec 29 13:50:00 EST 2007


Hi everyone,

Who's the maintainer of the classes in System.Collections.Specialized,
who can give me the okay to commit my changes (and Gert's unit tests) to
NameObjectCollectionBase[Test].cs?

(For HttpCookieCollection I know who to bother.)

- Juraj


On Sat, 2007-12-22 at 10:33 +0100, Gert Driesen wrote:
> Hi Juraj,
> 
> It looks ok to me, but since I'm not the maintainer ...
> 
> Gert
> 
> -----Original Message-----
> From: mono-devel-list-bounces at lists.ximian.com
> [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Juraj
> Skripsky
> Sent: vrijdag 21 december 2007 14:34
> To: Gert Driesen
> Cc: Konstantin Triger; mono-devel-list at lists.ximian.com
> Subject: Re: [Mono-dev] [Patch]
> NameObjectCollectionBase,HttpCookieCollection
> 
> Hi Gert,
> 
> Sorry, I attached the wrong version.
> 
> Here you go again, it's the right one this time and also includes the
> optimization suggested by Konstantin.
> 
> - Juraj
> 
> 
> On Fri, 2007-12-21 at 13:09 +0100, Gert Driesen wrote:
> > Hi Juraj,
> > 
> > I haven't checked, but are you sure the tests pass on both the 1.0 and 
> > the 2.0 profile.
> > 
> > I don't see any profile specific code in your patches.
> > 
> > Gert
> > 
> > -----Original Message-----
> > From: mono-devel-list-bounces at lists.ximian.com
> > [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Juraj 
> > Skripsky
> > Sent: vrijdag 21 december 2007 12:51
> > To: Gert Driesen
> > Cc: mono-devel-list at lists.ximian.com
> > Subject: Re: [Mono-dev] [Patch]
> > NameObjectCollectionBase,HttpCookieCollection
> > 
> > Hi Gert,
> > 
> > Thanks for your thorough review! Attached is the lastest and greatest.
> > All unit tests are updated and pass.
> > 
> > May I commit?
> > 
> > - Juraj
> > 
> > 
> > On Thu, 2007-12-20 at 18:44 +0100, Gert Driesen wrote:
> > > Hi Juraj,
> > > 
> > > I made some adjustments to your tests to get them to pass on both 
> > > .NET 2.0
> > > (SP1) and .NET 1.1.
> > > 
> > > I also improved some existing tests that may require additional 
> > > changes before they pass on Mono.
> > > 
> > > Gert
> > > 
> > > PS. Sorry if the attachment is binary (Outlook, says it all ...).
> > > 
> > > -----Original Message-----
> > > From: mono-devel-list-bounces at lists.ximian.com
> > > [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of Juraj 
> > > Skripsky
> > > Sent: donderdag 20 december 2007 10:38
> > > To: Gert Driesen
> > > Cc: mono-devel-list at lists.ximian.com
> > > Subject: Re: [Mono-dev] [Patch]
> > > NameObjectCollectionBase,HttpCookieCollection
> > > 
> > > Hi Gert,
> > > 
> > > I'm attaching my patches, updated as per your suggestions.
> > > 
> > > - Juraj
> > > 
> > > 
> > > On Thu, 2007-12-20 at 10:06 +0100, Gert Driesen wrote:
> > > > Hi Juraj,
> > > > 
> > > > I'd advise against using ExpectedException when multiple calls are 
> > > > made in the test, as this may lead to false positives.
> > > > 
> > > > For example:
> > > > 
> > > > 	[Test]
> > > > 	[ExpectedException (typeof (ArgumentException))]
> > > > 	public void CopyTo_NotEnoughSpace () 
> > > > 	{
> > > > 		string [] array = new string [4];
> > > > 		UnitTestNameObjectCollectionBase c = new 
> > > > UnitTestNameObjectCollectionBase ();
> > > > 		c.Add ("1", "mono");
> > > > 		c.Add ("2", "MoNo");
> > > > 		c.Add ("3", "mOnO");
> > > > 		c.Add ("4", "MONO");
> > > > 		((ICollection)c).CopyTo (array, 2);
> > > > 	}
> > > > 
> > > > If any of the Add methods would lead to an ArgumentException, the 
> > > > test would pass although you explicitly wanted to check if CopyTo 
> > > > resulted in an ArgumentException.
> > > > 
> > > > I would advise the following code (which is more bloated, yes):
> > > > 
> > > > 	[Test]
> > > > 	public void CopyTo_NotEnoughSpace () 
> > > > 	{
> > > > 		string [] array = new string [4];
> > > > 		UnitTestNameObjectCollectionBase c = new 
> > > > UnitTestNameObjectCollectionBase ();
> > > > 		c.Add ("1", "mono");
> > > > 		c.Add ("2", "MoNo");
> > > > 		c.Add ("3", "mOnO");
> > > > 		c.Add ("4", "MONO");
> > > > 		try {
> > > > 			((ICollection)c).CopyTo (array, 2);
> > > > 			Assert.Fail ("#1");
> > > > 		} catch (ArgumentException ex) {
> > > > 			Assert.AreEqual (typeof (ArgumentException),
> > > ex.GetType (), "#2");
> > > > 			Assert.IsNull (ex.InnerException, "#3");
> > > > 			Assert.IsNotNull (ex.Message, "#4");
> > > > 			Assert.IsNull (ex.ParamName, "#5");
> > > > 		}
> > > > 	}
> > > > 
> > > > This also allows you to perform additional checks (eg. was there 
> > > > an inner exception?).
> > > > 
> > > > Gert
> > > > 
> > > > -----Original Message-----
> > > > From: mono-devel-list-bounces at lists.ximian.com
> > > > [mailto:mono-devel-list-bounces at lists.ximian.com] On Behalf Of 
> > > > Juraj Skripsky
> > > > Sent: woensdag 19 december 2007 11:27
> > > > To: mono-devel-list at lists.ximian.com
> > > > Subject: [Mono-dev] [Patch] NameObjectCollectionBase, 
> > > > HttpCookieCollection
> > > > 
> > > > Hello,
> > > > 
> > > > Attached are three small patches for NameObjectCollectionBase.cs, 
> > > > NameObjectCollectionBaseTest.cs and HttpCookieCollection.cs.
> > > > 
> > > > All unit tests pass on Mono. Could someone verify that the new 
> > > > unit tests work on MS.NET?
> > > > 
> > > > May I commit?
> > > > 
> > > > - Juraj
> > > > 
> > 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
> 




More information about the Mono-devel-list mailing list