From: Jean Privat Date: Tue, 23 Sep 2014 17:02:34 +0000 (-0400) Subject: test_phase: count method definitions X-Git-Tag: v0.6.9~19^2~16 X-Git-Url: http://nitlanguage.org test_phase: count method definitions Signed-off-by: Jean Privat --- diff --git a/src/test_test_phase.nit b/src/test_test_phase.nit index e0b81ee..fc0aac1 100644 --- a/src/test_test_phase.nit +++ b/src/test_test_phase.nit @@ -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