[nem-en] Re: [NemerleUnit] What about other attributes available inNUnit?

Andrey Khropov andrey.khropov at gmail.com
Sat Feb 3 21:20:35 CET 2007


Kamil Skalski wrote:

> > 
> > 3) ExpectedException, Platform, Category, Explicit, Ignore
> > 
> >   These cases are more complicated. Can we add attributes like always:
> > 
> >        [ExpectedException(typeof(InvalidOperationException))]
> >        test MyTest
> >        {
> > 
> >        }
> > 
> 
> Maybe
> 
> test MyTest [ExpectedException (...)]
> {
> 
> }
> 
> It would be easier to parse and analyse.

I agree

>  It also looks quite nice.

As for me it looks ok too, but attributes are usually specified *before* the
declaration header. Making it a special case here would be inconsistent with
the programmer's expectations.

Although I understand that specifying them before 'test' may be somewhat
problematic (BTW, when do attributes stick to the declaration - before or after
the declaration stage, i.e. can they stick *after* the 'test' macro is
expanded?) it would be more consistent with the common attributes usage.

-- 
AKhropov




More information about the devel-en mailing list