| Prev | Code Coverage - Tales From the Trenches | Next |
There are classes of errors which branch coverage cannot detect:
$h = 0;
if ($x)
{
$h = { a => 1 };
}
if ($y)
{
print $h->{a};
}
100% branch coverage with ($x, $y) set to (1, 1) and (0, 0)
(0, 1) => BOOM
| Slide 12 | YAPC::Europe::2003 | Copyright © 2003 Paul Johnson |