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
47 changed files with 97 additions and 1 deletions

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();