Expand description
§Assertables: Rust crate of assert macros for testing
The assertables
Rust crate provides many assert macros to improve your
compile-time tests and run-time reliability.
- Crate: https://crates.io/crates/assertables
- Docs: https://docs.rs/assertables/
- Repo: https://github.com/sixarm/assertables-rust-crate/
- Contact: joel@joelparkerhenderson.com
To use this crate, add it to your Cargo.toml
file:
[dev-dependencies]
assertables = "8.7"
§Introduction
The Rust programming language provides a few built-in assert macros to test code:
The Rust programming language provides assert macros to test code:
assert!()
assert_eq!(a, b)
// equal
assert_ne!(a, b)
// not equal
The assertables crate provides many more, so you can write smarter tests.
For values:
assert_lt!(a, b)
// less than
assert_le!(a, b)
// less than or equal
assert_gt!(a, b)
// greater than
assert_ge!(a, b)
// greater than or equal
For approximation:
For strings:
For matching:
For infix operators:
For nearness:
For Result Ok/Err:
assert_ok!(a)
assert_ok_eq!(a, b)
assert_ok_eq_expr!(a, expr)
assert_ok_ne!(a, b)
assert_ok_ne_expr!(a, expr)
assert_err!(a)
For Option Some/None:
assert_some!(a)
assert_some_eq!(a, b)
assert_some_eq_expr!(a, expr)
assert_some_ne!(a, b)
assert_some_ne_expr!(a, expr)
assert_none!(a)
For Poll Ready/Pending:
For collections such as arrays, vectors, maps, sets:
For file system paths and input/output readers:
For command capture of standard output and standard error:
assert_command_stdout_eq!(command1, command2)
assert_program_args_stdout_eq!(program1, args1, program2, args2)
;
There are many more macros that are grouped into modules.
Modules for collections, such as arrays, vectors, lists, maps:
assert_set
for set collectionsassert_bag
for bag collections
Modules for functions:
assert_fn
for functions in general.assert_fn_ok
for functions that return Result::Ok.assert_fn_err
for functions that return Result::Err.
Modules for readers:
assert_fs_read_to_string
for file system path contents.assert_io_read_to_string
for input/output reader streams.
Modules for external calls:
assert_command
for commands and their stdout & stderr.assert_program_args
for programs with args and their stdout & stderr.
§Benefits
-
Your tests are more purposeful and powerful. This helps your code be more reliable.
-
Your assert failures provide more information. This helps you troubleshoot faster.
-
You gain runtime asserts. This helps you with validations and verifications.
§Features
-
Easy to use: each macro is well-documented with runnable examples and tests.
-
Zero overhead: if you don’t use a macro, then it’s never compiled into your code.
-
Zero dependencies: the crate has no release dependencies, and just a short list of development dependencies.
§Forms
§Forms for panic versus error
All the assert macros have 3 forms for different purposes:
- Panic form for typical tests.
- Debug form for debugging runtimes.
- Result form for runtime checks, verifications, validations, etc.
Examples:
assert_starts_with!(a, b)
// panic!debug_assert_starts_with!(a, b)
// panic! in debug modeassert_starts_with_as_result!(a, b)
// return Ok or Err
§Forms for messages
All the assert macros have 2 forms for messages.
- Default message form.
- Custom message form.
Examples:
§Forms for other versus expression
Many of the assert macros have 2 forms for comparing left hand side and right hand side.
- Comparing a LHS item to a RHS other of the same type.
- Comparing a LHS item to a RHS expression.
Examples:
§Tracking
- Package: assertables-rust-crate
- Version: 8.9.0
- Created: 2021-03-30T15:47:49Z
- Updated: 2024-09-25T15:18:42Z
- License: MIT or Apache-2.0 or GPL-2.0 or GPL-3.0 or contact us for more
- Contact: Joel Parker Henderson (joel@sixarm.com)
Modules§
- Assert a condition is true.
- Assert a number is approximately equal to another number.
- Assert a number is approximately not equal to another number.
- Assert macros for comparing bag collections.
- Assert macros for comparing commands and their stdout & stderr.
- Assert a container is a match for an expression.
- Assert an expression (such as a string) ends with an expression (such as a string).
- Assert an expression is equal to another.
- Assert expression is Err(_).
- Assert macros for comparing functions.
- Assert macros for comparing functions that return errors.
- Assert macros for comparing functions that return Result::Ok.
- Assert macros for comparing file system path contents.
- Assert a value is greater than or equal to an expression.
- Assert a value is greater than an expression.
- Assert a number is within delta of another number.
- Assert a number is within epsilon of another number.
- Assert a infix operator, such as assert_infix!(a == b).
- Assert macros for comparing input/output reader streams.
- Assert a matcher is a match for an expression.
- Assert a value is less than or equal to an expression.
- Assert a value is less than an expression.
- Assert an expression is not equal to an expression.
- Assert expression is None.
- Assert an expression (such as a string) does not contain an expression (such as a substring).
- Assert an expression (such as a string) does not end with an expression (such as a string).
- Assert an expression (such as a regex) is not a match for an expression (such as a string).
- Assert an expression (such as a string) does not start with an expression (such as a string).
- Assert expression is Ok(_).
- Assert two expressions are Ok(_) and their values are equal.
- Assert an expression is Ok(_) and its value is equal to an expression.
- Assert two expressions are Ok(_) and their values are not equal.
- Assert an expression is Ok(_) and its value is not equal to an expression.
- Assert macros for
Option
{Some
,None
} - Assert an expression is Pending.
- Assert macros for
Poll
{Ready
,Pending
} - Assert macros for comparing programs with arguments.
- Assert an expression is Ready(_).
- Assert two expressions are Ready(_) and their values are equal.
- Assert an expression is Ready(_) and its value is equal to an expression.
- Assert two expressions are Ready(_) and their values are not equal.
- Assert an expression is Ready(_) and its value is not equal to an expression.
- Assert macros for
Result
{Ok
,Err
} - Assert macros for comparing set collections.
- Assert expression is Some(_).
- Assert two expressions are Some(_) and their values are equal.
- Assert an expression is Some(_) and its value is equal to an expression.
- Assert two expressions are Some(_) and their values are not equal.
- Assert an expression is Some(_) and its value is not equal to an expression.
- Assert an expression (such as a string) starts with an expression (such as a string).
Macros§
- Assert a number is approximately equal to another number.
- Assert a number is approximately equal to another number.
- Assert a number is approximately not equal to another number.
- Assert a number is approximately not equal to another number.
- Assert a condition is true.
- Assert a bag is equal to another.
- Assert a bag is equal to another.
- Assert a bag is not equal to another.
- Assert a bag is not equal to another.
- Assert a bag is a subbag of another.
- Assert a bag is a subbag of another.
- Assert a bag is a superbag of another.
- Assert a bag is a superbag of another.
- Assert a command stderr string contains a given containee.
- Assert a command stderr string contains a given containee.
- Assert a command stderr string is equal to another.
- Assert a command stderr string is equal to another.
- Assert a command stderr string is equal to an expression.
- Assert a command stderr string is equal to an expression.
- Assert a command stderr string is a match to a regex.
- Assert a command stderr string is a match to a regex.
- Assert a command stdout string contains a given containee.
- Assert a command stdout string contains a given containee.
- Assert a command stdout string is equal to another.
- Assert a command stdout string is equal to another.
- Assert a command stdout string is equal to an expression.
- Assert a command stdout string is equal to an expression.
- Assert command stdout string is a match to a regex.
- Assert command stdout string is a match to a regex.
- Assert a container is a match for an expression.
- Assert an expression (such as a string) contains an expression (such as a substring).
- Assert an expression (such as a string) ends with an expression (such as a string).
- Assert an expression (such as a string) ends with an expression (such as a substring).
- Assert an expression is equal to another.
- Assert expression is Err(_).
- Assert expression is Err(_).
- Assert a function output is equal to another function output.
- Assert a function output is equal to another function output.
- Assert a function output is equal to an expression.
- Assert a function output is equal to an expression.
- Assert a function error is equal to another.
- Assert a function error is equal to another.
- Assert a function error is equal to an expression.
- Assert a function error is equal to an expression.
- Assert a function error is greater than or equal to another.
- Assert a function error is greater than or equal to another.
- Assert a function error is greater than or equal to an expression.
- Assert a function error is greater than or equal to an expression.
- Assert a function error is greater than another.
- Assert a function error is greater than another.
- Assert a function error is greater than an expression.
- Assert a function error is greater than an expression.
- Assert a function error is less than or equal to another.
- Assert a function error is less than or equal to another.
- Assert a function error is less than or equal to an expression.
- Assert a function error is less than or equal to an expression.
- Assert a function error is less than another.
- Assert a function error is less than another.
- Assert a function error is less than an expression.
- Assert a function error is less than an expression.
- Assert a function error is not equal to another.
- Assert a function error is not equal to another.
- Assert a function error is not equal to an expression.
- Assert a function error is not equal to an expression.
- Assert a function output is greater than or equal to another.
- Assert a function output is greater than or equal to another.
- Assert a function output is greater than or equal to an expression.
- Assert a function output is greater than or equal to an expression.
- Assert a function output is greater than another.
- Assert a function output is greater than another.
- Assert a function output is greater than an expression.
- Assert a function output is greater than an expression.
- Assert a function output is less than or equal to another.
- Assert a function output is less than or equal to another.
- Assert a function output is less than or equal to an expression.
- Assert a function output is less than or equal to an expression.
- Assert a function output is less than another.
- Assert a function output is less than another.
- Assert a function output is less than an expression.
- Assert a function output is less than an expression.
- Assert a function output is not equal to another.
- Assert a function output is not equal to another.
- Assert a function output is not equal to an expression.
- Assert a function output is not equal to an expression.
- Assert a function Ok(…) is equal to another.
- Assert a function Ok(…) is equal to another.
- Assert a function Ok(…) is equal to an expression.
- Assert a function Ok(…) is equal to an expression.
- Assert a function Ok(…) is greater than or equal to another.
- Assert a function Ok(…) is greater than or equal to another.
- Assert a function Ok(…) is greater than or equal to an expression.
- Assert a function Ok(…) is greater than or equal to an expression.
- Assert a function Ok(…) is greater than another.
- Assert a function Ok(…) is greater than another.
- Assert a function Ok(…) is greater than an expression.
- Assert a function Ok(…) is greater than an expression.
- Assert a function Ok(…) is less than or equal to another.
- Assert a function Ok(…) is less than or equal to another.
- Assert a function Ok(…) is less than or equal to an expression.
- Assert a function Ok(…) is less than or equal to an expression.
- Assert a function Ok(…) is less than another.
- Assert a function Ok(…) is less than another.
- Assert a function Ok(…) is less than an expression.
- Assert a function Ok(…) is less than an expression.
- Assert a function Ok(…) is not equal to another.
- Assert a function Ok(…) is not equal to another.
- Assert a function Ok(…) is not equal to an expression.
- Assert a function Ok(…) is not equal to an expression.
- Assert a std::fs::read_to_string(path) contains a pattern.
- Assert a std::fs::read_to_string(path) contains a pattern.
- Assert a std::fs::read_to_string(path) value is equal to another.
- Assert a std::fs::read_to_string(path) is equal to another.
- Assert a std::fs::read_to_string(path) value is equal to an expression.
- Assert a std::fs::read_to_string(path) value is equal to an expression.
- Assert a std::fs::read_to_string(path) value is greater than or equal to another.
- Assert a std::fs::read_to_string(path) value is greater than or equal to another.
- Assert a std::fs::read_to_string(path) value is greater than or equal to an expression.
- Assert a std::fs::read_to_string(path) value is greater than or equal to an expression.
- Assert a std::fs::read_to_string(path) value is greater than another.
- Assert a std::fs::read_to_string(path) value is greater than another.
- Assert a std::fs::read_to_string(path) value is greater than an expression.
- Assert a std::fs::read_to_string(path) value is greater than an expression.
- Assert a std::fs::read_to_string(path) value is less than or equal to another.
- Assert a std::fs::read_to_string(path) value is less than or equal to another.
- Assert a std::fs::read_to_string(path) value is less than or equal to an expression.
- Assert a std::fs::read_to_string(path) value is less than or equal to an expression.
- Assert a std::fs::read_to_string(path) value is less than another.
- Assert a std::fs::read_to_string(path) value is less than another.
- Assert a std::fs::read_to_string(path) value is less than an expression.
- Assert a std::fs::read_to_string(path) value is less than an expression.
- Assert a std::fs::read_to_string(path) is a match to a regex.
- Assert a std::fs::read_to_string(path) is a match to a regex.
- Assert a std::fs::read_to_string(path) is not equal to another.
- Assert a std::fs::read_to_string(path) is not equal to another.
- Assert a std::fs::read_to_string(path) is not equal to an expression.
- Assert a std::fs::read_to_string(path) is not equal to an expression.
- Assert a value is greater than or equal to an expression.
- Assert a value is greater than or equal to an expression.
- Assert a value is greater than an expression.
- Assert a value is greater than an expression.
- Assert a number is within delta of another number.
- Assert a number is within delta of another number.
- Assert a number is within epsilon of another number.
- Assert a number is within epsilon of another number.
- Assert a infix operator, such as assert_infix!(a == b).
- Assert a infix operator, such as assert_infix!(a == b).
- Assert a std::io::Read read_to_string() contains a pattern.
- Assert a std::io::Read read_to_string() contains a pattern.
- Assert a std::io::Read read_to_string() value is equal to another.
- Assert a std::io::Read read_to_string() is equal to another.
- Assert a std::io::Read read_to_string() value is equal to an expression.
- Assert a std::io::Read read_to_string() value is equal to an expression.
- Assert a std::io::Read read_to_string() value is greater than or equal to another.
- Assert a std::io::Read read_to_string() value is greater than or equal to another.
- Assert a std::io::Read read_to_string() value is greater than or equal to an expression.
- Assert a std::io::Read read_to_string() value is greater than or equal to an expression.
- Assert a std::io::Read read_to_string() value is greater than another.
- Assert a std::io::Read read_to_string() value is greater than another.
- Assert a std::io::Read read_to_string() value is greater than an expression.
- Assert a std::io::Read read_to_string() value is greater than an expression.
- Assert a std::io::Read read_to_string() value is less than or equal to another.
- Assert a std::io::Read read_to_string() value is less than or equal to another.
- Assert a std::io::Read read_to_string() value is less than or equal to an expression.
- Assert a std::io::Read read_to_string() value is less than or equal to an expression.
- Assert a std::io::Read read_to_string() value is less than another.
- Assert a std::io::Read read_to_string() value is less than another.
- Assert a std::io::Read read_to_string() value is less than an expression.
- Assert a std::io::Read read_to_string() value is less than an expression.
- Assert a std::io::Read read_to_string() is a match to a regex.
- Assert a std::io::Read read_to_string() is a match to a regex.
- Assert a std::io::Read read_to_string() is not equal to another.
- Assert a std::io::Read read_to_string() is not equal to another.
- Assert a std::io::Read read_to_string() is not equal to an expression.
- Assert a std::io::Read read_to_string() is not equal to an expression.
- Assert a matcher is a match for an expression.
- Assert an expression (such as a regex) is a match for an expression (such as a string).
- Assert a value is less than or equal to an expression.
- Assert a value is less than or equal to an expression.
- Assert a value is less than an expression.
- Assert a value is less than an expression.
- Assert an expression is not equal to an expression.
- Assert expression is None.
- Assert an expression.is_none() is true.
- Assert an expression (such as a string) does not contain an expression (such as a substring).
- Assert an expression (such as a string) does not contain an expression (such as a substring).
- Assert an expression (such as a string) does not end with an expression (such as a string).
- Assert an expression (such as a string) does not end with an expression (such as a substring).
- Assert an expression (such as a regex) is not a match for an expression (such as a string).
- Assert an expression (such as a regex) is not a match for an expression (such as a string).
- Assert an expression (such as a string) does not start with an expression (such as a string).
- Assert an expression (such as a string) does not start with an expression (such as a substring).
- Assert expression is Ok(_).
- Assert expression is Ok(_).
- Assert two expressions are Ok(_) and their values are equal.
- Assert two expressions are Ok(_) and their values are equal.
- Assert an expression is Ok(_) and its value is equal to an expression.
- Assert an expression is Ok(_) and its value is equal to an expression.
- Assert two expressions are Ok(_) and their values are not equal.
- Assert two expressions are Ok(_) and their values are not equal.
- Assert an expression is Ok(_) and its value is equal to an expression.
- Assert an expression is Ok(_) and its value is equal to an expression.
- assert_
option_ none Deprecated Assert expression is None. - assert_
option_ none_ as_ result Deprecated Assert an expression.is_none() is true. - assert_
option_ some Deprecated Assert expression is Some(_). - assert_
option_ some_ as_ result Deprecated Assert an expression.is_some() is true. - assert_
option_ some_ eq Deprecated Assert two expressions are Some(_) and their values are equal. - assert_
option_ some_ eq_ as_ result Deprecated Assert a.is_some() and a.unwrap() are equal to another. - assert_
option_ some_ ne Deprecated Assert two expressions are Some(_) and their values are not equal. - assert_
option_ some_ ne_ as_ result Deprecated Assert two expressions are Some(_) and their values are not equal. - Assert an expression is Pending.
- Assert an expression.is_pending() is true.
- assert_
poll_ pending Deprecated Assert an expression is Pending. - assert_
poll_ pending_ as_ result Deprecated Assert an expression.is_pending() is true. - assert_
poll_ ready Deprecated Assert an expression is Ready(_). - assert_
poll_ ready_ as_ result Deprecated Assert an expression is Ready(_). - assert_
poll_ ready_ eq Deprecated Assert two expressions are Ready(_) and their values are equal. - assert_
poll_ ready_ eq_ as_ result Deprecated Assert two expressions are Ready(_) and their values are equal. - assert_
poll_ ready_ ne Deprecated Assert two expressions are Ready(_) and their values are not equal. - assert_
poll_ ready_ ne_ as_ result Deprecated Assert two expressions are Ready(_) and their values are not equal. - Assert a command (built with program and args) stderr string contains a given containee.
- Assert a command (built with program and args) stderr string contains a given containee.
- Assert a command (built with program and args) stderr string is equal to another.
- Assert a command (built with program and args) stderr string is equal to another.
- Assert a command (built with program and args) stderr string is equal to an expression.
- Assert a command (built with program and args) stderr string is equal to an expression.
- Assert a command (built with program and args) stderr string is greater than or equal to another.
- Assert a command (built with program and args) stderr string is greater than or equal to another.
- Assert a command (built with program and args) stderr string is greater than or equal to an expression.
- Assert a command (built with program and args) stderr string is greater than or equal to an expression.
- Assert a command (built with program and args) stderr string is greater than to another.
- Assert a command (built with program and args) stderr string is greater than another.
- Assert a command (built with program and args) stderr string is greater than an expression.
- Assert a command (built with program and args) stderr string is greater than an expression.
- Assert a command (built with program and args) stderr string is a match to a regex.
- Assert a command (built with program and args) stderr string is a match to a regex.
- Assert a command (built with program and args) stderr string is less than or equal to another.
- Assert a command (built with program and args) stderr string is less than or equal to another.
- Assert a command (built with program and args) stderr string is less than or equal to an expression.
- Assert a command (built with program and args) stderr string is less than or equal to an expression.
- Assert a command (built with program and args) stderr string is less than another.
- Assert a command (built with program and args) stderr string is less than another.
- Assert a command (built with program and args) stderr string is less than an expression.
- Assert a command (built with program and args) stderr string is less than an expression.
- Assert a command (built with program and args) stderr string is not equal to another.
- Assert a command (built with program and args) stderr string is not equal to another.
- Assert a command (built with program and args) stderr string is not equal to an expression.
- Assert a command (built with program and args) stderr string is not equal to an expression.
- Assert a command (built with program and args) stdout string contains a given containee.
- Assert a command (built with program and args) stdout string contains a given containee.
- Assert a command (built with program and args) stdout string is equal to another.
- Assert a command (built with program and args) stdout string is equal to another.
- Assert a command (built with program and args) stdout string is equal to an expression.
- Assert a command (built with program and args) stdout string is equal to an expression.
- Assert a command (built with program and args) stdout string is greater than or equal to another.
- Assert a command (built with program and args) stdout string is greater than or equal to another.
- Assert a command (built with program and args) stdout string is greater than or equal to an expression.
- Assert a command (built with program and args) stdout string is greater than or equal to an expression.
- Assert a command (built with program and args) stdout string is greater than another.
- Assert a command (built with program and args) stdout string is greater than to another.
- Assert a command (built with program and args) stdout string is greater than an expression.
- Assert a command (built with program and args) stdout string is greater than an expression.
- Assert a command (built with program and args) stdout string is a match to a regex.
- Assert a command (built with program and args) stdout string is a match to a regex.
- Assert a command (built with program and args) stdout string is less than or equal to another.
- Assert a command (built with program and args) stdout string is less than or equal to another.
- Assert a command (built with program and args) stdout string is less than or equal to an expression.
- Assert a command (built with program and args) stdout string is less than or equal to an expression.
- Assert a command (built with program and args) stdout string is less than another.
- Assert a command (built with program and args) stdout string is less than another.
- Assert a command (built with program and args) stdout string is less than an expression.
- Assert a command (built with program and args) stdout string is less than an expression.
- Assert a command (built with program and args) stdout string is not equal to another.
- Assert a command (built with program and args) stdout string is not equal to another.
- Assert a command (built with program and args) stdout string is not equal to an expression.
- Assert a command (built with program and args) stdout string is not equal to an expression.
- Assert an expression is Ready(_).
- Assert an expression is Ready(_).
- Assert two expressions are Ready(_) and their values are equal.
- Assert two expressions are Ready(_) and their values are equal.
- Assert an expression is Ready(_) and its value is equal to an expression.
- Assert an expression is Ready(_) and its value is equal to an expression.
- Assert two expressions are Ready(_) and their values are not equal.
- Assert two expressions are Ready(_) and their values are not equal.
- Assert an expression is Ready(_) and its value is not equal to an expression.
- Assert an expression is Ready(_) and its value is not equal to an expression.
- assert_
result_ err Deprecated Assert expression is Err(_). - assert_
result_ err_ as_ result Deprecated Assert expression is Err(_). - assert_
result_ ok Deprecated Assert expression is Ok(_). - assert_
result_ ok_ as_ result Deprecated Assert expression is Ok(_). - assert_
result_ ok_ eq Deprecated Assert two expressions are Ok(_) and their values are equal. - assert_
result_ ok_ eq_ as_ result Deprecated Assert two expressions are Ok(_) and their values are equal. - assert_
result_ ok_ ne Deprecated Assert two expressions are Ok(_) and their values are not equal. - assert_
result_ ok_ ne_ as_ result Deprecated Assert two expressions are Ok(_) and their values are not equal. - Assert a set is disjoint with another.
- Assert a set is disjoint with another.
- Assert a set is equal to another.
- Assert a set is equal to another.
- Assert a set is joint with another.
- Assert a set is joint with another.
- Assert a set is not equal to another.
- Assert a set is not equal to another.
- Assert a set is a subset of another.
- Assert a set is a subset of another.
- Assert a set is a superset of another.
- Assert a set is a superset of another.
- Assert expression is Some(_).
- Assert an expression.is_some() is true.
- Assert two expressions are Some(_) and their values are equal.
- Assert a.is_some() and a.unwrap() are equal to another.
- Assert an expression is Some(_) and its value is equal to an expression.
- Assert a.is_some() and a.unwrap() are equal to another.
- Assert two expressions are Some(_) and their values are not equal.
- Assert two expressions are Some(_) and their values are not equal.
- Assert an expression is Some(_) and its value is not equal to an expression.
- Assert a.is_some() and a.unwrap() are equal to another.
- Assert an expression (such as a string) starts with an expression (such as a string).
- Assert an expression (such as a string) starts with an expression (such as a substring).
- Assert a number is approximately equal to another number.
- Assert a number is approximately not equal to another number.
- Assert a bag is equal to another.
- Assert a bag is not equal to another.
- Assert a bag is a subbag of another.
- Assert a bag is a superbag of another.
- Assert a command stderr string contains a given containee.
- Assert a command stderr string is equal to another.
- Assert a command stderr string is equal to an expression.
- Assert a command stderr string is a match to a regex.
- Assert a command stdout string contains a given containee.
- Assert a command stdout string is equal to another.
- Assert a command stdout string is equal to an expression.
- Assert command stdout string is a match to a regex.
- Assert a container is a match for an expression.
- Assert an expression (such as a string) ends with an expression (such as a string).
- Assert expression is Err(_).
- Assert a function output is equal to another function output.
- Assert a function output is equal to an expression.
- Assert a function error is equal to another.
- Assert a function error is equal to an expression.
- Assert a function error is greater than or equal to another.
- Assert a function error is greater than or equal to an expression.
- Assert a function error is greater than another.
- Assert a function error is greater than an expression.
- Assert a function error is less than or equal to another.
- Assert a function error is less than or equal to an expression.
- Assert a function error is less than another.
- Assert a function error is less than an expression.
- Assert a function error is not equal to another.
- Assert a function error is not equal to an expression.
- Assert a function output is greater than or equal to another.
- Assert a function output is greater than or equal to an expression.
- Assert a function output is greater than another.
- Assert a function output is greater than an expression.
- Assert a function output is less than or equal to another.
- Assert a function output is less than or equal to an expression.
- Assert a function output is less than another.
- Assert a function output is less than an expression.
- Assert a function output is not equal to another.
- Assert a function output is not equal to an expression.
- Assert a function Ok(…) is equal to another.
- Assert a function Ok(…) is equal to an expression.
- Assert a function Ok(…) is greater than or equal to another.
- Assert a function Ok(…) is greater than or equal to an expression.
- Assert a function Ok(…) is greater than another.
- Assert a function Ok(…) is greater than an expression.
- Assert a function Ok(…) is less than or equal to another.
- Assert a function Ok(…) is less than or equal to an expression.
- Assert a function Ok(…) is less than another.
- Assert a function Ok(…) is less than an expression.
- Assert a function Ok(…) is not equal to another.
- Assert a function Ok(…) is not equal to an expression.
- Assert a std::fs::read_to_string(path) contains a pattern.
- Assert a std::fs::read_to_string(path) value is equal to another.
- Assert a std::fs::read_to_string(path) value is equal to an expression.
- Assert a std::fs::read_to_string(path) value is greater than or equal to another.
- Assert zzz.
- Assert a std::fs::read_to_string(path) value is greater than another.
- Assert a std::fs::read_to_string(path) value is greater than an expression.
- Assert a std::fs::read_to_string(path) value is less than or equal to another.
- Assert a std::fs::read_to_string(path) value is less than or equal to an expression.
- Assert a std::fs::read_to_string(path) value is less than another.
- Assert a std::fs::read_to_string(path) value is less than an expression.
- Assert a std::fs::read_to_string(path) is a match to a regex.
- Assert a std::fs::read_to_string(path) is not equal to another.
- Assert a std::fs::read_to_string(path) is not equal to an expression.
- Assert a value is greater than or equal to an expression.
- Assert a value is greater than an expression.
- Assert a number is within delta of another number.
- Assert a number is within epsilon of another number.
- Assert a infix operator, such as assert_infix!(a == b).
- Assert a std::io::Read read_to_string() contains a pattern.
- Assert a std::io::Read read_to_string() value is equal to another.
- Assert a std::io::Read read_to_string() value is equal to an expression.
- Assert a std::io::Read read_to_string() value is greater than or equal to another.
- Assert zzz.
- Assert a std::io::Read read_to_string() value is greater than another.
- Assert a std::io::Read read_to_string() value is greater than an expression.
- Assert a std::io::Read read_to_string() value is less than or equal to another.
- Assert a std::io::Read read_to_string() value is less than or equal to an expression.
- Assert a std::io::Read read_to_string() value is less than another.
- Assert a std::io::Read read_to_string() value is less than an expression.
- Assert a std::io::Read read_to_string() is a match to a regex.
- Assert a std::io::Read read_to_string() is not equal to another.
- Assert a std::io::Read read_to_string() is not equal to an expression.
- Assert a matcher is a match for an expression.
- Assert a value is less than or equal to an expression.
- Assert a value is less than an expression.
- Assert expression is None.
- Assert an expression (such as a string) does not contain an expression (such as a substring).
- Assert an expression (such as a string) does not end with an expression (such as a string).
- Assert an expression (such as a regex) is not a match for an expression (such as a string).
- Assert an expression (such as a string) does not start with an expression (such as a string).
- Assert expression is Ok(_).
- Assert two expressions are Ok(_) and their values are equal.
- Assert an expression is Ok(_) and its value is equal to an expression.
- Assert two expressions are Ok(_) and their values are not equal.
- Assert an expression is Ok(_) and its value is equal to an expression.
- debug_
assert_ option_ none Deprecated Assert expression is None. - debug_
assert_ option_ some Deprecated Assert expression is Some(_). - debug_
assert_ option_ some_ eq Deprecated Assert two expressions are Some(_) and their values are equal. - debug_
assert_ option_ some_ ne Deprecated Assert two expressions are Some(_) and their values are not equal. - Assert an expression is Pending.
- debug_
assert_ poll_ pending Deprecated Assert an expression is Pending. - debug_
assert_ poll_ ready Deprecated Assert poll.is_ready() is true. - debug_
assert_ poll_ ready_ eq Deprecated Assert two expressions are Ready(_) and their values are equal. - Assert two expressions are Ready(_) and their values are not equal.
- Assert a command (built with program and args) stderr string contains a given containee.
- Assert a command (built with program and args) stderr string is equal to another.
- Assert a command (built with program and args) stderr string is equal to an expression.
- Assert a command (built with program and args) stderr string greater than or equal to another.
- Assert a command (built with program and args) stderr string is greater than or equal to an expression.
- Assert a command (built with program and args) stderr string is equal to another.
- Assert a command (built with program and args) stderr string is greater than an expression.
- Assert a command (built with program and args) stderr string is a match to a regex.
- Assert a command (built with program and args) stderr string is less than or equal to another.
- Assert a command (built with program and args) stderr string is equal to an expression.
- Assert a command (built with program and args) stderr string is less than another.
- Assert a command (built with program and args) stderr string is less than an expression.
- Assert a command (built with program and args) stderr string is not equal to another.
- Assert a command (built with program and args) stderr string is not equal to an expression.
- Assert a command (built with program and args) stdout string contains a given containee.
- Assert a command (built with program and args) stdout string is equal to another.
- Assert a command (built with program and args) stdout string is equal to an expression.
- Assert a command (built with program and args) stdout string is greater than or equal to another.
- Assert a command (built with program and args) stdout string is greater than or equal to an expression.
- Assert a command (built with program and args) stdout string is greater than another.
- Assert a command (built with program and args) stdout string is greater than an expression.
- Assert a command (built with program and args) stdout string is a match to a regex.
- Assert a command (built with program and args) stdout string is less than or equal to another.
- Assert a command (built with program and args) stdout string is less than or equal to an expression.
- Assert a command (built with program and args) stdout string is less than another.
- Assert a command (built with program and args) stdout string is less than an expression.
- Assert a command (built with program and args) stdout string is not equal to another.
- Assert a command (built with program and args) stdout string is not equal to an expression.
- Assert poll.is_ready() is true.
- Assert two expressions are Ready(_) and their values are equal.
- Assert an expression is Ready(_) and its value is equal to an expression.
- Assert two expressions are Ready(_) and their values are not equal.
- Assert an expression is Ready(_) and its value is not equal to an expression.
- debug_
assert_ result_ err Deprecated Assert expression is Err(_). - debug_
assert_ result_ ok Deprecated Assert expression is Ok(_). - debug_
assert_ result_ ok_ eq Deprecated Assert two expressions are Ok(_) and their values are equal. - debug_
assert_ result_ ok_ ne Deprecated Assert two expressions are Ok(_) and their values are not equal. - Assert a set is disjoint with another.
- Assert a set is equal to another.
- Assert a set is joint with another.
- Assert a set is not equal to another.
- Assert a set is a subset of another.
- Assert a set is a superset of another.
- Assert expression is Some(_).
- Assert two expressions are Some(_) and their values are equal.
- Assert an expression is Some(_) and its value is equal to an expression.
- Assert two expressions are Some(_) and their values are not equal.
- Assert an expression is Some(_) and its value is not equal to an expression.
- Assert an expression (such as a string) starts with an expression (such as a string).