scct icon indicating copy to clipboard operation
scct copied to clipboard

Base case of recursive list function not considered covered

Open eddsteel opened this issue 12 years ago • 0 comments

I'm seeing the following in my coverage report:

11    def interpolate(sep: String)(list: List[Array[Byte]]): List[Array[Byte]] = list match {
*12*        case Nil => List*()*
13      case List(x) => List(x)
14      case h :: t => h :: sep.getBytes() :: interpolate(sep)(t)
15    } 

Line 12 has the parens in red (I guess because the function is never called with an empty list). Of course every call to this function involves this line, because it's the base case of the recursion.

eddsteel avatar May 07 '13 20:05 eddsteel