mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Merge pull request #292 from taskchampion/issue291
Switch to pretty_assertions
This commit is contained in:
commit
d01386f3ea
47 changed files with 97 additions and 1 deletions
|
@ -28,3 +28,4 @@ strum_macros = "0.21"
|
|||
proptest = "^1.0.0"
|
||||
tempfile = "3"
|
||||
rstest = "0.10"
|
||||
pretty_assertions = "1"
|
||||
|
|
|
@ -149,6 +149,7 @@ impl Replica {
|
|||
mod tests {
|
||||
use super::*;
|
||||
use crate::task::Status;
|
||||
use pretty_assertions::assert_eq;
|
||||
use uuid::Uuid;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -159,6 +159,7 @@ impl Server for LocalServer {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
use tempfile::TempDir;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -78,6 +78,7 @@ impl AsRef<[u8]> for HistoryCiphertext {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn round_trip() {
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -35,6 +35,7 @@ impl Priority {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn test_priority() {
|
||||
|
|
|
@ -41,6 +41,7 @@ impl Status {
|
|||
#[cfg(test)]
|
||||
mod test {
|
||||
use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn test_status() {
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue