tests: really test nitmetrics.nit
authorJean Privat <jean@pryen.org>
Sat, 20 Jul 2013 03:27:04 +0000 (23:27 -0400)
committerJean Privat <jean@pryen.org>
Sat, 20 Jul 2013 11:28:19 +0000 (07:28 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

tests/nitmetrics.args
tests/sav/nitmetrics_args1.res
tests/sav/nitmetrics_args1.sav [new file with mode: 0644]

index b1e7e65..f118275 100644 (file)
@@ -1 +1 @@
-base_simple3.nit -d out/nitmetrics_args1.write
+--all base_simple3.nit -d out/nitmetrics_args1.write
index 6e72505..9dc3dd0 100644 (file)
@@ -1 +1,136 @@
 *** METRICS ***
+--- Global Summary metrics ---
+(NMD) Number of Modules: 1
+(NC)  Number of Classes: 4
+(NI)  Number of Interfaces: 1
+(NAC)  Number of Abstract Classes: 0
+(NGC)  Number of Generic Classes: 0
+(NGI)  Number of Generic Interfaces: 0
+--- (SL) Std-Lib Summary metrics ---
+(NMDSL) Number of Modules: 0
+(NCSL)  Number of Classes: 0
+(NISL)  Number of Interfaces: 0
+(NACSL)  Number of Abstract Classes: 0
+(NGCSL)  Number of Generic Classes: 0
+(NGISL)  Number of Generic Interfaces: 0
+--- (UD) User-Defined Summary metrics ---
+(NMDUD) Number of Modules: 1
+(NCUD)  Number of Classes: 4
+(NIUD)  Number of Interfaces: 1
+(NACUD)  Number of Abstract Classes: 0
+(NGCUD)  Number of Generic Classes: 0
+(NGIUD)  Number of Generic Interfaces: 0
+
+--- Global Inheritance metrics ---
+(DIT) Global Depth in Inheritance Tree: 0.85
+(DUI) Proportion of types inheriting another type other than Object: 0.0%
+(CCDUI) Proportion of classes that extend some other class: 0.0%
+(CIDUI) Proportion of classes that implement some other interface: 0.0%
+(IIDUI) Proportion of interfaces that extend some other interface: 0.0%
+(IF) Proportion of types Inherited From: 20.00%
+(CCIF) Proportion of classes extended by class: 0.0%
+(ICIF) Proportion of interfaces implemented by class: 100.00%
+(IIIF) Proportion of interfaces extended by interface: 0.0%
+
+--- (SL -> *) Std-Lib Inheritance metrics ---
+(SLDUI) Proportion of SL types inheriting another type other than Object: na%
+(SLCCDUI) Proportion of SL classes that extend some other class: na%
+(SLCIDUI) Proportion of SL classes that implement some other interface: na%
+(SLIIDUI) Proportion of SL interfaces that extend some other interface: na%
+(SLIF) Proportion of SL types Inherited From: na%
+(SLCCIF) Proportion of SL classes extended by class: na%
+(SLICIF) Proportion of SL interfaces implemented by class: na%
+(SLIIIF) Proportion of SL interfaces extended by interface: na%
+
+--- (SL -> SL) Std-Lib Inheritance metrics ---
+(SLIFSL) Proportion of SL types Inherited From by SL type: na%
+(SLCCIFSL) Proportion of SL classes extended by SL class: na%
+(SLICIFSL) Proportion of SL interfaces implemented by SL class: na%
+(SLIIIFSL) Proportion of SL interfaces extended by SL interface: na%
+
+--- (SL->UD) Std-Lib Inheritance metrics ---
+(SLIFUD) Proportion of SL types Inherited From by UD type: na%
+(SLCCIFUD) Proportion of SL classes extended by UD class: na%
+(SLICIFUD) Proportion of SL interfaces implemented by UD class: na%
+(SLIIIFUD) Proportion of SL interfaces extended by UD interface: na%
+
+--- (UD->*) User-Defined Inheritance metrics ---
+(UDDUI) Proportion of UD types inheriting another type other than Object: 0.0%
+(UDCCDUI) Proportion of UD classes that extend some other class: 0.0%
+(UDCIDUI) Proportion of UD classes that implement some other interface: 0.0%
+(UDIIDUI) Proportion of UD interfaces that extend some other interface: 0.0%
+(UDIF) Proportion of UD types Inherited From: 20.00%
+(UDCCIF) Proportion of UD classes extended by class: 0.0%
+(UDICIF) Proportion of UD interfaces implemented by class: 100.00%
+(UDIIIF) Proportion of UD interfaces extended by interface: 0.0%
+
+--- (UD -> SL) User-Defined Inheritance metrics ---
+(UDDUISL) Proportion of UD types inheriting another type other SL type: 0.0%
+(UDCCDUISL) Proportion of UD classes that extend some other SL class: 0.0%
+(UDCIDUISL) Proportion of UD classes that implement some other SL interface: 0.0%
+(UDIIDUISL) Proportion of UD interfaces that extend some other SL interface: 0.0%
+
+--- (UD -> UD) User-Defined Inheritance metrics ---
+(UDDUIUD) Proportion of UD types inheriting another type other UD type: 0.0%
+(UDCCDUIUD) Proportion of UD classes that extend some other UD class: 0.0%
+(UDCIDUIUD) Proportion of UD classes that implement some other UD interface: 0.0%
+(UDIIDUIUD) Proportion of UD interfaces that extend some other UD interface: 0.0%
+(UDIFUD) Proportion of UD types Inherited From: 20.00%
+(UDCCIFUD) Proportion of UD classes extended by UD class: 0.0%
+(UDICIFUD) Proportion of UD interfaces implemented by UD class: 100.00%
+(UDIIIFUD) Proportion of UD interfaces extended by UD interface: 0.0%
+--- Metrics of refinement usage ---
+Number of modules: 1
+
+Number of classes: 7
+  Number of interface kind: 1 (14.28%)
+  Number of enum kind: 2 (28.57%)
+  Number of class kind: 4 (57.14%)
+
+Number of class definitions: 8
+Number of refined classes: 1 (14.28%)
+Average number of class refinments by classes: 0.14
+Average number of class refinments by refined classes: 1.00
+
+Number of properties: 19
+  Number of MAttribute: 3 (15.78%)
+  Number of MMethod: 16 (84.21%)
+
+Number of property definitions: 19
+Number of redefined properties: 0 (0.0%)
+Average number of property redefinitions by property: 0.0
+Average number of property redefinitions by redefined property: na
+--- Metrics of the explitic static types ---
+Total number of explicit static types: 9
+Most used types: 
+  Int: 6
+  C: 1
+  B: 1
+  A: 1
+Distribution of type usage:
+  <=1: 3 (75.00% of types; 33.33% of usage)
+  <=8: 1 (25.00% of types; 66.66% of usage)
+--- Sends on Nullable Reciever ---
+Total number of sends: 19
+Number of sends on a nullable receiver: 0 (0.0%)
+Number of buggy sends (cannot determine the type of the receiver): 0 (0.0%)
+--- Explicit vs. Implicit Self ---
+Total number of self: 5
+Total number of implicit self: 4 (80.00%)
+--- Construction of tables ---
+Number of runtime classes: 6 (excluding interfaces and abstract classes)
+Average number of composing class definition by runtime class: 3.00
+Total size of tables (classes and instances): 34 (not including stuff like info for subtyping or call-next-method)
+Average size of table by runtime class: 5.66
+Values never redefined: 34 (100.00%)
+--- RTA metrics ---
+Number of live runtime types (instantied resolved type): 6
+       Sys Bool Int A B C
+Number of live method definitions: 14
+Number of live customized method definitions: 14
+Number of live runtime cast types (ie used in as and isa): 0
+       
+class_hierarchy.dot
+classdef_hierarchy.dot
+model.html
+module_hierarchy.dot
diff --git a/tests/sav/nitmetrics_args1.sav b/tests/sav/nitmetrics_args1.sav
new file mode 100644 (file)
index 0000000..41a794a
--- /dev/null
@@ -0,0 +1,136 @@
+*** METRICS ***
+--- Construction of tables ---
+Number of runtime classes: 6 (excluding interfaces and abstract classes)
+Average number of composing class definition by runtime class: 3.00
+Total size of tables (classes and instances): 34 (not including stuff like info for subtyping or call-next-method)
+Average size of table by runtime class: 5.66
+Values never redefined: 34 (100.00%)
+--- RTA metrics ---
+Number of live runtime types (instantied resolved type): 6
+       Sys Bool Int A B C
+Number of live method definitions: 14
+Number of live customized method definitions: 14
+Number of live runtime cast types (ie used in as and isa): 0
+       
+--- Explicit vs. Implicit Self ---
+Total number of self: 5
+Total number of implicit self: 4 (80.00%)
+--- Sends on Nullable Reciever ---
+Total number of sends: 19
+Number of sends on a nullable receiver: 0 (0.0%)
+Number of buggy sends (cannot determine the type of the receiver): 0 (0.0%)
+--- Metrics of the explitic static types ---
+Total number of explicit static types: 9
+Most used types: 
+  Int: 6
+  C: 1
+  B: 1
+  A: 1
+Distribution of type usage:
+  <=1: 3 (75.00% of types; 33.33% of usage)
+  <=8: 1 (25.00% of types; 66.66% of usage)
+--- Metrics of refinement usage ---
+Number of modules: 1
+
+Number of classes: 7
+  Number of interface kind: 1 (14.28%)
+  Number of enum kind: 2 (28.57%)
+  Number of class kind: 4 (57.14%)
+
+Number of class definitions: 8
+Number of refined classes: 1 (14.28%)
+Average number of class refinments by classes: 0.14
+Average number of class refinments by refined classes: 1.00
+
+Number of properties: 19
+  Number of MAttribute: 3 (15.78%)
+  Number of MMethod: 16 (84.21%)
+
+Number of property definitions: 19
+Number of redefined properties: 0 (0.0%)
+Average number of property redefinitions by property: 0.0
+Average number of property redefinitions by redefined property: na
+--- Global Summary metrics ---
+(NMD) Number of Modules: 1
+(NC)  Number of Classes: 4
+(NI)  Number of Interfaces: 1
+(NAC)  Number of Abstract Classes: 0
+(NGC)  Number of Generic Classes: 0
+(NGI)  Number of Generic Interfaces: 0
+--- (SL) Std-Lib Summary metrics ---
+(NMDSL) Number of Modules: 0
+(NCSL)  Number of Classes: 0
+(NISL)  Number of Interfaces: 0
+(NACSL)  Number of Abstract Classes: 0
+(NGCSL)  Number of Generic Classes: 0
+(NGISL)  Number of Generic Interfaces: 0
+--- (UD) User-Defined Summary metrics ---
+(NMDUD) Number of Modules: 1
+(NCUD)  Number of Classes: 4
+(NIUD)  Number of Interfaces: 1
+(NACUD)  Number of Abstract Classes: 0
+(NGCUD)  Number of Generic Classes: 0
+(NGIUD)  Number of Generic Interfaces: 0
+
+--- Global Inheritance metrics ---
+(DIT) Global Depth in Inheritance Tree: 0.85
+(DUI) Proportion of types inheriting another type other than Object: 0.0%
+(CCDUI) Proportion of classes that extend some other class: 0.0%
+(CIDUI) Proportion of classes that implement some other interface: 0.0%
+(IIDUI) Proportion of interfaces that extend some other interface: 0.0%
+(IF) Proportion of types Inherited From: 20.00%
+(CCIF) Proportion of classes extended by class: 0.0%
+(ICIF) Proportion of interfaces implemented by class: 100.00%
+(IIIF) Proportion of interfaces extended by interface: 0.0%
+
+--- (SL -> *) Std-Lib Inheritance metrics ---
+(SLDUI) Proportion of SL types inheriting another type other than Object: na%
+(SLCCDUI) Proportion of SL classes that extend some other class: na%
+(SLCIDUI) Proportion of SL classes that implement some other interface: na%
+(SLIIDUI) Proportion of SL interfaces that extend some other interface: na%
+(SLIF) Proportion of SL types Inherited From: na%
+(SLCCIF) Proportion of SL classes extended by class: na%
+(SLICIF) Proportion of SL interfaces implemented by class: na%
+(SLIIIF) Proportion of SL interfaces extended by interface: na%
+
+--- (SL -> SL) Std-Lib Inheritance metrics ---
+(SLIFSL) Proportion of SL types Inherited From by SL type: na%
+(SLCCIFSL) Proportion of SL classes extended by SL class: na%
+(SLICIFSL) Proportion of SL interfaces implemented by SL class: na%
+(SLIIIFSL) Proportion of SL interfaces extended by SL interface: na%
+
+--- (SL->UD) Std-Lib Inheritance metrics ---
+(SLIFUD) Proportion of SL types Inherited From by UD type: na%
+(SLCCIFUD) Proportion of SL classes extended by UD class: na%
+(SLICIFUD) Proportion of SL interfaces implemented by UD class: na%
+(SLIIIFUD) Proportion of SL interfaces extended by UD interface: na%
+
+--- (UD->*) User-Defined Inheritance metrics ---
+(UDDUI) Proportion of UD types inheriting another type other than Object: 0.0%
+(UDCCDUI) Proportion of UD classes that extend some other class: 0.0%
+(UDCIDUI) Proportion of UD classes that implement some other interface: 0.0%
+(UDIIDUI) Proportion of UD interfaces that extend some other interface: 0.0%
+(UDIF) Proportion of UD types Inherited From: 20.00%
+(UDCCIF) Proportion of UD classes extended by class: 0.0%
+(UDICIF) Proportion of UD interfaces implemented by class: 100.00%
+(UDIIIF) Proportion of UD interfaces extended by interface: 0.0%
+
+--- (UD -> SL) User-Defined Inheritance metrics ---
+(UDDUISL) Proportion of UD types inheriting another type other SL type: 0.0%
+(UDCCDUISL) Proportion of UD classes that extend some other SL class: 0.0%
+(UDCIDUISL) Proportion of UD classes that implement some other SL interface: 0.0%
+(UDIIDUISL) Proportion of UD interfaces that extend some other SL interface: 0.0%
+
+--- (UD -> UD) User-Defined Inheritance metrics ---
+(UDDUIUD) Proportion of UD types inheriting another type other UD type: 0.0%
+(UDCCDUIUD) Proportion of UD classes that extend some other UD class: 0.0%
+(UDCIDUIUD) Proportion of UD classes that implement some other UD interface: 0.0%
+(UDIIDUIUD) Proportion of UD interfaces that extend some other UD interface: 0.0%
+(UDIFUD) Proportion of UD types Inherited From: 20.00%
+(UDCCIFUD) Proportion of UD classes extended by UD class: 0.0%
+(UDICIFUD) Proportion of UD interfaces implemented by UD class: 100.00%
+(UDIIIFUD) Proportion of UD interfaces extended by UD interface: 0.0%
+class_hierarchy.dot
+classdef_hierarchy.dot
+model.html
+module_hierarchy.dot