Commit b5e231fc authored by Roxane Kang Maréchal's avatar Roxane Kang Maréchal
Browse files

Improved comment for helpers and rules related to TooFewBranchesForASwitchStatement

parent ad4f304f
......@@ -1440,7 +1440,7 @@ rule MeasureTestClassWithoutTest(w: java!CompilationUnit) {
}
}
--- Rule that creates an instance of Measure for the switch statement with too few branches passed in parameter
--- Rule that creates an instance of Measure when a switch statement has too few branches
rule MeasureTooFewBranchesForASwitchStatement(switchStatement: java!SwitchStatement) {
to
om: smm!ObservedMeasure (
......
......@@ -12,8 +12,7 @@ helper def: uselessStringValueOf() : Set(smm!Measure) =
------------------------------------ TooFewBranchesForASwitchStatement--------------------------------------
-- Returns a set of measures for each switch statement that violates the rule : number of switch cases < 3
-- To test, use input model : tooFewBranchesForASwitchStatement.xmi
--- Returns a set of measures for each switch statement that contains less than 3 switch cases
helper def: tooFewBranchesForASwitchStatement(): Set(smm!Measure) =
-- If the number of switch cases for the current switch statement is < 3 then add a new measure to the set
java!SwitchStatement.allInstances()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment