Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Guss2018-08-15 14:59:31 -0400
committerDominic Guss2018-08-28 11:25:29 -0400
commit29cbfa54f03d573770d72706367f8e8cb96bcc58 (patch)
tree0671ade997d1a1ab20f917dc8f4ae89c5d099ad9
parent19893d5a5767a81eec72e8b7f3e4bf6a5e96c99e (diff)
downloadorg.eclipse.osee-29cbfa54f03d573770d72706367f8e8cb96bcc58.tar.gz
org.eclipse.osee-29cbfa54f03d573770d72706367f8e8cb96bcc58.tar.xz
org.eclipse.osee-29cbfa54f03d573770d72706367f8e8cb96bcc58.zip
bug[ats_TW10428]: Coverage tool tests for False in MCDC Case statements
Change-Id: I852694552f7f5e1cf65e795af5968af2a1e4cd30 Signed-off-by: Dominic Guss <Dominic.Guss@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
index c04b9c9fdb..06e0745c07 100644
--- a/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
+++ b/plugins/org.eclipse.osee.disposition.rest/src/org/eclipse/osee/disposition/rest/internal/importer/coverage/LisFileParser.java
@@ -67,6 +67,7 @@ public class LisFileParser implements DispoImporterApi {
private static final String EXIT_WHEN = "\\s*\\( \\)\\s*\\( \\)\\s*(EXIT WHEN).*";
private static final String WHEN_FOR = "\\s*\\( \\)\\s*(WHEN|FOR).*";
private static final String WHEN_CASE = "(.*\\bWHEN\\b\\s*[^:]*$)";
+ private static final String CASE_STATEMENT = "(.*(\\bCASE|case\\s+.+[:].*))";
private final DispoDataFactory dataFactory;
@@ -321,12 +322,12 @@ public class LisFileParser implements DispoImporterApi {
location = String.format("%s.%s.%s", lineNumber, statementCoverageItem.getAbbrevCondition(), "T");
String location2 = String.format("%s.%s.%s", lineNumber, statementCoverageItem.getAbbrevCondition(), "F");
- if (!lineData.getFirst().matches(WHEN_FOR)) {
+ if (!lineData.getFirst().matches(WHEN_FOR) && !lineData.getFirst().matches(CASE_STATEMENT)) {
// Only add corresponding 'F' discrepancy if it's not a WHEN condition statement
text = statementCoverageItem.getFullCondition();
addDiscrepancy(discrepancies, location, text);
addDiscrepancy(discrepancies, location2, text);
- } else {
+ } else { // May be a case statement, which should only test for True
text = lineData.getFirst().trim();
addDiscrepancy(discrepancies, location, text);
}

Back to the top