text Metaobject callTestMethods

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Metaobject callTestMethods相关的知识,希望对你有一定的参考价值。

package metaobjectTest

@doc{*
    callTestMethods generates code that calls all methods of
    the current prototype whose name ends with 'Test'. It
    is the same as to use annotation @callUnaryMethods(".*Test")
*}
object CallTestMethods

    func run {
    
        @callTestMethods ;
        assert count == 3;
    }
    
    func oneTest { ++count }
    func twoTest { ++count }
    func threeTest { ++count }
    
    var Int count = 0;
    
end

以上是关于text Metaobject callTestMethods的主要内容,如果未能解决你的问题,请参考以下文章

text Metaobject callTestMethods

text Metaobject callRunMethods

text Metaobject类型

text Metaobject正则表达式

text Metaobject范围

text Metaobject annot