Switch otherwise

IDCC-8
TitleEvery switch shall have a matching otherwise section.
PriorityMandatory
Severity level4
DescriptionEvery switch shall have a matching otherwise section, even if it does not contain executable code.
RationaleBy including an otherwise section, no execution paths are overlooked. Additionally, code coverage can be accurately reported because without otherwise, it is unclear whether it happens that none of the cases occur.

Avoid:

switch reply
    case "Yes"
        saveData()
    case "No"
        clearData()
end

Instead use:

switch reply
    case "Yes"
        msg = "ok";
        saveData()
    case "No"
        msg = "ok";
        clearData()
    otherwise
        % Should not get here.
        msg = "wrong reply";
end