Merge pull request #292 from taskchampion/issue291

Switch to pretty_assertions
This commit is contained in:
Dustin J. Mitchell 2021-10-02 10:54:25 -04:00 committed by GitHub
commit d01386f3ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 97 additions and 1 deletions

View file

@ -28,3 +28,4 @@ strum_macros = "0.21"
proptest = "^1.0.0"
tempfile = "3"
rstest = "0.10"
pretty_assertions = "1"

View file

@ -149,6 +149,7 @@ impl Replica {
mod tests {
use super::*;
use crate::task::Status;
use pretty_assertions::assert_eq;
use uuid::Uuid;
#[test]

View file

@ -159,6 +159,7 @@ impl Server for LocalServer {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
use tempfile::TempDir;
#[test]

View file

@ -78,6 +78,7 @@ impl AsRef<[u8]> for HistoryCiphertext {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn round_trip() {

View file

@ -166,6 +166,7 @@ impl Storage for InMemoryStorage {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
// (note: this module is heavily used in tests so most of its functionality is well-tested
// elsewhere and not tested here)

View file

@ -128,6 +128,7 @@ mod test {
use crate::storage::InMemoryStorage;
use crate::taskdb::TaskDb;
use chrono::{Duration, Utc};
use pretty_assertions::assert_eq;
use proptest::prelude::*;
// note that `tests/operation_transform_invariant.rs` tests the transform function quite

View file

@ -356,6 +356,7 @@ impl<'t> StorageTxn for Txn<'t> {
mod test {
use super::*;
use crate::storage::taskmap_with;
use pretty_assertions::assert_eq;
use tempfile::TempDir;
#[test]

View file

@ -35,6 +35,7 @@ impl Priority {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_priority() {

View file

@ -41,6 +41,7 @@ impl Status {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_status() {

View file

@ -139,6 +139,7 @@ pub(super) enum SyntheticTag {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
use rstest::rstest;
use std::convert::TryInto;

View file

@ -314,6 +314,7 @@ impl<'r> std::ops::Deref for TaskMut<'r> {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
fn with_mut_task<F: FnOnce(TaskMut)>(f: F) {
let mut replica = Replica::new_inmemory();

View file

@ -359,6 +359,7 @@ mod tests {
use crate::server::test::TestServer;
use crate::storage::InMemoryStorage;
use chrono::Utc;
use pretty_assertions::assert_eq;
use proptest::prelude::*;
use std::collections::HashMap;
use uuid::Uuid;

View file

@ -41,6 +41,7 @@ impl AsRef<[u8]> for Key {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
#[test]
fn test_from_bytes() {

View file

@ -69,6 +69,7 @@ impl WorkingSet {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
fn make() -> (Uuid, Uuid, WorkingSet) {
let uuid1 = Uuid::new_v4();