1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73
//! Assert macros for comparing input/output reader streams.
//!
//! These macros help with input/output readers, such as file handles, byte arrays,
//! input streams, the trait `std::io::Read`, and anything that implements a
//! method `read_to_string() -> String`.
//!
//! Compare a reader with another reader:
//!
//! * [`assert_io_read_to_string_eq!(reader1, reader2)`](macro@crate::assert_io_read_to_string_eq) ≈ reader1.read_to_string() = reader2.read_to_string()
//!
//! * [`assert_io_read_to_string_ne!(reader1, reader2)`](macro@crate::assert_io_read_to_string_ne) ≈ reader1.read_to_string() ≠ reader2.read_to_string()
//!
//! * [`assert_io_read_to_string_ge!(reader1, reader2)`](macro@crate::assert_io_read_to_string_ge) ≈ reader1.read_to_string() ≥ reader2.read_to_string()
//!
//! * [`assert_io_read_to_string_gt!(reader1, reader2)`](macro@crate::assert_io_read_to_string_gt) ≈ reader1.read_to_string() > reader2.read_to_string()
//!
//! * [`assert_io_read_to_string_le!(reader1, reader2)`](macro@crate::assert_io_read_to_string_le) ≈ reader1.read_to_string() ≤ reader2.read_to_string()
//!
//! * [`assert_io_read_to_string_lt!(reader1, reader2)`](macro@crate::assert_io_read_to_string_lt) ≈ reader1.read_to_string() < reader2.read_to_string()
//!
//! Compare a reader with an expression:
//!
//! * [`assert_io_read_to_string_eq_expr!(reader, expr)`](macro@crate::assert_io_read_to_string_eq_expr) ≈ reader.read_to_string() = expr
//!
//! * [`assert_io_read_to_string_ne_expr!(reader, expr)`](macro@crate::assert_io_read_to_string_ne_expr) ≈ reader.read_to_string() ≠ expr
//!
//! * [`assert_io_read_to_string_ge_expr!(reader, expr)`](macro@crate::assert_io_read_to_string_ge_expr) ≈ reader.read_to_string() ≥ expr
//!
//! * [`assert_io_read_to_string_gt_expr!(reader, expr)`](macro@crate::assert_io_read_to_string_gt_expr) ≈ reader.read_to_string() > expr
//!
//! * [`assert_io_read_to_string_le_expr!(reader, expr)`](macro@crate::assert_io_read_to_string_le_expr) ≈ reader.read_to_string() ≤ expr
//!
//! * [`assert_io_read_to_string_lt_expr!(reader, expr)`](macro@crate::assert_io_read_to_string_lt_expr) ≈ reader.read_to_string() < expr
//!
//! Compare a reader with its contents:
//!
//! * [`assert_io_read_to_string_contains!(reader, &containee)`](macro@crate::assert_io_read_to_string_contains) ≈ reader.read_to_string().contains(containee)
//!
//! * [`assert_io_read_to_string_matches!(reader, &matcher)`](macro@crate::assert_io_read_to_string_matches) ≈ matcher.is_match(reader.read_to_string())
//!
//!
//! # Example
//!
//! ```rust
//! # #[macro_use] extern crate assertables;
//! use std::io::Read;
//!
//! # fn main() {
//! let mut a = "alfa".as_bytes();
//! let mut b = "alfa".as_bytes();
//! assert_io_read_to_string_eq!(a, b);
//! # }
//! ```
// Comparisons
pub mod assert_io_read_to_string_eq;
pub mod assert_io_read_to_string_ne;
pub mod assert_io_read_to_string_lt;
pub mod assert_io_read_to_string_le;
pub mod assert_io_read_to_string_gt;
pub mod assert_io_read_to_string_ge;
// Comparisons with expressions
pub mod assert_io_read_to_string_eq_expr;
pub mod assert_io_read_to_string_ne_expr;
pub mod assert_io_read_to_string_lt_expr;
pub mod assert_io_read_to_string_le_expr;
pub mod assert_io_read_to_string_gt_expr;
pub mod assert_io_read_to_string_ge_expr;
// Specializations
pub mod assert_io_read_to_string_matches;
pub mod assert_io_read_to_string_contains;