From 0285ac77fe5fb9027cb60dd93652ae619744fe2e Mon Sep 17 00:00:00 2001 From: Luni-4 Date: Mon, 14 Sep 2020 10:11:40 +0200 Subject: [PATCH] Update Mi test (#260) Use the new cyclomatic implementation to test the Mi metric --- rust-code-analysis-cli/src/web/server.rs | 18 +++++++++--------- src/metrics/mi.rs | 6 +++--- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rust-code-analysis-cli/src/web/server.rs b/rust-code-analysis-cli/src/web/server.rs index 1e711b07d..85682ffc6 100644 --- a/rust-code-analysis-cli/src/web/server.rs +++ b/rust-code-analysis-cli/src/web/server.rs @@ -650,9 +650,9 @@ mod tests { "volume": 4.754_887_502_163_468}, "loc": {"cloc": 1.0, "ploc": 2.0, "lloc": 1.0, "sloc": 4.0, "blank": 1.0}, "nom": {"functions": 1.0, "closures": 0.0, "total": 1.0}, - "mi": {"mi_original": 140.204_331_558_152_12, - "mi_sei": 161.644_455_240_662_24, - "mi_visual_studio": 81.990_837_168_510_01}}, + "mi": {"mi_original": 139.974_331_558_152_1, + "mi_sei": 161.414_455_240_662_22, + "mi_visual_studio": 81.856_334_244_533_39}}, "name": "test.py", "spaces": [{"kind": "function", "start_line": 3, @@ -728,9 +728,9 @@ mod tests { "volume": 4.754_887_502_163_468}, "loc": {"cloc": 0.0, "ploc": 2.0, "lloc": 1.0, "sloc": 2.0, "blank": 0.0}, "nom": {"functions": 1.0, "closures": 0.0, "total": 1.0}, - "mi": {"mi_original": 151.433_315_883_223_23, - "mi_sei": 142.873_061_717_489_78, - "mi_visual_studio": 88.557_494_668_551_6}}, + "mi": {"mi_original": 151.203_315_883_223_2, + "mi_sei": 142.643_061_717_489_76, + "mi_visual_studio": 88.422_991_744_574_97}}, "name": "test.py", "spaces": []} }); @@ -776,9 +776,9 @@ mod tests { "volume": 4.754_887_502_163_468}, "loc": {"cloc": 0.0, "ploc": 2.0, "lloc": 1.0, "sloc": 2.0, "blank": 0.0}, "nom": {"functions": 1.0, "closures": 0.0, "total": 1.0}, - "mi": {"mi_original": 151.433_315_883_223_23, - "mi_sei": 142.873_061_717_489_78, - "mi_visual_studio": 88.557_494_668_551_6}}, + "mi": {"mi_original": 151.203_315_883_223_2, + "mi_sei": 142.643_061_717_489_76, + "mi_visual_studio": 88.422_991_744_574_97}}, "name": "test.py", "spaces": [{"kind": "function", "start_line": 1, diff --git a/src/metrics/mi.rs b/src/metrics/mi.rs index 583c516f2..81d723116 100644 --- a/src/metrics/mi.rs +++ b/src/metrics/mi.rs @@ -129,9 +129,9 @@ mod tests { mi, [], [ - (mi_original, 151.433_315_883_223_23), - (mi_sei, 142.873_061_717_489_78), - (mi_visual_studio, 88.557_494_668_551_6), + (mi_original, 151.203_315_883_223_2), + (mi_sei, 142.643_061_717_489_76), + (mi_visual_studio, 88.422_991_744_574_97), ] ); }