use of com.intellij.rt.coverage.data.LineData in project intellij by bazelbuild.
the class BlazeCoverageRunnerTest method testParseSingleFile.
@Test
public void testParseSingleFile() throws IOException {
ProjectData data = BlazeCoverageRunner.parseCoverage(mockResolver, inputStream("SF:path/to/file.txt", "DA:4,0", "DA:8,0", "DA:9,1", "DA:23,3", "end_of_record"));
assertThat(data.getClasses()).hasSize(1);
LineData[] lines = (LineData[]) data.getClassData("/root/path/to/file.txt").getLines();
assertThat(lines).hasLength(24);
assertEquals(lines[4], lineData(4, 0));
assertEquals(lines[9], lineData(9, 1));
assertEquals(lines[23], lineData(23, 3));
}
Aggregations