Added some unit tests as requested

As discussed in PR #78267, for example:

* https://github.com/rust-lang/rust/pull/78267#discussion_r515404722
* https://github.com/rust-lang/rust/pull/78267#discussion_r515405958
This commit is contained in:
Rich Kadel
2020-11-02 21:32:48 -08:00
parent 5404efc28a
commit bd0eb07af2
10 changed files with 687 additions and 22 deletions

View File

@@ -5,6 +5,9 @@ mod debug;
mod graph;
mod spans;
#[cfg(test)]
mod tests;
use counters::CoverageCounters;
use graph::{BasicCoverageBlock, BasicCoverageBlockData, CoverageGraph};
use spans::{CoverageSpan, CoverageSpans};
@@ -31,7 +34,7 @@ use rustc_span::{CharPos, Pos, SourceFile, Span, Symbol};
/// A simple error message wrapper for `coverage::Error`s.
#[derive(Debug)]
pub(crate) struct Error {
pub(self) struct Error {
message: String,
}