Package: TypeCheckedTestSequence

TypeCheckedTestSequence

nameinstructionbranchcomplexitylinemethod
TypeCheckedTestSequence(TestSequence, Map)
M: 30 C: 0
0%
M: 4 C: 0
0%
M: 3 C: 0
0%
M: 8 C: 0
0%
M: 1 C: 0
0%
getTests()
M: 16 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 4 C: 0
0%
M: 1 C: 0
0%
getTypeCheckError(CallSequence)
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
isTypeCorrect(CallSequence)
M: 9 C: 0
0%
M: 2 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: package org.overture.interpreter.traces;
2:
3: import java.util.HashMap;
4: import java.util.Map;
5:
6: import org.overture.parser.messages.VDMErrorsException;
7:
8: public class TypeCheckedTestSequence extends TestSequence
9: {
10:         Map<CallSequence, VDMErrorsException> tcFailedTests = new HashMap<CallSequence, VDMErrorsException>();
11:         /**
12:          *
13:          */
14:         private static final long serialVersionUID = 1L;
15:
16:         public TypeCheckedTestSequence(TestSequence tests,
17:                         Map<CallSequence, VDMErrorsException> tcFailedTests)
18:         {
19:                 this.tcFailedTests = tcFailedTests;
20:•                for (CallSequence callSequence : tests)
21:                 {
22:•                        if (!tcFailedTests.containsKey(callSequence))
23:                         {
24:                                 this.add(callSequence);
25:                         }
26:                 }
27:         }
28:
29:         public TestSequence getTests()
30:         {
31:                 TestSequence tests = new TestSequence();
32:                 tests.addAll(this);
33:                 tests.addAll(tcFailedTests.keySet());
34:                 return tests;
35:         }
36:
37:         public boolean isTypeCorrect(CallSequence callSequence)
38:         {
39:•                return !tcFailedTests.containsKey(callSequence);
40:         }
41:
42:         public VDMErrorsException getTypeCheckError(CallSequence callSequence)
43:         {
44:                 return tcFailedTests.get(callSequence);
45:         }
46: }