coverio 0.0.2

Better code coverage reporting for Rust
use assert_cmd::Command;
use std::path::{Path, PathBuf};

mod input;

struct TestContext {
  current_dir: PathBuf,
}

impl TestContext {
  /// Returns the default command.
  pub fn command(&self) -> Command {
    Command::cargo_bin("coverio").unwrap()
  }

  /// Returns the relative path to current directory.
  pub fn current_dir(&self) -> &PathBuf {
    &self.current_dir
  }
}

macro_rules! test_context {
  () => {{
    let file_name = file!();
    let current_dir = Path::new(file_name).parent().unwrap().to_path_buf();
    TestContext { current_dir }
  }};
}

use test_context;