[fpc-devel] .NET Reflection vs RTTI
Michael Van Canneyt
michael at freepascal.org
Wed Nov 21 19:50:53 CET 2007
On Wed, 21 Nov 2007, Vincent Snijders wrote:
> Michael Van Canneyt schreef:
> >
> > On Wed, 21 Nov 2007, Vincent Snijders wrote:
> >
> > > Michael Van Canneyt schreef:
> > > > > The current fpc solution is that you need to register classes with
> > > > > test
> > > > > methods. This is an extra action.
> > > > You must type the 'TestFixture' attribute also, so no extras here.
> > > > Really...
> > > I know what is easier to write: textfixture at the class declaration or
> > > some
> > > registertest(MyTestClass) in some intialization section. It is a change in
> > > two
> > > locations. Really...
> >
> > The difference being that the compiler checks the former, the latter is
> > unchecked. Since you wrote textfixture, you're already wrong without
> > noticing it, and you would wonder why your test is not picked up... :-)
> >
> > (just teasing, please don't take it serious)
>
> Better not take you seriously, because you are wrong ;-)
>
> A. Attributes are a kind of type too, so the compile would have errored saying
> that TextFixture is an unknown attribute.
As far as I have seen from the discussion so far, attributes were free texts;
if what you say is true, then you can disregard my remark...
Michael.
More information about the fpc-devel
mailing list