Skip to content

Commit

Permalink
Update CoverageResult.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
LPeter1997 committed Sep 29, 2024
1 parent 3ae29b7 commit ff8aedf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/Draco.Coverage/CoverageResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,19 @@ public CoverageResult(ImmutableArray<SequencePoint> sequencePoints, ImmutableArr
this.Hits = hits;
}

/// <summary>
/// Transforms the coverage result into LCOV format.
/// </summary>
/// <returns>The coverage result in LCOV format.</returns>
public string ToLcov()
{
using var stream = new MemoryStream();
this.WriteLcov(stream);
stream.Position = 0;
using var reader = new StreamReader(stream);
return reader.ReadToEnd();
}

/// <summary>
/// Writes the coverage result in LCOV format.
/// </summary>
Expand Down

0 comments on commit ff8aedf

Please sign in to comment.