test_phase: count method definitions
authorJean Privat <jean@pryen.org>
Tue, 23 Sep 2014 17:02:34 +0000 (13:02 -0400)
committerJean Privat <jean@pryen.org>
Wed, 24 Sep 2014 00:24:46 +0000 (20:24 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/test_test_phase.nit

index e0b81ee..fc0aac1 100644 (file)
@@ -34,4 +34,14 @@ do
        print "I have {model.mmodules.length} modules"
        var mclasses = mainmodule.flatten_mclass_hierarchy
        print "I have also {mclasses.length} classes"
+
+       var meth_cpt = 0
+       for m in mainmodule.in_importation.greaters do
+               for cd in m.mclassdefs do
+                       for pd in cd.mpropdefs do
+                               if pd isa MMethodDef then meth_cpt += 1
+                       end
+               end
+       end
+       print "And {meth_cpt} definitions of methods"
 end