[MonoDevelop] Unit test

Jacob Ilsø Christensen jacobilsoe at gmail.com
Tue Mar 21 14:20:21 EST 2006


On 3/21/06, Lluis Sanchez <lluis at ximian.com> wrote:
>
> > Hi.
> >
> > The attached patch adds a unit test for namespace resolving to the
> > CSharpBinding assembly. It does not do much yet, but should be easy to
> > extend.
>
> Nice! That's a good start.
>
> >
> > A few comments:
> >
> > * To run the tests type: make check (I had to add some templates to
> > the CSharpBinding to ensure make check did not fail).
>
> Those templates are not needed in CSharpBinding, they were moved to
> MonoDevelop.IDE since they are not c#-specific.
>

Ok, will try and make make check work without them.

> > * Since Assembly.GetEntryAssembly() is null when an assembly is tested
> > through NUnit, I had to check for this and use
> > AppDomain.CurrentDomain.BaseDirectory in those situations.
>
> I think it would be better to add a property somewhere (maybe in
> PropertyService) which returns the entry assembly location, and use that
> property in all other services, instead of adding the null check
> everywhere.
>

Yeah, I thought about doing that, but wanted to try out the concept
first. Will make some common property.

> > * The test assembly will have to be output in build/bin for the
> > MonoDevelop runtime to work. Any suggestions for doing this another
> > way are most welcome!
>
> I think it is ok for now.
>
> >
> > Well, apart from this, I guess it is more or less self explanatory.
> > Any comments? Is this ok to commit with appropriate ChangeLogs?
>
> In the test setup, you shouldn't need to start the IDE. If you need a
> parser database just create one using the ParserService:
>

Will try that.

> IParserDatabase pdb = Services.ParserService.CreateParserDatabase ();
>
> Lluis.

Thanks for the input. I will send out a revised patch.

/Jacob

>
>
>


More information about the Monodevelop-list mailing list