Coverage Report: Coaster
File: PriceCalculation.cpp
show more
show less
From
All Files
Location
C:\Testwell\Coaster\CoasterCode\PriceCalculation.cpp
MC/DC
90%
9 / 10
Statement
100%
5 / 5
True
Highlight:
All
MC/DC
Statement
False
Source & Details
Show Code:
Outside Functions
Show Coverage Details:
Single Probe Descriptions
Condition Blocks
True-False-Tables
MC/DC Blocks
PriceCalculation.cpp
All Files
1
#include "PriceCalculation.h"
2
3
int
calcPrice(
int
Age)
3
FUNCTION calcPrice()
4
{
5
if
(Age < 10)
1
2
if (Age < 10)
6
{
7
return
2;
1
return 2
8
}
9
else
if
(Age < 18 || Age >= 65)
1
1
else if (Age < 18 || Age >= 65)
1
1
T || _
0
2
F || T
1
3
F || F
+
MC/DC
Age < 18:
1, 3
-
MC/DC
Age >= 65:
2, 3
10
{
11
return
3;
1
return 3
12
}
13
else
else
14
{
15
return
5;
1
return 5
16
}
17
}
function end
Overview
❮❮
❮
All Files
PassengerScan.cpp
PriceCalculation.cpp
Rollercoaster.cpp
TicketApp.cpp
Select File
❯
❯❯