[fpc-devel] .NET Reflection vs RTTI

Vincent Snijders vsnijders at quicknet.nl
Wed Nov 21 17:50:45 CET 2007


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.

B: Intellisense would have helped me and I would not have type text.

Vincent



More information about the fpc-devel mailing list