Skip to content

Commit

Permalink
Update Mi test (mozilla#260)
Browse files Browse the repository at this point in the history
Use the new cyclomatic implementation to test the Mi metric
  • Loading branch information
Luni-4 authored and spacedragon committed Feb 2, 2021
1 parent 3cc7ed4 commit 0285ac7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
18 changes: 9 additions & 9 deletions rust-code-analysis-cli/src/web/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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": []}
});
Expand Down Expand Up @@ -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,
Expand Down
6 changes: 3 additions & 3 deletions src/metrics/mi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
]
);
}
Expand Down

0 comments on commit 0285ac7

Please sign in to comment.