Open
Description
When using macros in conditions, the MC/DC report sais the position of those conditions is where the macro is.
Example:
#define ID(exp) exp
int main(void) {
int a = 1;
int b = 1;
if (ID(a == 1) && b == 1) {
return 0;
}
return 1;
}
The condition ID(a == 1)
is located in line 7 but the MC/DC report will say it is in line 1:
1| 2|#define ID(exp) exp
2| |
3| 1|int main(void) {
4| 1| int a = 1;
5| 1| int b = 1;
6| |
7| 1| if (ID(a == 1) && b == 1) {
------------------
|---> MC/DC Decision Region (7:9) to (7:29)
|
| Number of Conditions: 2
| Condition C1 --> (1:17)
| Condition C2 --> (7:23)
|
| Executed MC/DC Test Vectors:
|
| C1, C2 Result
| 1 { T, T = T }
|
| C1-Pair: not covered
| C2-Pair: not covered
| MC/DC Coverage for Decision: 0.00%
|
------------------
8| 1| return 0;
9| 1| }
10| 0| return 1;
11| 1|}
I would expect the report to refer to the actual position inside the decision.