nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9cfab85
)
test_phase: count method definitions
author
Jean Privat
<jean@pryen.org>
Tue, 23 Sep 2014 17:02:34 +0000
(13:02 -0400)
committer
Jean 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
patch
|
blob
|
history
diff --git
a/src/test_test_phase.nit
b/src/test_test_phase.nit
index
e0b81ee
..
fc0aac1
100644
(file)
--- 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