diff --git a/CHANGES.md b/CHANGES.md index de56e3248..d436b8fa7 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,19 +5,15 @@ Changes highlights for recent major versions. ## Version 8.x -8.6: Add `assert_poll_ready_eq`, `assert_poll_ready_ne` +* Add Result macros: `assert_ok`, `assert_err`, et al. + +* Add Option macros: `assert_some`, `assert_none`, et al. -8.5: Add `assert_option_some_eq`, `assert_option_some_ne` +* Add Poll macros: `assert_ready`, `assert_pending`, et al. -8.4: Add `assert_result_ok_eq`, `assert_result_ok_ne` - -8.3: Add `assert_poll_ready`, `assert_poll_pending`. - -8.2: Add `assert_infix`. - -8.1: Add `assert_result_ok`, `assert_result_err`, `assert_option_some`, `assert_option_none`. - -8.0: Add `assert_fs_read_to_string_*`, `assert_io_read_to_string_*`. Breaking change: migrate from `assert_read_to_string_*`. to `assert_io_read_to_string_*`. +* Add read macros: `assert_fs_read_to_string_*`, `assert_io_read_to_string_*`, et al. + +* Breaking change: migrate from `assert_read_to_string_*`. to `assert_io_read_to_string_*`. ## Version 7.x diff --git a/Cargo.toml b/Cargo.toml index f383f5374..762459bcc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "assertables" -version = "8.6.0" +version = "8.7.0" authors = ["Joel Parker Henderson "] edition = "2021" description = "Assertables: Rust crate of macros `assert…!` for better tests, quality assurance, debug testing, and runtime reliability." diff --git a/README.md b/README.md index 46561180c..52d4bc623 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,17 @@ compile-time tests and run-time reliability. The Rust programming language provides assert macros to test code: * [`assert!()`](https://doc.rust-lang.org/std/macro.assert.html) -* [`assert_eq!(a, b)`](https://doc.rust-lang.org/std/macro.assert_eq.html) -* [`assert_ne!(a, b)`]((https://doc.rust-lang.org/std/macro.assert_ne.html) +* [`assert_eq!(a, b)`](https://doc.rust-lang.org/std/macro.assert_eq.html) `// equal` +* [`assert_ne!(a, b)`](https://doc.rust-lang.org/std/macro.assert_ne.html) `// not equal` The assertables crate provides many more, so you can write smarter tests. For values: -* [`assert_lt!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_lt.html) // less than -* [`assert_le!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_le.html) // less than or equal to -* [`assert_gt!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_gt.html) // greater than -* [`assert_ge!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_ge.html) // greater than or equal to +* [`assert_lt!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_lt.html) `// less than` +* [`assert_le!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_le.html) `// less than or equal` +* [`assert_gt!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_gt.html) `// greater than` +* [`assert_ge!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_ge.html) `// greater than or equal` For strings: @@ -46,26 +46,26 @@ For numbers: * [`assert_in_delta!(a, b, delta)`](https://docs.rs/assertables/latest/assertables/macro.assert_in_delta.html) * [`assert_in_epsilon!(a, b, epsilon)`](https://docs.rs/assertables/latest/assertables/macro.assert_in_epsilon.html) -For results: +For Result: -* [`assert_result_ok!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_result_ok.html) -* [`assert_result_ok_eq!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_result_ok_eq.html) -* [`assert_result_ok_ne!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_result_ok_ne.html) -* [`assert_result_err!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_result_err.html) +* [`assert_ok!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_ok.html) +* [`assert_ok_eq!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_ok_eq.html) +* [`assert_ok_ne!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_ok_ne.html) +* [`assert_err!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_err.html) -For options: +For Option: -* [`assert_option_some!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_option_some.html) -* [`assert_option_some_eq!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_option_some_eq.html) -* [`assert_option_some_ne!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_option_some_ne.html) -* [`assert_option_none!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_option_none.html) +* [`assert_some!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_some.html) +* [`assert_some_eq!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_some_eq.html) +* [`assert_some_ne!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_some_ne.html) +* [`assert_none!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_none.html) -For polls: +For Poll: -* [`assert_poll_ready!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_poll_ready.html) -* [`assert_poll_ready_eq!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_poll_ready_eq.html) -* [`assert_poll_ready_ne!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_poll_ready_ne.html) -* [`assert_poll_pending!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_poll_pending.html) +* [`assert_ready!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_ready.html) +* [`assert_ready_eq!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_ready_eq.html) +* [`assert_ready_ne!(a, b)`](https://docs.rs/assertables/latest/assertables/macro.assert_ready_ne.html) +* [`assert_pending!(a)`](https://docs.rs/assertables/latest/assertables/macro.assert_pending.html) For collections such as arrays, vectors, maps, sets: @@ -182,8 +182,8 @@ Examples: ## Tracking * Package: assertables-rust-crate -* Version: 8.6.0 +* Version: 8.7.0 * Created: 2021-03-30T15:47:49Z -* Updated: 2024-09-18T03:02:31Z +* Updated: 2024-09-18T14:51:06Z * 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) diff --git a/doc/lib/all.html b/doc/lib/all.html index 297f5eebe..b776b7ff6 100644 --- a/doc/lib/all.html +++ b/doc/lib/all.html @@ -1 +1 @@ -List of all items in this crate

List of all items

Macros

\ No newline at end of file +List of all items in this crate

List of all items

Macros

\ No newline at end of file diff --git a/doc/lib/assert_err/index.html b/doc/lib/assert_err/index.html new file mode 100644 index 000000000..aea713fd8 --- /dev/null +++ b/doc/lib/assert_err/index.html @@ -0,0 +1,11 @@ +lib::assert_err - Rust

Module lib::assert_err

source ·
Expand description

Assert expression is Err(_).

+

§Example

+
let a: Result<(), i8> = Err(1);
+assert_err!(a);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_err/sidebar-items.js b/doc/lib/assert_err/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_err/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_none/index.html b/doc/lib/assert_none/index.html new file mode 100644 index 000000000..6a8660a55 --- /dev/null +++ b/doc/lib/assert_none/index.html @@ -0,0 +1,11 @@ +lib::assert_none - Rust

Module lib::assert_none

source ·
Expand description

Assert expression is None.

+

§Example

+
let a: Option<i8> = Option::None;
+assert_none!(a);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_none/sidebar-items.js b/doc/lib/assert_none/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_none/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_ok/index.html b/doc/lib/assert_ok/index.html new file mode 100644 index 000000000..ed3379871 --- /dev/null +++ b/doc/lib/assert_ok/index.html @@ -0,0 +1,11 @@ +lib::assert_ok - Rust

Module lib::assert_ok

source ·
Expand description

Assert expression is Ok(_).

+

§Example

+
let a: Result<(), i8> = Ok(());
+assert_ok!(a);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_ok/sidebar-items.js b/doc/lib/assert_ok/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_ok/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_ok_eq/index.html b/doc/lib/assert_ok_eq/index.html new file mode 100644 index 000000000..1dd923d0d --- /dev/null +++ b/doc/lib/assert_ok_eq/index.html @@ -0,0 +1,12 @@ +lib::assert_ok_eq - Rust

Module lib::assert_ok_eq

source ·
Expand description

Assert two expressions are Ok(_) and their values are equal.

+

§Example

+
let a: Result<i8, i8> = Ok(1);
+let b: Result<i8, i8> = Ok(1);
+assert_ok_eq!(a, b);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_ok_eq/sidebar-items.js b/doc/lib/assert_ok_eq/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_ok_eq/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_ok_ne/index.html b/doc/lib/assert_ok_ne/index.html new file mode 100644 index 000000000..8650c86fb --- /dev/null +++ b/doc/lib/assert_ok_ne/index.html @@ -0,0 +1,12 @@ +lib::assert_ok_ne - Rust

Module lib::assert_ok_ne

source ·
Expand description

Assert two expressions are Ok(_) and their values are not equal.

+

§Example

+
let a: Result<i8, i8> = Ok(1);
+let b: Result<i8, i8> = Ok(2);
+assert_ok_ne!(a, b);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_ok_ne/sidebar-items.js b/doc/lib/assert_ok_ne/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_ok_ne/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_option/assert_option_none/index.html b/doc/lib/assert_option/assert_option_none/index.html index 1d29207a2..bfe685e6d 100644 --- a/doc/lib/assert_option/assert_option_none/index.html +++ b/doc/lib/assert_option/assert_option_none/index.html @@ -1,4 +1,4 @@ -lib::assert_option::assert_option_none - Rust

Module lib::assert_option::assert_option_none

source ·
Expand description

Assert expression is None.

+lib::assert_option::assert_option_none - Rust

Module lib::assert_option::assert_option_none

source ·
Expand description

Assert expression is None.

§Example

let a: Option<i8> = Option::None;
 assert_option_none!(a);
diff --git a/doc/lib/assert_option/assert_option_some/index.html b/doc/lib/assert_option/assert_option_some/index.html index 7baa70936..79a26d0b0 100644 --- a/doc/lib/assert_option/assert_option_some/index.html +++ b/doc/lib/assert_option/assert_option_some/index.html @@ -1,4 +1,4 @@ -lib::assert_option::assert_option_some - Rust

Module lib::assert_option::assert_option_some

source ·
Expand description

Assert expression is Some(_).

+lib::assert_option::assert_option_some - Rust

Module lib::assert_option::assert_option_some

source ·
Expand description

Assert expression is Some(_).

§Example

let a: Option<i8> = Option::Some(1);
 assert_option_some!(a);
diff --git a/doc/lib/assert_option/assert_option_some_eq/index.html b/doc/lib/assert_option/assert_option_some_eq/index.html index 65266c343..81a37a092 100644 --- a/doc/lib/assert_option/assert_option_some_eq/index.html +++ b/doc/lib/assert_option/assert_option_some_eq/index.html @@ -1,4 +1,4 @@ -lib::assert_option::assert_option_some_eq - Rust

Module lib::assert_option::assert_option_some_eq

source ·
Expand description

Assert two expressions are Some(_) and their values are equal.

+lib::assert_option::assert_option_some_eq - Rust

Module lib::assert_option::assert_option_some_eq

source ·
Expand description

Assert two expressions are Some(_) and their values are equal.

§Example

let a: Option<i8> = Option::Some(1);
 let b: Option<i8> = Option::Some(1);
diff --git a/doc/lib/assert_option/assert_option_some_ne/index.html b/doc/lib/assert_option/assert_option_some_ne/index.html
index 213637a44..f88c2b6f5 100644
--- a/doc/lib/assert_option/assert_option_some_ne/index.html
+++ b/doc/lib/assert_option/assert_option_some_ne/index.html
@@ -1,4 +1,4 @@
-lib::assert_option::assert_option_some_ne - Rust

Module lib::assert_option::assert_option_some_ne

source ·
Expand description

Assert two expressions are Some(_) and their values are not equal.

+lib::assert_option::assert_option_some_ne - Rust

Module lib::assert_option::assert_option_some_ne

source ·
Expand description

Assert two expressions are Some(_) and their values are not equal.

§Example

let a: Option<i8> = Option::Some(1);
 let b: Option<i8> = Option::Some(2);
diff --git a/doc/lib/assert_pending/index.html b/doc/lib/assert_pending/index.html
new file mode 100644
index 000000000..87362e550
--- /dev/null
+++ b/doc/lib/assert_pending/index.html
@@ -0,0 +1,14 @@
+lib::assert_pending - Rust

Module lib::assert_pending

source ·
Expand description

Assert an expression is Pending.

+

§Example

+
use std::task::Poll;
+use std::task::Poll::*;
+
+let a: Poll<i8> = Pending;
+assert_pending!(a);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_pending/sidebar-items.js b/doc/lib/assert_pending/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_pending/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_poll/assert_poll_pending/index.html b/doc/lib/assert_poll/assert_poll_pending/index.html index 8137a3802..b9052f8ea 100644 --- a/doc/lib/assert_poll/assert_poll_pending/index.html +++ b/doc/lib/assert_poll/assert_poll_pending/index.html @@ -1,4 +1,4 @@ -lib::assert_poll::assert_poll_pending - Rust

Module lib::assert_poll::assert_poll_pending

source ·
Expand description

Assert an expression is Pending.

+lib::assert_poll::assert_poll_pending - Rust

Module lib::assert_poll::assert_poll_pending

source ·
Expand description

Assert an expression is Pending.

§Example

use std::task::Poll;
 use std::task::Poll::*;
diff --git a/doc/lib/assert_poll/assert_poll_ready/index.html b/doc/lib/assert_poll/assert_poll_ready/index.html
index d30eda948..7bace5109 100644
--- a/doc/lib/assert_poll/assert_poll_ready/index.html
+++ b/doc/lib/assert_poll/assert_poll_ready/index.html
@@ -1,4 +1,4 @@
-lib::assert_poll::assert_poll_ready - Rust

Module lib::assert_poll::assert_poll_ready

source ·
Expand description

Assert an expression is Ready(_).

+lib::assert_poll::assert_poll_ready - Rust

Module lib::assert_poll::assert_poll_ready

source ·
Expand description

Assert an expression is Ready(_).

§Example

use std::task::Poll;
 use std::task::Poll::*;
diff --git a/doc/lib/assert_poll/assert_poll_ready_eq/index.html b/doc/lib/assert_poll/assert_poll_ready_eq/index.html
index 12b5e0310..638895686 100644
--- a/doc/lib/assert_poll/assert_poll_ready_eq/index.html
+++ b/doc/lib/assert_poll/assert_poll_ready_eq/index.html
@@ -1,4 +1,4 @@
-lib::assert_poll::assert_poll_ready_eq - Rust

Module lib::assert_poll::assert_poll_ready_eq

source ·
Expand description

Assert two expressions are Ready(_) and their values are equal.

+lib::assert_poll::assert_poll_ready_eq - Rust

Module lib::assert_poll::assert_poll_ready_eq

source ·
Expand description

Assert two expressions are Ready(_) and their values are equal.

§Example

use std::task::Poll;
 use std::task::Poll::*;
diff --git a/doc/lib/assert_poll/assert_poll_ready_ne/index.html b/doc/lib/assert_poll/assert_poll_ready_ne/index.html
index faca62d7f..af8a7357d 100644
--- a/doc/lib/assert_poll/assert_poll_ready_ne/index.html
+++ b/doc/lib/assert_poll/assert_poll_ready_ne/index.html
@@ -1,4 +1,4 @@
-lib::assert_poll::assert_poll_ready_ne - Rust

Module lib::assert_poll::assert_poll_ready_ne

source ·
Expand description

Assert two expressions are Ready(_) and their values are not equal.

+lib::assert_poll::assert_poll_ready_ne - Rust

Module lib::assert_poll::assert_poll_ready_ne

source ·
Expand description

Assert two expressions are Ready(_) and their values are not equal.

§Example

use std::task::Poll;
 use std::task::Poll::*;
diff --git a/doc/lib/assert_ready/index.html b/doc/lib/assert_ready/index.html
new file mode 100644
index 000000000..bb11ca4bf
--- /dev/null
+++ b/doc/lib/assert_ready/index.html
@@ -0,0 +1,14 @@
+lib::assert_ready - Rust

Module lib::assert_ready

source ·
Expand description

Assert an expression is Ready(_).

+

§Example

+
use std::task::Poll;
+use std::task::Poll::*;
+
+let a: Poll<i8> = Ready(1);
+assert_ready!(a);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_ready/sidebar-items.js b/doc/lib/assert_ready/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_ready/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_ready_eq/index.html b/doc/lib/assert_ready_eq/index.html new file mode 100644 index 000000000..a7b86938f --- /dev/null +++ b/doc/lib/assert_ready_eq/index.html @@ -0,0 +1,14 @@ +lib::assert_ready_eq - Rust

Module lib::assert_ready_eq

source ·
Expand description

Assert two expressions are Ready(_) and their values are equal.

+

§Example

+
use std::task::Poll;
+use std::task::Poll::*;
+let a: Poll<i8> = Ready(1);
+let b: Poll<i8> = Ready(1);
+assert_ready_eq!(a, b);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_ready_eq/sidebar-items.js b/doc/lib/assert_ready_eq/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_ready_eq/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_ready_ne/index.html b/doc/lib/assert_ready_ne/index.html new file mode 100644 index 000000000..8b7e58b58 --- /dev/null +++ b/doc/lib/assert_ready_ne/index.html @@ -0,0 +1,14 @@ +lib::assert_ready_ne - Rust

Module lib::assert_ready_ne

source ·
Expand description

Assert two expressions are Ready(_) and their values are not equal.

+

§Example

+
use std::task::Poll;
+use std::task::Poll::*;
+let a: Poll<i8> = Ready(1);
+let b: Poll<i8> = Ready(2);
+assert_ready_ne!(a, b);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_ready_ne/sidebar-items.js b/doc/lib/assert_ready_ne/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_ready_ne/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_result/assert_result_err/index.html b/doc/lib/assert_result/assert_result_err/index.html index 9991756c2..ac0934f4e 100644 --- a/doc/lib/assert_result/assert_result_err/index.html +++ b/doc/lib/assert_result/assert_result_err/index.html @@ -1,4 +1,4 @@ -lib::assert_result::assert_result_err - Rust

Module lib::assert_result::assert_result_err

source ·
Expand description

Assert expression is Err(_).

+lib::assert_result::assert_result_err - Rust

Module lib::assert_result::assert_result_err

source ·
Expand description

Assert expression is Err(_).

§Example

let a: Result<(), i8> = Err(1);
 assert_result_err!(a);
diff --git a/doc/lib/assert_result/assert_result_ok/index.html b/doc/lib/assert_result/assert_result_ok/index.html index fd1a6a758..dcfbbcd97 100644 --- a/doc/lib/assert_result/assert_result_ok/index.html +++ b/doc/lib/assert_result/assert_result_ok/index.html @@ -1,4 +1,4 @@ -lib::assert_result::assert_result_ok - Rust

Module lib::assert_result::assert_result_ok

source ·
Expand description

Assert expression is Ok(_).

+lib::assert_result::assert_result_ok - Rust

Module lib::assert_result::assert_result_ok

source ·
Expand description

Assert expression is Ok(_).

§Example

let a: Result<(), i8> = Ok(());
 assert_result_ok!(a);
diff --git a/doc/lib/assert_result/assert_result_ok_eq/index.html b/doc/lib/assert_result/assert_result_ok_eq/index.html index ac006a3cc..46ca19576 100644 --- a/doc/lib/assert_result/assert_result_ok_eq/index.html +++ b/doc/lib/assert_result/assert_result_ok_eq/index.html @@ -1,4 +1,4 @@ -lib::assert_result::assert_result_ok_eq - Rust

Module lib::assert_result::assert_result_ok_eq

source ·
Expand description

Assert two expressions are Ok(_) and their values are equal.

+lib::assert_result::assert_result_ok_eq - Rust

Module lib::assert_result::assert_result_ok_eq

source ·
Expand description

Assert two expressions are Ok(_) and their values are equal.

§Example

let a: Result<i8, i8> = Ok(1);
 let b: Result<i8, i8> = Ok(1);
diff --git a/doc/lib/assert_result/assert_result_ok_ne/index.html b/doc/lib/assert_result/assert_result_ok_ne/index.html
index cf60fcfd3..90c06a4ca 100644
--- a/doc/lib/assert_result/assert_result_ok_ne/index.html
+++ b/doc/lib/assert_result/assert_result_ok_ne/index.html
@@ -1,4 +1,4 @@
-lib::assert_result::assert_result_ok_ne - Rust

Module lib::assert_result::assert_result_ok_ne

source ·
Expand description

Assert two expressions are Ok(_) and their values are not equal.

+lib::assert_result::assert_result_ok_ne - Rust

Module lib::assert_result::assert_result_ok_ne

source ·
Expand description

Assert two expressions are Ok(_) and their values are not equal.

§Example

let a: Result<i8, i8> = Ok(1);
 let b: Result<i8, i8> = Ok(2);
diff --git a/doc/lib/assert_some/index.html b/doc/lib/assert_some/index.html
new file mode 100644
index 000000000..e6a8d40bf
--- /dev/null
+++ b/doc/lib/assert_some/index.html
@@ -0,0 +1,11 @@
+lib::assert_some - Rust

Module lib::assert_some

source ·
Expand description

Assert expression is Some(_).

+

§Example

+
let a: Option<i8> = Option::Some(1);
+assert_some!(a);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_some/sidebar-items.js b/doc/lib/assert_some/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_some/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_some_eq/index.html b/doc/lib/assert_some_eq/index.html new file mode 100644 index 000000000..b8aead7d9 --- /dev/null +++ b/doc/lib/assert_some_eq/index.html @@ -0,0 +1,12 @@ +lib::assert_some_eq - Rust

Module lib::assert_some_eq

source ·
Expand description

Assert two expressions are Some(_) and their values are equal.

+

§Example

+
let a: Option<i8> = Option::Some(1);
+let b: Option<i8> = Option::Some(1);
+assert_some_eq!(a, b);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_some_eq/sidebar-items.js b/doc/lib/assert_some_eq/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_some_eq/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/assert_some_ne/index.html b/doc/lib/assert_some_ne/index.html new file mode 100644 index 000000000..04751faa8 --- /dev/null +++ b/doc/lib/assert_some_ne/index.html @@ -0,0 +1,12 @@ +lib::assert_some_ne - Rust

Module lib::assert_some_ne

source ·
Expand description

Assert two expressions are Some(_) and their values are not equal.

+

§Example

+
let a: Option<i8> = Option::Some(1);
+let b: Option<i8> = Option::Some(2);
+assert_some_ne!(a, b);
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/assert_some_ne/sidebar-items.js b/doc/lib/assert_some_ne/sidebar-items.js new file mode 100644 index 000000000..5244ce01c --- /dev/null +++ b/doc/lib/assert_some_ne/sidebar-items.js @@ -0,0 +1 @@ +window.SIDEBAR_ITEMS = {}; \ No newline at end of file diff --git a/doc/lib/index.html b/doc/lib/index.html index 65fa05fd8..896653160 100644 --- a/doc/lib/index.html +++ b/doc/lib/index.html @@ -1,4 +1,4 @@ -lib - Rust

Crate lib

source ·
Expand description

§Assertables: Rust crate of assert macros for testing

+lib - Rust

Crate lib

source ·
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.

Modules§

  • Assert a condition is true.
  • 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 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 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 macros for Option {Some, None}
  • Assert macros for Poll {Ready, Pending}
  • Assert macros for comparing programs with arguments.
  • Assert macros for Result {Ok, Err}
  • Assert macros for comparing set collections.
  • Assert an expression (such as a string) starts with an expression (such as a string).

Macros§

\ No newline at end of file +

Modules§

Macros§

\ No newline at end of file diff --git a/doc/lib/macro.assert_err!.html b/doc/lib/macro.assert_err!.html new file mode 100644 index 000000000..44a079d44 --- /dev/null +++ b/doc/lib/macro.assert_err!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_err.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_err.html b/doc/lib/macro.assert_err.html new file mode 100644 index 000000000..45a90040a --- /dev/null +++ b/doc/lib/macro.assert_err.html @@ -0,0 +1,29 @@ +assert_err in lib - Rust

Macro lib::assert_err

source ·
macro_rules! assert_err {
+    ($result:expr $(,)?) => { ... };
+    ($result:expr, $($message:tt)+) => { ... };
+}
Expand description

Assert expression is Err(_).

+
    +
  • +

    If true, return ().

    +
  • +
  • +

    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

    +
  • +
+

§Examples

+
let a: Result<(), i8> = Err(1);
+assert_err!(a);
+
+let a: Result<(), i8> = Ok(());
+assert_err!(a);
+// assertion failed: `assert_err!(a)`
+//  a label: `a`,
+//  a debug: `Ok(())`
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_err_as_result!.html b/doc/lib/macro.assert_err_as_result!.html new file mode 100644 index 000000000..862278a14 --- /dev/null +++ b/doc/lib/macro.assert_err_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_err_as_result.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_err_as_result.html b/doc/lib/macro.assert_err_as_result.html new file mode 100644 index 000000000..3451afca5 --- /dev/null +++ b/doc/lib/macro.assert_err_as_result.html @@ -0,0 +1,22 @@ +assert_err_as_result in lib - Rust

Macro lib::assert_err_as_result

source ·
macro_rules! assert_err_as_result {
+    ($result:expr $(,)?) => { ... };
+}
Expand description

Assert expression is Err(_).

+
    +
  • +

    If true, return Result Ok(()).

    +
  • +
  • +

    Otherwise, return Result Err with a diagnostic message.

    +
  • +
+

This macro provides the same statements as assert_err, +except this macro returns a Result, rather than doing a panic.

+

This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_none!.html b/doc/lib/macro.assert_none!.html new file mode 100644 index 000000000..4221d6e02 --- /dev/null +++ b/doc/lib/macro.assert_none!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_none.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_none.html b/doc/lib/macro.assert_none.html new file mode 100644 index 000000000..b32bbeb98 --- /dev/null +++ b/doc/lib/macro.assert_none.html @@ -0,0 +1,29 @@ +assert_none in lib - Rust

Macro lib::assert_none

source ·
macro_rules! assert_none {
+    ($option:expr $(,)?) => { ... };
+    ($option:expr, $($message:tt)+) => { ... };
+}
Expand description

Assert expression is None.

+
    +
  • +

    If true, return ().

    +
  • +
  • +

    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

    +
  • +
+

§Examples

+
let a: Option<i8> = Option::None;
+assert_none!(a);
+
+let a: Option<i8> = Option::Some(1);
+assert_none!(a);
+// assertion failed: `assert_none!(a)`
+//  a label: `a`,
+//  a debug: `Some(1)`
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_none_as_result!.html b/doc/lib/macro.assert_none_as_result!.html new file mode 100644 index 000000000..59f14fe7a --- /dev/null +++ b/doc/lib/macro.assert_none_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_none_as_result.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_none_as_result.html b/doc/lib/macro.assert_none_as_result.html new file mode 100644 index 000000000..f8d838216 --- /dev/null +++ b/doc/lib/macro.assert_none_as_result.html @@ -0,0 +1,22 @@ +assert_none_as_result in lib - Rust

Macro lib::assert_none_as_result

source ·
macro_rules! assert_none_as_result {
+    ($a:expr $(,)?) => { ... };
+}
Expand description

Assert an expression.is_none() is true.

+
    +
  • +

    If true, return Result Ok(()).

    +
  • +
  • +

    Otherwise, return Result Err with a diagnostic message.

    +
  • +
+

This macro provides the same statements as assert_none, +except this macro returns a Result, rather than doing a panic.

+

This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_ok!.html b/doc/lib/macro.assert_ok!.html new file mode 100644 index 000000000..a0d8afb72 --- /dev/null +++ b/doc/lib/macro.assert_ok!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_ok.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ok.html b/doc/lib/macro.assert_ok.html new file mode 100644 index 000000000..8d1357aa0 --- /dev/null +++ b/doc/lib/macro.assert_ok.html @@ -0,0 +1,29 @@ +assert_ok in lib - Rust

Macro lib::assert_ok

source ·
macro_rules! assert_ok {
+    ($result:expr $(,)?) => { ... };
+    ($result:expr, $($message:tt)+) => { ... };
+}
Expand description

Assert expression is Ok(_).

+
    +
  • +

    If true, return ().

    +
  • +
  • +

    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

    +
  • +
+

§Examples

+
let a: Result<(), i8> = Ok(());
+assert_ok!(a);
+
+let a: Result<(), i8> = Err(1);
+assert_ok!(a);
+// assertion failed: `assert_ok!(a)`
+//  a label: `a`,
+//  a debug: `Err(1)`
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_ok_as_result!.html b/doc/lib/macro.assert_ok_as_result!.html new file mode 100644 index 000000000..a691af797 --- /dev/null +++ b/doc/lib/macro.assert_ok_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_ok_as_result.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ok_as_result.html b/doc/lib/macro.assert_ok_as_result.html new file mode 100644 index 000000000..475fd56aa --- /dev/null +++ b/doc/lib/macro.assert_ok_as_result.html @@ -0,0 +1,22 @@ +assert_ok_as_result in lib - Rust

Macro lib::assert_ok_as_result

source ·
macro_rules! assert_ok_as_result {
+    ($result:expr $(,)?) => { ... };
+}
Expand description

Assert expression is Ok(_).

+
    +
  • +

    If true, return Result Ok(()).

    +
  • +
  • +

    Otherwise, return Result Err with a diagnostic message.

    +
  • +
+

This macro provides the same statements as assert_ok, +except this macro returns a Result, rather than doing a panic.

+

This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_ok_eq!.html b/doc/lib/macro.assert_ok_eq!.html new file mode 100644 index 000000000..3deea57af --- /dev/null +++ b/doc/lib/macro.assert_ok_eq!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_ok_eq.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ok_eq.html b/doc/lib/macro.assert_ok_eq.html new file mode 100644 index 000000000..721a287e2 --- /dev/null +++ b/doc/lib/macro.assert_ok_eq.html @@ -0,0 +1,35 @@ +assert_ok_eq in lib - Rust

Macro lib::assert_ok_eq

source ·
macro_rules! assert_ok_eq {
+    ($a:expr, $b:expr $(,)?) => { ... };
+    ($a:expr, $b:expr, $($message:tt)+) => { ... };
+}
Expand description

Assert two expressions are Ok(_) and their values are equal.

+
    +
  • +

    If true, return ().

    +
  • +
  • +

    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

    +
  • +
+

§Examples

+
let a: Result<i8, i8> = Ok(1);
+let b: Result<i8, i8> = Ok(1);
+assert_ok_eq!(a, b);
+
+let a: Result<i8, i8> = Ok(1);
+let b: Result<i8, i8> = Ok(2);
+assert_ok_eq!(a, b);
+// assertion failed: `assert_ok_eq!(a, b)`
+//  a label: `a`,
+//  a debug: `Ok(1)`,
+//  a inner: `1`,
+//  b label: `b`,
+//  b debug: `Ok(2)`,
+//  b inner: `2`
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_ok_eq_as_result!.html b/doc/lib/macro.assert_ok_eq_as_result!.html new file mode 100644 index 000000000..73f1a280a --- /dev/null +++ b/doc/lib/macro.assert_ok_eq_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_ok_eq_as_result.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ok_eq_as_result.html b/doc/lib/macro.assert_ok_eq_as_result.html new file mode 100644 index 000000000..031234adf --- /dev/null +++ b/doc/lib/macro.assert_ok_eq_as_result.html @@ -0,0 +1,22 @@ +assert_ok_eq_as_result in lib - Rust

Macro lib::assert_ok_eq_as_result

source ·
macro_rules! assert_ok_eq_as_result {
+    ($a:expr, $b:expr $(,)?) => { ... };
+}
Expand description

Assert two expressions are Ok(_) and their values are equal.

+
    +
  • +

    If true, return Result Ok(()).

    +
  • +
  • +

    Otherwise, return Result Err with a diagnostic message.

    +
  • +
+

This macro provides the same statements as assert_ok_eq, +except this macro returns a Result, rather than doing a panic.

+

This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_ok_ne!.html b/doc/lib/macro.assert_ok_ne!.html new file mode 100644 index 000000000..c501acb87 --- /dev/null +++ b/doc/lib/macro.assert_ok_ne!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_ok_ne.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ok_ne.html b/doc/lib/macro.assert_ok_ne.html new file mode 100644 index 000000000..d69fe301d --- /dev/null +++ b/doc/lib/macro.assert_ok_ne.html @@ -0,0 +1,35 @@ +assert_ok_ne in lib - Rust

Macro lib::assert_ok_ne

source ·
macro_rules! assert_ok_ne {
+    ($a:expr, $b:expr $(,)?) => { ... };
+    ($a:expr, $b:expr, $($message:tt)+) => { ... };
+}
Expand description

Assert two expressions are Ok(_) and their values are not equal.

+
    +
  • +

    If true, return ().

    +
  • +
  • +

    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

    +
  • +
+

§Examples

+
let a: Result<i8, i8> = Ok(1);
+let b: Result<i8, i8> = Ok(2);
+assert_ok_ne!(a, b);
+
+let a: Result<i8, i8> = Ok(1);
+let b: Result<i8, i8> = Ok(1);
+assert_ok_ne!(a, b);
+// assertion failed: `assert_ok_ne!(a, b)`
+//  a label: `a`,
+//  a debug: `Ok(1)`,
+//  a inner: `1`,
+//  b label: `b`,
+//  b debug: `Ok(1)`,
+//  b inner: `1`
+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_ok_ne_as_result!.html b/doc/lib/macro.assert_ok_ne_as_result!.html new file mode 100644 index 000000000..1564952e1 --- /dev/null +++ b/doc/lib/macro.assert_ok_ne_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

Redirecting to macro.assert_ok_ne_as_result.html...

+ + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ok_ne_as_result.html b/doc/lib/macro.assert_ok_ne_as_result.html new file mode 100644 index 000000000..2bb822ab7 --- /dev/null +++ b/doc/lib/macro.assert_ok_ne_as_result.html @@ -0,0 +1,22 @@ +assert_ok_ne_as_result in lib - Rust

Macro lib::assert_ok_ne_as_result

source ·
macro_rules! assert_ok_ne_as_result {
+    ($a:expr, $b:expr $(,)?) => { ... };
+}
Expand description

Assert two expressions are Ok(_) and their values are not equal.

+
    +
  • +

    If true, return Result Ok(()).

    +
  • +
  • +

    Otherwise, return Result Err with a diagnostic message.

    +
  • +
+

This macro provides the same statements as assert_ok_ne, +except this macro returns a Result, rather than doing a panic.

+

This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

+

§Module macros

+ +
\ No newline at end of file diff --git a/doc/lib/macro.assert_option_none.html b/doc/lib/macro.assert_option_none.html index e67c5dd8b..9b5f66846 100644 --- a/doc/lib/macro.assert_option_none.html +++ b/doc/lib/macro.assert_option_none.html @@ -1,7 +1,7 @@ -assert_option_none in lib - Rust

Macro lib::assert_option_none

source ·
macro_rules! assert_option_none {
+assert_option_none in lib - Rust

Macro lib::assert_option_none

source ·
macro_rules! assert_option_none {
     ($option:expr $(,)?) => { ... };
     ($option:expr, $($message:tt)+) => { ... };
-}
Expand description

Assert expression is None.

+}
👎Deprecated: Please rename from assert_option_none to assert_none because more developers prefer the shorter name.
Expand description

Assert expression is None.

  • If true, return ().

    diff --git a/doc/lib/macro.assert_option_none_as_result.html b/doc/lib/macro.assert_option_none_as_result.html index a43f13329..381f15563 100644 --- a/doc/lib/macro.assert_option_none_as_result.html +++ b/doc/lib/macro.assert_option_none_as_result.html @@ -1,6 +1,6 @@ -assert_option_none_as_result in lib - Rust

    Macro lib::assert_option_none_as_result

    source ·
    macro_rules! assert_option_none_as_result {
    +assert_option_none_as_result in lib - Rust

    Macro lib::assert_option_none_as_result

    source ·
    macro_rules! assert_option_none_as_result {
         ($a:expr $(,)?) => { ... };
    -}
    Expand description

    Assert an expression.is_none() is true.

    +}
    👎Deprecated: Please rename from assert_option_none_as_result to assert_none_as_result because more developers prefer the shorter name.
    Expand description

    Assert an expression.is_none() is true.

    • If true, return Result Ok(()).

      diff --git a/doc/lib/macro.assert_option_some.html b/doc/lib/macro.assert_option_some.html index d05ad1f1f..b61d064dd 100644 --- a/doc/lib/macro.assert_option_some.html +++ b/doc/lib/macro.assert_option_some.html @@ -1,7 +1,7 @@ -assert_option_some in lib - Rust

      Macro lib::assert_option_some

      source ·
      macro_rules! assert_option_some {
      +assert_option_some in lib - Rust

      Macro lib::assert_option_some

      source ·
      macro_rules! assert_option_some {
           ($option:expr $(,)?) => { ... };
           ($option:expr, $($message:tt)+) => { ... };
      -}
      Expand description

      Assert expression is Some(_).

      +}
      👎Deprecated: Please rename from assert_option_some to assert_some because more developers prefer the shorter name.
      Expand description

      Assert expression is Some(_).

      • If true, return ().

        diff --git a/doc/lib/macro.assert_option_some_as_result.html b/doc/lib/macro.assert_option_some_as_result.html index 6d9fdcf3b..f3d406890 100644 --- a/doc/lib/macro.assert_option_some_as_result.html +++ b/doc/lib/macro.assert_option_some_as_result.html @@ -1,6 +1,6 @@ -assert_option_some_as_result in lib - Rust

        Macro lib::assert_option_some_as_result

        source ·
        macro_rules! assert_option_some_as_result {
        +assert_option_some_as_result in lib - Rust

        Macro lib::assert_option_some_as_result

        source ·
        macro_rules! assert_option_some_as_result {
             ($option:expr $(,)?) => { ... };
        -}
        Expand description

        Assert an expression.is_some() is true.

        +}
        👎Deprecated: Please rename from assert_option_some_as_result to assert_some_as_result because more developers prefer the shorter name.
        Expand description

        Assert an expression.is_some() is true.

        • If true, return Result Ok(()).

          diff --git a/doc/lib/macro.assert_option_some_eq.html b/doc/lib/macro.assert_option_some_eq.html index ccb5a1dda..3a323c147 100644 --- a/doc/lib/macro.assert_option_some_eq.html +++ b/doc/lib/macro.assert_option_some_eq.html @@ -1,7 +1,7 @@ -assert_option_some_eq in lib - Rust

          Macro lib::assert_option_some_eq

          source ·
          macro_rules! assert_option_some_eq {
          +assert_option_some_eq in lib - Rust

          Macro lib::assert_option_some_eq

          source ·
          macro_rules! assert_option_some_eq {
               ($a:expr, $b:expr $(,)?) => { ... };
               ($a:expr, $b:expr, $($message:tt)+) => { ... };
          -}
          Expand description

          Assert two expressions are Some(_) and their values are equal.

          +}
          👎Deprecated: Please rename from assert_option_some_eq to assert_some_eq because more developers prefer the shorter name.
          Expand description

          Assert two expressions are Some(_) and their values are equal.

          • If true, return ().

            diff --git a/doc/lib/macro.assert_option_some_eq_as_result.html b/doc/lib/macro.assert_option_some_eq_as_result.html index a288cf13c..3014742ea 100644 --- a/doc/lib/macro.assert_option_some_eq_as_result.html +++ b/doc/lib/macro.assert_option_some_eq_as_result.html @@ -1,6 +1,6 @@ -assert_option_some_eq_as_result in lib - Rust

            Macro lib::assert_option_some_eq_as_result

            source ·
            macro_rules! assert_option_some_eq_as_result {
            +assert_option_some_eq_as_result in lib - Rust

            Macro lib::assert_option_some_eq_as_result

            source ·
            macro_rules! assert_option_some_eq_as_result {
                 ($a:expr, $b:expr $(,)?) => { ... };
            -}
            Expand description

            Assert a.is_some() and a.unwrap() are equal to another.

            +}
            👎Deprecated: Please rename from assert_option_some_eq_as_result to assert_some_eq_as_result because more developers prefer the shorter name.
            Expand description

            Assert a.is_some() and a.unwrap() are equal to another.

            • If true, return Result Ok(()).

              diff --git a/doc/lib/macro.assert_option_some_ne.html b/doc/lib/macro.assert_option_some_ne.html index 78656cb0d..1dc11b934 100644 --- a/doc/lib/macro.assert_option_some_ne.html +++ b/doc/lib/macro.assert_option_some_ne.html @@ -1,7 +1,7 @@ -assert_option_some_ne in lib - Rust

              Macro lib::assert_option_some_ne

              source ·
              macro_rules! assert_option_some_ne {
              +assert_option_some_ne in lib - Rust

              Macro lib::assert_option_some_ne

              source ·
              macro_rules! assert_option_some_ne {
                   ($a:expr, $b:expr $(,)?) => { ... };
                   ($a:expr, $b:expr, $($message:tt)+) => { ... };
              -}
              Expand description

              Assert two expressions are Some(_) and their values are not equal.

              +}
              👎Deprecated: Please rename from assert_option_some_ne to assert_some_ne because more developers prefer the shorter name.
              Expand description

              Assert two expressions are Some(_) and their values are not equal.

              • If true, return ().

                diff --git a/doc/lib/macro.assert_option_some_ne_as_result.html b/doc/lib/macro.assert_option_some_ne_as_result.html index fd933a7ac..941069acc 100644 --- a/doc/lib/macro.assert_option_some_ne_as_result.html +++ b/doc/lib/macro.assert_option_some_ne_as_result.html @@ -1,6 +1,6 @@ -assert_option_some_ne_as_result in lib - Rust

                Macro lib::assert_option_some_ne_as_result

                source ·
                macro_rules! assert_option_some_ne_as_result {
                +assert_option_some_ne_as_result in lib - Rust

                Macro lib::assert_option_some_ne_as_result

                source ·
                macro_rules! assert_option_some_ne_as_result {
                     ($a:expr, $b:expr $(,)?) => { ... };
                -}
                Expand description

                Assert two expressions are Some(_) and their values are not equal.

                +}
                👎Deprecated: Please rename from assert_option_some_ne_as_result to assert_some_ne_as_result because more developers prefer the shorter name.
                Expand description

                Assert two expressions are Some(_) and their values are not equal.

                • If true, return Result Ok(()).

                  diff --git a/doc/lib/macro.assert_pending!.html b/doc/lib/macro.assert_pending!.html new file mode 100644 index 000000000..64778a6a3 --- /dev/null +++ b/doc/lib/macro.assert_pending!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                  Redirecting to macro.assert_pending.html...

                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_pending.html b/doc/lib/macro.assert_pending.html new file mode 100644 index 000000000..b9bc1aadf --- /dev/null +++ b/doc/lib/macro.assert_pending.html @@ -0,0 +1,31 @@ +assert_pending in lib - Rust

                  Macro lib::assert_pending

                  source ·
                  macro_rules! assert_pending {
                  +    ($poll:expr $(,)?) => { ... };
                  +    ($poll:expr, $($message:tt)+) => { ... };
                  +}
                  Expand description

                  Assert an expression is Pending.

                  +
                    +
                  • +

                    If true, return ().

                    +
                  • +
                  • +

                    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

                    +
                  • +
                  +

                  §Examples

                  +
                  use std::task::Poll;
                  +use std::task::Poll::*;
                  +let a: Poll<i8> = Pending;
                  +assert_pending!(a);
                  +
                  +let a: Poll<i8> = Ready(1);
                  +assert_pending!(a);
                  +// assertion failed: `assert_pending!(a)`
                  +//  a label: `a`,
                  +//  a debug: `Ready(1)`
                  +

                  §Module macros

                  + +
                  \ No newline at end of file diff --git a/doc/lib/macro.assert_pending_as_result!.html b/doc/lib/macro.assert_pending_as_result!.html new file mode 100644 index 000000000..c7ca4c136 --- /dev/null +++ b/doc/lib/macro.assert_pending_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                  Redirecting to macro.assert_pending_as_result.html...

                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_pending_as_result.html b/doc/lib/macro.assert_pending_as_result.html new file mode 100644 index 000000000..82ebb9cad --- /dev/null +++ b/doc/lib/macro.assert_pending_as_result.html @@ -0,0 +1,22 @@ +assert_pending_as_result in lib - Rust

                  Macro lib::assert_pending_as_result

                  source ·
                  macro_rules! assert_pending_as_result {
                  +    ($a:expr $(,)?) => { ... };
                  +}
                  Expand description

                  Assert an expression.is_pending() is true.

                  +
                    +
                  • +

                    If true, return Result Ok(()).

                    +
                  • +
                  • +

                    Otherwise, return Result Err with a diagnostic message.

                    +
                  • +
                  +

                  This macro provides the same statements as assert_pending, +except this macro returns a Result, rather than doing a panic.

                  +

                  This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

                  +

                  §Module macros

                  + +
                  \ No newline at end of file diff --git a/doc/lib/macro.assert_poll_pending.html b/doc/lib/macro.assert_poll_pending.html index fa2853646..3b50d1f9d 100644 --- a/doc/lib/macro.assert_poll_pending.html +++ b/doc/lib/macro.assert_poll_pending.html @@ -1,7 +1,7 @@ -assert_poll_pending in lib - Rust

                  Macro lib::assert_poll_pending

                  source ·
                  macro_rules! assert_poll_pending {
                  +assert_poll_pending in lib - Rust

                  Macro lib::assert_poll_pending

                  source ·
                  macro_rules! assert_poll_pending {
                       ($poll:expr $(,)?) => { ... };
                       ($poll:expr, $($message:tt)+) => { ... };
                  -}
                  Expand description

                  Assert an expression is Pending.

                  +}
                  👎Deprecated: Please rename from assert_poll_pending to assert_pending because more developers prefer the shorter name.
                  Expand description

                  Assert an expression is Pending.

                  • If true, return ().

                    diff --git a/doc/lib/macro.assert_poll_pending_as_result.html b/doc/lib/macro.assert_poll_pending_as_result.html index 8e00ad1b0..1202f9f1b 100644 --- a/doc/lib/macro.assert_poll_pending_as_result.html +++ b/doc/lib/macro.assert_poll_pending_as_result.html @@ -1,6 +1,6 @@ -assert_poll_pending_as_result in lib - Rust

                    Macro lib::assert_poll_pending_as_result

                    source ·
                    macro_rules! assert_poll_pending_as_result {
                    +assert_poll_pending_as_result in lib - Rust

                    Macro lib::assert_poll_pending_as_result

                    source ·
                    macro_rules! assert_poll_pending_as_result {
                         ($a:expr $(,)?) => { ... };
                    -}
                    Expand description

                    Assert an expression.is_pending() is true.

                    +}
                    👎Deprecated: Please rename from assert_poll_pending_as_result to assert_pending_as_result because more developers prefer the shorter name.
                    Expand description

                    Assert an expression.is_pending() is true.

                    • If true, return Result Ok(()).

                      diff --git a/doc/lib/macro.assert_poll_ready.html b/doc/lib/macro.assert_poll_ready.html index 841cd8e4e..069dd6059 100644 --- a/doc/lib/macro.assert_poll_ready.html +++ b/doc/lib/macro.assert_poll_ready.html @@ -1,7 +1,7 @@ -assert_poll_ready in lib - Rust

                      Macro lib::assert_poll_ready

                      source ·
                      macro_rules! assert_poll_ready {
                      +assert_poll_ready in lib - Rust

                      Macro lib::assert_poll_ready

                      source ·
                      macro_rules! assert_poll_ready {
                           ($poll:expr $(,)?) => { ... };
                           ($poll:expr, $($message:tt)+) => { ... };
                      -}
                      Expand description

                      Assert an expression is Ready(_).

                      +}
                      👎Deprecated: Please rename from assert_poll_ready to assert_ready because more developers prefer the shorter name.
                      Expand description

                      Assert an expression is Ready(_).

                      • If true, return ().

                        diff --git a/doc/lib/macro.assert_poll_ready_as_result.html b/doc/lib/macro.assert_poll_ready_as_result.html index a4e4efc9e..cff3fff72 100644 --- a/doc/lib/macro.assert_poll_ready_as_result.html +++ b/doc/lib/macro.assert_poll_ready_as_result.html @@ -1,6 +1,6 @@ -assert_poll_ready_as_result in lib - Rust

                        Macro lib::assert_poll_ready_as_result

                        source ·
                        macro_rules! assert_poll_ready_as_result {
                        +assert_poll_ready_as_result in lib - Rust

                        Macro lib::assert_poll_ready_as_result

                        source ·
                        macro_rules! assert_poll_ready_as_result {
                             ($a:expr $(,)?) => { ... };
                        -}
                        Expand description

                        Assert an expression is Ready(_).

                        +}
                        👎Deprecated: Please rename from assert_poll_ready_as_result to assert_ready_as_result because more developers prefer the shorter name.
                        Expand description

                        Assert an expression is Ready(_).

                        • If true, return Result Ok(()).

                          diff --git a/doc/lib/macro.assert_poll_ready_eq.html b/doc/lib/macro.assert_poll_ready_eq.html index cd384be01..cdfe8972d 100644 --- a/doc/lib/macro.assert_poll_ready_eq.html +++ b/doc/lib/macro.assert_poll_ready_eq.html @@ -1,7 +1,7 @@ -assert_poll_ready_eq in lib - Rust

                          Macro lib::assert_poll_ready_eq

                          source ·
                          macro_rules! assert_poll_ready_eq {
                          +assert_poll_ready_eq in lib - Rust

                          Macro lib::assert_poll_ready_eq

                          source ·
                          macro_rules! assert_poll_ready_eq {
                               ($a:expr, $b:expr $(,)?) => { ... };
                               ($a:expr, $b:expr, $($message:tt)+) => { ... };
                          -}
                          Expand description

                          Assert two expressions are Ready(_) and their values are equal.

                          +}
                          👎Deprecated: Please rename from assert_poll_ready_eq to assert_ready_eq because more developers prefer the shorter name.
                          Expand description

                          Assert two expressions are Ready(_) and their values are equal.

                          • If true, return ().

                            diff --git a/doc/lib/macro.assert_poll_ready_eq_as_result.html b/doc/lib/macro.assert_poll_ready_eq_as_result.html index 54f8ef954..fe88816fc 100644 --- a/doc/lib/macro.assert_poll_ready_eq_as_result.html +++ b/doc/lib/macro.assert_poll_ready_eq_as_result.html @@ -1,6 +1,6 @@ -assert_poll_ready_eq_as_result in lib - Rust

                            Macro lib::assert_poll_ready_eq_as_result

                            source ·
                            macro_rules! assert_poll_ready_eq_as_result {
                            +assert_poll_ready_eq_as_result in lib - Rust

                            Macro lib::assert_poll_ready_eq_as_result

                            source ·
                            macro_rules! assert_poll_ready_eq_as_result {
                                 ($a:expr, $b:expr $(,)?) => { ... };
                            -}
                            Expand description

                            Assert two expressions are Ready(_) and their values are equal.

                            +}
                            👎Deprecated: Please rename from assert_poll_ready_eq_as_result to assert_ready_eq_as_result because more developers prefer the shorter name.
                            Expand description

                            Assert two expressions are Ready(_) and their values are equal.

                            • If true, return Result Some(()).

                              diff --git a/doc/lib/macro.assert_poll_ready_ne.html b/doc/lib/macro.assert_poll_ready_ne.html index 24d88e16f..9412bfe87 100644 --- a/doc/lib/macro.assert_poll_ready_ne.html +++ b/doc/lib/macro.assert_poll_ready_ne.html @@ -1,7 +1,7 @@ -assert_poll_ready_ne in lib - Rust

                              Macro lib::assert_poll_ready_ne

                              source ·
                              macro_rules! assert_poll_ready_ne {
                              +assert_poll_ready_ne in lib - Rust

                              Macro lib::assert_poll_ready_ne

                              source ·
                              macro_rules! assert_poll_ready_ne {
                                   ($a:expr, $b:expr $(,)?) => { ... };
                                   ($a:expr, $b:expr, $($message:tt)+) => { ... };
                              -}
                              Expand description

                              Assert two expressions are Ready(_) and their values are not equal.

                              +}
                              👎Deprecated: Please rename from assert_poll_ready_ne to assert_ready_ne because more developers prefer the shorter name.
                              Expand description

                              Assert two expressions are Ready(_) and their values are not equal.

                              • If true, return ().

                                diff --git a/doc/lib/macro.assert_poll_ready_ne_as_result.html b/doc/lib/macro.assert_poll_ready_ne_as_result.html index a75483dd8..c168ed8a3 100644 --- a/doc/lib/macro.assert_poll_ready_ne_as_result.html +++ b/doc/lib/macro.assert_poll_ready_ne_as_result.html @@ -1,6 +1,6 @@ -assert_poll_ready_ne_as_result in lib - Rust

                                Macro lib::assert_poll_ready_ne_as_result

                                source ·
                                macro_rules! assert_poll_ready_ne_as_result {
                                +assert_poll_ready_ne_as_result in lib - Rust

                                Macro lib::assert_poll_ready_ne_as_result

                                source ·
                                macro_rules! assert_poll_ready_ne_as_result {
                                     ($a:expr, $b:expr $(,)?) => { ... };
                                -}
                                Expand description

                                Assert two expressions are Ready(_) and their values are not equal.

                                +}
                                👎Deprecated: Please rename from assert_poll_ready_ne_as_result to assert_ready_ne_as_result because more developers prefer the shorter name.
                                Expand description

                                Assert two expressions are Ready(_) and their values are not equal.

                                • If true, return Result Some(()).

                                  diff --git a/doc/lib/macro.assert_ready!.html b/doc/lib/macro.assert_ready!.html new file mode 100644 index 000000000..72932b726 --- /dev/null +++ b/doc/lib/macro.assert_ready!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                  Redirecting to macro.assert_ready.html...

                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ready.html b/doc/lib/macro.assert_ready.html new file mode 100644 index 000000000..cf46b934c --- /dev/null +++ b/doc/lib/macro.assert_ready.html @@ -0,0 +1,31 @@ +assert_ready in lib - Rust

                                  Macro lib::assert_ready

                                  source ·
                                  macro_rules! assert_ready {
                                  +    ($poll:expr $(,)?) => { ... };
                                  +    ($poll:expr, $($message:tt)+) => { ... };
                                  +}
                                  Expand description

                                  Assert an expression is Ready(_).

                                  +
                                    +
                                  • +

                                    If true, return ().

                                    +
                                  • +
                                  • +

                                    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

                                    +
                                  • +
                                  +

                                  §Examples

                                  +
                                  use std::task::Poll;
                                  +use std::task::Poll::*;
                                  +let a: Poll<i8> = Ready(1);
                                  +assert_ready!(a);
                                  +
                                  +let a: Poll<i8> = Pending;
                                  +assert_ready!(a);
                                  +// assertion failed: `assert_ready!(a)`
                                  +//  a label: `a`,
                                  +//  a debug: `Pending`
                                  +

                                  §Module macros

                                  + +
                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_as_result!.html b/doc/lib/macro.assert_ready_as_result!.html new file mode 100644 index 000000000..dc99109cb --- /dev/null +++ b/doc/lib/macro.assert_ready_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                  Redirecting to macro.assert_ready_as_result.html...

                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_as_result.html b/doc/lib/macro.assert_ready_as_result.html new file mode 100644 index 000000000..43f443959 --- /dev/null +++ b/doc/lib/macro.assert_ready_as_result.html @@ -0,0 +1,22 @@ +assert_ready_as_result in lib - Rust

                                  Macro lib::assert_ready_as_result

                                  source ·
                                  macro_rules! assert_ready_as_result {
                                  +    ($a:expr $(,)?) => { ... };
                                  +}
                                  Expand description

                                  Assert an expression is Ready(_).

                                  +
                                    +
                                  • +

                                    If true, return Result Ok(()).

                                    +
                                  • +
                                  • +

                                    Otherwise, return Result Err with a diagnostic message.

                                    +
                                  • +
                                  +

                                  This macro provides the same statements as assert_ready, +except this macro returns a Result, rather than doing a panic.

                                  +

                                  This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

                                  +

                                  §Module macros

                                  + +
                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_eq!.html b/doc/lib/macro.assert_ready_eq!.html new file mode 100644 index 000000000..8fe9ace77 --- /dev/null +++ b/doc/lib/macro.assert_ready_eq!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                  Redirecting to macro.assert_ready_eq.html...

                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_eq.html b/doc/lib/macro.assert_ready_eq.html new file mode 100644 index 000000000..8f061fda2 --- /dev/null +++ b/doc/lib/macro.assert_ready_eq.html @@ -0,0 +1,37 @@ +assert_ready_eq in lib - Rust

                                  Macro lib::assert_ready_eq

                                  source ·
                                  macro_rules! assert_ready_eq {
                                  +    ($a:expr, $b:expr $(,)?) => { ... };
                                  +    ($a:expr, $b:expr, $($message:tt)+) => { ... };
                                  +}
                                  Expand description

                                  Assert two expressions are Ready(_) and their values are equal.

                                  +
                                    +
                                  • +

                                    If true, return ().

                                    +
                                  • +
                                  • +

                                    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

                                    +
                                  • +
                                  +

                                  §Examples

                                  +
                                  use std::task::Poll;
                                  +use std::task::Poll::*;
                                  +let a: Poll<i8> = Ready(1);
                                  +let b: Poll<i8> = Ready(1);
                                  +assert_ready_eq!(a, b);
                                  +
                                  +let a: Poll<i8> = Ready(1);
                                  +let b: Poll<i8> = Ready(2);
                                  +assert_ready_eq!(a, b);
                                  +// assertion failed: `assert_ready_eq!(a, b)`
                                  +//  a label: `a`,
                                  +//  a debug: `Ready(1)`,
                                  +//  a inner: `1`,
                                  +//  b label: `b`,
                                  +//  b debug: `Ready(2)`,
                                  +//  b inner: `2`
                                  +

                                  §Module macros

                                  + +
                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_eq_as_result!.html b/doc/lib/macro.assert_ready_eq_as_result!.html new file mode 100644 index 000000000..994dceacb --- /dev/null +++ b/doc/lib/macro.assert_ready_eq_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                  Redirecting to macro.assert_ready_eq_as_result.html...

                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_eq_as_result.html b/doc/lib/macro.assert_ready_eq_as_result.html new file mode 100644 index 000000000..1b4fa76eb --- /dev/null +++ b/doc/lib/macro.assert_ready_eq_as_result.html @@ -0,0 +1,22 @@ +assert_ready_eq_as_result in lib - Rust

                                  Macro lib::assert_ready_eq_as_result

                                  source ·
                                  macro_rules! assert_ready_eq_as_result {
                                  +    ($a:expr, $b:expr $(,)?) => { ... };
                                  +}
                                  Expand description

                                  Assert two expressions are Ready(_) and their values are equal.

                                  +
                                    +
                                  • +

                                    If true, return Result Some(()).

                                    +
                                  • +
                                  • +

                                    Otherwise, return Result Err with a diagnostic message.

                                    +
                                  • +
                                  +

                                  This macro provides the same statements as assert_ready_eq, +except this macro returns a Option, rather than doing a panic.

                                  +

                                  This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

                                  +

                                  §Module macros

                                  + +
                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_ne!.html b/doc/lib/macro.assert_ready_ne!.html new file mode 100644 index 000000000..8a9aa16a6 --- /dev/null +++ b/doc/lib/macro.assert_ready_ne!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                  Redirecting to macro.assert_ready_ne.html...

                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_ne.html b/doc/lib/macro.assert_ready_ne.html new file mode 100644 index 000000000..c396132d7 --- /dev/null +++ b/doc/lib/macro.assert_ready_ne.html @@ -0,0 +1,37 @@ +assert_ready_ne in lib - Rust

                                  Macro lib::assert_ready_ne

                                  source ·
                                  macro_rules! assert_ready_ne {
                                  +    ($a:expr, $b:expr $(,)?) => { ... };
                                  +    ($a:expr, $b:expr, $($message:tt)+) => { ... };
                                  +}
                                  Expand description

                                  Assert two expressions are Ready(_) and their values are not equal.

                                  +
                                    +
                                  • +

                                    If true, return ().

                                    +
                                  • +
                                  • +

                                    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

                                    +
                                  • +
                                  +

                                  §Examples

                                  +
                                  use std::task::Poll;
                                  +use std::task::Poll::*;
                                  +let a: Poll<i8> = Ready(1);
                                  +let b: Poll<i8> = Ready(2);
                                  +assert_ready_ne!(a, b);
                                  +
                                  +let a: Poll<i8> = Ready(1);
                                  +let b: Poll<i8> = Ready(1);
                                  +assert_ready_ne!(a, b);
                                  +// assertion failed: `assert_ready_ne!(a, b)`
                                  +//  a label: `a`,
                                  +//  a debug: `Ready(1)`,
                                  +//  a inner: `1`,
                                  +//  b label: `b`,
                                  +//  b debug: `Ready(1)`,
                                  +//  b inner: `1`
                                  +

                                  §Module macros

                                  + +
                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_ne_as_result!.html b/doc/lib/macro.assert_ready_ne_as_result!.html new file mode 100644 index 000000000..ec6a8106b --- /dev/null +++ b/doc/lib/macro.assert_ready_ne_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                  Redirecting to macro.assert_ready_ne_as_result.html...

                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_ready_ne_as_result.html b/doc/lib/macro.assert_ready_ne_as_result.html new file mode 100644 index 000000000..2e3fa27a2 --- /dev/null +++ b/doc/lib/macro.assert_ready_ne_as_result.html @@ -0,0 +1,22 @@ +assert_ready_ne_as_result in lib - Rust

                                  Macro lib::assert_ready_ne_as_result

                                  source ·
                                  macro_rules! assert_ready_ne_as_result {
                                  +    ($a:expr, $b:expr $(,)?) => { ... };
                                  +}
                                  Expand description

                                  Assert two expressions are Ready(_) and their values are not equal.

                                  +
                                    +
                                  • +

                                    If true, return Result Some(()).

                                    +
                                  • +
                                  • +

                                    Otherwise, return Result Err with a diagnostic message.

                                    +
                                  • +
                                  +

                                  This macro provides the same statements as assert_ready_ne, +except this macro returns a Option, rather than doing a panic.

                                  +

                                  This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

                                  +

                                  §Module macros

                                  + +
                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_result_err.html b/doc/lib/macro.assert_result_err.html index 25e0eb209..355629459 100644 --- a/doc/lib/macro.assert_result_err.html +++ b/doc/lib/macro.assert_result_err.html @@ -1,7 +1,7 @@ -assert_result_err in lib - Rust

                                  Macro lib::assert_result_err

                                  source ·
                                  macro_rules! assert_result_err {
                                  +assert_result_err in lib - Rust

                                  Macro lib::assert_result_err

                                  source ·
                                  macro_rules! assert_result_err {
                                       ($result:expr $(,)?) => { ... };
                                       ($result:expr, $($message:tt)+) => { ... };
                                  -}
                                  Expand description

                                  Assert expression is Err(_).

                                  +}
                                  👎Deprecated: Please rename from assert_result_err to assert_err because more developers prefer the shorter name.
                                  Expand description

                                  Assert expression is Err(_).

                                  • If true, return ().

                                    diff --git a/doc/lib/macro.assert_result_err_as_result.html b/doc/lib/macro.assert_result_err_as_result.html index 6fd090631..ffc4e945a 100644 --- a/doc/lib/macro.assert_result_err_as_result.html +++ b/doc/lib/macro.assert_result_err_as_result.html @@ -1,6 +1,6 @@ -assert_result_err_as_result in lib - Rust

                                    Macro lib::assert_result_err_as_result

                                    source ·
                                    macro_rules! assert_result_err_as_result {
                                    +assert_result_err_as_result in lib - Rust

                                    Macro lib::assert_result_err_as_result

                                    source ·
                                    macro_rules! assert_result_err_as_result {
                                         ($result:expr $(,)?) => { ... };
                                    -}
                                    Expand description

                                    Assert expression is Err(_).

                                    +}
                                    👎Deprecated: Please rename from assert_result_err_as_result to assert_err_as_result because more developers prefer the shorter name.
                                    Expand description

                                    Assert expression is Err(_).

                                    • If true, return Result Ok(()).

                                      diff --git a/doc/lib/macro.assert_result_ok.html b/doc/lib/macro.assert_result_ok.html index 140ae5393..db8d74631 100644 --- a/doc/lib/macro.assert_result_ok.html +++ b/doc/lib/macro.assert_result_ok.html @@ -1,7 +1,7 @@ -assert_result_ok in lib - Rust

                                      Macro lib::assert_result_ok

                                      source ·
                                      macro_rules! assert_result_ok {
                                      +assert_result_ok in lib - Rust

                                      Macro lib::assert_result_ok

                                      source ·
                                      macro_rules! assert_result_ok {
                                           ($result:expr $(,)?) => { ... };
                                           ($result:expr, $($message:tt)+) => { ... };
                                      -}
                                      Expand description

                                      Assert expression is Ok(_).

                                      +}
                                      👎Deprecated: Please rename from assert_result_ok to assert_ok because more developers prefer the shorter name.
                                      Expand description

                                      Assert expression is Ok(_).

                                      • If true, return ().

                                        diff --git a/doc/lib/macro.assert_result_ok_as_result.html b/doc/lib/macro.assert_result_ok_as_result.html index 33412cc6b..213dc89c9 100644 --- a/doc/lib/macro.assert_result_ok_as_result.html +++ b/doc/lib/macro.assert_result_ok_as_result.html @@ -1,6 +1,6 @@ -assert_result_ok_as_result in lib - Rust

                                        Macro lib::assert_result_ok_as_result

                                        source ·
                                        macro_rules! assert_result_ok_as_result {
                                        +assert_result_ok_as_result in lib - Rust

                                        Macro lib::assert_result_ok_as_result

                                        source ·
                                        macro_rules! assert_result_ok_as_result {
                                             ($result:expr $(,)?) => { ... };
                                        -}
                                        Expand description

                                        Assert expression is Ok(_).

                                        +}
                                        👎Deprecated: Please rename from assert_result_ok_as_result to assert_ok_as_result because more developers prefer the shorter name.
                                        Expand description

                                        Assert expression is Ok(_).

                                        • If true, return Result Ok(()).

                                          diff --git a/doc/lib/macro.assert_result_ok_eq.html b/doc/lib/macro.assert_result_ok_eq.html index 896c8e6f1..02e77953d 100644 --- a/doc/lib/macro.assert_result_ok_eq.html +++ b/doc/lib/macro.assert_result_ok_eq.html @@ -1,7 +1,7 @@ -assert_result_ok_eq in lib - Rust

                                          Macro lib::assert_result_ok_eq

                                          source ·
                                          macro_rules! assert_result_ok_eq {
                                          +assert_result_ok_eq in lib - Rust

                                          Macro lib::assert_result_ok_eq

                                          source ·
                                          macro_rules! assert_result_ok_eq {
                                               ($a:expr, $b:expr $(,)?) => { ... };
                                               ($a:expr, $b:expr, $($message:tt)+) => { ... };
                                          -}
                                          Expand description

                                          Assert two expressions are Ok(_) and their values are equal.

                                          +}
                                          👎Deprecated: Please rename from assert_result_ok_eq to assert_ok_eq because more developers prefer the shorter name.
                                          Expand description

                                          Assert two expressions are Ok(_) and their values are equal.

                                          • If true, return ().

                                            diff --git a/doc/lib/macro.assert_result_ok_eq_as_result.html b/doc/lib/macro.assert_result_ok_eq_as_result.html index 3729b7056..82987e065 100644 --- a/doc/lib/macro.assert_result_ok_eq_as_result.html +++ b/doc/lib/macro.assert_result_ok_eq_as_result.html @@ -1,6 +1,6 @@ -assert_result_ok_eq_as_result in lib - Rust

                                            Macro lib::assert_result_ok_eq_as_result

                                            source ·
                                            macro_rules! assert_result_ok_eq_as_result {
                                            +assert_result_ok_eq_as_result in lib - Rust

                                            Macro lib::assert_result_ok_eq_as_result

                                            source ·
                                            macro_rules! assert_result_ok_eq_as_result {
                                                 ($a:expr, $b:expr $(,)?) => { ... };
                                            -}
                                            Expand description

                                            Assert two expressions are Ok(_) and their values are equal.

                                            +}
                                            👎Deprecated: Please rename from assert_result_ok_eq_as_result to assert_ok_eq_as_result because more developers prefer the shorter name.
                                            Expand description

                                            Assert two expressions are Ok(_) and their values are equal.

                                            • If true, return Result Ok(()).

                                              diff --git a/doc/lib/macro.assert_result_ok_ne.html b/doc/lib/macro.assert_result_ok_ne.html index 4eedefab5..b9e2eaede 100644 --- a/doc/lib/macro.assert_result_ok_ne.html +++ b/doc/lib/macro.assert_result_ok_ne.html @@ -1,7 +1,7 @@ -assert_result_ok_ne in lib - Rust

                                              Macro lib::assert_result_ok_ne

                                              source ·
                                              macro_rules! assert_result_ok_ne {
                                              +assert_result_ok_ne in lib - Rust

                                              Macro lib::assert_result_ok_ne

                                              source ·
                                              macro_rules! assert_result_ok_ne {
                                                   ($a:expr, $b:expr $(,)?) => { ... };
                                                   ($a:expr, $b:expr, $($message:tt)+) => { ... };
                                              -}
                                              Expand description

                                              Assert two expressions are Ok(_) and their values are not equal.

                                              +}
                                              👎Deprecated: Please rename from assert_result_ok_ne to assert_ok_ne because more developers prefer the shorter name.
                                              Expand description

                                              Assert two expressions are Ok(_) and their values are not equal.

                                              • If true, return ().

                                                diff --git a/doc/lib/macro.assert_result_ok_ne_as_result.html b/doc/lib/macro.assert_result_ok_ne_as_result.html index 1f38907b9..9f79c9cca 100644 --- a/doc/lib/macro.assert_result_ok_ne_as_result.html +++ b/doc/lib/macro.assert_result_ok_ne_as_result.html @@ -1,6 +1,6 @@ -assert_result_ok_ne_as_result in lib - Rust

                                                Macro lib::assert_result_ok_ne_as_result

                                                source ·
                                                macro_rules! assert_result_ok_ne_as_result {
                                                +assert_result_ok_ne_as_result in lib - Rust

                                                Macro lib::assert_result_ok_ne_as_result

                                                source ·
                                                macro_rules! assert_result_ok_ne_as_result {
                                                     ($a:expr, $b:expr $(,)?) => { ... };
                                                -}
                                                Expand description

                                                Assert two expressions are Ok(_) and their values are not equal.

                                                +}
                                                👎Deprecated: Please rename from assert_result_ok_ne_as_result to assert_ok_ne_as_result because more developers prefer the shorter name.
                                                Expand description

                                                Assert two expressions are Ok(_) and their values are not equal.

                                                • If true, return Result Ok(()).

                                                  diff --git a/doc/lib/macro.assert_some!.html b/doc/lib/macro.assert_some!.html new file mode 100644 index 000000000..4d4a51e39 --- /dev/null +++ b/doc/lib/macro.assert_some!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.assert_some.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_some.html b/doc/lib/macro.assert_some.html new file mode 100644 index 000000000..cd26f5dfc --- /dev/null +++ b/doc/lib/macro.assert_some.html @@ -0,0 +1,29 @@ +assert_some in lib - Rust

                                                  Macro lib::assert_some

                                                  source ·
                                                  macro_rules! assert_some {
                                                  +    ($option:expr $(,)?) => { ... };
                                                  +    ($option:expr, $($message:tt)+) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert expression is Some(_).

                                                  +
                                                    +
                                                  • +

                                                    If true, return ().

                                                    +
                                                  • +
                                                  • +

                                                    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

                                                    +
                                                  • +
                                                  +

                                                  §Examples

                                                  +
                                                  let a: Option<i8> = Option::Some(1);
                                                  +assert_some!(a);
                                                  +
                                                  +let a: Option<i8> = Option::None;
                                                  +assert_some!(a);
                                                  +// assertion failed: `assert_some!(a)`
                                                  +//  option label: `a`,
                                                  +//  option debug: `None`
                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_some_as_result!.html b/doc/lib/macro.assert_some_as_result!.html new file mode 100644 index 000000000..96b3ef7a1 --- /dev/null +++ b/doc/lib/macro.assert_some_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.assert_some_as_result.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_some_as_result.html b/doc/lib/macro.assert_some_as_result.html new file mode 100644 index 000000000..755b6b997 --- /dev/null +++ b/doc/lib/macro.assert_some_as_result.html @@ -0,0 +1,22 @@ +assert_some_as_result in lib - Rust

                                                  Macro lib::assert_some_as_result

                                                  source ·
                                                  macro_rules! assert_some_as_result {
                                                  +    ($option:expr $(,)?) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert an expression.is_some() is true.

                                                  +
                                                    +
                                                  • +

                                                    If true, return Result Ok(()).

                                                    +
                                                  • +
                                                  • +

                                                    Otherwise, return Result Err with a diagnostic message.

                                                    +
                                                  • +
                                                  +

                                                  This macro provides the same statements as assert_some, +except this macro returns a Result, rather than doing a panic.

                                                  +

                                                  This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_some_eq!.html b/doc/lib/macro.assert_some_eq!.html new file mode 100644 index 000000000..9957be698 --- /dev/null +++ b/doc/lib/macro.assert_some_eq!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.assert_some_eq.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_some_eq.html b/doc/lib/macro.assert_some_eq.html new file mode 100644 index 000000000..9153e6f72 --- /dev/null +++ b/doc/lib/macro.assert_some_eq.html @@ -0,0 +1,35 @@ +assert_some_eq in lib - Rust

                                                  Macro lib::assert_some_eq

                                                  source ·
                                                  macro_rules! assert_some_eq {
                                                  +    ($a:expr, $b:expr $(,)?) => { ... };
                                                  +    ($a:expr, $b:expr, $($message:tt)+) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert two expressions are Some(_) and their values are equal.

                                                  +
                                                    +
                                                  • +

                                                    If true, return ().

                                                    +
                                                  • +
                                                  • +

                                                    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

                                                    +
                                                  • +
                                                  +

                                                  §Examples

                                                  +
                                                  let a: Option<i8> = Option::Some(1);
                                                  +let b: Option<i8> = Option::Some(1);
                                                  +assert_some_eq!(a, b);
                                                  +
                                                  +let a: Option<i8> = Option::Some(1);
                                                  +let b: Option<i8> = Option::Some(2);
                                                  +assert_some_eq!(a, b);
                                                  +// assertion failed: `assert_some_eq!(a, b)`
                                                  +//  a label: `a`,
                                                  +//  a debug: `Some(1)`,
                                                  +//  a inner: `1`,
                                                  +//  b label: `b`,
                                                  +//  b debug: `Some(2)`,
                                                  +//  b inner: `2`
                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_some_eq_as_result!.html b/doc/lib/macro.assert_some_eq_as_result!.html new file mode 100644 index 000000000..d36fcd14b --- /dev/null +++ b/doc/lib/macro.assert_some_eq_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.assert_some_eq_as_result.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_some_eq_as_result.html b/doc/lib/macro.assert_some_eq_as_result.html new file mode 100644 index 000000000..76b910d71 --- /dev/null +++ b/doc/lib/macro.assert_some_eq_as_result.html @@ -0,0 +1,22 @@ +assert_some_eq_as_result in lib - Rust

                                                  Macro lib::assert_some_eq_as_result

                                                  source ·
                                                  macro_rules! assert_some_eq_as_result {
                                                  +    ($a:expr, $b:expr $(,)?) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert a.is_some() and a.unwrap() are equal to another.

                                                  +
                                                    +
                                                  • +

                                                    If true, return Result Ok(()).

                                                    +
                                                  • +
                                                  • +

                                                    Otherwise, return Result Err with a diagnostic message.

                                                    +
                                                  • +
                                                  +

                                                  This macro provides the same statements as assert_some_eq, +except this macro returns a Option, rather than doing a panic.

                                                  +

                                                  This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_some_ne!.html b/doc/lib/macro.assert_some_ne!.html new file mode 100644 index 000000000..bba077f6d --- /dev/null +++ b/doc/lib/macro.assert_some_ne!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.assert_some_ne.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_some_ne.html b/doc/lib/macro.assert_some_ne.html new file mode 100644 index 000000000..2a409f28c --- /dev/null +++ b/doc/lib/macro.assert_some_ne.html @@ -0,0 +1,35 @@ +assert_some_ne in lib - Rust

                                                  Macro lib::assert_some_ne

                                                  source ·
                                                  macro_rules! assert_some_ne {
                                                  +    ($a:expr, $b:expr $(,)?) => { ... };
                                                  +    ($a:expr, $b:expr, $($message:tt)+) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert two expressions are Some(_) and their values are not equal.

                                                  +
                                                    +
                                                  • +

                                                    If true, return ().

                                                    +
                                                  • +
                                                  • +

                                                    Otherwise, call panic! with a message and the values of the +expressions with their debug representations.

                                                    +
                                                  • +
                                                  +

                                                  §Examples

                                                  +
                                                  let a: Option<i8> = Option::Some(1);
                                                  +let b: Option<i8> = Option::Some(2);
                                                  +assert_some_ne!(a, b);
                                                  +
                                                  +let a: Option<i8> = Option::Some(1);
                                                  +let b: Option<i8> = Option::Some(1);
                                                  +assert_some_ne!(a, b);
                                                  +// assertion failed: `assert_some_ne!(a, b)`
                                                  +//  a label: `a`,
                                                  +//  a debug: `Some(1)`,
                                                  +//  b label: `b`,
                                                  +//  b debug: `Some(1)`,
                                                  +//  a inner: `1`,
                                                  +//  b inner: `1`
                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.assert_some_ne_as_result!.html b/doc/lib/macro.assert_some_ne_as_result!.html new file mode 100644 index 000000000..7697d0647 --- /dev/null +++ b/doc/lib/macro.assert_some_ne_as_result!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.assert_some_ne_as_result.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.assert_some_ne_as_result.html b/doc/lib/macro.assert_some_ne_as_result.html new file mode 100644 index 000000000..510285683 --- /dev/null +++ b/doc/lib/macro.assert_some_ne_as_result.html @@ -0,0 +1,22 @@ +assert_some_ne_as_result in lib - Rust

                                                  Macro lib::assert_some_ne_as_result

                                                  source ·
                                                  macro_rules! assert_some_ne_as_result {
                                                  +    ($a:expr, $b:expr $(,)?) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert two expressions are Some(_) and their values are not equal.

                                                  +
                                                    +
                                                  • +

                                                    If true, return Result Ok(()).

                                                    +
                                                  • +
                                                  • +

                                                    Otherwise, return Result Err with a diagnostic message.

                                                    +
                                                  • +
                                                  +

                                                  This macro provides the same statements as assert_some_ne, +except this macro returns a Option, rather than doing a panic.

                                                  +

                                                  This macro is useful for runtime checks, such as checking parameters, +or sanitizing inputs, or handling different results in different ways.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_err!.html b/doc/lib/macro.debug_assert_err!.html new file mode 100644 index 000000000..4fa79b6eb --- /dev/null +++ b/doc/lib/macro.debug_assert_err!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_err.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_err.html b/doc/lib/macro.debug_assert_err.html new file mode 100644 index 000000000..2f5b7cabf --- /dev/null +++ b/doc/lib/macro.debug_assert_err.html @@ -0,0 +1,25 @@ +debug_assert_err in lib - Rust

                                                  Macro lib::debug_assert_err

                                                  source ·
                                                  macro_rules! debug_assert_err {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert expression is Err(_).

                                                  +

                                                  This macro provides the same statements as assert_err, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_none!.html b/doc/lib/macro.debug_assert_none!.html new file mode 100644 index 000000000..e49fef840 --- /dev/null +++ b/doc/lib/macro.debug_assert_none!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_none.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_none.html b/doc/lib/macro.debug_assert_none.html new file mode 100644 index 000000000..5a2350d8f --- /dev/null +++ b/doc/lib/macro.debug_assert_none.html @@ -0,0 +1,25 @@ +debug_assert_none in lib - Rust

                                                  Macro lib::debug_assert_none

                                                  source ·
                                                  macro_rules! debug_assert_none {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert expression is None.

                                                  +

                                                  This macro provides the same statements as assert_none, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ok!.html b/doc/lib/macro.debug_assert_ok!.html new file mode 100644 index 000000000..42bbc4aae --- /dev/null +++ b/doc/lib/macro.debug_assert_ok!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_ok.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ok.html b/doc/lib/macro.debug_assert_ok.html new file mode 100644 index 000000000..baff2cc46 --- /dev/null +++ b/doc/lib/macro.debug_assert_ok.html @@ -0,0 +1,25 @@ +debug_assert_ok in lib - Rust

                                                  Macro lib::debug_assert_ok

                                                  source ·
                                                  macro_rules! debug_assert_ok {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert expression is Ok(_).

                                                  +

                                                  This macro provides the same statements as assert_ok, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ok_eq!.html b/doc/lib/macro.debug_assert_ok_eq!.html new file mode 100644 index 000000000..8937c4b22 --- /dev/null +++ b/doc/lib/macro.debug_assert_ok_eq!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_ok_eq.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ok_eq.html b/doc/lib/macro.debug_assert_ok_eq.html new file mode 100644 index 000000000..74b6d209f --- /dev/null +++ b/doc/lib/macro.debug_assert_ok_eq.html @@ -0,0 +1,25 @@ +debug_assert_ok_eq in lib - Rust

                                                  Macro lib::debug_assert_ok_eq

                                                  source ·
                                                  macro_rules! debug_assert_ok_eq {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert two expressions are Ok(_) and their values are equal.

                                                  +

                                                  This macro provides the same statements as assert_ok_eq, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ok_ne!.html b/doc/lib/macro.debug_assert_ok_ne!.html new file mode 100644 index 000000000..78d2ecbbb --- /dev/null +++ b/doc/lib/macro.debug_assert_ok_ne!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_ok_ne.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ok_ne.html b/doc/lib/macro.debug_assert_ok_ne.html new file mode 100644 index 000000000..3b5316836 --- /dev/null +++ b/doc/lib/macro.debug_assert_ok_ne.html @@ -0,0 +1,25 @@ +debug_assert_ok_ne in lib - Rust

                                                  Macro lib::debug_assert_ok_ne

                                                  source ·
                                                  macro_rules! debug_assert_ok_ne {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert two expressions are Ok(_) and their values are not equal.

                                                  +

                                                  This macro provides the same statements as assert_ok_ne, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_option_none.html b/doc/lib/macro.debug_assert_option_none.html index 90dcf673a..97e4c06d2 100644 --- a/doc/lib/macro.debug_assert_option_none.html +++ b/doc/lib/macro.debug_assert_option_none.html @@ -1,6 +1,6 @@ -debug_assert_option_none in lib - Rust

                                                  Macro lib::debug_assert_option_none

                                                  source ·
                                                  macro_rules! debug_assert_option_none {
                                                  +debug_assert_option_none in lib - Rust

                                                  Macro lib::debug_assert_option_none

                                                  source ·
                                                  macro_rules! debug_assert_option_none {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert expression is None.

                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_option_none to debug_assert_none because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert expression is None.

                                                  This macro provides the same statements as assert_option_none, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_option_some.html b/doc/lib/macro.debug_assert_option_some.html index 010cf6b86..b53b0602f 100644 --- a/doc/lib/macro.debug_assert_option_some.html +++ b/doc/lib/macro.debug_assert_option_some.html @@ -1,6 +1,6 @@ -debug_assert_option_some in lib - Rust

                                                  Macro lib::debug_assert_option_some

                                                  source ·
                                                  macro_rules! debug_assert_option_some {
                                                  -    ($($optionrg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert expression is Some(_).

                                                  +debug_assert_option_some in lib - Rust

                                                  Macro lib::debug_assert_option_some

                                                  source ·
                                                  macro_rules! debug_assert_option_some {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_option_some to debug_assert_some because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert expression is Some(_).

                                                  This macro provides the same statements as assert_option_some, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_option_some_eq.html b/doc/lib/macro.debug_assert_option_some_eq.html index 5f6fb2bac..5cb434e3b 100644 --- a/doc/lib/macro.debug_assert_option_some_eq.html +++ b/doc/lib/macro.debug_assert_option_some_eq.html @@ -1,6 +1,6 @@ -debug_assert_option_some_eq in lib - Rust

                                                  Macro lib::debug_assert_option_some_eq

                                                  source ·
                                                  macro_rules! debug_assert_option_some_eq {
                                                  +debug_assert_option_some_eq in lib - Rust

                                                  Macro lib::debug_assert_option_some_eq

                                                  source ·
                                                  macro_rules! debug_assert_option_some_eq {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert two expressions are Some(_) and their values are equal.

                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_option_some_eq to debug_assert_some_eq because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert two expressions are Some(_) and their values are equal.

                                                  This macro provides the same statements as assert_option_some_eq, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_option_some_ne.html b/doc/lib/macro.debug_assert_option_some_ne.html index 0c55886d8..0b8caca32 100644 --- a/doc/lib/macro.debug_assert_option_some_ne.html +++ b/doc/lib/macro.debug_assert_option_some_ne.html @@ -1,6 +1,6 @@ -debug_assert_option_some_ne in lib - Rust

                                                  Macro lib::debug_assert_option_some_ne

                                                  source ·
                                                  macro_rules! debug_assert_option_some_ne {
                                                  +debug_assert_option_some_ne in lib - Rust

                                                  Macro lib::debug_assert_option_some_ne

                                                  source ·
                                                  macro_rules! debug_assert_option_some_ne {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert two expressions are Some(_) and their values are not equal.

                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_option_some_ne to debug_assert_some_ne because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert two expressions are Some(_) and their values are not equal.

                                                  This macro provides the same statements as assert_option_some_ne, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_pending!.html b/doc/lib/macro.debug_assert_pending!.html new file mode 100644 index 000000000..471508fe5 --- /dev/null +++ b/doc/lib/macro.debug_assert_pending!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_pending.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_pending.html b/doc/lib/macro.debug_assert_pending.html new file mode 100644 index 000000000..1909c512a --- /dev/null +++ b/doc/lib/macro.debug_assert_pending.html @@ -0,0 +1,25 @@ +debug_assert_pending in lib - Rust

                                                  Macro lib::debug_assert_pending

                                                  source ·
                                                  macro_rules! debug_assert_pending {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert an expression is Pending.

                                                  +

                                                  This macro provides the same statements as assert_pending, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_poll_pending.html b/doc/lib/macro.debug_assert_poll_pending.html index 444f5d878..2ea31a62a 100644 --- a/doc/lib/macro.debug_assert_poll_pending.html +++ b/doc/lib/macro.debug_assert_poll_pending.html @@ -1,6 +1,6 @@ -debug_assert_poll_pending in lib - Rust

                                                  Macro lib::debug_assert_poll_pending

                                                  source ·
                                                  macro_rules! debug_assert_poll_pending {
                                                  +debug_assert_poll_pending in lib - Rust

                                                  Macro lib::debug_assert_poll_pending

                                                  source ·
                                                  macro_rules! debug_assert_poll_pending {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert an expression is Pending.

                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_poll_pending to debug_assert_pending because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert an expression is Pending.

                                                  This macro provides the same statements as assert_poll_pending, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_poll_ready.html b/doc/lib/macro.debug_assert_poll_ready.html index 9443b020b..d1ff5135d 100644 --- a/doc/lib/macro.debug_assert_poll_ready.html +++ b/doc/lib/macro.debug_assert_poll_ready.html @@ -1,6 +1,6 @@ -debug_assert_poll_ready in lib - Rust

                                                  Macro lib::debug_assert_poll_ready

                                                  source ·
                                                  macro_rules! debug_assert_poll_ready {
                                                  +debug_assert_poll_ready in lib - Rust

                                                  Macro lib::debug_assert_poll_ready

                                                  source ·
                                                  macro_rules! debug_assert_poll_ready {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert poll.is_ready() is true.

                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_poll_ready to debug_assert_ready because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert poll.is_ready() is true.

                                                  This macro provides the same statements as assert_poll_ready, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_poll_ready_eq.html b/doc/lib/macro.debug_assert_poll_ready_eq.html index 15fcf032c..edc2a202f 100644 --- a/doc/lib/macro.debug_assert_poll_ready_eq.html +++ b/doc/lib/macro.debug_assert_poll_ready_eq.html @@ -1,6 +1,6 @@ -debug_assert_poll_ready_eq in lib - Rust

                                                  Macro lib::debug_assert_poll_ready_eq

                                                  source ·
                                                  macro_rules! debug_assert_poll_ready_eq {
                                                  +debug_assert_poll_ready_eq in lib - Rust

                                                  Macro lib::debug_assert_poll_ready_eq

                                                  source ·
                                                  macro_rules! debug_assert_poll_ready_eq {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert two expressions are Ready(_) and their values are equal.

                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_poll_ready_eq to debug_assert_ready_eq because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert two expressions are Ready(_) and their values are equal.

                                                  This macro provides the same statements as assert_poll_ready_eq, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_poll_ready_ne.html b/doc/lib/macro.debug_assert_poll_ready_ne.html index ea930436e..afcb74dcf 100644 --- a/doc/lib/macro.debug_assert_poll_ready_ne.html +++ b/doc/lib/macro.debug_assert_poll_ready_ne.html @@ -1,4 +1,4 @@ -debug_assert_poll_ready_ne in lib - Rust

                                                  Macro lib::debug_assert_poll_ready_ne

                                                  source ·
                                                  macro_rules! debug_assert_poll_ready_ne {
                                                  +debug_assert_poll_ready_ne in lib - Rust

                                                  Macro lib::debug_assert_poll_ready_ne

                                                  source ·
                                                  macro_rules! debug_assert_poll_ready_ne {
                                                       ($($arg:tt)*) => { ... };
                                                   }
                                                  Expand description

                                                  Assert two expressions are Ready(_) and their values are not equal.

                                                  This macro provides the same statements as assert_poll_ready_ne, diff --git a/doc/lib/macro.debug_assert_ready!.html b/doc/lib/macro.debug_assert_ready!.html new file mode 100644 index 000000000..aed118b33 --- /dev/null +++ b/doc/lib/macro.debug_assert_ready!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_ready.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ready.html b/doc/lib/macro.debug_assert_ready.html new file mode 100644 index 000000000..4a1cae0e8 --- /dev/null +++ b/doc/lib/macro.debug_assert_ready.html @@ -0,0 +1,25 @@ +debug_assert_ready in lib - Rust

                                                  Macro lib::debug_assert_ready

                                                  source ·
                                                  macro_rules! debug_assert_ready {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert poll.is_ready() is true.

                                                  +

                                                  This macro provides the same statements as assert_ready, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ready_eq!.html b/doc/lib/macro.debug_assert_ready_eq!.html new file mode 100644 index 000000000..d59ddf551 --- /dev/null +++ b/doc/lib/macro.debug_assert_ready_eq!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_ready_eq.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ready_eq.html b/doc/lib/macro.debug_assert_ready_eq.html new file mode 100644 index 000000000..4ded09e6c --- /dev/null +++ b/doc/lib/macro.debug_assert_ready_eq.html @@ -0,0 +1,25 @@ +debug_assert_ready_eq in lib - Rust

                                                  Macro lib::debug_assert_ready_eq

                                                  source ·
                                                  macro_rules! debug_assert_ready_eq {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert two expressions are Ready(_) and their values are equal.

                                                  +

                                                  This macro provides the same statements as assert_ready_eq, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ready_ne!.html b/doc/lib/macro.debug_assert_ready_ne!.html new file mode 100644 index 000000000..208b60b40 --- /dev/null +++ b/doc/lib/macro.debug_assert_ready_ne!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_ready_ne.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_ready_ne.html b/doc/lib/macro.debug_assert_ready_ne.html new file mode 100644 index 000000000..9875f766a --- /dev/null +++ b/doc/lib/macro.debug_assert_ready_ne.html @@ -0,0 +1,25 @@ +debug_assert_ready_ne in lib - Rust

                                                  Macro lib::debug_assert_ready_ne

                                                  source ·
                                                  macro_rules! debug_assert_ready_ne {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert two expressions are Ready(_) and their values are not equal.

                                                  +

                                                  This macro provides the same statements as assert_ready_ne, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_result_err.html b/doc/lib/macro.debug_assert_result_err.html index cff101f43..3e3171878 100644 --- a/doc/lib/macro.debug_assert_result_err.html +++ b/doc/lib/macro.debug_assert_result_err.html @@ -1,6 +1,6 @@ -debug_assert_result_err in lib - Rust

                                                  Macro lib::debug_assert_result_err

                                                  source ·
                                                  macro_rules! debug_assert_result_err {
                                                  +debug_assert_result_err in lib - Rust

                                                  Macro lib::debug_assert_result_err

                                                  source ·
                                                  macro_rules! debug_assert_result_err {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert expression is Err(_).

                                                  +}
                                                  👎Deprecated: Please rename from deubg_assert_result_err to debug_assert_err because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert expression is Err(_).

                                                  This macro provides the same statements as assert_result_err, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_result_ok.html b/doc/lib/macro.debug_assert_result_ok.html index 5a2d198fd..4df9cb305 100644 --- a/doc/lib/macro.debug_assert_result_ok.html +++ b/doc/lib/macro.debug_assert_result_ok.html @@ -1,6 +1,6 @@ -debug_assert_result_ok in lib - Rust

                                                  Macro lib::debug_assert_result_ok

                                                  source ·
                                                  macro_rules! debug_assert_result_ok {
                                                  +debug_assert_result_ok in lib - Rust

                                                  Macro lib::debug_assert_result_ok

                                                  source ·
                                                  macro_rules! debug_assert_result_ok {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert expression is Ok(_).

                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_result_ok to debug_assert_ok because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert expression is Ok(_).

                                                  This macro provides the same statements as assert_result_ok, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_result_ok_eq.html b/doc/lib/macro.debug_assert_result_ok_eq.html index c7e38e019..eeaed121d 100644 --- a/doc/lib/macro.debug_assert_result_ok_eq.html +++ b/doc/lib/macro.debug_assert_result_ok_eq.html @@ -1,6 +1,6 @@ -debug_assert_result_ok_eq in lib - Rust

                                                  Macro lib::debug_assert_result_ok_eq

                                                  source ·
                                                  macro_rules! debug_assert_result_ok_eq {
                                                  +debug_assert_result_ok_eq in lib - Rust

                                                  Macro lib::debug_assert_result_ok_eq

                                                  source ·
                                                  macro_rules! debug_assert_result_ok_eq {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert two expressions are Ok(_) and their values are equal.

                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_result_ok_eq to debug_assert_result_ok_eq because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert two expressions are Ok(_) and their values are equal.

                                                  This macro provides the same statements as assert_result_ok_eq, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_result_ok_ne.html b/doc/lib/macro.debug_assert_result_ok_ne.html index 4f15234c0..f80c5fd52 100644 --- a/doc/lib/macro.debug_assert_result_ok_ne.html +++ b/doc/lib/macro.debug_assert_result_ok_ne.html @@ -1,6 +1,6 @@ -debug_assert_result_ok_ne in lib - Rust

                                                  Macro lib::debug_assert_result_ok_ne

                                                  source ·
                                                  macro_rules! debug_assert_result_ok_ne {
                                                  +debug_assert_result_ok_ne in lib - Rust

                                                  Macro lib::debug_assert_result_ok_ne

                                                  source ·
                                                  macro_rules! debug_assert_result_ok_ne {
                                                       ($($arg:tt)*) => { ... };
                                                  -}
                                                  Expand description

                                                  Assert two expressions are Ok(_) and their values are not equal.

                                                  +}
                                                  👎Deprecated: Please rename from debug_assert_result_ok_ne to debug_result_ok_ne because more developers prefer the shorter name.
                                                  Expand description

                                                  Assert two expressions are Ok(_) and their values are not equal.

                                                  This macro provides the same statements as assert_result_ok_ne, except this macro’s statements are only enabled in non-optimized builds by default. An optimized build will not execute this macro’s diff --git a/doc/lib/macro.debug_assert_some!.html b/doc/lib/macro.debug_assert_some!.html new file mode 100644 index 000000000..0ab689ca1 --- /dev/null +++ b/doc/lib/macro.debug_assert_some!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_some.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_some.html b/doc/lib/macro.debug_assert_some.html new file mode 100644 index 000000000..80592de39 --- /dev/null +++ b/doc/lib/macro.debug_assert_some.html @@ -0,0 +1,25 @@ +debug_assert_some in lib - Rust

                                                  Macro lib::debug_assert_some

                                                  source ·
                                                  macro_rules! debug_assert_some {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert expression is Some(_).

                                                  +

                                                  This macro provides the same statements as assert_some, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_some_eq!.html b/doc/lib/macro.debug_assert_some_eq!.html new file mode 100644 index 000000000..fedb992c6 --- /dev/null +++ b/doc/lib/macro.debug_assert_some_eq!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_some_eq.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_some_eq.html b/doc/lib/macro.debug_assert_some_eq.html new file mode 100644 index 000000000..3cb9dbf8e --- /dev/null +++ b/doc/lib/macro.debug_assert_some_eq.html @@ -0,0 +1,25 @@ +debug_assert_some_eq in lib - Rust

                                                  Macro lib::debug_assert_some_eq

                                                  source ·
                                                  macro_rules! debug_assert_some_eq {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert two expressions are Some(_) and their values are equal.

                                                  +

                                                  This macro provides the same statements as assert_some_eq, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_some_ne!.html b/doc/lib/macro.debug_assert_some_ne!.html new file mode 100644 index 000000000..d27909433 --- /dev/null +++ b/doc/lib/macro.debug_assert_some_ne!.html @@ -0,0 +1,11 @@ + + + + + Redirection + + +

                                                  Redirecting to macro.debug_assert_some_ne.html...

                                                  + + + \ No newline at end of file diff --git a/doc/lib/macro.debug_assert_some_ne.html b/doc/lib/macro.debug_assert_some_ne.html new file mode 100644 index 000000000..b3f2b49b8 --- /dev/null +++ b/doc/lib/macro.debug_assert_some_ne.html @@ -0,0 +1,25 @@ +debug_assert_some_ne in lib - Rust

                                                  Macro lib::debug_assert_some_ne

                                                  source ·
                                                  macro_rules! debug_assert_some_ne {
                                                  +    ($($arg:tt)*) => { ... };
                                                  +}
                                                  Expand description

                                                  Assert two expressions are Some(_) and their values are not equal.

                                                  +

                                                  This macro provides the same statements as assert_some_ne, +except this macro’s statements are only enabled in non-optimized +builds by default. An optimized build will not execute this macro’s +statements unless -C debug-assertions is passed to the compiler.

                                                  +

                                                  This macro is useful for checks that are too expensive to be present +in a release build but may be helpful during development.

                                                  +

                                                  The result of expanding this macro is always type checked.

                                                  +

                                                  An unchecked assertion allows a program in an inconsistent state to +keep running, which might have unexpected consequences but does not +introduce unsafety as long as this only happens in safe code. The +performance cost of assertions, however, is not measurable in general. +Replacing assert*! with debug_assert*! is thus only encouraged +after thorough profiling, and more importantly, only in safe code!

                                                  +

                                                  This macro is intended to work in a similar way to +std::debug_assert.

                                                  +

                                                  §Module macros

                                                  + +
                                                  \ No newline at end of file diff --git a/doc/lib/sidebar-items.js b/doc/lib/sidebar-items.js index 0f5d7d067..90594fdf4 100644 --- a/doc/lib/sidebar-items.js +++ b/doc/lib/sidebar-items.js @@ -1 +1 @@ -window.SIDEBAR_ITEMS = {"macro":["assert_as_result","assert_bag_eq","assert_bag_eq_as_result","assert_bag_impl_prep","assert_bag_ne","assert_bag_ne_as_result","assert_bag_subbag","assert_bag_subbag_as_result","assert_bag_superbag","assert_bag_superbag_as_result","assert_command_stderr_contains","assert_command_stderr_contains_as_result","assert_command_stderr_eq","assert_command_stderr_eq_as_result","assert_command_stderr_eq_expr","assert_command_stderr_eq_expr_as_result","assert_command_stderr_is_match","assert_command_stderr_is_match_as_result","assert_command_stdout_contains","assert_command_stdout_contains_as_result","assert_command_stdout_eq","assert_command_stdout_eq_as_result","assert_command_stdout_eq_expr","assert_command_stdout_eq_expr_as_result","assert_command_stdout_is_match","assert_command_stdout_is_match_as_result","assert_contains","assert_contains_as_result","assert_ends_with","assert_ends_with_as_result","assert_eq_as_result","assert_fn_eq","assert_fn_eq_as_result","assert_fn_eq_expr","assert_fn_eq_expr_as_result","assert_fn_err_eq","assert_fn_err_eq_as_result","assert_fn_err_eq_expr","assert_fn_err_eq_expr_as_result","assert_fn_err_ge","assert_fn_err_ge_as_result","assert_fn_err_ge_expr","assert_fn_err_ge_expr_as_result","assert_fn_err_gt","assert_fn_err_gt_as_result","assert_fn_err_gt_expr","assert_fn_err_gt_expr_as_result","assert_fn_err_le","assert_fn_err_le_as_result","assert_fn_err_le_expr","assert_fn_err_le_expr_as_result","assert_fn_err_lt","assert_fn_err_lt_as_result","assert_fn_err_lt_expr","assert_fn_err_lt_expr_as_result","assert_fn_err_ne","assert_fn_err_ne_as_result","assert_fn_err_ne_expr","assert_fn_err_ne_expr_as_result","assert_fn_ge","assert_fn_ge_as_result","assert_fn_ge_expr","assert_fn_ge_expr_as_result","assert_fn_gt","assert_fn_gt_as_result","assert_fn_gt_expr","assert_fn_gt_expr_as_result","assert_fn_le","assert_fn_le_as_result","assert_fn_le_expr","assert_fn_le_expr_as_result","assert_fn_lt","assert_fn_lt_as_result","assert_fn_lt_expr","assert_fn_lt_expr_as_result","assert_fn_ne","assert_fn_ne_as_result","assert_fn_ne_expr","assert_fn_ne_expr_as_result","assert_fn_ok_eq","assert_fn_ok_eq_as_result","assert_fn_ok_eq_expr","assert_fn_ok_eq_expr_as_result","assert_fn_ok_ge","assert_fn_ok_ge_as_result","assert_fn_ok_ge_expr","assert_fn_ok_ge_expr_as_result","assert_fn_ok_gt","assert_fn_ok_gt_as_result","assert_fn_ok_gt_expr","assert_fn_ok_gt_expr_as_result","assert_fn_ok_le","assert_fn_ok_le_as_result","assert_fn_ok_le_expr","assert_fn_ok_le_expr_as_result","assert_fn_ok_lt","assert_fn_ok_lt_as_result","assert_fn_ok_lt_expr","assert_fn_ok_lt_expr_as_result","assert_fn_ok_ne","assert_fn_ok_ne_as_result","assert_fn_ok_ne_expr","assert_fn_ok_ne_expr_as_result","assert_fs_read_to_string_contains","assert_fs_read_to_string_contains_as_result","assert_fs_read_to_string_eq","assert_fs_read_to_string_eq_as_result","assert_fs_read_to_string_eq_expr","assert_fs_read_to_string_eq_expr_as_result","assert_fs_read_to_string_ge","assert_fs_read_to_string_ge_as_result","assert_fs_read_to_string_ge_expr","assert_fs_read_to_string_ge_expr_as_result","assert_fs_read_to_string_gt","assert_fs_read_to_string_gt_as_result","assert_fs_read_to_string_gt_expr","assert_fs_read_to_string_gt_expr_as_result","assert_fs_read_to_string_le","assert_fs_read_to_string_le_as_result","assert_fs_read_to_string_le_expr","assert_fs_read_to_string_le_expr_as_result","assert_fs_read_to_string_lt","assert_fs_read_to_string_lt_as_result","assert_fs_read_to_string_lt_expr","assert_fs_read_to_string_lt_expr_as_result","assert_fs_read_to_string_matches","assert_fs_read_to_string_matches_as_result","assert_fs_read_to_string_ne","assert_fs_read_to_string_ne_as_result","assert_fs_read_to_string_ne_expr","assert_fs_read_to_string_ne_expr_as_result","assert_ge","assert_ge_as_result","assert_gt","assert_gt_as_result","assert_in_delta","assert_in_delta_as_result","assert_in_epsilon","assert_in_epsilon_as_result","assert_infix","assert_infix_as_result","assert_io_read_to_string_contains","assert_io_read_to_string_contains_as_result","assert_io_read_to_string_eq","assert_io_read_to_string_eq_as_result","assert_io_read_to_string_eq_expr","assert_io_read_to_string_eq_expr_as_result","assert_io_read_to_string_ge","assert_io_read_to_string_ge_as_result","assert_io_read_to_string_ge_expr","assert_io_read_to_string_ge_expr_as_result","assert_io_read_to_string_gt","assert_io_read_to_string_gt_as_result","assert_io_read_to_string_gt_expr","assert_io_read_to_string_gt_expr_as_result","assert_io_read_to_string_le","assert_io_read_to_string_le_as_result","assert_io_read_to_string_le_expr","assert_io_read_to_string_le_expr_as_result","assert_io_read_to_string_lt","assert_io_read_to_string_lt_as_result","assert_io_read_to_string_lt_expr","assert_io_read_to_string_lt_expr_as_result","assert_io_read_to_string_matches","assert_io_read_to_string_matches_as_result","assert_io_read_to_string_ne","assert_io_read_to_string_ne_as_result","assert_io_read_to_string_ne_expr","assert_io_read_to_string_ne_expr_as_result","assert_is_match","assert_is_match_as_result","assert_le","assert_le_as_result","assert_lt","assert_lt_as_result","assert_ne_as_result","assert_not_contains","assert_not_contains_as_result","assert_not_ends_with","assert_not_ends_with_as_result","assert_not_match","assert_not_match_as_result","assert_not_starts_with","assert_not_starts_with_as_result","assert_option_none","assert_option_none_as_result","assert_option_some","assert_option_some_as_result","assert_option_some_eq","assert_option_some_eq_as_result","assert_option_some_ne","assert_option_some_ne_as_result","assert_poll_pending","assert_poll_pending_as_result","assert_poll_ready","assert_poll_ready_as_result","assert_poll_ready_eq","assert_poll_ready_eq_as_result","assert_poll_ready_ne","assert_poll_ready_ne_as_result","assert_program_args_impl_prep","assert_program_args_stderr_contains","assert_program_args_stderr_contains_as_result","assert_program_args_stderr_eq","assert_program_args_stderr_eq_as_result","assert_program_args_stderr_eq_expr","assert_program_args_stderr_eq_expr_as_result","assert_program_args_stderr_ge","assert_program_args_stderr_ge_as_result","assert_program_args_stderr_ge_expr","assert_program_args_stderr_ge_expr_as_result","assert_program_args_stderr_gt","assert_program_args_stderr_gt_as_result","assert_program_args_stderr_gt_expr","assert_program_args_stderr_gt_expr_as_result","assert_program_args_stderr_is_match","assert_program_args_stderr_is_match_as_result","assert_program_args_stderr_le","assert_program_args_stderr_le_as_result","assert_program_args_stderr_le_expr","assert_program_args_stderr_le_expr_as_result","assert_program_args_stderr_lt","assert_program_args_stderr_lt_as_result","assert_program_args_stderr_lt_expr","assert_program_args_stderr_lt_expr_as_result","assert_program_args_stderr_ne","assert_program_args_stderr_ne_as_result","assert_program_args_stderr_ne_expr","assert_program_args_stderr_ne_expr_as_result","assert_program_args_stdout_contains","assert_program_args_stdout_contains_as_result","assert_program_args_stdout_eq","assert_program_args_stdout_eq_as_result","assert_program_args_stdout_eq_expr","assert_program_args_stdout_eq_expr_as_result","assert_program_args_stdout_ge","assert_program_args_stdout_ge_as_result","assert_program_args_stdout_ge_expr","assert_program_args_stdout_ge_expr_as_result","assert_program_args_stdout_gt","assert_program_args_stdout_gt_as_result","assert_program_args_stdout_gt_expr","assert_program_args_stdout_gt_expr_as_result","assert_program_args_stdout_is_match","assert_program_args_stdout_is_match_as_result","assert_program_args_stdout_le","assert_program_args_stdout_le_as_result","assert_program_args_stdout_le_expr","assert_program_args_stdout_le_expr_as_result","assert_program_args_stdout_lt","assert_program_args_stdout_lt_as_result","assert_program_args_stdout_lt_expr","assert_program_args_stdout_lt_expr_as_result","assert_program_args_stdout_ne","assert_program_args_stdout_ne_as_result","assert_program_args_stdout_ne_expr","assert_program_args_stdout_ne_expr_as_result","assert_result_err","assert_result_err_as_result","assert_result_ok","assert_result_ok_as_result","assert_result_ok_eq","assert_result_ok_eq_as_result","assert_result_ok_ne","assert_result_ok_ne_as_result","assert_set_disjoint","assert_set_disjoint_as_result","assert_set_eq","assert_set_eq_as_result","assert_set_impl_prep","assert_set_joint","assert_set_joint_as_result","assert_set_ne","assert_set_ne_as_result","assert_set_subset","assert_set_subset_as_result","assert_set_superset","assert_set_superset_as_result","assert_starts_with","assert_starts_with_as_result","debug_assert_bag_eq","debug_assert_bag_ne","debug_assert_bag_subbag","debug_assert_bag_superbag","debug_assert_command_stderr_contains","debug_assert_command_stderr_eq","debug_assert_command_stderr_eq_expr","debug_assert_command_stderr_is_match","debug_assert_command_stdout_contains","debug_assert_command_stdout_eq","debug_assert_command_stdout_eq_expr","debug_assert_command_stdout_is_match","debug_assert_contains","debug_assert_ends_with","debug_assert_fn_eq","debug_assert_fn_eq_expr","debug_assert_fn_err_eq","debug_assert_fn_err_eq_expr","debug_assert_fn_err_ge","debug_assert_fn_err_ge_expr","debug_assert_fn_err_gt","debug_assert_fn_err_gt_expr","debug_assert_fn_err_le","debug_assert_fn_err_le_expr","debug_assert_fn_err_lt","debug_assert_fn_err_lt_expr","debug_assert_fn_err_ne","debug_assert_fn_err_ne_expr","debug_assert_fn_ge","debug_assert_fn_ge_expr","debug_assert_fn_gt","debug_assert_fn_gt_expr","debug_assert_fn_le","debug_assert_fn_le_expr","debug_assert_fn_lt","debug_assert_fn_lt_expr","debug_assert_fn_ne","debug_assert_fn_ne_expr","debug_assert_fn_ok_eq","debug_assert_fn_ok_eq_expr","debug_assert_fn_ok_ge","debug_assert_fn_ok_ge_expr","debug_assert_fn_ok_gt","debug_assert_fn_ok_gt_expr","debug_assert_fn_ok_le","debug_assert_fn_ok_le_expr","debug_assert_fn_ok_lt","debug_assert_fn_ok_lt_expr","debug_assert_fn_ok_ne","debug_assert_fn_ok_ne_expr","debug_assert_fs_read_to_string_contains","debug_assert_fs_read_to_string_eq","debug_assert_fs_read_to_string_eq_expr","debug_assert_fs_read_to_string_ge","debug_assert_fs_read_to_string_ge_expr","debug_assert_fs_read_to_string_gt","debug_assert_fs_read_to_string_gt_expr","debug_assert_fs_read_to_string_le","debug_assert_fs_read_to_string_le_expr","debug_assert_fs_read_to_string_lt","debug_assert_fs_read_to_string_lt_expr","debug_assert_fs_read_to_string_matches","debug_assert_fs_read_to_string_ne","debug_assert_fs_read_to_string_ne_expr","debug_assert_ge","debug_assert_gt","debug_assert_in_delta","debug_assert_in_epsilon","debug_assert_infix","debug_assert_io_read_to_string_contains","debug_assert_io_read_to_string_eq","debug_assert_io_read_to_string_eq_expr","debug_assert_io_read_to_string_ge","debug_assert_io_read_to_string_ge_expr","debug_assert_io_read_to_string_gt","debug_assert_io_read_to_string_gt_expr","debug_assert_io_read_to_string_le","debug_assert_io_read_to_string_le_expr","debug_assert_io_read_to_string_lt","debug_assert_io_read_to_string_lt_expr","debug_assert_io_read_to_string_matches","debug_assert_io_read_to_string_ne","debug_assert_io_read_to_string_ne_expr","debug_assert_is_match","debug_assert_le","debug_assert_lt","debug_assert_not_contains","debug_assert_not_ends_with","debug_assert_not_match","debug_assert_not_starts_with","debug_assert_option_none","debug_assert_option_some","debug_assert_option_some_eq","debug_assert_option_some_ne","debug_assert_poll_pending","debug_assert_poll_ready","debug_assert_poll_ready_eq","debug_assert_poll_ready_ne","debug_assert_program_args_stderr_contains","debug_assert_program_args_stderr_eq","debug_assert_program_args_stderr_eq_expr","debug_assert_program_args_stderr_ge","debug_assert_program_args_stderr_ge_expr","debug_assert_program_args_stderr_gt","debug_assert_program_args_stderr_gt_expr","debug_assert_program_args_stderr_is_match","debug_assert_program_args_stderr_le","debug_assert_program_args_stderr_le_expr","debug_assert_program_args_stderr_lt","debug_assert_program_args_stderr_lt_expr","debug_assert_program_args_stderr_ne","debug_assert_program_args_stderr_ne_expr","debug_assert_program_args_stdout_contains","debug_assert_program_args_stdout_eq","debug_assert_program_args_stdout_eq_expr","debug_assert_program_args_stdout_ge","debug_assert_program_args_stdout_ge_expr","debug_assert_program_args_stdout_gt","debug_assert_program_args_stdout_gt_expr","debug_assert_program_args_stdout_is_match","debug_assert_program_args_stdout_le","debug_assert_program_args_stdout_le_expr","debug_assert_program_args_stdout_lt","debug_assert_program_args_stdout_lt_expr","debug_assert_program_args_stdout_ne","debug_assert_program_args_stdout_ne_expr","debug_assert_result_err","debug_assert_result_ok","debug_assert_result_ok_eq","debug_assert_result_ok_ne","debug_assert_set_disjoint","debug_assert_set_eq","debug_assert_set_joint","debug_assert_set_ne","debug_assert_set_subset","debug_assert_set_superset","debug_assert_starts_with"],"mod":["assert","assert_bag","assert_command","assert_contains","assert_ends_with","assert_eq","assert_fn","assert_fn_err","assert_fn_ok","assert_fs_read_to_string","assert_ge","assert_gt","assert_in_delta","assert_in_epsilon","assert_infix","assert_io_read_to_string","assert_is_match","assert_le","assert_lt","assert_ne","assert_not_contains","assert_not_ends_with","assert_not_match","assert_not_starts_with","assert_option","assert_poll","assert_program_args","assert_result","assert_set","assert_starts_with"]}; \ No newline at end of file +window.SIDEBAR_ITEMS = {"macro":["assert_as_result","assert_bag_eq","assert_bag_eq_as_result","assert_bag_impl_prep","assert_bag_ne","assert_bag_ne_as_result","assert_bag_subbag","assert_bag_subbag_as_result","assert_bag_superbag","assert_bag_superbag_as_result","assert_command_stderr_contains","assert_command_stderr_contains_as_result","assert_command_stderr_eq","assert_command_stderr_eq_as_result","assert_command_stderr_eq_expr","assert_command_stderr_eq_expr_as_result","assert_command_stderr_is_match","assert_command_stderr_is_match_as_result","assert_command_stdout_contains","assert_command_stdout_contains_as_result","assert_command_stdout_eq","assert_command_stdout_eq_as_result","assert_command_stdout_eq_expr","assert_command_stdout_eq_expr_as_result","assert_command_stdout_is_match","assert_command_stdout_is_match_as_result","assert_contains","assert_contains_as_result","assert_ends_with","assert_ends_with_as_result","assert_eq_as_result","assert_err","assert_err_as_result","assert_fn_eq","assert_fn_eq_as_result","assert_fn_eq_expr","assert_fn_eq_expr_as_result","assert_fn_err_eq","assert_fn_err_eq_as_result","assert_fn_err_eq_expr","assert_fn_err_eq_expr_as_result","assert_fn_err_ge","assert_fn_err_ge_as_result","assert_fn_err_ge_expr","assert_fn_err_ge_expr_as_result","assert_fn_err_gt","assert_fn_err_gt_as_result","assert_fn_err_gt_expr","assert_fn_err_gt_expr_as_result","assert_fn_err_le","assert_fn_err_le_as_result","assert_fn_err_le_expr","assert_fn_err_le_expr_as_result","assert_fn_err_lt","assert_fn_err_lt_as_result","assert_fn_err_lt_expr","assert_fn_err_lt_expr_as_result","assert_fn_err_ne","assert_fn_err_ne_as_result","assert_fn_err_ne_expr","assert_fn_err_ne_expr_as_result","assert_fn_ge","assert_fn_ge_as_result","assert_fn_ge_expr","assert_fn_ge_expr_as_result","assert_fn_gt","assert_fn_gt_as_result","assert_fn_gt_expr","assert_fn_gt_expr_as_result","assert_fn_le","assert_fn_le_as_result","assert_fn_le_expr","assert_fn_le_expr_as_result","assert_fn_lt","assert_fn_lt_as_result","assert_fn_lt_expr","assert_fn_lt_expr_as_result","assert_fn_ne","assert_fn_ne_as_result","assert_fn_ne_expr","assert_fn_ne_expr_as_result","assert_fn_ok_eq","assert_fn_ok_eq_as_result","assert_fn_ok_eq_expr","assert_fn_ok_eq_expr_as_result","assert_fn_ok_ge","assert_fn_ok_ge_as_result","assert_fn_ok_ge_expr","assert_fn_ok_ge_expr_as_result","assert_fn_ok_gt","assert_fn_ok_gt_as_result","assert_fn_ok_gt_expr","assert_fn_ok_gt_expr_as_result","assert_fn_ok_le","assert_fn_ok_le_as_result","assert_fn_ok_le_expr","assert_fn_ok_le_expr_as_result","assert_fn_ok_lt","assert_fn_ok_lt_as_result","assert_fn_ok_lt_expr","assert_fn_ok_lt_expr_as_result","assert_fn_ok_ne","assert_fn_ok_ne_as_result","assert_fn_ok_ne_expr","assert_fn_ok_ne_expr_as_result","assert_fs_read_to_string_contains","assert_fs_read_to_string_contains_as_result","assert_fs_read_to_string_eq","assert_fs_read_to_string_eq_as_result","assert_fs_read_to_string_eq_expr","assert_fs_read_to_string_eq_expr_as_result","assert_fs_read_to_string_ge","assert_fs_read_to_string_ge_as_result","assert_fs_read_to_string_ge_expr","assert_fs_read_to_string_ge_expr_as_result","assert_fs_read_to_string_gt","assert_fs_read_to_string_gt_as_result","assert_fs_read_to_string_gt_expr","assert_fs_read_to_string_gt_expr_as_result","assert_fs_read_to_string_le","assert_fs_read_to_string_le_as_result","assert_fs_read_to_string_le_expr","assert_fs_read_to_string_le_expr_as_result","assert_fs_read_to_string_lt","assert_fs_read_to_string_lt_as_result","assert_fs_read_to_string_lt_expr","assert_fs_read_to_string_lt_expr_as_result","assert_fs_read_to_string_matches","assert_fs_read_to_string_matches_as_result","assert_fs_read_to_string_ne","assert_fs_read_to_string_ne_as_result","assert_fs_read_to_string_ne_expr","assert_fs_read_to_string_ne_expr_as_result","assert_ge","assert_ge_as_result","assert_gt","assert_gt_as_result","assert_in_delta","assert_in_delta_as_result","assert_in_epsilon","assert_in_epsilon_as_result","assert_infix","assert_infix_as_result","assert_io_read_to_string_contains","assert_io_read_to_string_contains_as_result","assert_io_read_to_string_eq","assert_io_read_to_string_eq_as_result","assert_io_read_to_string_eq_expr","assert_io_read_to_string_eq_expr_as_result","assert_io_read_to_string_ge","assert_io_read_to_string_ge_as_result","assert_io_read_to_string_ge_expr","assert_io_read_to_string_ge_expr_as_result","assert_io_read_to_string_gt","assert_io_read_to_string_gt_as_result","assert_io_read_to_string_gt_expr","assert_io_read_to_string_gt_expr_as_result","assert_io_read_to_string_le","assert_io_read_to_string_le_as_result","assert_io_read_to_string_le_expr","assert_io_read_to_string_le_expr_as_result","assert_io_read_to_string_lt","assert_io_read_to_string_lt_as_result","assert_io_read_to_string_lt_expr","assert_io_read_to_string_lt_expr_as_result","assert_io_read_to_string_matches","assert_io_read_to_string_matches_as_result","assert_io_read_to_string_ne","assert_io_read_to_string_ne_as_result","assert_io_read_to_string_ne_expr","assert_io_read_to_string_ne_expr_as_result","assert_is_match","assert_is_match_as_result","assert_le","assert_le_as_result","assert_lt","assert_lt_as_result","assert_ne_as_result","assert_none","assert_none_as_result","assert_not_contains","assert_not_contains_as_result","assert_not_ends_with","assert_not_ends_with_as_result","assert_not_match","assert_not_match_as_result","assert_not_starts_with","assert_not_starts_with_as_result","assert_ok","assert_ok_as_result","assert_ok_eq","assert_ok_eq_as_result","assert_ok_ne","assert_ok_ne_as_result","assert_option_none","assert_option_none_as_result","assert_option_some","assert_option_some_as_result","assert_option_some_eq","assert_option_some_eq_as_result","assert_option_some_ne","assert_option_some_ne_as_result","assert_pending","assert_pending_as_result","assert_poll_pending","assert_poll_pending_as_result","assert_poll_ready","assert_poll_ready_as_result","assert_poll_ready_eq","assert_poll_ready_eq_as_result","assert_poll_ready_ne","assert_poll_ready_ne_as_result","assert_program_args_impl_prep","assert_program_args_stderr_contains","assert_program_args_stderr_contains_as_result","assert_program_args_stderr_eq","assert_program_args_stderr_eq_as_result","assert_program_args_stderr_eq_expr","assert_program_args_stderr_eq_expr_as_result","assert_program_args_stderr_ge","assert_program_args_stderr_ge_as_result","assert_program_args_stderr_ge_expr","assert_program_args_stderr_ge_expr_as_result","assert_program_args_stderr_gt","assert_program_args_stderr_gt_as_result","assert_program_args_stderr_gt_expr","assert_program_args_stderr_gt_expr_as_result","assert_program_args_stderr_is_match","assert_program_args_stderr_is_match_as_result","assert_program_args_stderr_le","assert_program_args_stderr_le_as_result","assert_program_args_stderr_le_expr","assert_program_args_stderr_le_expr_as_result","assert_program_args_stderr_lt","assert_program_args_stderr_lt_as_result","assert_program_args_stderr_lt_expr","assert_program_args_stderr_lt_expr_as_result","assert_program_args_stderr_ne","assert_program_args_stderr_ne_as_result","assert_program_args_stderr_ne_expr","assert_program_args_stderr_ne_expr_as_result","assert_program_args_stdout_contains","assert_program_args_stdout_contains_as_result","assert_program_args_stdout_eq","assert_program_args_stdout_eq_as_result","assert_program_args_stdout_eq_expr","assert_program_args_stdout_eq_expr_as_result","assert_program_args_stdout_ge","assert_program_args_stdout_ge_as_result","assert_program_args_stdout_ge_expr","assert_program_args_stdout_ge_expr_as_result","assert_program_args_stdout_gt","assert_program_args_stdout_gt_as_result","assert_program_args_stdout_gt_expr","assert_program_args_stdout_gt_expr_as_result","assert_program_args_stdout_is_match","assert_program_args_stdout_is_match_as_result","assert_program_args_stdout_le","assert_program_args_stdout_le_as_result","assert_program_args_stdout_le_expr","assert_program_args_stdout_le_expr_as_result","assert_program_args_stdout_lt","assert_program_args_stdout_lt_as_result","assert_program_args_stdout_lt_expr","assert_program_args_stdout_lt_expr_as_result","assert_program_args_stdout_ne","assert_program_args_stdout_ne_as_result","assert_program_args_stdout_ne_expr","assert_program_args_stdout_ne_expr_as_result","assert_ready","assert_ready_as_result","assert_ready_eq","assert_ready_eq_as_result","assert_ready_ne","assert_ready_ne_as_result","assert_result_err","assert_result_err_as_result","assert_result_ok","assert_result_ok_as_result","assert_result_ok_eq","assert_result_ok_eq_as_result","assert_result_ok_ne","assert_result_ok_ne_as_result","assert_set_disjoint","assert_set_disjoint_as_result","assert_set_eq","assert_set_eq_as_result","assert_set_impl_prep","assert_set_joint","assert_set_joint_as_result","assert_set_ne","assert_set_ne_as_result","assert_set_subset","assert_set_subset_as_result","assert_set_superset","assert_set_superset_as_result","assert_some","assert_some_as_result","assert_some_eq","assert_some_eq_as_result","assert_some_ne","assert_some_ne_as_result","assert_starts_with","assert_starts_with_as_result","debug_assert_bag_eq","debug_assert_bag_ne","debug_assert_bag_subbag","debug_assert_bag_superbag","debug_assert_command_stderr_contains","debug_assert_command_stderr_eq","debug_assert_command_stderr_eq_expr","debug_assert_command_stderr_is_match","debug_assert_command_stdout_contains","debug_assert_command_stdout_eq","debug_assert_command_stdout_eq_expr","debug_assert_command_stdout_is_match","debug_assert_contains","debug_assert_ends_with","debug_assert_err","debug_assert_fn_eq","debug_assert_fn_eq_expr","debug_assert_fn_err_eq","debug_assert_fn_err_eq_expr","debug_assert_fn_err_ge","debug_assert_fn_err_ge_expr","debug_assert_fn_err_gt","debug_assert_fn_err_gt_expr","debug_assert_fn_err_le","debug_assert_fn_err_le_expr","debug_assert_fn_err_lt","debug_assert_fn_err_lt_expr","debug_assert_fn_err_ne","debug_assert_fn_err_ne_expr","debug_assert_fn_ge","debug_assert_fn_ge_expr","debug_assert_fn_gt","debug_assert_fn_gt_expr","debug_assert_fn_le","debug_assert_fn_le_expr","debug_assert_fn_lt","debug_assert_fn_lt_expr","debug_assert_fn_ne","debug_assert_fn_ne_expr","debug_assert_fn_ok_eq","debug_assert_fn_ok_eq_expr","debug_assert_fn_ok_ge","debug_assert_fn_ok_ge_expr","debug_assert_fn_ok_gt","debug_assert_fn_ok_gt_expr","debug_assert_fn_ok_le","debug_assert_fn_ok_le_expr","debug_assert_fn_ok_lt","debug_assert_fn_ok_lt_expr","debug_assert_fn_ok_ne","debug_assert_fn_ok_ne_expr","debug_assert_fs_read_to_string_contains","debug_assert_fs_read_to_string_eq","debug_assert_fs_read_to_string_eq_expr","debug_assert_fs_read_to_string_ge","debug_assert_fs_read_to_string_ge_expr","debug_assert_fs_read_to_string_gt","debug_assert_fs_read_to_string_gt_expr","debug_assert_fs_read_to_string_le","debug_assert_fs_read_to_string_le_expr","debug_assert_fs_read_to_string_lt","debug_assert_fs_read_to_string_lt_expr","debug_assert_fs_read_to_string_matches","debug_assert_fs_read_to_string_ne","debug_assert_fs_read_to_string_ne_expr","debug_assert_ge","debug_assert_gt","debug_assert_in_delta","debug_assert_in_epsilon","debug_assert_infix","debug_assert_io_read_to_string_contains","debug_assert_io_read_to_string_eq","debug_assert_io_read_to_string_eq_expr","debug_assert_io_read_to_string_ge","debug_assert_io_read_to_string_ge_expr","debug_assert_io_read_to_string_gt","debug_assert_io_read_to_string_gt_expr","debug_assert_io_read_to_string_le","debug_assert_io_read_to_string_le_expr","debug_assert_io_read_to_string_lt","debug_assert_io_read_to_string_lt_expr","debug_assert_io_read_to_string_matches","debug_assert_io_read_to_string_ne","debug_assert_io_read_to_string_ne_expr","debug_assert_is_match","debug_assert_le","debug_assert_lt","debug_assert_none","debug_assert_not_contains","debug_assert_not_ends_with","debug_assert_not_match","debug_assert_not_starts_with","debug_assert_ok","debug_assert_ok_eq","debug_assert_ok_ne","debug_assert_option_none","debug_assert_option_some","debug_assert_option_some_eq","debug_assert_option_some_ne","debug_assert_pending","debug_assert_poll_pending","debug_assert_poll_ready","debug_assert_poll_ready_eq","debug_assert_poll_ready_ne","debug_assert_program_args_stderr_contains","debug_assert_program_args_stderr_eq","debug_assert_program_args_stderr_eq_expr","debug_assert_program_args_stderr_ge","debug_assert_program_args_stderr_ge_expr","debug_assert_program_args_stderr_gt","debug_assert_program_args_stderr_gt_expr","debug_assert_program_args_stderr_is_match","debug_assert_program_args_stderr_le","debug_assert_program_args_stderr_le_expr","debug_assert_program_args_stderr_lt","debug_assert_program_args_stderr_lt_expr","debug_assert_program_args_stderr_ne","debug_assert_program_args_stderr_ne_expr","debug_assert_program_args_stdout_contains","debug_assert_program_args_stdout_eq","debug_assert_program_args_stdout_eq_expr","debug_assert_program_args_stdout_ge","debug_assert_program_args_stdout_ge_expr","debug_assert_program_args_stdout_gt","debug_assert_program_args_stdout_gt_expr","debug_assert_program_args_stdout_is_match","debug_assert_program_args_stdout_le","debug_assert_program_args_stdout_le_expr","debug_assert_program_args_stdout_lt","debug_assert_program_args_stdout_lt_expr","debug_assert_program_args_stdout_ne","debug_assert_program_args_stdout_ne_expr","debug_assert_ready","debug_assert_ready_eq","debug_assert_ready_ne","debug_assert_result_err","debug_assert_result_ok","debug_assert_result_ok_eq","debug_assert_result_ok_ne","debug_assert_set_disjoint","debug_assert_set_eq","debug_assert_set_joint","debug_assert_set_ne","debug_assert_set_subset","debug_assert_set_superset","debug_assert_some","debug_assert_some_eq","debug_assert_some_ne","debug_assert_starts_with"],"mod":["assert","assert_bag","assert_command","assert_contains","assert_ends_with","assert_eq","assert_err","assert_fn","assert_fn_err","assert_fn_ok","assert_fs_read_to_string","assert_ge","assert_gt","assert_in_delta","assert_in_epsilon","assert_infix","assert_io_read_to_string","assert_is_match","assert_le","assert_lt","assert_ne","assert_none","assert_not_contains","assert_not_ends_with","assert_not_match","assert_not_starts_with","assert_ok","assert_ok_eq","assert_ok_ne","assert_option","assert_pending","assert_poll","assert_program_args","assert_ready","assert_ready_eq","assert_ready_ne","assert_result","assert_set","assert_some","assert_some_eq","assert_some_ne","assert_starts_with"]}; \ No newline at end of file diff --git a/doc/search-index.js b/doc/search-index.js index 1d06ee8e6..cb500deb6 100644 --- a/doc/search-index.js +++ b/doc/search-index.js @@ -1,5 +1,5 @@ var searchIndex = new Map(JSON.parse('[\ -["lib",{"t":"CQCQQQQQQQQQCQQQQQQQQQQQQQQQQCQQCQQCQCQQQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQCQQQQQQQQQQQQQQQQQQQQQQQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQCQQCQQCQQCQQCQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQCQQCQQCQQCQCQQCQQCQQCQQCQQQQQQQQCQQQQQQQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQCQQQQQQQQCQQQQQQQQQQQQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC","n":["assert","assert_as_result","assert_bag","assert_bag_eq","assert_bag_eq_as_result","assert_bag_impl_prep","assert_bag_ne","assert_bag_ne_as_result","assert_bag_subbag","assert_bag_subbag_as_result","assert_bag_superbag","assert_bag_superbag_as_result","assert_command","assert_command_stderr_contains","assert_command_stderr_contains_as_result","assert_command_stderr_eq","assert_command_stderr_eq_as_result","assert_command_stderr_eq_expr","assert_command_stderr_eq_expr_as_result","assert_command_stderr_is_match","assert_command_stderr_is_match_as_result","assert_command_stdout_contains","assert_command_stdout_contains_as_result","assert_command_stdout_eq","assert_command_stdout_eq_as_result","assert_command_stdout_eq_expr","assert_command_stdout_eq_expr_as_result","assert_command_stdout_is_match","assert_command_stdout_is_match_as_result","assert_contains","assert_contains","assert_contains_as_result","assert_ends_with","assert_ends_with","assert_ends_with_as_result","assert_eq","assert_eq_as_result","assert_fn","assert_fn_eq","assert_fn_eq_as_result","assert_fn_eq_expr","assert_fn_eq_expr_as_result","assert_fn_err","assert_fn_err_eq","assert_fn_err_eq_as_result","assert_fn_err_eq_expr","assert_fn_err_eq_expr_as_result","assert_fn_err_ge","assert_fn_err_ge_as_result","assert_fn_err_ge_expr","assert_fn_err_ge_expr_as_result","assert_fn_err_gt","assert_fn_err_gt_as_result","assert_fn_err_gt_expr","assert_fn_err_gt_expr_as_result","assert_fn_err_le","assert_fn_err_le_as_result","assert_fn_err_le_expr","assert_fn_err_le_expr_as_result","assert_fn_err_lt","assert_fn_err_lt_as_result","assert_fn_err_lt_expr","assert_fn_err_lt_expr_as_result","assert_fn_err_ne","assert_fn_err_ne_as_result","assert_fn_err_ne_expr","assert_fn_err_ne_expr_as_result","assert_fn_ge","assert_fn_ge_as_result","assert_fn_ge_expr","assert_fn_ge_expr_as_result","assert_fn_gt","assert_fn_gt_as_result","assert_fn_gt_expr","assert_fn_gt_expr_as_result","assert_fn_le","assert_fn_le_as_result","assert_fn_le_expr","assert_fn_le_expr_as_result","assert_fn_lt","assert_fn_lt_as_result","assert_fn_lt_expr","assert_fn_lt_expr_as_result","assert_fn_ne","assert_fn_ne_as_result","assert_fn_ne_expr","assert_fn_ne_expr_as_result","assert_fn_ok","assert_fn_ok_eq","assert_fn_ok_eq_as_result","assert_fn_ok_eq_expr","assert_fn_ok_eq_expr_as_result","assert_fn_ok_ge","assert_fn_ok_ge_as_result","assert_fn_ok_ge_expr","assert_fn_ok_ge_expr_as_result","assert_fn_ok_gt","assert_fn_ok_gt_as_result","assert_fn_ok_gt_expr","assert_fn_ok_gt_expr_as_result","assert_fn_ok_le","assert_fn_ok_le_as_result","assert_fn_ok_le_expr","assert_fn_ok_le_expr_as_result","assert_fn_ok_lt","assert_fn_ok_lt_as_result","assert_fn_ok_lt_expr","assert_fn_ok_lt_expr_as_result","assert_fn_ok_ne","assert_fn_ok_ne_as_result","assert_fn_ok_ne_expr","assert_fn_ok_ne_expr_as_result","assert_fs_read_to_string","assert_fs_read_to_string_contains","assert_fs_read_to_string_contains_as_result","assert_fs_read_to_string_eq","assert_fs_read_to_string_eq_as_result","assert_fs_read_to_string_eq_expr","assert_fs_read_to_string_eq_expr_as_result","assert_fs_read_to_string_ge","assert_fs_read_to_string_ge_as_result","assert_fs_read_to_string_ge_expr","assert_fs_read_to_string_ge_expr_as_result","assert_fs_read_to_string_gt","assert_fs_read_to_string_gt_as_result","assert_fs_read_to_string_gt_expr","assert_fs_read_to_string_gt_expr_as_result","assert_fs_read_to_string_le","assert_fs_read_to_string_le_as_result","assert_fs_read_to_string_le_expr","assert_fs_read_to_string_le_expr_as_result","assert_fs_read_to_string_lt","assert_fs_read_to_string_lt_as_result","assert_fs_read_to_string_lt_expr","assert_fs_read_to_string_lt_expr_as_result","assert_fs_read_to_string_matches","assert_fs_read_to_string_matches_as_result","assert_fs_read_to_string_ne","assert_fs_read_to_string_ne_as_result","assert_fs_read_to_string_ne_expr","assert_fs_read_to_string_ne_expr_as_result","assert_ge","assert_ge","assert_ge_as_result","assert_gt","assert_gt","assert_gt_as_result","assert_in_delta","assert_in_delta","assert_in_delta_as_result","assert_in_epsilon","assert_in_epsilon","assert_in_epsilon_as_result","assert_infix","assert_infix","assert_infix_as_result","assert_io_read_to_string","assert_io_read_to_string_contains","assert_io_read_to_string_contains_as_result","assert_io_read_to_string_eq","assert_io_read_to_string_eq_as_result","assert_io_read_to_string_eq_expr","assert_io_read_to_string_eq_expr_as_result","assert_io_read_to_string_ge","assert_io_read_to_string_ge_as_result","assert_io_read_to_string_ge_expr","assert_io_read_to_string_ge_expr_as_result","assert_io_read_to_string_gt","assert_io_read_to_string_gt_as_result","assert_io_read_to_string_gt_expr","assert_io_read_to_string_gt_expr_as_result","assert_io_read_to_string_le","assert_io_read_to_string_le_as_result","assert_io_read_to_string_le_expr","assert_io_read_to_string_le_expr_as_result","assert_io_read_to_string_lt","assert_io_read_to_string_lt_as_result","assert_io_read_to_string_lt_expr","assert_io_read_to_string_lt_expr_as_result","assert_io_read_to_string_matches","assert_io_read_to_string_matches_as_result","assert_io_read_to_string_ne","assert_io_read_to_string_ne_as_result","assert_io_read_to_string_ne_expr","assert_io_read_to_string_ne_expr_as_result","assert_is_match","assert_is_match","assert_is_match_as_result","assert_le","assert_le","assert_le_as_result","assert_lt","assert_lt","assert_lt_as_result","assert_ne","assert_ne_as_result","assert_not_contains","assert_not_contains","assert_not_contains_as_result","assert_not_ends_with","assert_not_ends_with","assert_not_ends_with_as_result","assert_not_match","assert_not_match","assert_not_match_as_result","assert_not_starts_with","assert_not_starts_with","assert_not_starts_with_as_result","assert_option","assert_option_none","assert_option_none_as_result","assert_option_some","assert_option_some_as_result","assert_option_some_eq","assert_option_some_eq_as_result","assert_option_some_ne","assert_option_some_ne_as_result","assert_poll","assert_poll_pending","assert_poll_pending_as_result","assert_poll_ready","assert_poll_ready_as_result","assert_poll_ready_eq","assert_poll_ready_eq_as_result","assert_poll_ready_ne","assert_poll_ready_ne_as_result","assert_program_args","assert_program_args_impl_prep","assert_program_args_stderr_contains","assert_program_args_stderr_contains_as_result","assert_program_args_stderr_eq","assert_program_args_stderr_eq_as_result","assert_program_args_stderr_eq_expr","assert_program_args_stderr_eq_expr_as_result","assert_program_args_stderr_ge","assert_program_args_stderr_ge_as_result","assert_program_args_stderr_ge_expr","assert_program_args_stderr_ge_expr_as_result","assert_program_args_stderr_gt","assert_program_args_stderr_gt_as_result","assert_program_args_stderr_gt_expr","assert_program_args_stderr_gt_expr_as_result","assert_program_args_stderr_is_match","assert_program_args_stderr_is_match_as_result","assert_program_args_stderr_le","assert_program_args_stderr_le_as_result","assert_program_args_stderr_le_expr","assert_program_args_stderr_le_expr_as_result","assert_program_args_stderr_lt","assert_program_args_stderr_lt_as_result","assert_program_args_stderr_lt_expr","assert_program_args_stderr_lt_expr_as_result","assert_program_args_stderr_ne","assert_program_args_stderr_ne_as_result","assert_program_args_stderr_ne_expr","assert_program_args_stderr_ne_expr_as_result","assert_program_args_stdout_contains","assert_program_args_stdout_contains_as_result","assert_program_args_stdout_eq","assert_program_args_stdout_eq_as_result","assert_program_args_stdout_eq_expr","assert_program_args_stdout_eq_expr_as_result","assert_program_args_stdout_ge","assert_program_args_stdout_ge_as_result","assert_program_args_stdout_ge_expr","assert_program_args_stdout_ge_expr_as_result","assert_program_args_stdout_gt","assert_program_args_stdout_gt_as_result","assert_program_args_stdout_gt_expr","assert_program_args_stdout_gt_expr_as_result","assert_program_args_stdout_is_match","assert_program_args_stdout_is_match_as_result","assert_program_args_stdout_le","assert_program_args_stdout_le_as_result","assert_program_args_stdout_le_expr","assert_program_args_stdout_le_expr_as_result","assert_program_args_stdout_lt","assert_program_args_stdout_lt_as_result","assert_program_args_stdout_lt_expr","assert_program_args_stdout_lt_expr_as_result","assert_program_args_stdout_ne","assert_program_args_stdout_ne_as_result","assert_program_args_stdout_ne_expr","assert_program_args_stdout_ne_expr_as_result","assert_result","assert_result_err","assert_result_err_as_result","assert_result_ok","assert_result_ok_as_result","assert_result_ok_eq","assert_result_ok_eq_as_result","assert_result_ok_ne","assert_result_ok_ne_as_result","assert_set","assert_set_disjoint","assert_set_disjoint_as_result","assert_set_eq","assert_set_eq_as_result","assert_set_impl_prep","assert_set_joint","assert_set_joint_as_result","assert_set_ne","assert_set_ne_as_result","assert_set_subset","assert_set_subset_as_result","assert_set_superset","assert_set_superset_as_result","assert_starts_with","assert_starts_with","assert_starts_with_as_result","debug_assert_bag_eq","debug_assert_bag_ne","debug_assert_bag_subbag","debug_assert_bag_superbag","debug_assert_command_stderr_contains","debug_assert_command_stderr_eq","debug_assert_command_stderr_eq_expr","debug_assert_command_stderr_is_match","debug_assert_command_stdout_contains","debug_assert_command_stdout_eq","debug_assert_command_stdout_eq_expr","debug_assert_command_stdout_is_match","debug_assert_contains","debug_assert_ends_with","debug_assert_fn_eq","debug_assert_fn_eq_expr","debug_assert_fn_err_eq","debug_assert_fn_err_eq_expr","debug_assert_fn_err_ge","debug_assert_fn_err_ge_expr","debug_assert_fn_err_gt","debug_assert_fn_err_gt_expr","debug_assert_fn_err_le","debug_assert_fn_err_le_expr","debug_assert_fn_err_lt","debug_assert_fn_err_lt_expr","debug_assert_fn_err_ne","debug_assert_fn_err_ne_expr","debug_assert_fn_ge","debug_assert_fn_ge_expr","debug_assert_fn_gt","debug_assert_fn_gt_expr","debug_assert_fn_le","debug_assert_fn_le_expr","debug_assert_fn_lt","debug_assert_fn_lt_expr","debug_assert_fn_ne","debug_assert_fn_ne_expr","debug_assert_fn_ok_eq","debug_assert_fn_ok_eq_expr","debug_assert_fn_ok_ge","debug_assert_fn_ok_ge_expr","debug_assert_fn_ok_gt","debug_assert_fn_ok_gt_expr","debug_assert_fn_ok_le","debug_assert_fn_ok_le_expr","debug_assert_fn_ok_lt","debug_assert_fn_ok_lt_expr","debug_assert_fn_ok_ne","debug_assert_fn_ok_ne_expr","debug_assert_fs_read_to_string_contains","debug_assert_fs_read_to_string_eq","debug_assert_fs_read_to_string_eq_expr","debug_assert_fs_read_to_string_ge","debug_assert_fs_read_to_string_ge_expr","debug_assert_fs_read_to_string_gt","debug_assert_fs_read_to_string_gt_expr","debug_assert_fs_read_to_string_le","debug_assert_fs_read_to_string_le_expr","debug_assert_fs_read_to_string_lt","debug_assert_fs_read_to_string_lt_expr","debug_assert_fs_read_to_string_matches","debug_assert_fs_read_to_string_ne","debug_assert_fs_read_to_string_ne_expr","debug_assert_ge","debug_assert_gt","debug_assert_in_delta","debug_assert_in_epsilon","debug_assert_infix","debug_assert_io_read_to_string_contains","debug_assert_io_read_to_string_eq","debug_assert_io_read_to_string_eq_expr","debug_assert_io_read_to_string_ge","debug_assert_io_read_to_string_ge_expr","debug_assert_io_read_to_string_gt","debug_assert_io_read_to_string_gt_expr","debug_assert_io_read_to_string_le","debug_assert_io_read_to_string_le_expr","debug_assert_io_read_to_string_lt","debug_assert_io_read_to_string_lt_expr","debug_assert_io_read_to_string_matches","debug_assert_io_read_to_string_ne","debug_assert_io_read_to_string_ne_expr","debug_assert_is_match","debug_assert_le","debug_assert_lt","debug_assert_not_contains","debug_assert_not_ends_with","debug_assert_not_match","debug_assert_not_starts_with","debug_assert_option_none","debug_assert_option_some","debug_assert_option_some_eq","debug_assert_option_some_ne","debug_assert_poll_pending","debug_assert_poll_ready","debug_assert_poll_ready_eq","debug_assert_poll_ready_ne","debug_assert_program_args_stderr_contains","debug_assert_program_args_stderr_eq","debug_assert_program_args_stderr_eq_expr","debug_assert_program_args_stderr_ge","debug_assert_program_args_stderr_ge_expr","debug_assert_program_args_stderr_gt","debug_assert_program_args_stderr_gt_expr","debug_assert_program_args_stderr_is_match","debug_assert_program_args_stderr_le","debug_assert_program_args_stderr_le_expr","debug_assert_program_args_stderr_lt","debug_assert_program_args_stderr_lt_expr","debug_assert_program_args_stderr_ne","debug_assert_program_args_stderr_ne_expr","debug_assert_program_args_stdout_contains","debug_assert_program_args_stdout_eq","debug_assert_program_args_stdout_eq_expr","debug_assert_program_args_stdout_ge","debug_assert_program_args_stdout_ge_expr","debug_assert_program_args_stdout_gt","debug_assert_program_args_stdout_gt_expr","debug_assert_program_args_stdout_is_match","debug_assert_program_args_stdout_le","debug_assert_program_args_stdout_le_expr","debug_assert_program_args_stdout_lt","debug_assert_program_args_stdout_lt_expr","debug_assert_program_args_stdout_ne","debug_assert_program_args_stdout_ne_expr","debug_assert_result_err","debug_assert_result_ok","debug_assert_result_ok_eq","debug_assert_result_ok_ne","debug_assert_set_disjoint","debug_assert_set_eq","debug_assert_set_joint","debug_assert_set_ne","debug_assert_set_subset","debug_assert_set_superset","debug_assert_starts_with","assert_bag_eq","assert_bag_ne","assert_bag_subbag","assert_bag_superbag","assert_command_stderr_contains","assert_command_stderr_eq","assert_command_stderr_eq_expr","assert_command_stderr_is_match","assert_command_stdout_contains","assert_command_stdout_eq","assert_command_stdout_eq_expr","assert_command_stdout_is_match","assert_fn_eq","assert_fn_eq_expr","assert_fn_ge","assert_fn_ge_expr","assert_fn_gt","assert_fn_gt_expr","assert_fn_le","assert_fn_le_expr","assert_fn_lt","assert_fn_lt_expr","assert_fn_ne","assert_fn_ne_expr","assert_fn_err_eq","assert_fn_err_eq_expr","assert_fn_err_ge","assert_fn_err_ge_expr","assert_fn_err_gt","assert_fn_err_gt_expr","assert_fn_err_le","assert_fn_err_le_expr","assert_fn_err_lt","assert_fn_err_lt_expr","assert_fn_err_ne","assert_fn_err_ne_expr","assert_fn_ok_eq","assert_fn_ok_eq_expr","assert_fn_ok_ge","assert_fn_ok_ge_expr","assert_fn_ok_gt","assert_fn_ok_gt_expr","assert_fn_ok_le","assert_fn_ok_le_expr","assert_fn_ok_lt","assert_fn_ok_lt_expr","assert_fn_ok_ne","assert_fn_ok_ne_expr","assert_fs_read_to_string_contains","assert_fs_read_to_string_eq","assert_fs_read_to_string_eq_expr","assert_fs_read_to_string_ge","assert_fs_read_to_string_ge_expr","assert_fs_read_to_string_gt","assert_fs_read_to_string_gt_expr","assert_fs_read_to_string_le","assert_fs_read_to_string_le_expr","assert_fs_read_to_string_lt","assert_fs_read_to_string_lt_expr","assert_fs_read_to_string_matches","assert_fs_read_to_string_ne","assert_fs_read_to_string_ne_expr","assert_io_read_to_string_contains","assert_io_read_to_string_eq","assert_io_read_to_string_eq_expr","assert_io_read_to_string_ge","assert_io_read_to_string_ge_expr","assert_io_read_to_string_gt","assert_io_read_to_string_gt_expr","assert_io_read_to_string_le","assert_io_read_to_string_le_expr","assert_io_read_to_string_lt","assert_io_read_to_string_lt_expr","assert_io_read_to_string_matches","assert_io_read_to_string_ne","assert_io_read_to_string_ne_expr","assert_option_none","assert_option_some","assert_option_some_eq","assert_option_some_ne","assert_poll_pending","assert_poll_ready","assert_poll_ready_eq","assert_poll_ready_ne","assert_program_args_stderr_contains","assert_program_args_stderr_eq","assert_program_args_stderr_eq_expr","assert_program_args_stderr_ge","assert_program_args_stderr_ge_expr","assert_program_args_stderr_gt","assert_program_args_stderr_gt_expr","assert_program_args_stderr_is_match","assert_program_args_stderr_le","assert_program_args_stderr_le_expr","assert_program_args_stderr_lt","assert_program_args_stderr_lt_expr","assert_program_args_stderr_ne","assert_program_args_stderr_ne_expr","assert_program_args_stdout_contains","assert_program_args_stdout_eq","assert_program_args_stdout_eq_expr","assert_program_args_stdout_ge","assert_program_args_stdout_ge_expr","assert_program_args_stdout_gt","assert_program_args_stdout_gt_expr","assert_program_args_stdout_is_match","assert_program_args_stdout_le","assert_program_args_stdout_le_expr","assert_program_args_stdout_lt","assert_program_args_stdout_lt_expr","assert_program_args_stdout_ne","assert_program_args_stdout_ne_expr","assert_result_err","assert_result_ok","assert_result_ok_eq","assert_result_ok_ne","assert_set_disjoint","assert_set_eq","assert_set_joint","assert_set_ne","assert_set_subset","assert_set_superset"],"q":[[0,"lib"],[447,"lib::assert_bag"],[451,"lib::assert_command"],[459,"lib::assert_fn"],[471,"lib::assert_fn_err"],[483,"lib::assert_fn_ok"],[495,"lib::assert_fs_read_to_string"],[509,"lib::assert_io_read_to_string"],[523,"lib::assert_option"],[527,"lib::assert_poll"],[531,"lib::assert_program_args"],[559,"lib::assert_result"],[563,"lib::assert_set"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"f":"`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````","D":"DFn","p":[],"r":[],"b":[],"c":"OjAAAAAAAAA=","e":"OjAAAAEAAAAAAAIAEAAAAAYA5AArAQ=="}]\ +["lib",{"t":"CQCQQQQQQQQQCQQQQQQQQQQQQQQQQCQQCQQCQCQQCQQQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQCQQQQQQQQQQQQQQQQQQQQQQQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQCQQCQQCQQCQQCQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQCQQCQQCQQCQCQQCQQCQQCQQCQQCQQCQQCQQCQQQQQQQQCQQCQQQQQQQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQCQQCQQCQQCQQQQQQQQCQQQQQQQQQQQQQCQQCQQCQQCQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC","n":["assert","assert_as_result","assert_bag","assert_bag_eq","assert_bag_eq_as_result","assert_bag_impl_prep","assert_bag_ne","assert_bag_ne_as_result","assert_bag_subbag","assert_bag_subbag_as_result","assert_bag_superbag","assert_bag_superbag_as_result","assert_command","assert_command_stderr_contains","assert_command_stderr_contains_as_result","assert_command_stderr_eq","assert_command_stderr_eq_as_result","assert_command_stderr_eq_expr","assert_command_stderr_eq_expr_as_result","assert_command_stderr_is_match","assert_command_stderr_is_match_as_result","assert_command_stdout_contains","assert_command_stdout_contains_as_result","assert_command_stdout_eq","assert_command_stdout_eq_as_result","assert_command_stdout_eq_expr","assert_command_stdout_eq_expr_as_result","assert_command_stdout_is_match","assert_command_stdout_is_match_as_result","assert_contains","assert_contains","assert_contains_as_result","assert_ends_with","assert_ends_with","assert_ends_with_as_result","assert_eq","assert_eq_as_result","assert_err","assert_err","assert_err_as_result","assert_fn","assert_fn_eq","assert_fn_eq_as_result","assert_fn_eq_expr","assert_fn_eq_expr_as_result","assert_fn_err","assert_fn_err_eq","assert_fn_err_eq_as_result","assert_fn_err_eq_expr","assert_fn_err_eq_expr_as_result","assert_fn_err_ge","assert_fn_err_ge_as_result","assert_fn_err_ge_expr","assert_fn_err_ge_expr_as_result","assert_fn_err_gt","assert_fn_err_gt_as_result","assert_fn_err_gt_expr","assert_fn_err_gt_expr_as_result","assert_fn_err_le","assert_fn_err_le_as_result","assert_fn_err_le_expr","assert_fn_err_le_expr_as_result","assert_fn_err_lt","assert_fn_err_lt_as_result","assert_fn_err_lt_expr","assert_fn_err_lt_expr_as_result","assert_fn_err_ne","assert_fn_err_ne_as_result","assert_fn_err_ne_expr","assert_fn_err_ne_expr_as_result","assert_fn_ge","assert_fn_ge_as_result","assert_fn_ge_expr","assert_fn_ge_expr_as_result","assert_fn_gt","assert_fn_gt_as_result","assert_fn_gt_expr","assert_fn_gt_expr_as_result","assert_fn_le","assert_fn_le_as_result","assert_fn_le_expr","assert_fn_le_expr_as_result","assert_fn_lt","assert_fn_lt_as_result","assert_fn_lt_expr","assert_fn_lt_expr_as_result","assert_fn_ne","assert_fn_ne_as_result","assert_fn_ne_expr","assert_fn_ne_expr_as_result","assert_fn_ok","assert_fn_ok_eq","assert_fn_ok_eq_as_result","assert_fn_ok_eq_expr","assert_fn_ok_eq_expr_as_result","assert_fn_ok_ge","assert_fn_ok_ge_as_result","assert_fn_ok_ge_expr","assert_fn_ok_ge_expr_as_result","assert_fn_ok_gt","assert_fn_ok_gt_as_result","assert_fn_ok_gt_expr","assert_fn_ok_gt_expr_as_result","assert_fn_ok_le","assert_fn_ok_le_as_result","assert_fn_ok_le_expr","assert_fn_ok_le_expr_as_result","assert_fn_ok_lt","assert_fn_ok_lt_as_result","assert_fn_ok_lt_expr","assert_fn_ok_lt_expr_as_result","assert_fn_ok_ne","assert_fn_ok_ne_as_result","assert_fn_ok_ne_expr","assert_fn_ok_ne_expr_as_result","assert_fs_read_to_string","assert_fs_read_to_string_contains","assert_fs_read_to_string_contains_as_result","assert_fs_read_to_string_eq","assert_fs_read_to_string_eq_as_result","assert_fs_read_to_string_eq_expr","assert_fs_read_to_string_eq_expr_as_result","assert_fs_read_to_string_ge","assert_fs_read_to_string_ge_as_result","assert_fs_read_to_string_ge_expr","assert_fs_read_to_string_ge_expr_as_result","assert_fs_read_to_string_gt","assert_fs_read_to_string_gt_as_result","assert_fs_read_to_string_gt_expr","assert_fs_read_to_string_gt_expr_as_result","assert_fs_read_to_string_le","assert_fs_read_to_string_le_as_result","assert_fs_read_to_string_le_expr","assert_fs_read_to_string_le_expr_as_result","assert_fs_read_to_string_lt","assert_fs_read_to_string_lt_as_result","assert_fs_read_to_string_lt_expr","assert_fs_read_to_string_lt_expr_as_result","assert_fs_read_to_string_matches","assert_fs_read_to_string_matches_as_result","assert_fs_read_to_string_ne","assert_fs_read_to_string_ne_as_result","assert_fs_read_to_string_ne_expr","assert_fs_read_to_string_ne_expr_as_result","assert_ge","assert_ge","assert_ge_as_result","assert_gt","assert_gt","assert_gt_as_result","assert_in_delta","assert_in_delta","assert_in_delta_as_result","assert_in_epsilon","assert_in_epsilon","assert_in_epsilon_as_result","assert_infix","assert_infix","assert_infix_as_result","assert_io_read_to_string","assert_io_read_to_string_contains","assert_io_read_to_string_contains_as_result","assert_io_read_to_string_eq","assert_io_read_to_string_eq_as_result","assert_io_read_to_string_eq_expr","assert_io_read_to_string_eq_expr_as_result","assert_io_read_to_string_ge","assert_io_read_to_string_ge_as_result","assert_io_read_to_string_ge_expr","assert_io_read_to_string_ge_expr_as_result","assert_io_read_to_string_gt","assert_io_read_to_string_gt_as_result","assert_io_read_to_string_gt_expr","assert_io_read_to_string_gt_expr_as_result","assert_io_read_to_string_le","assert_io_read_to_string_le_as_result","assert_io_read_to_string_le_expr","assert_io_read_to_string_le_expr_as_result","assert_io_read_to_string_lt","assert_io_read_to_string_lt_as_result","assert_io_read_to_string_lt_expr","assert_io_read_to_string_lt_expr_as_result","assert_io_read_to_string_matches","assert_io_read_to_string_matches_as_result","assert_io_read_to_string_ne","assert_io_read_to_string_ne_as_result","assert_io_read_to_string_ne_expr","assert_io_read_to_string_ne_expr_as_result","assert_is_match","assert_is_match","assert_is_match_as_result","assert_le","assert_le","assert_le_as_result","assert_lt","assert_lt","assert_lt_as_result","assert_ne","assert_ne_as_result","assert_none","assert_none","assert_none_as_result","assert_not_contains","assert_not_contains","assert_not_contains_as_result","assert_not_ends_with","assert_not_ends_with","assert_not_ends_with_as_result","assert_not_match","assert_not_match","assert_not_match_as_result","assert_not_starts_with","assert_not_starts_with","assert_not_starts_with_as_result","assert_ok","assert_ok","assert_ok_as_result","assert_ok_eq","assert_ok_eq","assert_ok_eq_as_result","assert_ok_ne","assert_ok_ne","assert_ok_ne_as_result","assert_option","assert_option_none","assert_option_none_as_result","assert_option_some","assert_option_some_as_result","assert_option_some_eq","assert_option_some_eq_as_result","assert_option_some_ne","assert_option_some_ne_as_result","assert_pending","assert_pending","assert_pending_as_result","assert_poll","assert_poll_pending","assert_poll_pending_as_result","assert_poll_ready","assert_poll_ready_as_result","assert_poll_ready_eq","assert_poll_ready_eq_as_result","assert_poll_ready_ne","assert_poll_ready_ne_as_result","assert_program_args","assert_program_args_impl_prep","assert_program_args_stderr_contains","assert_program_args_stderr_contains_as_result","assert_program_args_stderr_eq","assert_program_args_stderr_eq_as_result","assert_program_args_stderr_eq_expr","assert_program_args_stderr_eq_expr_as_result","assert_program_args_stderr_ge","assert_program_args_stderr_ge_as_result","assert_program_args_stderr_ge_expr","assert_program_args_stderr_ge_expr_as_result","assert_program_args_stderr_gt","assert_program_args_stderr_gt_as_result","assert_program_args_stderr_gt_expr","assert_program_args_stderr_gt_expr_as_result","assert_program_args_stderr_is_match","assert_program_args_stderr_is_match_as_result","assert_program_args_stderr_le","assert_program_args_stderr_le_as_result","assert_program_args_stderr_le_expr","assert_program_args_stderr_le_expr_as_result","assert_program_args_stderr_lt","assert_program_args_stderr_lt_as_result","assert_program_args_stderr_lt_expr","assert_program_args_stderr_lt_expr_as_result","assert_program_args_stderr_ne","assert_program_args_stderr_ne_as_result","assert_program_args_stderr_ne_expr","assert_program_args_stderr_ne_expr_as_result","assert_program_args_stdout_contains","assert_program_args_stdout_contains_as_result","assert_program_args_stdout_eq","assert_program_args_stdout_eq_as_result","assert_program_args_stdout_eq_expr","assert_program_args_stdout_eq_expr_as_result","assert_program_args_stdout_ge","assert_program_args_stdout_ge_as_result","assert_program_args_stdout_ge_expr","assert_program_args_stdout_ge_expr_as_result","assert_program_args_stdout_gt","assert_program_args_stdout_gt_as_result","assert_program_args_stdout_gt_expr","assert_program_args_stdout_gt_expr_as_result","assert_program_args_stdout_is_match","assert_program_args_stdout_is_match_as_result","assert_program_args_stdout_le","assert_program_args_stdout_le_as_result","assert_program_args_stdout_le_expr","assert_program_args_stdout_le_expr_as_result","assert_program_args_stdout_lt","assert_program_args_stdout_lt_as_result","assert_program_args_stdout_lt_expr","assert_program_args_stdout_lt_expr_as_result","assert_program_args_stdout_ne","assert_program_args_stdout_ne_as_result","assert_program_args_stdout_ne_expr","assert_program_args_stdout_ne_expr_as_result","assert_ready","assert_ready","assert_ready_as_result","assert_ready_eq","assert_ready_eq","assert_ready_eq_as_result","assert_ready_ne","assert_ready_ne","assert_ready_ne_as_result","assert_result","assert_result_err","assert_result_err_as_result","assert_result_ok","assert_result_ok_as_result","assert_result_ok_eq","assert_result_ok_eq_as_result","assert_result_ok_ne","assert_result_ok_ne_as_result","assert_set","assert_set_disjoint","assert_set_disjoint_as_result","assert_set_eq","assert_set_eq_as_result","assert_set_impl_prep","assert_set_joint","assert_set_joint_as_result","assert_set_ne","assert_set_ne_as_result","assert_set_subset","assert_set_subset_as_result","assert_set_superset","assert_set_superset_as_result","assert_some","assert_some","assert_some_as_result","assert_some_eq","assert_some_eq","assert_some_eq_as_result","assert_some_ne","assert_some_ne","assert_some_ne_as_result","assert_starts_with","assert_starts_with","assert_starts_with_as_result","debug_assert_bag_eq","debug_assert_bag_ne","debug_assert_bag_subbag","debug_assert_bag_superbag","debug_assert_command_stderr_contains","debug_assert_command_stderr_eq","debug_assert_command_stderr_eq_expr","debug_assert_command_stderr_is_match","debug_assert_command_stdout_contains","debug_assert_command_stdout_eq","debug_assert_command_stdout_eq_expr","debug_assert_command_stdout_is_match","debug_assert_contains","debug_assert_ends_with","debug_assert_err","debug_assert_fn_eq","debug_assert_fn_eq_expr","debug_assert_fn_err_eq","debug_assert_fn_err_eq_expr","debug_assert_fn_err_ge","debug_assert_fn_err_ge_expr","debug_assert_fn_err_gt","debug_assert_fn_err_gt_expr","debug_assert_fn_err_le","debug_assert_fn_err_le_expr","debug_assert_fn_err_lt","debug_assert_fn_err_lt_expr","debug_assert_fn_err_ne","debug_assert_fn_err_ne_expr","debug_assert_fn_ge","debug_assert_fn_ge_expr","debug_assert_fn_gt","debug_assert_fn_gt_expr","debug_assert_fn_le","debug_assert_fn_le_expr","debug_assert_fn_lt","debug_assert_fn_lt_expr","debug_assert_fn_ne","debug_assert_fn_ne_expr","debug_assert_fn_ok_eq","debug_assert_fn_ok_eq_expr","debug_assert_fn_ok_ge","debug_assert_fn_ok_ge_expr","debug_assert_fn_ok_gt","debug_assert_fn_ok_gt_expr","debug_assert_fn_ok_le","debug_assert_fn_ok_le_expr","debug_assert_fn_ok_lt","debug_assert_fn_ok_lt_expr","debug_assert_fn_ok_ne","debug_assert_fn_ok_ne_expr","debug_assert_fs_read_to_string_contains","debug_assert_fs_read_to_string_eq","debug_assert_fs_read_to_string_eq_expr","debug_assert_fs_read_to_string_ge","debug_assert_fs_read_to_string_ge_expr","debug_assert_fs_read_to_string_gt","debug_assert_fs_read_to_string_gt_expr","debug_assert_fs_read_to_string_le","debug_assert_fs_read_to_string_le_expr","debug_assert_fs_read_to_string_lt","debug_assert_fs_read_to_string_lt_expr","debug_assert_fs_read_to_string_matches","debug_assert_fs_read_to_string_ne","debug_assert_fs_read_to_string_ne_expr","debug_assert_ge","debug_assert_gt","debug_assert_in_delta","debug_assert_in_epsilon","debug_assert_infix","debug_assert_io_read_to_string_contains","debug_assert_io_read_to_string_eq","debug_assert_io_read_to_string_eq_expr","debug_assert_io_read_to_string_ge","debug_assert_io_read_to_string_ge_expr","debug_assert_io_read_to_string_gt","debug_assert_io_read_to_string_gt_expr","debug_assert_io_read_to_string_le","debug_assert_io_read_to_string_le_expr","debug_assert_io_read_to_string_lt","debug_assert_io_read_to_string_lt_expr","debug_assert_io_read_to_string_matches","debug_assert_io_read_to_string_ne","debug_assert_io_read_to_string_ne_expr","debug_assert_is_match","debug_assert_le","debug_assert_lt","debug_assert_none","debug_assert_not_contains","debug_assert_not_ends_with","debug_assert_not_match","debug_assert_not_starts_with","debug_assert_ok","debug_assert_ok_eq","debug_assert_ok_ne","debug_assert_option_none","debug_assert_option_some","debug_assert_option_some_eq","debug_assert_option_some_ne","debug_assert_pending","debug_assert_poll_pending","debug_assert_poll_ready","debug_assert_poll_ready_eq","debug_assert_poll_ready_ne","debug_assert_program_args_stderr_contains","debug_assert_program_args_stderr_eq","debug_assert_program_args_stderr_eq_expr","debug_assert_program_args_stderr_ge","debug_assert_program_args_stderr_ge_expr","debug_assert_program_args_stderr_gt","debug_assert_program_args_stderr_gt_expr","debug_assert_program_args_stderr_is_match","debug_assert_program_args_stderr_le","debug_assert_program_args_stderr_le_expr","debug_assert_program_args_stderr_lt","debug_assert_program_args_stderr_lt_expr","debug_assert_program_args_stderr_ne","debug_assert_program_args_stderr_ne_expr","debug_assert_program_args_stdout_contains","debug_assert_program_args_stdout_eq","debug_assert_program_args_stdout_eq_expr","debug_assert_program_args_stdout_ge","debug_assert_program_args_stdout_ge_expr","debug_assert_program_args_stdout_gt","debug_assert_program_args_stdout_gt_expr","debug_assert_program_args_stdout_is_match","debug_assert_program_args_stdout_le","debug_assert_program_args_stdout_le_expr","debug_assert_program_args_stdout_lt","debug_assert_program_args_stdout_lt_expr","debug_assert_program_args_stdout_ne","debug_assert_program_args_stdout_ne_expr","debug_assert_ready","debug_assert_ready_eq","debug_assert_ready_ne","debug_assert_result_err","debug_assert_result_ok","debug_assert_result_ok_eq","debug_assert_result_ok_ne","debug_assert_set_disjoint","debug_assert_set_eq","debug_assert_set_joint","debug_assert_set_ne","debug_assert_set_subset","debug_assert_set_superset","debug_assert_some","debug_assert_some_eq","debug_assert_some_ne","debug_assert_starts_with","assert_bag_eq","assert_bag_ne","assert_bag_subbag","assert_bag_superbag","assert_command_stderr_contains","assert_command_stderr_eq","assert_command_stderr_eq_expr","assert_command_stderr_is_match","assert_command_stdout_contains","assert_command_stdout_eq","assert_command_stdout_eq_expr","assert_command_stdout_is_match","assert_fn_eq","assert_fn_eq_expr","assert_fn_ge","assert_fn_ge_expr","assert_fn_gt","assert_fn_gt_expr","assert_fn_le","assert_fn_le_expr","assert_fn_lt","assert_fn_lt_expr","assert_fn_ne","assert_fn_ne_expr","assert_fn_err_eq","assert_fn_err_eq_expr","assert_fn_err_ge","assert_fn_err_ge_expr","assert_fn_err_gt","assert_fn_err_gt_expr","assert_fn_err_le","assert_fn_err_le_expr","assert_fn_err_lt","assert_fn_err_lt_expr","assert_fn_err_ne","assert_fn_err_ne_expr","assert_fn_ok_eq","assert_fn_ok_eq_expr","assert_fn_ok_ge","assert_fn_ok_ge_expr","assert_fn_ok_gt","assert_fn_ok_gt_expr","assert_fn_ok_le","assert_fn_ok_le_expr","assert_fn_ok_lt","assert_fn_ok_lt_expr","assert_fn_ok_ne","assert_fn_ok_ne_expr","assert_fs_read_to_string_contains","assert_fs_read_to_string_eq","assert_fs_read_to_string_eq_expr","assert_fs_read_to_string_ge","assert_fs_read_to_string_ge_expr","assert_fs_read_to_string_gt","assert_fs_read_to_string_gt_expr","assert_fs_read_to_string_le","assert_fs_read_to_string_le_expr","assert_fs_read_to_string_lt","assert_fs_read_to_string_lt_expr","assert_fs_read_to_string_matches","assert_fs_read_to_string_ne","assert_fs_read_to_string_ne_expr","assert_io_read_to_string_contains","assert_io_read_to_string_eq","assert_io_read_to_string_eq_expr","assert_io_read_to_string_ge","assert_io_read_to_string_ge_expr","assert_io_read_to_string_gt","assert_io_read_to_string_gt_expr","assert_io_read_to_string_le","assert_io_read_to_string_le_expr","assert_io_read_to_string_lt","assert_io_read_to_string_lt_expr","assert_io_read_to_string_matches","assert_io_read_to_string_ne","assert_io_read_to_string_ne_expr","assert_option_none","assert_option_some","assert_option_some_eq","assert_option_some_ne","assert_poll_pending","assert_poll_ready","assert_poll_ready_eq","assert_poll_ready_ne","assert_program_args_stderr_contains","assert_program_args_stderr_eq","assert_program_args_stderr_eq_expr","assert_program_args_stderr_ge","assert_program_args_stderr_ge_expr","assert_program_args_stderr_gt","assert_program_args_stderr_gt_expr","assert_program_args_stderr_is_match","assert_program_args_stderr_le","assert_program_args_stderr_le_expr","assert_program_args_stderr_lt","assert_program_args_stderr_lt_expr","assert_program_args_stderr_ne","assert_program_args_stderr_ne_expr","assert_program_args_stdout_contains","assert_program_args_stdout_eq","assert_program_args_stdout_eq_expr","assert_program_args_stdout_ge","assert_program_args_stdout_ge_expr","assert_program_args_stdout_gt","assert_program_args_stdout_gt_expr","assert_program_args_stdout_is_match","assert_program_args_stdout_le","assert_program_args_stdout_le_expr","assert_program_args_stdout_lt","assert_program_args_stdout_lt_expr","assert_program_args_stdout_ne","assert_program_args_stdout_ne_expr","assert_result_err","assert_result_ok","assert_result_ok_eq","assert_result_ok_ne","assert_set_disjoint","assert_set_eq","assert_set_joint","assert_set_ne","assert_set_subset","assert_set_superset"],"q":[[0,"lib"],[495,"lib::assert_bag"],[499,"lib::assert_command"],[507,"lib::assert_fn"],[519,"lib::assert_fn_err"],[531,"lib::assert_fn_ok"],[543,"lib::assert_fs_read_to_string"],[557,"lib::assert_io_read_to_string"],[571,"lib::assert_option"],[575,"lib::assert_poll"],[579,"lib::assert_program_args"],[607,"lib::assert_result"],[611,"lib::assert_set"]],"i":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],"f":"`````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````````","D":"DLn","p":[],"r":[],"b":[],"c":"OzAAAAEAACIABgDhAAcA7QAHADkBBwC6AQMAvwECAOIBAwA=","e":"OjAAAAEAAAAAAAIAEAAAAAYA9gBGAQ=="}]\ ]')); if (typeof exports !== 'undefined') exports.searchIndex = searchIndex; else if (window.initSearch) window.initSearch(searchIndex); diff --git a/doc/search.desc/lib/lib-desc-0-.js b/doc/search.desc/lib/lib-desc-0-.js index 91011373c..73c159334 100644 --- a/doc/search.desc/lib/lib-desc-0-.js +++ b/doc/search.desc/lib/lib-desc-0-.js @@ -1 +1 @@ -searchState.loadedDescShard("lib", 0, "Assertables: Rust crate of assert macros for testing\nAssert a condition is true.\nAssert a condition is true.\nAssert macros for comparing bag collections.\nAssert a bag is equal to another.\nAssert a bag is equal to another.\nAssert a bag is not equal to another.\nAssert a bag is not equal to another.\nAssert a bag is a subbag of another.\nAssert a bag is a subbag of another.\nAssert a bag is a superbag of another.\nAssert a bag is a superbag of another.\nAssert macros for comparing commands and their stdout & …\nAssert a command stderr string contains a given containee.\nAssert a command stderr string contains a given containee.\nAssert a command stderr string is equal to another.\nAssert a command stderr string is equal to another.\nAssert a command stderr string is equal to an expression.\nAssert a command stderr string is equal to an expression.\nAssert a command stderr string is a match to a regex.\nAssert a command stderr string is a match to a regex.\nAssert a command stdout string contains a given containee.\nAssert a command stdout string contains a given containee.\nAssert a command stdout string is equal to another.\nAssert a command stdout string is equal to another.\nAssert a command stdout string is equal to an expression.\nAssert a command stdout string is equal to an expression.\nAssert command stdout string is a match to a regex.\nAssert command stdout string is a match to a regex.\nAssert a container is a match for an expression.\nAssert a container is a match for an expression.\nAssert an expression (such as a string) contains an …\nAssert an expression (such as a string) ends with an …\nAssert an expression (such as a string) ends with an …\nAssert an expression (such as a string) ends with an …\nAssert an expression is equal to another.\nAssert an expression is equal to another.\nAssert macros for comparing functions.\nAssert a function output is equal to another function …\nAssert a function output is equal to another function …\nAssert a function output is equal to an expression.\nAssert a function output is equal to an expression.\nAssert macros for comparing functions that return errors.\nAssert a function err() is equal to another.\nAssert a function err() is equal to another.\nAssert a function err() is equal to an expression.\nAssert a function err() is equal to an expression.\nAssert a function err() is greater than or equal to …\nAssert a function err() is greater than or equal to …\nAssert a function err() is greater than or equal to an …\nAssert a function err() is greater than or equal to an …\nAssert a function err() is greater than another.\nAssert a function err() is greater than another.\nAssert a function err() is greater than an expression.\nAssert a function err() is greater than an expression.\nAssert a function err() is less than or equal to another.\nAssert a function err() is less than or equal to another.\nAssert a function err() is less than or equal to an …\nAssert a function err() is less than or equal to an …\nAssert a function err() is less than another.\nAssert a function err() is less than another.\nAssert a function err() is less than an expression.\nAssert a function err() is less than an expression.\nAssert a function err() is not equal to another.\nAssert a function err() is not equal to another.\nAssert a function err() is not equal to an expression.\nAssert a function err() is not equal to an expression.\nAssert a function output is greater than or equal to …\nAssert a function output is greater than or equal to …\nAssert a function output is greater than or equal to an …\nAssert a function output is greater than or equal to an …\nAssert a function output is greater than another.\nAssert a function output is greater than another.\nAssert a function output is greater than an expression.\nAssert a function output is greater than an expression.\nAssert a function output is less than or equal to another.\nAssert a function output is less than or equal to another.\nAssert a function output is less than or equal to an …\nAssert a function output is less than or equal to an …\nAssert a function output is less than another.\nAssert a function output is less than another.\nAssert a function output is less than an expression.\nAssert a function output is less than an expression.\nAssert a function output is not equal to another.\nAssert a function output is not equal to another.\nAssert a function output is not equal to an expression.\nAssert a function output is not equal to an expression.\nAssert macros for comparing functions that return …\nAssert a function ok() is equal to another.\nAssert a function ok() is equal to another.\nAssert a function ok() is equal to an expression.\nAssert a function ok() is equal to an expression.\nAssert a function ok() is greater than or equal to another.\nAssert a function ok() is greater than or equal to another.\nAssert a function ok() is greater than or equal to an …\nAssert a function ok() is greater than or equal to an …\nAssert a function ok() is greater than another.\nAssert a function ok() is greater than another.\nAssert a function ok() is greater than an expression.\nAssert a function ok() is greater than an expression.\nAssert a function ok() is less than or equal to another.\nAssert a function ok() is less than or equal to another.\nAssert a function ok() is less than or equal to an …\nAssert a function ok() is less than or equal to an …\nAssert a function ok() is less than another.\nAssert a function ok() is less than another.\nAssert a function ok() is less than an expression.\nAssert a function ok() is less than an expression.\nAssert a function ok() is not equal to another.\nAssert a function ok() is not equal to another.\nAssert a function ok() is not equal to an expression.\nAssert a function ok() is not equal to an expression.\nAssert macros for comparing file system path contents.\nAssert a std::fs::read_to_string() contains a pattern.\nAssert a std::fs::read_to_string() contains a pattern.\nAssert a std::fs::read_to_string() value is equal to …\nAssert a std::fs::read_to_string() is equal to another.\nAssert a std::fs::read_to_string() value is equal to an …\nAssert a std::fs::read_to_string() value is equal to an …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than …\nAssert a std::fs::read_to_string() value is less than …\nAssert a std::fs::read_to_string() value is less than an …\nAssert a std::fs::read_to_string() value is less than an …\nAssert a std::fs::read_to_string() is a match to a regex.\nAssert a std::fs::read_to_string() is a match to a regex.\nAssert a std::fs::read_to_string() is not equal to another.\nAssert a std::fs::read_to_string() is not equal to another.\nAssert a std::fs::read_to_string() is not equal to an …\nAssert a std::fs::read_to_string() is not equal to an …\nAssert a value is greater than or equal to an expression.\nAssert a value is greater than or equal to an expression.\nAssert a value is greater than or equal to an expression.\nAssert a value is greater than an expression.\nAssert a value is greater than an expression.\nAssert a value is greater than an expression.\nAssert a number is within delta of another number.\nAssert a number is within delta of another number.\nAssert a number is within delta of another number.\nAssert a number is within epsilon of another number.\nAssert a number is within epsilon of another number.\nAssert a number is within epsilon of another number.\nAssert a infix operator, such as assert_infix!(a == b).\nAssert a infix operator, such as assert_infix!(a == b).\nAssert a infix operator, such as assert_infix!(a == b).\nAssert macros for comparing input/output reader streams.\nAssert a std::io::Read read_to_string() contains a pattern.\nAssert a std::io::Read read_to_string() contains a pattern.\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() is equal to …\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() is a match to a …\nAssert a std::io::Read read_to_string() is a match to a …\nAssert a std::io::Read read_to_string() is not equal to …\nAssert a std::io::Read read_to_string() is not equal to …\nAssert a std::io::Read read_to_string() is not equal to an …\nAssert a std::io::Read read_to_string() is not equal to an …\nAssert a matcher is a match for an expression.\nAssert a matcher is a match for an expression.\nAssert an expression (such as a regex) is a match for an …\nAssert a value is less than or equal to an expression.\nAssert a value is less than or equal to an expression.\nAssert a value is less than or equal to an expression.\nAssert a value is less than an expression.\nAssert a value is less than an expression.\nAssert a value is less than an expression.\nAssert an expression is not equal to an expression.\nAssert an expression is not equal to an expression.\nAssert an expression (such as a string) does not contain …\nAssert an expression (such as a string) does not contain …\nAssert an expression (such as a string) does not contain …\nAssert an expression (such as a string) does not end with …\nAssert an expression (such as a string) does not end with …\nAssert an expression (such as a string) does not end with …\nAssert an expression (such as a regex) is not a match for …\nAssert an expression (such as a regex) is not a match for …\nAssert an expression (such as a regex) is not a match for …\nAssert an expression (such as a string) does not start …\nAssert an expression (such as a string) does not start …\nAssert an expression (such as a string) does not start …\nAssert macros for Option {Some, None}\nAssert expression is None.\nAssert an expression.is_none() is true.\nAssert expression is Some(_).\nAssert an expression.is_some() is true.\nAssert two expressions are Some(_) and their values are …\nAssert a.is_some() and a.unwrap() are equal to another.\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert macros for Poll {Ready, Pending}\nAssert an expression is Pending.\nAssert an expression.is_pending() is true.\nAssert an expression is Ready(_).\nAssert an expression is Ready(_).\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert macros for comparing programs with arguments.\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert macros for Result {Ok, Err}\nAssert expression is Err(_).\nAssert expression is Err(_).\nAssert expression is Ok(_).\nAssert expression is Ok(_).\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are not …\nAssert two expressions are Ok(_) and their values are not …\nAssert macros for comparing set collections.\nAssert a set is disjoint with another.\nAssert a set is disjoint with another.\nAssert a set is equal to another.\nAssert a set is equal to another.\nAssert a set is joint with another.\nAssert a set is joint with another.\nAssert a set is not equal to another.\nAssert a set is not equal to another.\nAssert a set is a subset of another.\nAssert a set is a subset of another.\nAssert a set is a superset of another.\nAssert a set is a superset of another.\nAssert an expression (such as a string) starts with an …\nAssert an expression (such as a string) starts with an …\nAssert an expression (such as a string) starts with an …\nAssert a bag is equal to another.\nAssert a bag is not equal to another.\nAssert a bag is a subbag of another.\nAssert a bag is a superbag of another.\nAssert a command stderr string contains a given containee.\nAssert a command stderr string is equal to another.\nAssert a command stderr string is equal to an expression.\nAssert a command stderr string is a match to a regex.\nAssert a command stdout string contains a given containee.\nAssert a command stdout string is equal to another.\nAssert a command stdout string is equal to an expression.\nAssert command stdout string is a match to a regex.\nAssert a container is a match for an expression.\nAssert an expression (such as a string) ends with an …\nAssert a function output is equal to another function …\nAssert a function output is equal to an expression.\nAssert a function err() is equal to another.\nAssert a function err() is equal to an expression.\nAssert a function err() is greater than or equal to …\nAssert a function err() is greater than or equal to an …\nAssert a function err() is greater than another.\nAssert a function err() is greater than an expression.\nAssert a function err() is less than or equal to another.\nAssert a function err() is less than or equal to an …\nAssert a function err() is less than another.\nAssert a function err() is less than an expression.\nAssert a function err() is not equal to another.\nAssert a function err() is not equal to an expression.\nAssert a function output is greater than or equal to …\nAssert a function output is greater than or equal to an …\nAssert a function output is greater than another.\nAssert a function output is greater than an expression.\nAssert a function output is less than or equal to another.\nAssert a function output is less than or equal to an …\nAssert a function output is less than another.\nAssert a function output is less than an expression.\nAssert a function output is not equal to another.\nAssert a function output is not equal to an expression.\nAssert a function ok() is equal to another.\nAssert a function ok() is equal to an expression.\nAssert a function ok() is greater than or equal to another.\nAssert a function ok() is greater than or equal to an …\nAssert a function ok() is greater than another.\nAssert a function ok() is greater than an expression.\nAssert a function ok() is less than or equal to another.\nAssert a function ok() is less than or equal to an …\nAssert a function ok() is less than another.\nAssert a function ok() is less than an expression.\nAssert a function ok() is not equal to another.\nAssert a function ok() is not equal to an expression.\nAssert a std::fs::read_to_string() contains a pattern.\nAssert a std::fs::read_to_string() value is equal to …\nAssert a std::fs::read_to_string() value is equal to an …\nAssert a std::fs::read_to_string() value is greater than …\nAssert zzz.\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than …\nAssert a std::fs::read_to_string() value is less than an …\nAssert a std::fs::read_to_string() is a match to a regex.\nAssert a std::fs::read_to_string() is not equal to another.\nAssert a std::fs::read_to_string() is not equal to an …\nAssert a value is greater than or equal to an expression.\nAssert a value is greater than an expression.\nAssert a number is within delta of another number.\nAssert a number is within epsilon of another number.\nAssert a infix operator, such as assert_infix!(a == b).\nAssert a std::io::Read read_to_string() contains a pattern.\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is greater …\nAssert zzz.\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() is a match to a …\nAssert a std::io::Read read_to_string() is not equal to …\nAssert a std::io::Read read_to_string() is not equal to an …\nAssert a matcher is a match for an expression.\nAssert a value is less than or equal to an expression.\nAssert a value is less than an expression.\nAssert an expression (such as a string) does not contain …\nAssert an expression (such as a string) does not end with …\nAssert an expression (such as a regex) is not a match for …\nAssert an expression (such as a string) does not start …\nAssert expression is None.\nAssert expression is Some(_).\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert an expression is Pending.\nAssert poll.is_ready() is true.\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert expression is Err(_).\nAssert expression is Ok(_).\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are not …\nAssert a set is disjoint with another.\nAssert a set is equal to another.\nAssert a set is joint with another.\nAssert a set is not equal to another.\nAssert a set is a subset of another.\nAssert a set is a superset of another.\nAssert an expression (such as a string) starts with an …\nAssert a bag is equal to another.\nAssert a bag is not equal to another.\nAssert a bag is a subbag of another.\nAssert a bag is a superbag of another.\nAssert a command stderr string contains a given containee.\nAssert a command stderr string is equal to another.\nAssert a command stderr string is equal to an expression.\nAssert a command stderr string is a match to a regex.\nAssert a command stdout string contains a given containee.\nAssert a command stdout string is equal to another.\nAssert a command stdout string is equal to an expression.\nAssert command stdout string is a match to a regex.\nAssert a function output is equal to another function …\nAssert a function output is equal to an expression.\nAssert a function output is greater than or equal to …\nAssert a function output is greater than or equal to an …\nAssert a function output is greater than another.\nAssert a function output is greater than an expression.\nAssert a function output is less than or equal to another.\nAssert a function output is less than or equal to an …\nAssert a function output is less than another.\nAssert a function output is less than an expression.\nAssert a function output is not equal to another.\nAssert a function output is not equal to an expression.\nAssert a function err() is equal to another.\nAssert a function err() is equal to an expression.\nAssert a function err() is greater than or equal to …\nAssert a function err() is greater than or equal to an …\nAssert a function err() is greater than another.\nAssert a function err() is greater than an expression.\nAssert a function err() is less than or equal to another.\nAssert a function err() is less than or equal to an …\nAssert a function err() is less than another.\nAssert a function err() is less than an expression.\nAssert a function err() is not equal to another.\nAssert a function err() is not equal to an expression.\nAssert a function ok() is equal to another.\nAssert a function ok() is equal to an expression.\nAssert a function ok() is greater than or equal to another.\nAssert a function ok() is greater than or equal to an …\nAssert a function ok() is greater than another.\nAssert a function ok() is greater than an expression.\nAssert a function ok() is less than or equal to another.\nAssert a function ok() is less than or equal to an …\nAssert a function ok() is less than another.\nAssert a function ok() is less than an expression.\nAssert a function ok() is not equal to another.\nAssert a function ok() is not equal to an expression.\nAssert a std::fs::read_to_string() contains a pattern.\nAssert a std::fs::read_to_string() value is equal to …\nAssert a std::fs::read_to_string() value is equal to an …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than …\nAssert a std::fs::read_to_string() value is less than an …\nAssert a std::fs::read_to_string() is a match to a regex.\nAssert a std::fs::read_to_string() is not equal to another.\nAssert a std::fs::read_to_string() is not equal to an …\nAssert a std::io::Read read_to_string() contains a pattern.\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() is a match to a …\nAssert a std::io::Read read_to_string() is not equal to …\nAssert a std::io::Read read_to_string() is not equal to an …\nAssert expression is None.\nAssert expression is Some(_).\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert an expression is Pending.\nAssert an expression is Ready(_).\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert expression is Err(_).\nAssert expression is Ok(_).\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are not …\nAssert a set is disjoint with another.\nAssert a set is equal to another.\nAssert a set is joint with another.\nAssert a set is not equal to another.\nAssert a set is a subset of another.\nAssert a set is a superset of another.") \ No newline at end of file +searchState.loadedDescShard("lib", 0, "Assertables: Rust crate of assert macros for testing\nAssert a condition is true.\nAssert a condition is true.\nAssert macros for comparing bag collections.\nAssert a bag is equal to another.\nAssert a bag is equal to another.\nAssert a bag is not equal to another.\nAssert a bag is not equal to another.\nAssert a bag is a subbag of another.\nAssert a bag is a subbag of another.\nAssert a bag is a superbag of another.\nAssert a bag is a superbag of another.\nAssert macros for comparing commands and their stdout & …\nAssert a command stderr string contains a given containee.\nAssert a command stderr string contains a given containee.\nAssert a command stderr string is equal to another.\nAssert a command stderr string is equal to another.\nAssert a command stderr string is equal to an expression.\nAssert a command stderr string is equal to an expression.\nAssert a command stderr string is a match to a regex.\nAssert a command stderr string is a match to a regex.\nAssert a command stdout string contains a given containee.\nAssert a command stdout string contains a given containee.\nAssert a command stdout string is equal to another.\nAssert a command stdout string is equal to another.\nAssert a command stdout string is equal to an expression.\nAssert a command stdout string is equal to an expression.\nAssert command stdout string is a match to a regex.\nAssert command stdout string is a match to a regex.\nAssert a container is a match for an expression.\nAssert a container is a match for an expression.\nAssert an expression (such as a string) contains an …\nAssert an expression (such as a string) ends with an …\nAssert an expression (such as a string) ends with an …\nAssert an expression (such as a string) ends with an …\nAssert an expression is equal to another.\nAssert an expression is equal to another.\nAssert expression is Err(_).\nAssert expression is Err(_).\nAssert expression is Err(_).\nAssert macros for comparing functions.\nAssert a function output is equal to another function …\nAssert a function output is equal to another function …\nAssert a function output is equal to an expression.\nAssert a function output is equal to an expression.\nAssert macros for comparing functions that return errors.\nAssert a function err() is equal to another.\nAssert a function err() is equal to another.\nAssert a function err() is equal to an expression.\nAssert a function err() is equal to an expression.\nAssert a function err() is greater than or equal to …\nAssert a function err() is greater than or equal to …\nAssert a function err() is greater than or equal to an …\nAssert a function err() is greater than or equal to an …\nAssert a function err() is greater than another.\nAssert a function err() is greater than another.\nAssert a function err() is greater than an expression.\nAssert a function err() is greater than an expression.\nAssert a function err() is less than or equal to another.\nAssert a function err() is less than or equal to another.\nAssert a function err() is less than or equal to an …\nAssert a function err() is less than or equal to an …\nAssert a function err() is less than another.\nAssert a function err() is less than another.\nAssert a function err() is less than an expression.\nAssert a function err() is less than an expression.\nAssert a function err() is not equal to another.\nAssert a function err() is not equal to another.\nAssert a function err() is not equal to an expression.\nAssert a function err() is not equal to an expression.\nAssert a function output is greater than or equal to …\nAssert a function output is greater than or equal to …\nAssert a function output is greater than or equal to an …\nAssert a function output is greater than or equal to an …\nAssert a function output is greater than another.\nAssert a function output is greater than another.\nAssert a function output is greater than an expression.\nAssert a function output is greater than an expression.\nAssert a function output is less than or equal to another.\nAssert a function output is less than or equal to another.\nAssert a function output is less than or equal to an …\nAssert a function output is less than or equal to an …\nAssert a function output is less than another.\nAssert a function output is less than another.\nAssert a function output is less than an expression.\nAssert a function output is less than an expression.\nAssert a function output is not equal to another.\nAssert a function output is not equal to another.\nAssert a function output is not equal to an expression.\nAssert a function output is not equal to an expression.\nAssert macros for comparing functions that return …\nAssert a function ok() is equal to another.\nAssert a function ok() is equal to another.\nAssert a function ok() is equal to an expression.\nAssert a function ok() is equal to an expression.\nAssert a function ok() is greater than or equal to another.\nAssert a function ok() is greater than or equal to another.\nAssert a function ok() is greater than or equal to an …\nAssert a function ok() is greater than or equal to an …\nAssert a function ok() is greater than another.\nAssert a function ok() is greater than another.\nAssert a function ok() is greater than an expression.\nAssert a function ok() is greater than an expression.\nAssert a function ok() is less than or equal to another.\nAssert a function ok() is less than or equal to another.\nAssert a function ok() is less than or equal to an …\nAssert a function ok() is less than or equal to an …\nAssert a function ok() is less than another.\nAssert a function ok() is less than another.\nAssert a function ok() is less than an expression.\nAssert a function ok() is less than an expression.\nAssert a function ok() is not equal to another.\nAssert a function ok() is not equal to another.\nAssert a function ok() is not equal to an expression.\nAssert a function ok() is not equal to an expression.\nAssert macros for comparing file system path contents.\nAssert a std::fs::read_to_string() contains a pattern.\nAssert a std::fs::read_to_string() contains a pattern.\nAssert a std::fs::read_to_string() value is equal to …\nAssert a std::fs::read_to_string() is equal to another.\nAssert a std::fs::read_to_string() value is equal to an …\nAssert a std::fs::read_to_string() value is equal to an …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than …\nAssert a std::fs::read_to_string() value is less than …\nAssert a std::fs::read_to_string() value is less than an …\nAssert a std::fs::read_to_string() value is less than an …\nAssert a std::fs::read_to_string() is a match to a regex.\nAssert a std::fs::read_to_string() is a match to a regex.\nAssert a std::fs::read_to_string() is not equal to another.\nAssert a std::fs::read_to_string() is not equal to another.\nAssert a std::fs::read_to_string() is not equal to an …\nAssert a std::fs::read_to_string() is not equal to an …\nAssert a value is greater than or equal to an expression.\nAssert a value is greater than or equal to an expression.\nAssert a value is greater than or equal to an expression.\nAssert a value is greater than an expression.\nAssert a value is greater than an expression.\nAssert a value is greater than an expression.\nAssert a number is within delta of another number.\nAssert a number is within delta of another number.\nAssert a number is within delta of another number.\nAssert a number is within epsilon of another number.\nAssert a number is within epsilon of another number.\nAssert a number is within epsilon of another number.\nAssert a infix operator, such as assert_infix!(a == b).\nAssert a infix operator, such as assert_infix!(a == b).\nAssert a infix operator, such as assert_infix!(a == b).\nAssert macros for comparing input/output reader streams.\nAssert a std::io::Read read_to_string() contains a pattern.\nAssert a std::io::Read read_to_string() contains a pattern.\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() is equal to …\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() is a match to a …\nAssert a std::io::Read read_to_string() is a match to a …\nAssert a std::io::Read read_to_string() is not equal to …\nAssert a std::io::Read read_to_string() is not equal to …\nAssert a std::io::Read read_to_string() is not equal to an …\nAssert a std::io::Read read_to_string() is not equal to an …\nAssert a matcher is a match for an expression.\nAssert a matcher is a match for an expression.\nAssert an expression (such as a regex) is a match for an …\nAssert a value is less than or equal to an expression.\nAssert a value is less than or equal to an expression.\nAssert a value is less than or equal to an expression.\nAssert a value is less than an expression.\nAssert a value is less than an expression.\nAssert a value is less than an expression.\nAssert an expression is not equal to an expression.\nAssert an expression is not equal to an expression.\nAssert expression is None.\nAssert expression is None.\nAssert an expression.is_none() is true.\nAssert an expression (such as a string) does not contain …\nAssert an expression (such as a string) does not contain …\nAssert an expression (such as a string) does not contain …\nAssert an expression (such as a string) does not end with …\nAssert an expression (such as a string) does not end with …\nAssert an expression (such as a string) does not end with …\nAssert an expression (such as a regex) is not a match for …\nAssert an expression (such as a regex) is not a match for …\nAssert an expression (such as a regex) is not a match for …\nAssert an expression (such as a string) does not start …\nAssert an expression (such as a string) does not start …\nAssert an expression (such as a string) does not start …\nAssert expression is Ok(_).\nAssert expression is Ok(_).\nAssert expression is Ok(_).\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are not …\nAssert two expressions are Ok(_) and their values are not …\nAssert two expressions are Ok(_) and their values are not …\nAssert macros for Option {Some, None}\nAssert expression is None.\nAssert an expression.is_none() is true.\nAssert expression is Some(_).\nAssert an expression.is_some() is true.\nAssert two expressions are Some(_) and their values are …\nAssert a.is_some() and a.unwrap() are equal to another.\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert an expression is Pending.\nAssert an expression is Pending.\nAssert an expression.is_pending() is true.\nAssert macros for Poll {Ready, Pending}\nAssert an expression is Pending.\nAssert an expression.is_pending() is true.\nAssert an expression is Ready(_).\nAssert an expression is Ready(_).\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert macros for comparing programs with arguments.\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert an expression is Ready(_).\nAssert an expression is Ready(_).\nAssert an expression is Ready(_).\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert macros for Result {Ok, Err}\nAssert expression is Err(_).\nAssert expression is Err(_).\nAssert expression is Ok(_).\nAssert expression is Ok(_).\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are not …\nAssert two expressions are Ok(_) and their values are not …\nAssert macros for comparing set collections.\nAssert a set is disjoint with another.\nAssert a set is disjoint with another.\nAssert a set is equal to another.\nAssert a set is equal to another.\nAssert a set is joint with another.\nAssert a set is joint with another.\nAssert a set is not equal to another.\nAssert a set is not equal to another.\nAssert a set is a subset of another.\nAssert a set is a subset of another.\nAssert a set is a superset of another.\nAssert a set is a superset of another.\nAssert expression is Some(_).\nAssert expression is Some(_).\nAssert an expression.is_some() is true.\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert a.is_some() and a.unwrap() are equal to another.\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert an expression (such as a string) starts with an …\nAssert an expression (such as a string) starts with an …\nAssert an expression (such as a string) starts with an …\nAssert a bag is equal to another.\nAssert a bag is not equal to another.\nAssert a bag is a subbag of another.\nAssert a bag is a superbag of another.\nAssert a command stderr string contains a given containee.\nAssert a command stderr string is equal to another.\nAssert a command stderr string is equal to an expression.\nAssert a command stderr string is a match to a regex.\nAssert a command stdout string contains a given containee.\nAssert a command stdout string is equal to another.\nAssert a command stdout string is equal to an expression.\nAssert command stdout string is a match to a regex.\nAssert a container is a match for an expression.\nAssert an expression (such as a string) ends with an …\nAssert expression is Err(_).\nAssert a function output is equal to another function …\nAssert a function output is equal to an expression.\nAssert a function err() is equal to another.\nAssert a function err() is equal to an expression.\nAssert a function err() is greater than or equal to …\nAssert a function err() is greater than or equal to an …\nAssert a function err() is greater than another.\nAssert a function err() is greater than an expression.\nAssert a function err() is less than or equal to another.\nAssert a function err() is less than or equal to an …\nAssert a function err() is less than another.\nAssert a function err() is less than an expression.\nAssert a function err() is not equal to another.\nAssert a function err() is not equal to an expression.\nAssert a function output is greater than or equal to …\nAssert a function output is greater than or equal to an …\nAssert a function output is greater than another.\nAssert a function output is greater than an expression.\nAssert a function output is less than or equal to another.\nAssert a function output is less than or equal to an …\nAssert a function output is less than another.\nAssert a function output is less than an expression.\nAssert a function output is not equal to another.\nAssert a function output is not equal to an expression.\nAssert a function ok() is equal to another.\nAssert a function ok() is equal to an expression.\nAssert a function ok() is greater than or equal to another.\nAssert a function ok() is greater than or equal to an …\nAssert a function ok() is greater than another.\nAssert a function ok() is greater than an expression.\nAssert a function ok() is less than or equal to another.\nAssert a function ok() is less than or equal to an …\nAssert a function ok() is less than another.\nAssert a function ok() is less than an expression.\nAssert a function ok() is not equal to another.\nAssert a function ok() is not equal to an expression.\nAssert a std::fs::read_to_string() contains a pattern.\nAssert a std::fs::read_to_string() value is equal to …\nAssert a std::fs::read_to_string() value is equal to an …\nAssert a std::fs::read_to_string() value is greater than …\nAssert zzz.\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than …\nAssert a std::fs::read_to_string() value is less than an …\nAssert a std::fs::read_to_string() is a match to a regex.\nAssert a std::fs::read_to_string() is not equal to another.\nAssert a std::fs::read_to_string() is not equal to an …\nAssert a value is greater than or equal to an expression.\nAssert a value is greater than an expression.\nAssert a number is within delta of another number.\nAssert a number is within epsilon of another number.\nAssert a infix operator, such as assert_infix!(a == b).\nAssert a std::io::Read read_to_string() contains a pattern.\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is greater …\nAssert zzz.\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() is a match to a …\nAssert a std::io::Read read_to_string() is not equal to …\nAssert a std::io::Read read_to_string() is not equal to an …\nAssert a matcher is a match for an expression.\nAssert a value is less than or equal to an expression.\nAssert a value is less than an expression.\nAssert expression is None.\nAssert an expression (such as a string) does not contain …\nAssert an expression (such as a string) does not end with …\nAssert an expression (such as a regex) is not a match for …\nAssert an expression (such as a string) does not start …\nAssert expression is Ok(_).\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are not …\nAssert expression is None.\nAssert expression is Some(_).\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert an expression is Pending.\nAssert an expression is Pending.\nAssert poll.is_ready() is true.\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert poll.is_ready() is true.\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert expression is Err(_).\nAssert expression is Ok(_).\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are not …\nAssert a set is disjoint with another.\nAssert a set is equal to another.\nAssert a set is joint with another.\nAssert a set is not equal to another.\nAssert a set is a subset of another.\nAssert a set is a superset of another.\nAssert expression is Some(_).\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert an expression (such as a string) starts with an …\nAssert a bag is equal to another.\nAssert a bag is not equal to another.\nAssert a bag is a subbag of another.\nAssert a bag is a superbag of another.\nAssert a command stderr string contains a given containee.\nAssert a command stderr string is equal to another.\nAssert a command stderr string is equal to an expression.\nAssert a command stderr string is a match to a regex.\nAssert a command stdout string contains a given containee.\nAssert a command stdout string is equal to another.\nAssert a command stdout string is equal to an expression.\nAssert command stdout string is a match to a regex.\nAssert a function output is equal to another function …\nAssert a function output is equal to an expression.\nAssert a function output is greater than or equal to …\nAssert a function output is greater than or equal to an …\nAssert a function output is greater than another.\nAssert a function output is greater than an expression.\nAssert a function output is less than or equal to another.\nAssert a function output is less than or equal to an …\nAssert a function output is less than another.\nAssert a function output is less than an expression.\nAssert a function output is not equal to another.\nAssert a function output is not equal to an expression.\nAssert a function err() is equal to another.\nAssert a function err() is equal to an expression.\nAssert a function err() is greater than or equal to …\nAssert a function err() is greater than or equal to an …\nAssert a function err() is greater than another.\nAssert a function err() is greater than an expression.\nAssert a function err() is less than or equal to another.\nAssert a function err() is less than or equal to an …\nAssert a function err() is less than another.\nAssert a function err() is less than an expression.\nAssert a function err() is not equal to another.\nAssert a function err() is not equal to an expression.\nAssert a function ok() is equal to another.\nAssert a function ok() is equal to an expression.\nAssert a function ok() is greater than or equal to another.\nAssert a function ok() is greater than or equal to an …\nAssert a function ok() is greater than another.\nAssert a function ok() is greater than an expression.\nAssert a function ok() is less than or equal to another.\nAssert a function ok() is less than or equal to an …\nAssert a function ok() is less than another.\nAssert a function ok() is less than an expression.\nAssert a function ok() is not equal to another.\nAssert a function ok() is not equal to an expression.\nAssert a std::fs::read_to_string() contains a pattern.\nAssert a std::fs::read_to_string() value is equal to …\nAssert a std::fs::read_to_string() value is equal to an …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is greater than …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than or …\nAssert a std::fs::read_to_string() value is less than …\nAssert a std::fs::read_to_string() value is less than an …\nAssert a std::fs::read_to_string() is a match to a regex.\nAssert a std::fs::read_to_string() is not equal to another.\nAssert a std::fs::read_to_string() is not equal to an …\nAssert a std::io::Read read_to_string() contains a pattern.\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is equal to …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is greater …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() value is less than …\nAssert a std::io::Read read_to_string() is a match to a …\nAssert a std::io::Read read_to_string() is not equal to …\nAssert a std::io::Read read_to_string() is not equal to an …\nAssert expression is None.\nAssert expression is Some(_).\nAssert two expressions are Some(_) and their values are …\nAssert two expressions are Some(_) and their values are …\nAssert an expression is Pending.\nAssert an expression is Ready(_).\nAssert two expressions are Ready(_) and their values are …\nAssert two expressions are Ready(_) and their values are …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stderr …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert a command (built with program and args) stdout …\nAssert expression is Err(_).\nAssert expression is Ok(_).\nAssert two expressions are Ok(_) and their values are …\nAssert two expressions are Ok(_) and their values are not …\nAssert a set is disjoint with another.\nAssert a set is equal to another.\nAssert a set is joint with another.\nAssert a set is not equal to another.\nAssert a set is a subset of another.\nAssert a set is a superset of another.") \ No newline at end of file diff --git a/doc/src-files.js b/doc/src-files.js index f2c4b32a6..7128ae54c 100644 --- a/doc/src-files.js +++ b/doc/src-files.js @@ -1,4 +1,4 @@ var srcIndex = new Map(JSON.parse('[\ -["lib",["",[["assert_bag",[],["assert_bag_eq.rs","assert_bag_ne.rs","assert_bag_subbag.rs","assert_bag_superbag.rs","mod.rs"]],["assert_command",[],["assert_command_stderr_contains.rs","assert_command_stderr_eq.rs","assert_command_stderr_eq_expr.rs","assert_command_stderr_is_match.rs","assert_command_stdout_contains.rs","assert_command_stdout_eq.rs","assert_command_stdout_eq_expr.rs","assert_command_stdout_is_match.rs","mod.rs"]],["assert_fn",[],["assert_fn_eq.rs","assert_fn_eq_expr.rs","assert_fn_ge.rs","assert_fn_ge_expr.rs","assert_fn_gt.rs","assert_fn_gt_expr.rs","assert_fn_le.rs","assert_fn_le_expr.rs","assert_fn_lt.rs","assert_fn_lt_expr.rs","assert_fn_ne.rs","assert_fn_ne_expr.rs","mod.rs"]],["assert_fn_err",[],["assert_fn_err_eq.rs","assert_fn_err_eq_expr.rs","assert_fn_err_ge.rs","assert_fn_err_ge_expr.rs","assert_fn_err_gt.rs","assert_fn_err_gt_expr.rs","assert_fn_err_le.rs","assert_fn_err_le_expr.rs","assert_fn_err_lt.rs","assert_fn_err_lt_expr.rs","assert_fn_err_ne.rs","assert_fn_err_ne_expr.rs","mod.rs"]],["assert_fn_ok",[],["assert_fn_ok_eq.rs","assert_fn_ok_eq_expr.rs","assert_fn_ok_ge.rs","assert_fn_ok_ge_expr.rs","assert_fn_ok_gt.rs","assert_fn_ok_gt_expr.rs","assert_fn_ok_le.rs","assert_fn_ok_le_expr.rs","assert_fn_ok_lt.rs","assert_fn_ok_lt_expr.rs","assert_fn_ok_ne.rs","assert_fn_ok_ne_expr.rs","mod.rs"]],["assert_fs_read_to_string",[],["assert_fs_read_to_string_contains.rs","assert_fs_read_to_string_eq.rs","assert_fs_read_to_string_eq_expr.rs","assert_fs_read_to_string_ge.rs","assert_fs_read_to_string_ge_expr.rs","assert_fs_read_to_string_gt.rs","assert_fs_read_to_string_gt_expr.rs","assert_fs_read_to_string_le.rs","assert_fs_read_to_string_le_expr.rs","assert_fs_read_to_string_lt.rs","assert_fs_read_to_string_lt_expr.rs","assert_fs_read_to_string_matches.rs","assert_fs_read_to_string_ne.rs","assert_fs_read_to_string_ne_expr.rs","mod.rs"]],["assert_io_read_to_string",[],["assert_io_read_to_string_contains.rs","assert_io_read_to_string_eq.rs","assert_io_read_to_string_eq_expr.rs","assert_io_read_to_string_ge.rs","assert_io_read_to_string_ge_expr.rs","assert_io_read_to_string_gt.rs","assert_io_read_to_string_gt_expr.rs","assert_io_read_to_string_le.rs","assert_io_read_to_string_le_expr.rs","assert_io_read_to_string_lt.rs","assert_io_read_to_string_lt_expr.rs","assert_io_read_to_string_matches.rs","assert_io_read_to_string_ne.rs","assert_io_read_to_string_ne_expr.rs","mod.rs"]],["assert_option",[],["assert_option_none.rs","assert_option_some.rs","assert_option_some_eq.rs","assert_option_some_ne.rs","mod.rs"]],["assert_poll",[],["assert_poll_pending.rs","assert_poll_ready.rs","assert_poll_ready_eq.rs","assert_poll_ready_ne.rs","mod.rs"]],["assert_program_args",[],["assert_program_args_stderr_contains.rs","assert_program_args_stderr_eq.rs","assert_program_args_stderr_eq_expr.rs","assert_program_args_stderr_ge.rs","assert_program_args_stderr_ge_expr.rs","assert_program_args_stderr_gt.rs","assert_program_args_stderr_gt_expr.rs","assert_program_args_stderr_is_match.rs","assert_program_args_stderr_le.rs","assert_program_args_stderr_le_expr.rs","assert_program_args_stderr_lt.rs","assert_program_args_stderr_lt_expr.rs","assert_program_args_stderr_ne.rs","assert_program_args_stderr_ne_expr.rs","assert_program_args_stdout_contains.rs","assert_program_args_stdout_eq.rs","assert_program_args_stdout_eq_expr.rs","assert_program_args_stdout_ge.rs","assert_program_args_stdout_ge_expr.rs","assert_program_args_stdout_gt.rs","assert_program_args_stdout_gt_expr.rs","assert_program_args_stdout_is_match.rs","assert_program_args_stdout_le.rs","assert_program_args_stdout_le_expr.rs","assert_program_args_stdout_lt.rs","assert_program_args_stdout_lt_expr.rs","assert_program_args_stdout_ne.rs","assert_program_args_stdout_ne_expr.rs","mod.rs"]],["assert_result",[],["assert_result_err.rs","assert_result_ok.rs","assert_result_ok_eq.rs","assert_result_ok_ne.rs","mod.rs"]],["assert_set",[],["assert_set_disjoint.rs","assert_set_eq.rs","assert_set_joint.rs","assert_set_ne.rs","assert_set_subset.rs","assert_set_superset.rs","mod.rs"]]],["assert.rs","assert_contains.rs","assert_ends_with.rs","assert_eq.rs","assert_ge.rs","assert_gt.rs","assert_in_delta.rs","assert_in_epsilon.rs","assert_infix.rs","assert_is_match.rs","assert_le.rs","assert_lt.rs","assert_ne.rs","assert_not_contains.rs","assert_not_ends_with.rs","assert_not_match.rs","assert_not_starts_with.rs","assert_starts_with.rs","lib.rs"]]]\ +["lib",["",[["assert_bag",[],["assert_bag_eq.rs","assert_bag_ne.rs","assert_bag_subbag.rs","assert_bag_superbag.rs","mod.rs"]],["assert_command",[],["assert_command_stderr_contains.rs","assert_command_stderr_eq.rs","assert_command_stderr_eq_expr.rs","assert_command_stderr_is_match.rs","assert_command_stdout_contains.rs","assert_command_stdout_eq.rs","assert_command_stdout_eq_expr.rs","assert_command_stdout_is_match.rs","mod.rs"]],["assert_fn",[],["assert_fn_eq.rs","assert_fn_eq_expr.rs","assert_fn_ge.rs","assert_fn_ge_expr.rs","assert_fn_gt.rs","assert_fn_gt_expr.rs","assert_fn_le.rs","assert_fn_le_expr.rs","assert_fn_lt.rs","assert_fn_lt_expr.rs","assert_fn_ne.rs","assert_fn_ne_expr.rs","mod.rs"]],["assert_fn_err",[],["assert_fn_err_eq.rs","assert_fn_err_eq_expr.rs","assert_fn_err_ge.rs","assert_fn_err_ge_expr.rs","assert_fn_err_gt.rs","assert_fn_err_gt_expr.rs","assert_fn_err_le.rs","assert_fn_err_le_expr.rs","assert_fn_err_lt.rs","assert_fn_err_lt_expr.rs","assert_fn_err_ne.rs","assert_fn_err_ne_expr.rs","mod.rs"]],["assert_fn_ok",[],["assert_fn_ok_eq.rs","assert_fn_ok_eq_expr.rs","assert_fn_ok_ge.rs","assert_fn_ok_ge_expr.rs","assert_fn_ok_gt.rs","assert_fn_ok_gt_expr.rs","assert_fn_ok_le.rs","assert_fn_ok_le_expr.rs","assert_fn_ok_lt.rs","assert_fn_ok_lt_expr.rs","assert_fn_ok_ne.rs","assert_fn_ok_ne_expr.rs","mod.rs"]],["assert_fs_read_to_string",[],["assert_fs_read_to_string_contains.rs","assert_fs_read_to_string_eq.rs","assert_fs_read_to_string_eq_expr.rs","assert_fs_read_to_string_ge.rs","assert_fs_read_to_string_ge_expr.rs","assert_fs_read_to_string_gt.rs","assert_fs_read_to_string_gt_expr.rs","assert_fs_read_to_string_le.rs","assert_fs_read_to_string_le_expr.rs","assert_fs_read_to_string_lt.rs","assert_fs_read_to_string_lt_expr.rs","assert_fs_read_to_string_matches.rs","assert_fs_read_to_string_ne.rs","assert_fs_read_to_string_ne_expr.rs","mod.rs"]],["assert_io_read_to_string",[],["assert_io_read_to_string_contains.rs","assert_io_read_to_string_eq.rs","assert_io_read_to_string_eq_expr.rs","assert_io_read_to_string_ge.rs","assert_io_read_to_string_ge_expr.rs","assert_io_read_to_string_gt.rs","assert_io_read_to_string_gt_expr.rs","assert_io_read_to_string_le.rs","assert_io_read_to_string_le_expr.rs","assert_io_read_to_string_lt.rs","assert_io_read_to_string_lt_expr.rs","assert_io_read_to_string_matches.rs","assert_io_read_to_string_ne.rs","assert_io_read_to_string_ne_expr.rs","mod.rs"]],["assert_option",[],["assert_option_none.rs","assert_option_some.rs","assert_option_some_eq.rs","assert_option_some_ne.rs","mod.rs"]],["assert_poll",[],["assert_poll_pending.rs","assert_poll_ready.rs","assert_poll_ready_eq.rs","assert_poll_ready_ne.rs","mod.rs"]],["assert_program_args",[],["assert_program_args_stderr_contains.rs","assert_program_args_stderr_eq.rs","assert_program_args_stderr_eq_expr.rs","assert_program_args_stderr_ge.rs","assert_program_args_stderr_ge_expr.rs","assert_program_args_stderr_gt.rs","assert_program_args_stderr_gt_expr.rs","assert_program_args_stderr_is_match.rs","assert_program_args_stderr_le.rs","assert_program_args_stderr_le_expr.rs","assert_program_args_stderr_lt.rs","assert_program_args_stderr_lt_expr.rs","assert_program_args_stderr_ne.rs","assert_program_args_stderr_ne_expr.rs","assert_program_args_stdout_contains.rs","assert_program_args_stdout_eq.rs","assert_program_args_stdout_eq_expr.rs","assert_program_args_stdout_ge.rs","assert_program_args_stdout_ge_expr.rs","assert_program_args_stdout_gt.rs","assert_program_args_stdout_gt_expr.rs","assert_program_args_stdout_is_match.rs","assert_program_args_stdout_le.rs","assert_program_args_stdout_le_expr.rs","assert_program_args_stdout_lt.rs","assert_program_args_stdout_lt_expr.rs","assert_program_args_stdout_ne.rs","assert_program_args_stdout_ne_expr.rs","mod.rs"]],["assert_result",[],["assert_result_err.rs","assert_result_ok.rs","assert_result_ok_eq.rs","assert_result_ok_ne.rs","mod.rs"]],["assert_set",[],["assert_set_disjoint.rs","assert_set_eq.rs","assert_set_joint.rs","assert_set_ne.rs","assert_set_subset.rs","assert_set_superset.rs","mod.rs"]]],["assert.rs","assert_contains.rs","assert_ends_with.rs","assert_eq.rs","assert_err.rs","assert_ge.rs","assert_gt.rs","assert_in_delta.rs","assert_in_epsilon.rs","assert_infix.rs","assert_is_match.rs","assert_le.rs","assert_lt.rs","assert_ne.rs","assert_none.rs","assert_not_contains.rs","assert_not_ends_with.rs","assert_not_match.rs","assert_not_starts_with.rs","assert_ok.rs","assert_ok_eq.rs","assert_ok_ne.rs","assert_pending.rs","assert_ready.rs","assert_ready_eq.rs","assert_ready_ne.rs","assert_some.rs","assert_some_eq.rs","assert_some_ne.rs","assert_starts_with.rs","lib.rs"]]]\ ]')); createSrcSidebar(); diff --git a/doc/src/lib/assert_err.rs.html b/doc/src/lib/assert_err.rs.html new file mode 100644 index 000000000..47c4960c2 --- /dev/null +++ b/doc/src/lib/assert_err.rs.html @@ -0,0 +1,359 @@ +assert_err.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +
                                                  //! Assert expression is Err(_).
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! # fn main() {
                                                  +//! let a: Result<(), i8> = Err(1);
                                                  +//! assert_err!(a);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_err`](macro@crate::assert_err)
                                                  +//! * [`assert_err_as_result`](macro@crate::assert_err_as_result)
                                                  +//! * [`debug_assert_err`](macro@crate::debug_assert_err)
                                                  +
                                                  +/// Assert expression is Err(_).
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_err`](macro.assert_err.html),
                                                  +/// except this macro returns a Result, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_err`](macro@crate::assert_err)
                                                  +/// * [`assert_err_as_result`](macro@crate::assert_err_as_result)
                                                  +/// * [`debug_assert_err`](macro@crate::debug_assert_err)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_err_as_result {
                                                  +    ($result:expr $(,)?) => ({
                                                  +        match (&$result) {
                                                  +            result => {
                                                  +                match (result) {
                                                  +                    Err(_) => {
                                                  +                        Ok(())
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_err!(a)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($result),
                                                  +                            result
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_err_as_result_x_success() {
                                                  +        let a: Result<(), i8> = Err(1);
                                                  +        let result = assert_err_as_result!(a);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_err_as_result_x_failure() {
                                                  +        let a: Result<(), i8>  = Ok(());
                                                  +        let result = assert_err_as_result!(a);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_err!(a)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ok(())`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +}
                                                  +
                                                  +/// Assert expression is Err(_).
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// # fn main() {
                                                  +/// let a: Result<(), i8> = Err(1);
                                                  +/// assert_err!(a);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Result<(), i8> = Ok(());
                                                  +/// assert_err!(a);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_err!(a)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Ok(())`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_err!(a)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Ok(())`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_err`](macro@crate::assert_err)
                                                  +/// * [`assert_err_as_result`](macro@crate::assert_err_as_result)
                                                  +/// * [`debug_assert_err`](macro@crate::debug_assert_err)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_err {
                                                  +    ($result:expr $(,)?) => ({
                                                  +        match assert_err_as_result!($result) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($result:expr, $($message:tt)+) => ({
                                                  +        match assert_err_as_result!($result) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert expression is Err(_).
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_err`](macro.assert_err.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_err`](macro@crate::assert_err)
                                                  +/// * [`assert_err`](macro@crate::assert_err)
                                                  +/// * [`debug_assert_err`](macro@crate::debug_assert_err)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_err {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_err!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_none.rs.html b/doc/src/lib/assert_none.rs.html new file mode 100644 index 000000000..45ad79cf5 --- /dev/null +++ b/doc/src/lib/assert_none.rs.html @@ -0,0 +1,359 @@ +assert_none.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +
                                                  //! Assert expression is None.
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! # fn main() {
                                                  +//! let a: Option<i8> = Option::None;
                                                  +//! assert_none!(a);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_none`](macro@crate::assert_none)
                                                  +//! * [`assert_none_as_result`](macro@crate::assert_none_as_result)
                                                  +//! * [`debug_assert_none`](macro@crate::debug_assert_none)
                                                  +
                                                  +/// Assert an expression.is_none() is true.
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_none`](macro.assert_none.html),
                                                  +/// except this macro returns a Result, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_none`](macro@crate::assert_none)
                                                  +/// * [`assert_none_as_result`](macro@crate::assert_none_as_result)
                                                  +/// * [`debug_assert_none`](macro@crate::debug_assert_none)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_none_as_result {
                                                  +    ($a:expr $(,)?) => ({
                                                  +        match (&$a) {
                                                  +            a => {
                                                  +                match (a) {
                                                  +                    None => {
                                                  +                        Ok(())
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_none!(a)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($a),
                                                  +                            a
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_none_as_result_x_success() {
                                                  +        let a: Option<i8> = Option::None;
                                                  +        let result = assert_none_as_result!(a);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_none_as_result_x_failure() {
                                                  +        let a: Option<i8> = Option::Some(1);
                                                  +        let result = assert_none_as_result!(a);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_none!(a)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Some(1)`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +}
                                                  +
                                                  +/// Assert expression is None.
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// # fn main() {
                                                  +/// let a: Option<i8> = Option::None;
                                                  +/// assert_none!(a);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Option<i8> = Option::Some(1);
                                                  +/// assert_none!(a);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_none!(a)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Some(1)`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_none!(a)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Some(1)`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_none`](macro@crate::assert_none)
                                                  +/// * [`assert_none_as_result`](macro@crate::assert_none_as_result)
                                                  +/// * [`debug_assert_none`](macro@crate::debug_assert_none)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_none {
                                                  +    ($option:expr $(,)?) => ({
                                                  +        match assert_none_as_result!($option) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($option:expr, $($message:tt)+) => ({
                                                  +        match assert_none_as_result!($option) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert expression is None.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_none`](macro.assert_none.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_none`](macro@crate::assert_none)
                                                  +/// * [`assert_none`](macro@crate::assert_none)
                                                  +/// * [`debug_assert_none`](macro@crate::debug_assert_none)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_none {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_none!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_ok.rs.html b/doc/src/lib/assert_ok.rs.html new file mode 100644 index 000000000..f71b9e6c3 --- /dev/null +++ b/doc/src/lib/assert_ok.rs.html @@ -0,0 +1,359 @@ +assert_ok.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +
                                                  //! Assert expression is Ok(_).
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! # fn main() {
                                                  +//! let a: Result<(), i8> = Ok(());
                                                  +//! assert_ok!(a);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_ok`](macro@crate::assert_ok)
                                                  +//! * [`assert_ok_as_result`](macro@crate::assert_ok_as_result)
                                                  +//! * [`debug_assert_ok`](macro@crate::debug_assert_ok)
                                                  +
                                                  +/// Assert expression is Ok(_).
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ok`](macro.assert_ok.html),
                                                  +/// except this macro returns a Result, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ok`](macro@crate::assert_ok)
                                                  +/// * [`assert_ok_as_result`](macro@crate::assert_ok_as_result)
                                                  +/// * [`debug_assert_ok`](macro@crate::debug_assert_ok)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ok_as_result {
                                                  +    ($result:expr $(,)?) => ({
                                                  +        match (&$result) {
                                                  +            result => {
                                                  +                match (result) {
                                                  +                    Ok(_) => {
                                                  +                        Ok(())
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_ok!(a)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($result),
                                                  +                            result
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ok_as_result_x_success() {
                                                  +        let a: Result<(), i8> = Ok(());
                                                  +        let result = assert_ok_as_result!(a);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ok_as_result_x_failure() {
                                                  +        let a: Result<(), i8> = Err(1);
                                                  +        let result = assert_ok_as_result!(a);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ok!(a)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Err(1)`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +}
                                                  +
                                                  +/// Assert expression is Ok(_).
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// # fn main() {
                                                  +/// let a: Result<(), i8> = Ok(());
                                                  +/// assert_ok!(a);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Result<(), i8> = Err(1);
                                                  +/// assert_ok!(a);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_ok!(a)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Err(1)`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_ok!(a)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Err(1)`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ok`](macro@crate::assert_ok)
                                                  +/// * [`assert_ok_as_result`](macro@crate::assert_ok_as_result)
                                                  +/// * [`debug_assert_ok`](macro@crate::debug_assert_ok)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ok {
                                                  +    ($result:expr $(,)?) => ({
                                                  +        match assert_ok_as_result!($result) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($result:expr, $($message:tt)+) => ({
                                                  +        match assert_ok_as_result!($result) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert expression is Ok(_).
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ok`](macro.assert_ok.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ok`](macro@crate::assert_ok)
                                                  +/// * [`assert_ok`](macro@crate::assert_ok)
                                                  +/// * [`debug_assert_ok`](macro@crate::debug_assert_ok)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_ok {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_ok!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_ok_eq.rs.html b/doc/src/lib/assert_ok_eq.rs.html new file mode 100644 index 000000000..4e92ff805 --- /dev/null +++ b/doc/src/lib/assert_ok_eq.rs.html @@ -0,0 +1,479 @@ +assert_ok_eq.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +180
                                                  +181
                                                  +182
                                                  +183
                                                  +184
                                                  +185
                                                  +186
                                                  +187
                                                  +188
                                                  +189
                                                  +190
                                                  +191
                                                  +192
                                                  +193
                                                  +194
                                                  +195
                                                  +196
                                                  +197
                                                  +198
                                                  +199
                                                  +200
                                                  +201
                                                  +202
                                                  +203
                                                  +204
                                                  +205
                                                  +206
                                                  +207
                                                  +208
                                                  +209
                                                  +210
                                                  +211
                                                  +212
                                                  +213
                                                  +214
                                                  +215
                                                  +216
                                                  +217
                                                  +218
                                                  +219
                                                  +220
                                                  +221
                                                  +222
                                                  +223
                                                  +224
                                                  +225
                                                  +226
                                                  +227
                                                  +228
                                                  +229
                                                  +230
                                                  +231
                                                  +232
                                                  +233
                                                  +234
                                                  +235
                                                  +236
                                                  +237
                                                  +238
                                                  +239
                                                  +
                                                  //! Assert two expressions are Ok(_) and their values are equal.
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! # fn main() {
                                                  +//! let a: Result<i8, i8> = Ok(1);
                                                  +//! let b: Result<i8, i8> = Ok(1);
                                                  +//! assert_ok_eq!(a, b);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_ok_eq`](macro@crate::assert_ok_eq)
                                                  +//! * [`assert_ok_eq_as_result`](macro@crate::assert_ok_eq_as_result)
                                                  +//! * [`debug_assert_ok_eq`](macro@crate::debug_assert_ok_eq)
                                                  +
                                                  +/// Assert two expressions are Ok(_) and their values are equal.
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ok_eq`](macro.assert_ok_eq.html),
                                                  +/// except this macro returns a Result, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ok_eq`](macro@crate::assert_ok_eq)
                                                  +/// * [`assert_ok_eq_as_result`](macro@crate::assert_ok_eq_as_result)
                                                  +/// * [`debug_assert_ok_eq`](macro@crate::debug_assert_ok_eq)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ok_eq_as_result {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match (&$a, &$b) {
                                                  +            (a, b) => {
                                                  +                match (a, b) {
                                                  +                    (Ok(a_inner), Ok(b_inner)) => {
                                                  +                        if a_inner == b_inner {
                                                  +                            Ok(())
                                                  +                        } else {
                                                  +                            Err(format!(
                                                  +                                concat!(
                                                  +                                    "assertion failed: `assert_ok_eq!(a, b)`\n",
                                                  +                                    " a label: `{}`,\n",
                                                  +                                    " a debug: `{:?}`,\n",
                                                  +                                    " a inner: `{:?}`,\n",
                                                  +                                    " b label: `{}`,\n",
                                                  +                                    " b debug: `{:?}`,\n",
                                                  +                                    " b inner: `{:?}`"
                                                  +                                ),
                                                  +                                stringify!($a),
                                                  +                                a,
                                                  +                                a_inner,
                                                  +                                stringify!($b),
                                                  +                                b,
                                                  +                                b_inner
                                                  +                            ))
                                                  +                        }
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_ok_eq!(a, b)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`,\n",
                                                  +                                " b label: `{}`,\n",
                                                  +                                " b debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($a),
                                                  +                            a,
                                                  +                            stringify!($b),
                                                  +                            b,
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ok_eq_as_result_x_success() {
                                                  +        let a: Result<i8, i8> = Ok(1);
                                                  +        let b: Result<i8, i8> = Ok(1);
                                                  +        let result = assert_ok_eq_as_result!(a, b);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ok_eq_as_result_x_failure_because_ne() {
                                                  +        let a: Result<i8, i8> = Ok(1);
                                                  +        let b: Result<i8, i8> = Ok(2);
                                                  +        let result = assert_ok_eq_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ok_eq!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ok(1)`,\n",
                                                  +                " a inner: `1`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Ok(2)`,\n",
                                                  +                " b inner: `2`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ok_eq_as_result_x_failure_because_not_ok() {
                                                  +        let a: Result<i8, i8> = Ok(1);
                                                  +        let b: Result<i8, i8> = Err(1);
                                                  +        let result = assert_ok_eq_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ok_eq!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ok(1)`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Err(1)`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Ok(_) and their values are equal.
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// # fn main() {
                                                  +/// let a: Result<i8, i8> = Ok(1);
                                                  +/// let b: Result<i8, i8> = Ok(1);
                                                  +/// assert_ok_eq!(a, b);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Result<i8, i8> = Ok(1);
                                                  +/// let b: Result<i8, i8> = Ok(2);
                                                  +/// assert_ok_eq!(a, b);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_ok_eq!(a, b)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Ok(1)`,
                                                  +/// //  a inner: `1`,
                                                  +/// //  b label: `b`,
                                                  +/// //  b debug: `Ok(2)`,
                                                  +/// //  b inner: `2`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_ok_eq!(a, b)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Ok(1)`,\n",
                                                  +/// #     " a inner: `1`,\n",
                                                  +/// #     " b label: `b`,\n",
                                                  +/// #     " b debug: `Ok(2)`,\n",
                                                  +/// #     " b inner: `2`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ok_eq`](macro@crate::assert_ok_eq)
                                                  +/// * [`assert_ok_eq_as_result`](macro@crate::assert_ok_eq_as_result)
                                                  +/// * [`debug_assert_ok_eq`](macro@crate::debug_assert_ok_eq)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ok_eq {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match assert_ok_eq_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($a:expr, $b:expr, $($message:tt)+) => ({
                                                  +        match assert_ok_eq_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Ok(_) and their values are equal.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ok_eq`](macro.assert_ok_eq.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ok_eq`](macro@crate::assert_ok_eq)
                                                  +/// * [`assert_ok_eq`](macro@crate::assert_ok_eq)
                                                  +/// * [`debug_assert_ok_eq`](macro@crate::debug_assert_ok_eq)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_ok_eq {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_ok_eq!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_ok_ne.rs.html b/doc/src/lib/assert_ok_ne.rs.html new file mode 100644 index 000000000..c5d4c495a --- /dev/null +++ b/doc/src/lib/assert_ok_ne.rs.html @@ -0,0 +1,479 @@ +assert_ok_ne.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +180
                                                  +181
                                                  +182
                                                  +183
                                                  +184
                                                  +185
                                                  +186
                                                  +187
                                                  +188
                                                  +189
                                                  +190
                                                  +191
                                                  +192
                                                  +193
                                                  +194
                                                  +195
                                                  +196
                                                  +197
                                                  +198
                                                  +199
                                                  +200
                                                  +201
                                                  +202
                                                  +203
                                                  +204
                                                  +205
                                                  +206
                                                  +207
                                                  +208
                                                  +209
                                                  +210
                                                  +211
                                                  +212
                                                  +213
                                                  +214
                                                  +215
                                                  +216
                                                  +217
                                                  +218
                                                  +219
                                                  +220
                                                  +221
                                                  +222
                                                  +223
                                                  +224
                                                  +225
                                                  +226
                                                  +227
                                                  +228
                                                  +229
                                                  +230
                                                  +231
                                                  +232
                                                  +233
                                                  +234
                                                  +235
                                                  +236
                                                  +237
                                                  +238
                                                  +239
                                                  +
                                                  //! Assert two expressions are Ok(_) and their values are not equal.
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! # fn main() {
                                                  +//! let a: Result<i8, i8> = Ok(1);
                                                  +//! let b: Result<i8, i8> = Ok(2);
                                                  +//! assert_ok_ne!(a, b);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_ok_ne`](macro@crate::assert_ok_ne)
                                                  +//! * [`assert_ok_ne_as_result`](macro@crate::assert_ok_ne_as_result)
                                                  +//! * [`debug_assert_ok_ne`](macro@crate::debug_assert_ok_ne)
                                                  +
                                                  +/// Assert two expressions are Ok(_) and their values are not equal.
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ok_ne`](macro.assert_ok_ne.html),
                                                  +/// except this macro returns a Result, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ok_ne`](macro@crate::assert_ok_ne)
                                                  +/// * [`assert_ok_ne_as_result`](macro@crate::assert_ok_ne_as_result)
                                                  +/// * [`debug_assert_ok_ne`](macro@crate::debug_assert_ok_ne)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ok_ne_as_result {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match (&$a, &$b) {
                                                  +            (a, b) => {
                                                  +                match (a, b) {
                                                  +                    (Ok(a_inner), Ok(b_inner)) => {
                                                  +                        if a_inner != b_inner {
                                                  +                            Ok(())
                                                  +                        } else {
                                                  +                            Err(format!(
                                                  +                                concat!(
                                                  +                                    "assertion failed: `assert_ok_ne!(a, b)`\n",
                                                  +                                    " a label: `{}`,\n",
                                                  +                                    " a debug: `{:?}`,\n",
                                                  +                                    " a inner: `{:?}`,\n",
                                                  +                                    " b label: `{}`,\n",
                                                  +                                    " b debug: `{:?}`,\n",
                                                  +                                    " b inner: `{:?}`"
                                                  +                                ),
                                                  +                                stringify!($a),
                                                  +                                a,
                                                  +                                a_inner,
                                                  +                                stringify!($b),
                                                  +                                b,
                                                  +                                b_inner
                                                  +                            ))
                                                  +                        }
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_ok_ne!(a, b)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`,\n",
                                                  +                                " b label: `{}`,\n",
                                                  +                                " b debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($a),
                                                  +                            a,
                                                  +                            stringify!($b),
                                                  +                            b,
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ok_ne_as_result_x_success() {
                                                  +        let a: Result<i8, i8> = Ok(1);
                                                  +        let b: Result<i8, i8> = Ok(2);
                                                  +        let result = assert_ok_ne_as_result!(a, b);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ok_ne_as_result_x_failure_because_eq() {
                                                  +        let a: Result<i8, i8> = Ok(1);
                                                  +        let b: Result<i8, i8> = Ok(1);
                                                  +        let result = assert_ok_ne_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ok_ne!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ok(1)`,\n",
                                                  +                " a inner: `1`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Ok(1)`,\n",
                                                  +                " b inner: `1`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ok_ne_as_result_x_failure_because_not_ok() {
                                                  +        let a: Result<i8, i8> = Ok(1);
                                                  +        let b: Result<i8, i8> = Err(1);
                                                  +        let result = assert_ok_ne_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ok_ne!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ok(1)`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Err(1)`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Ok(_) and their values are not equal.
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// # fn main() {
                                                  +/// let a: Result<i8, i8> = Ok(1);
                                                  +/// let b: Result<i8, i8> = Ok(2);
                                                  +/// assert_ok_ne!(a, b);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Result<i8, i8> = Ok(1);
                                                  +/// let b: Result<i8, i8> = Ok(1);
                                                  +/// assert_ok_ne!(a, b);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_ok_ne!(a, b)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Ok(1)`,
                                                  +/// //  a inner: `1`,
                                                  +/// //  b label: `b`,
                                                  +/// //  b debug: `Ok(1)`,
                                                  +/// //  b inner: `1`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_ok_ne!(a, b)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Ok(1)`,\n",
                                                  +/// #     " a inner: `1`,\n",
                                                  +/// #     " b label: `b`,\n",
                                                  +/// #     " b debug: `Ok(1)`,\n",
                                                  +/// #     " b inner: `1`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ok_ne`](macro@crate::assert_ok_ne)
                                                  +/// * [`assert_ok_ne_as_result`](macro@crate::assert_ok_ne_as_result)
                                                  +/// * [`debug_assert_ok_ne`](macro@crate::debug_assert_ok_ne)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ok_ne {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match assert_ok_ne_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($a:expr, $b:expr, $($message:tt)+) => ({
                                                  +        match assert_ok_ne_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Ok(_) and their values are not equal.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ok_ne`](macro.assert_ok_ne.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ok_ne`](macro@crate::assert_ok_ne)
                                                  +/// * [`assert_ok_ne`](macro@crate::assert_ok_ne)
                                                  +/// * [`debug_assert_ok_ne`](macro@crate::debug_assert_ok_ne)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_ok_ne {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_ok_ne!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_option/assert_option_none.rs.html b/doc/src/lib/assert_option/assert_option_none.rs.html index 0f782d404..42a4a6689 100644 --- a/doc/src/lib/assert_option/assert_option_none.rs.html +++ b/doc/src/lib/assert_option/assert_option_none.rs.html @@ -177,6 +177,9 @@ 177 178 179 +180 +181 +182
                                                  //! Assert expression is None.
                                                   //!
                                                   //! # Example
                                                  @@ -213,7 +216,8 @@
                                                   /// * [`assert_option_none_as_result`](macro@crate::assert_option_none_as_result)
                                                   /// * [`debug_assert_option_none`](macro@crate::debug_assert_option_none)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_option_none_as_result` to `assert_none_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_option_none_as_result {
                                                       ($a:expr $(,)?) => ({
                                                           match (&$a) {
                                                  @@ -304,7 +308,8 @@
                                                   /// * [`assert_option_none_as_result`](macro@crate::assert_option_none_as_result)
                                                   /// * [`debug_assert_option_none`](macro@crate::debug_assert_option_none)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_option_none` to `assert_none` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_option_none {
                                                       ($option:expr $(,)?) => ({
                                                           match assert_option_none_as_result!($option) {
                                                  @@ -348,7 +353,8 @@
                                                   /// * [`assert_option_none`](macro@crate::assert_option_none)
                                                   /// * [`debug_assert_option_none`](macro@crate::debug_assert_option_none)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_option_none` to `debug_assert_none` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_option_none {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_option/assert_option_some.rs.html b/doc/src/lib/assert_option/assert_option_some.rs.html
                                                  index 95a591996..500c2b0ab 100644
                                                  --- a/doc/src/lib/assert_option/assert_option_some.rs.html
                                                  +++ b/doc/src/lib/assert_option/assert_option_some.rs.html
                                                  @@ -177,6 +177,9 @@
                                                   177
                                                   178
                                                   179
                                                  +180
                                                  +181
                                                  +182
                                                   
                                                  //!Assert expression is Some(_).
                                                   //!
                                                   //! # Example
                                                  @@ -213,7 +216,8 @@
                                                   /// * [`assert_option_some_as_result`](macro@crate::assert_option_some_as_result)
                                                   /// * [`debug_assert_option_some`](macro@crate::debug_assert_option_some)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_option_some_as_result` to `assert_some_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_option_some_as_result {
                                                       ($option:expr $(,)?) => ({
                                                           match (&$option) {
                                                  @@ -304,7 +308,8 @@
                                                   /// * [`assert_option_some_as_result`](macro@crate::assert_option_some_as_result)
                                                   /// * [`debug_assert_option_some`](macro@crate::debug_assert_option_some)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_option_some` to `assert_some` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_option_some {
                                                       ($option:expr $(,)?) => ({
                                                           match assert_option_some_as_result!($option) {
                                                  @@ -348,11 +353,12 @@
                                                   /// * [`assert_option_some`](macro@crate::assert_option_some)
                                                   /// * [`debug_assert_option_some`](macro@crate::debug_assert_option_some)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_option_some` to `debug_assert_some` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_option_some {
                                                  -    ($($optionrg:tt)*) => {
                                                  +    ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  -            $crate::assert_option_some!($($optionrg)*);
                                                  +            $crate::assert_option_some!($($arg)*);
                                                           }
                                                       };
                                                   }
                                                  diff --git a/doc/src/lib/assert_option/assert_option_some_eq.rs.html b/doc/src/lib/assert_option/assert_option_some_eq.rs.html
                                                  index bd2b5a98a..cab53c4be 100644
                                                  --- a/doc/src/lib/assert_option/assert_option_some_eq.rs.html
                                                  +++ b/doc/src/lib/assert_option/assert_option_some_eq.rs.html
                                                  @@ -237,6 +237,9 @@
                                                   237
                                                   238
                                                   239
                                                  +240
                                                  +241
                                                  +242
                                                   
                                                  //! Assert two expressions are Some(_) and their values are equal.
                                                   //!
                                                   //! # Example
                                                  @@ -274,7 +277,8 @@
                                                   /// * [`assert_option_some_eq_as_result`](macro@crate::assert_option_some_eq_as_result)
                                                   /// * [`debug_assert_option_some_eq`](macro@crate::debug_assert_option_some_eq)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_option_some_eq_as_result` to `assert_some_eq_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_option_some_eq_as_result {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match (&$a, &$b) {
                                                  @@ -424,7 +428,8 @@
                                                   /// * [`assert_option_some_eq_as_result`](macro@crate::assert_option_some_eq_as_result)
                                                   /// * [`debug_assert_option_some_eq`](macro@crate::debug_assert_option_some_eq)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_option_some_eq` to `assert_some_eq` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_option_some_eq {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match assert_option_some_eq_as_result!($a, $b) {
                                                  @@ -468,7 +473,8 @@
                                                   /// * [`assert_option_some_eq`](macro@crate::assert_option_some_eq)
                                                   /// * [`debug_assert_option_some_eq`](macro@crate::debug_assert_option_some_eq)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_option_some_eq` to `debug_assert_some_eq` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_option_some_eq {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_option/assert_option_some_ne.rs.html b/doc/src/lib/assert_option/assert_option_some_ne.rs.html
                                                  index 4e0a59b5f..880d80bad 100644
                                                  --- a/doc/src/lib/assert_option/assert_option_some_ne.rs.html
                                                  +++ b/doc/src/lib/assert_option/assert_option_some_ne.rs.html
                                                  @@ -237,6 +237,9 @@
                                                   237
                                                   238
                                                   239
                                                  +240
                                                  +241
                                                  +242
                                                   
                                                  //! Assert two expressions are Some(_) and their values are not equal.
                                                   //!
                                                   //! # Example
                                                  @@ -274,7 +277,8 @@
                                                   /// * [`assert_option_some_ne_as_result`](macro@crate::assert_option_some_ne_as_result)
                                                   /// * [`debug_assert_option_some_ne`](macro@crate::debug_assert_option_some_ne)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_option_some_ne_as_result` to `assert_some_ne_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_option_some_ne_as_result {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match (&$a, &$b) {
                                                  @@ -424,7 +428,8 @@
                                                   /// * [`assert_option_some_ne_as_result`](macro@crate::assert_option_some_ne_as_result)
                                                   /// * [`debug_assert_option_some_ne`](macro@crate::debug_assert_option_some_ne)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_option_some_ne` to `assert_some_ne` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_option_some_ne {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match assert_option_some_ne_as_result!($a, $b) {
                                                  @@ -468,7 +473,8 @@
                                                   /// * [`assert_option_some_ne`](macro@crate::assert_option_some_ne)
                                                   /// * [`debug_assert_option_some_ne`](macro@crate::debug_assert_option_some_ne)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_option_some_ne` to `debug_assert_some_ne` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_option_some_ne {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_pending.rs.html b/doc/src/lib/assert_pending.rs.html
                                                  new file mode 100644
                                                  index 000000000..405df9f64
                                                  --- /dev/null
                                                  +++ b/doc/src/lib/assert_pending.rs.html
                                                  @@ -0,0 +1,373 @@
                                                  +assert_pending.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +180
                                                  +181
                                                  +182
                                                  +183
                                                  +184
                                                  +185
                                                  +186
                                                  +
                                                  //! Assert an expression is Pending.
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! use std::task::Poll;
                                                  +//! use std::task::Poll::*;
                                                  +//!
                                                  +//! # fn main() {
                                                  +//! let a: Poll<i8> = Pending;
                                                  +//! assert_pending!(a);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_pending`](macro@crate::assert_pending)
                                                  +//! * [`assert_pending_as_result`](macro@crate::assert_pending_as_result)
                                                  +//! * [`debug_assert_pending`](macro@crate::debug_assert_pending)
                                                  +
                                                  +/// Assert an expression.is_pending() is true.
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_pending`](macro.assert_pending.html),
                                                  +/// except this macro returns a Result, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_pending`](macro@crate::assert_pending)
                                                  +/// * [`assert_pending_as_result`](macro@crate::assert_pending_as_result)
                                                  +/// * [`debug_assert_pending`](macro@crate::debug_assert_pending)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_pending_as_result {
                                                  +    ($a:expr $(,)?) => ({
                                                  +        match (&$a) {
                                                  +            a => {
                                                  +                match (a) {
                                                  +                    Pending => {
                                                  +                        Ok(())
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_pending!(a)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($a),
                                                  +                            a
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +    use std::task::Poll;
                                                  +    use std::task::Poll::*;
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_pending_as_result_x_success() {
                                                  +        let a: Poll<i8> = Pending;
                                                  +        let result = assert_pending_as_result!(a);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_pending_as_result_x_failure() {
                                                  +        let a: Poll<i8> = Ready(1);
                                                  +        let result = assert_pending_as_result!(a);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_pending!(a)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ready(1)`"
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +}
                                                  +
                                                  +/// Assert an expression is Pending.
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// use std::task::Poll;
                                                  +/// use std::task::Poll::*;
                                                  +/// # fn main() {
                                                  +/// let a: Poll<i8> = Pending;
                                                  +/// assert_pending!(a);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Poll<i8> = Ready(1);
                                                  +/// assert_pending!(a);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_pending!(a)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Ready(1)`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_pending!(a)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Ready(1)`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_pending`](macro@crate::assert_pending)
                                                  +/// * [`assert_pending_as_result`](macro@crate::assert_pending_as_result)
                                                  +/// * [`debug_assert_pending`](macro@crate::debug_assert_pending)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_pending {
                                                  +    ($poll:expr $(,)?) => ({
                                                  +        match assert_pending_as_result!($poll) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($poll:expr, $($message:tt)+) => ({
                                                  +        match assert_pending_as_result!($poll) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert an expression is Pending.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_pending`](macro.assert_pending.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_pending`](macro@crate::assert_pending)
                                                  +/// * [`assert_pending`](macro@crate::assert_pending)
                                                  +/// * [`debug_assert_pending`](macro@crate::debug_assert_pending)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_pending {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_pending!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_poll/assert_poll_pending.rs.html b/doc/src/lib/assert_poll/assert_poll_pending.rs.html index 3531c86d3..814742efd 100644 --- a/doc/src/lib/assert_poll/assert_poll_pending.rs.html +++ b/doc/src/lib/assert_poll/assert_poll_pending.rs.html @@ -184,6 +184,9 @@ 184 185 186 +187 +188 +189
                                                  //! Assert an expression is Pending.
                                                   //!
                                                   //! # Example
                                                  @@ -223,7 +226,8 @@
                                                   /// * [`assert_poll_pending_as_result`](macro@crate::assert_poll_pending_as_result)
                                                   /// * [`debug_assert_poll_pending`](macro@crate::debug_assert_poll_pending)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_poll_pending_as_result` to `assert_pending_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_poll_pending_as_result {
                                                       ($a:expr $(,)?) => ({
                                                           match (&$a) {
                                                  @@ -318,7 +322,8 @@
                                                   /// * [`assert_poll_pending_as_result`](macro@crate::assert_poll_pending_as_result)
                                                   /// * [`debug_assert_poll_pending`](macro@crate::debug_assert_poll_pending)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_poll_pending` to `assert_pending` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_poll_pending {
                                                       ($poll:expr $(,)?) => ({
                                                           match assert_poll_pending_as_result!($poll) {
                                                  @@ -362,7 +367,8 @@
                                                   /// * [`assert_poll_pending`](macro@crate::assert_poll_pending)
                                                   /// * [`debug_assert_poll_pending`](macro@crate::debug_assert_poll_pending)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_poll_pending` to `debug_assert_pending` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_poll_pending {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_poll/assert_poll_ready.rs.html b/doc/src/lib/assert_poll/assert_poll_ready.rs.html
                                                  index 6ba9a5a61..f84ba894c 100644
                                                  --- a/doc/src/lib/assert_poll/assert_poll_ready.rs.html
                                                  +++ b/doc/src/lib/assert_poll/assert_poll_ready.rs.html
                                                  @@ -184,6 +184,9 @@
                                                   184
                                                   185
                                                   186
                                                  +187
                                                  +188
                                                  +189
                                                   
                                                  //! Assert an expression is Ready(_).
                                                   //!
                                                   //! # Example
                                                  @@ -223,7 +226,8 @@
                                                   /// * [`assert_poll_ready_as_result`](macro@crate::assert_poll_ready_as_result)
                                                   /// * [`debug_assert_poll_ready`](macro@crate::debug_assert_poll_ready)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_poll_ready_as_result` to `assert_ready_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_poll_ready_as_result {
                                                       ($a:expr $(,)?) => ({
                                                           match (&$a) {
                                                  @@ -318,7 +322,8 @@
                                                   /// * [`assert_poll_ready_as_result`](macro@crate::assert_poll_ready_as_result)
                                                   /// * [`debug_assert_poll_ready`](macro@crate::debug_assert_poll_ready)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_poll_ready` to `assert_ready` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_poll_ready {
                                                       ($poll:expr $(,)?) => ({
                                                           match assert_poll_ready_as_result!($poll) {
                                                  @@ -362,7 +367,8 @@
                                                   /// * [`assert_poll_ready`](macro@crate::assert_poll_ready)
                                                   /// * [`debug_assert_poll_ready`](macro@crate::debug_assert_poll_ready)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_poll_ready` to `debug_assert_ready` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_poll_ready {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_poll/assert_poll_ready_eq.rs.html b/doc/src/lib/assert_poll/assert_poll_ready_eq.rs.html
                                                  index c63a5d1e7..30a99afcb 100644
                                                  --- a/doc/src/lib/assert_poll/assert_poll_ready_eq.rs.html
                                                  +++ b/doc/src/lib/assert_poll/assert_poll_ready_eq.rs.html
                                                  @@ -243,6 +243,9 @@
                                                   243
                                                   244
                                                   245
                                                  +246
                                                  +247
                                                  +248
                                                   
                                                  //! Assert two expressions are Ready(_) and their values are equal.
                                                   //!
                                                   //! # Example
                                                  @@ -282,7 +285,8 @@
                                                   /// * [`assert_poll_ready_eq_as_result`](macro@crate::assert_poll_ready_eq_as_result)
                                                   /// * [`debug_assert_poll_ready_eq`](macro@crate::debug_assert_poll_ready_eq)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_poll_ready_eq_as_result` to `assert_ready_eq_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_poll_ready_eq_as_result {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match (&$a, &$b) {
                                                  @@ -436,7 +440,8 @@
                                                   /// * [`assert_poll_ready_eq_as_result`](macro@crate::assert_poll_ready_eq_as_result)
                                                   /// * [`debug_assert_poll_ready_eq`](macro@crate::debug_assert_poll_ready_eq)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_poll_ready_eq` to `assert_ready_eq` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_poll_ready_eq {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match assert_poll_ready_eq_as_result!($a, $b) {
                                                  @@ -480,7 +485,8 @@
                                                   /// * [`assert_poll_ready_eq`](macro@crate::assert_poll_ready_eq)
                                                   /// * [`debug_assert_poll_ready_eq`](macro@crate::debug_assert_poll_ready_eq)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_poll_ready_eq` to `debug_assert_ready_eq` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_poll_ready_eq {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_poll/assert_poll_ready_ne.rs.html b/doc/src/lib/assert_poll/assert_poll_ready_ne.rs.html
                                                  index 27033eb7f..fb0d4de0b 100644
                                                  --- a/doc/src/lib/assert_poll/assert_poll_ready_ne.rs.html
                                                  +++ b/doc/src/lib/assert_poll/assert_poll_ready_ne.rs.html
                                                  @@ -243,6 +243,8 @@
                                                   243
                                                   244
                                                   245
                                                  +246
                                                  +247
                                                   
                                                  //! Assert two expressions are Ready(_) and their values are not equal.
                                                   //!
                                                   //! # Example
                                                  @@ -282,7 +284,8 @@
                                                   /// * [`assert_poll_ready_ne_as_result`](macro@crate::assert_poll_ready_ne_as_result)
                                                   /// * [`debug_assert_poll_ready_ne`](macro@crate::debug_assert_poll_ready_ne)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_poll_ready_ne_as_result` to `assert_ready_ne_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_poll_ready_ne_as_result {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match (&$a, &$b) {
                                                  @@ -436,7 +439,8 @@
                                                   /// * [`assert_poll_ready_ne_as_result`](macro@crate::assert_poll_ready_ne_as_result)
                                                   /// * [`debug_assert_poll_ready_ne`](macro@crate::debug_assert_poll_ready_ne)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_poll_ready_ne` to `assert_ready_ne` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_poll_ready_ne {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match assert_poll_ready_ne_as_result!($a, $b) {
                                                  diff --git a/doc/src/lib/assert_ready.rs.html b/doc/src/lib/assert_ready.rs.html
                                                  new file mode 100644
                                                  index 000000000..ff7bdee93
                                                  --- /dev/null
                                                  +++ b/doc/src/lib/assert_ready.rs.html
                                                  @@ -0,0 +1,373 @@
                                                  +assert_ready.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +180
                                                  +181
                                                  +182
                                                  +183
                                                  +184
                                                  +185
                                                  +186
                                                  +
                                                  //! Assert an expression is Ready(_).
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! use std::task::Poll;
                                                  +//! use std::task::Poll::*;
                                                  +//!
                                                  +//! # fn main() {
                                                  +//! let a: Poll<i8> = Ready(1);
                                                  +//! assert_ready!(a);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_ready`](macro@crate::assert_ready)
                                                  +//! * [`assert_ready_as_result`](macro@crate::assert_ready_as_result)
                                                  +//! * [`debug_assert_ready`](macro@crate::debug_assert_ready)
                                                  +
                                                  +/// Assert an expression is Ready(_).
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ready`](macro.assert_ready.html),
                                                  +/// except this macro returns a Result, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ready`](macro@crate::assert_ready)
                                                  +/// * [`assert_ready_as_result`](macro@crate::assert_ready_as_result)
                                                  +/// * [`debug_assert_ready`](macro@crate::debug_assert_ready)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ready_as_result {
                                                  +    ($a:expr $(,)?) => ({
                                                  +        match (&$a) {
                                                  +            a => {
                                                  +                match (a) {
                                                  +                    Ready(_) => {
                                                  +                        Ok(())
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_ready!(a)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($a),
                                                  +                            a,
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +    use std::task::Poll;
                                                  +    use std::task::Poll::*;
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ready_as_result_x_success() {
                                                  +        let a: Poll<i8> = Ready(1);
                                                  +        let result = assert_ready_as_result!(a);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ready_as_result_x_failure() {
                                                  +        let a: Poll<i8> = Pending;
                                                  +        let result = assert_ready_as_result!(a);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ready!(a)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Pending`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +}
                                                  +
                                                  +/// Assert an expression is Ready(_).
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// use std::task::Poll;
                                                  +/// use std::task::Poll::*;
                                                  +/// # fn main() {
                                                  +/// let a: Poll<i8> = Ready(1);
                                                  +/// assert_ready!(a);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Poll<i8> = Pending;
                                                  +/// assert_ready!(a);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_ready!(a)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Pending`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_ready!(a)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Pending`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ready`](macro@crate::assert_ready)
                                                  +/// * [`assert_ready_as_result`](macro@crate::assert_ready_as_result)
                                                  +/// * [`debug_assert_ready`](macro@crate::debug_assert_ready)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ready {
                                                  +    ($poll:expr $(,)?) => ({
                                                  +        match assert_ready_as_result!($poll) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($poll:expr, $($message:tt)+) => ({
                                                  +        match assert_ready_as_result!($poll) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert poll.is_ready() is true.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ready`](macro.assert_ready.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ready`](macro@crate::assert_ready)
                                                  +/// * [`assert_ready`](macro@crate::assert_ready)
                                                  +/// * [`debug_assert_ready`](macro@crate::debug_assert_ready)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_ready {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_ready!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_ready_eq.rs.html b/doc/src/lib/assert_ready_eq.rs.html new file mode 100644 index 000000000..6d9445e24 --- /dev/null +++ b/doc/src/lib/assert_ready_eq.rs.html @@ -0,0 +1,491 @@ +assert_ready_eq.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +180
                                                  +181
                                                  +182
                                                  +183
                                                  +184
                                                  +185
                                                  +186
                                                  +187
                                                  +188
                                                  +189
                                                  +190
                                                  +191
                                                  +192
                                                  +193
                                                  +194
                                                  +195
                                                  +196
                                                  +197
                                                  +198
                                                  +199
                                                  +200
                                                  +201
                                                  +202
                                                  +203
                                                  +204
                                                  +205
                                                  +206
                                                  +207
                                                  +208
                                                  +209
                                                  +210
                                                  +211
                                                  +212
                                                  +213
                                                  +214
                                                  +215
                                                  +216
                                                  +217
                                                  +218
                                                  +219
                                                  +220
                                                  +221
                                                  +222
                                                  +223
                                                  +224
                                                  +225
                                                  +226
                                                  +227
                                                  +228
                                                  +229
                                                  +230
                                                  +231
                                                  +232
                                                  +233
                                                  +234
                                                  +235
                                                  +236
                                                  +237
                                                  +238
                                                  +239
                                                  +240
                                                  +241
                                                  +242
                                                  +243
                                                  +244
                                                  +245
                                                  +
                                                  //! Assert two expressions are Ready(_) and their values are equal.
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! use std::task::Poll;
                                                  +//! use std::task::Poll::*;
                                                  +//! # fn main() {
                                                  +//! let a: Poll<i8> = Ready(1);
                                                  +//! let b: Poll<i8> = Ready(1);
                                                  +//! assert_ready_eq!(a, b);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_ready_eq`](macro@crate::assert_ready_eq)
                                                  +//! * [`assert_ready_eq_as_result`](macro@crate::assert_ready_eq_as_result)
                                                  +//! * [`debug_assert_ready_eq`](macro@crate::debug_assert_ready_eq)
                                                  +
                                                  +/// Assert two expressions are Ready(_) and their values are equal.
                                                  +///
                                                  +/// * If true, return Result `Some(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ready_eq`](macro.assert_ready_eq.html),
                                                  +/// except this macro returns a Option, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ready_eq`](macro@crate::assert_ready_eq)
                                                  +/// * [`assert_ready_eq_as_result`](macro@crate::assert_ready_eq_as_result)
                                                  +/// * [`debug_assert_ready_eq`](macro@crate::debug_assert_ready_eq)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ready_eq_as_result {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match (&$a, &$b) {
                                                  +            (a, b) => {
                                                  +                match (a, b) {
                                                  +                    (Ready(a_inner), Ready(b_inner)) => {
                                                  +                        if a_inner == b_inner {
                                                  +                            Ok(())
                                                  +                        } else {
                                                  +                            Err(format!(
                                                  +                                concat!(
                                                  +                                    "assertion failed: `assert_ready_eq!(a, b)`\n",
                                                  +                                    " a label: `{}`,\n",
                                                  +                                    " a debug: `{:?}`,\n",
                                                  +                                    " a inner: `{:?}`,\n",
                                                  +                                    " b label: `{}`,\n",
                                                  +                                    " b debug: `{:?}`,\n",
                                                  +                                    " b inner: `{:?}`"
                                                  +                                ),
                                                  +                                stringify!($a),
                                                  +                                a,
                                                  +                                a_inner,
                                                  +                                stringify!($b),
                                                  +                                b,
                                                  +                                b_inner
                                                  +                            ))
                                                  +                        }
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_ready_eq!(a, b)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`,\n",
                                                  +                                " b label: `{}`,\n",
                                                  +                                " b debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($a),
                                                  +                            a,
                                                  +                            stringify!($b),
                                                  +                            $b
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +    use std::task::Poll;
                                                  +    use std::task::Poll::*;
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ready_eq_as_result_x_success() {
                                                  +        let a: Poll<i8> = Ready(1);
                                                  +        let b: Poll<i8> = Ready(1);
                                                  +        let result = assert_ready_eq_as_result!(a, b);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ready_eq_as_result_x_failure_because_ne() {
                                                  +        let a: Poll<i8> = Ready(1);
                                                  +        let b: Poll<i8> = Ready(2);
                                                  +        let result = assert_ready_eq_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ready_eq!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ready(1)`,\n",
                                                  +                " a inner: `1`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Ready(2)`,\n",
                                                  +                " b inner: `2`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ready_eq_as_result_x_failure_because_not_ready() {
                                                  +        let a: Poll<i8> = Ready(1);
                                                  +        let b: Poll<i8> = Pending;
                                                  +        let result = assert_ready_eq_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ready_eq!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ready(1)`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Pending`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Ready(_) and their values are equal.
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// use std::task::Poll;
                                                  +/// use std::task::Poll::*;
                                                  +/// # fn main() {
                                                  +/// let a: Poll<i8> = Ready(1);
                                                  +/// let b: Poll<i8> = Ready(1);
                                                  +/// assert_ready_eq!(a, b);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Poll<i8> = Ready(1);
                                                  +/// let b: Poll<i8> = Ready(2);
                                                  +/// assert_ready_eq!(a, b);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_ready_eq!(a, b)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Ready(1)`,
                                                  +/// //  a inner: `1`,
                                                  +/// //  b label: `b`,
                                                  +/// //  b debug: `Ready(2)`,
                                                  +/// //  b inner: `2`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_ready_eq!(a, b)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Ready(1)`,\n",
                                                  +/// #     " a inner: `1`,\n",
                                                  +/// #     " b label: `b`,\n",
                                                  +/// #     " b debug: `Ready(2)`,\n",
                                                  +/// #     " b inner: `2`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ready_eq`](macro@crate::assert_ready_eq)
                                                  +/// * [`assert_ready_eq_as_result`](macro@crate::assert_ready_eq_as_result)
                                                  +/// * [`debug_assert_ready_eq`](macro@crate::debug_assert_ready_eq)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ready_eq {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match assert_ready_eq_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($a:expr, $b:expr, $($message:tt)+) => ({
                                                  +        match assert_ready_eq_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Ready(_) and their values are equal.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ready_eq`](macro.assert_ready_eq.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ready_eq`](macro@crate::assert_ready_eq)
                                                  +/// * [`assert_ready_eq`](macro@crate::assert_ready_eq)
                                                  +/// * [`debug_assert_ready_eq`](macro@crate::debug_assert_ready_eq)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_ready_eq {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_ready_eq!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_ready_ne.rs.html b/doc/src/lib/assert_ready_ne.rs.html new file mode 100644 index 000000000..54998258a --- /dev/null +++ b/doc/src/lib/assert_ready_ne.rs.html @@ -0,0 +1,491 @@ +assert_ready_ne.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +180
                                                  +181
                                                  +182
                                                  +183
                                                  +184
                                                  +185
                                                  +186
                                                  +187
                                                  +188
                                                  +189
                                                  +190
                                                  +191
                                                  +192
                                                  +193
                                                  +194
                                                  +195
                                                  +196
                                                  +197
                                                  +198
                                                  +199
                                                  +200
                                                  +201
                                                  +202
                                                  +203
                                                  +204
                                                  +205
                                                  +206
                                                  +207
                                                  +208
                                                  +209
                                                  +210
                                                  +211
                                                  +212
                                                  +213
                                                  +214
                                                  +215
                                                  +216
                                                  +217
                                                  +218
                                                  +219
                                                  +220
                                                  +221
                                                  +222
                                                  +223
                                                  +224
                                                  +225
                                                  +226
                                                  +227
                                                  +228
                                                  +229
                                                  +230
                                                  +231
                                                  +232
                                                  +233
                                                  +234
                                                  +235
                                                  +236
                                                  +237
                                                  +238
                                                  +239
                                                  +240
                                                  +241
                                                  +242
                                                  +243
                                                  +244
                                                  +245
                                                  +
                                                  //! Assert two expressions are Ready(_) and their values are not equal.
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! use std::task::Poll;
                                                  +//! use std::task::Poll::*;
                                                  +//! # fn main() {
                                                  +//! let a: Poll<i8> = Ready(1);
                                                  +//! let b: Poll<i8> = Ready(2);
                                                  +//! assert_ready_ne!(a, b);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_ready_ne`](macro@crate::assert_ready_ne)
                                                  +//! * [`assert_ready_ne_as_result`](macro@crate::assert_ready_ne_as_result)
                                                  +//! * [`debug_assert_ready_ne`](macro@crate::debug_assert_ready_ne)
                                                  +
                                                  +/// Assert two expressions are Ready(_) and their values are not equal.
                                                  +///
                                                  +/// * If true, return Result `Some(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ready_ne`](macro.assert_ready_ne.html),
                                                  +/// except this macro returns a Option, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ready_ne`](macro@crate::assert_ready_ne)
                                                  +/// * [`assert_ready_ne_as_result`](macro@crate::assert_ready_ne_as_result)
                                                  +/// * [`debug_assert_ready_ne`](macro@crate::debug_assert_ready_ne)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ready_ne_as_result {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match (&$a, &$b) {
                                                  +            (a, b) => {
                                                  +                match (a, b) {
                                                  +                    (Ready(a_inner), Ready(b_inner)) => {
                                                  +                        if a_inner != b_inner {
                                                  +                            Ok(())
                                                  +                        } else {
                                                  +                            Err(format!(
                                                  +                                concat!(
                                                  +                                    "assertion failed: `assert_ready_ne!(a, b)`\n",
                                                  +                                    " a label: `{}`,\n",
                                                  +                                    " a debug: `{:?}`,\n",
                                                  +                                    " a inner: `{:?}`,\n",
                                                  +                                    " b label: `{}`,\n",
                                                  +                                    " b debug: `{:?}`,\n",
                                                  +                                    " b inner: `{:?}`"
                                                  +                                ),
                                                  +                                stringify!($a),
                                                  +                                a,
                                                  +                                a_inner,
                                                  +                                stringify!($b),
                                                  +                                b,
                                                  +                                b_inner
                                                  +                            ))
                                                  +                        }
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_ready_ne!(a, b)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`,\n",
                                                  +                                " b label: `{}`,\n",
                                                  +                                " b debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($a),
                                                  +                            a,
                                                  +                            stringify!($b),
                                                  +                            $b
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +    use std::task::Poll;
                                                  +    use std::task::Poll::*;
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ready_ne_as_result_x_success() {
                                                  +        let a: Poll<i8> = Ready(1);
                                                  +        let b: Poll<i8> = Ready(2);
                                                  +        let result = assert_ready_ne_as_result!(a, b);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ready_ne_as_result_x_failure_because_ne() {
                                                  +        let a: Poll<i8> = Ready(1);
                                                  +        let b: Poll<i8> = Ready(1);
                                                  +        let result = assert_ready_ne_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ready_ne!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ready(1)`,\n",
                                                  +                " a inner: `1`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Ready(1)`,\n",
                                                  +                " b inner: `1`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_ready_ne_as_result_x_failure_because_not_ready() {
                                                  +        let a: Poll<i8> = Ready(1);
                                                  +        let b: Poll<i8> = Pending;
                                                  +        let result = assert_ready_ne_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_ready_ne!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Ready(1)`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Pending`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Ready(_) and their values are not equal.
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// use std::task::Poll;
                                                  +/// use std::task::Poll::*;
                                                  +/// # fn main() {
                                                  +/// let a: Poll<i8> = Ready(1);
                                                  +/// let b: Poll<i8> = Ready(2);
                                                  +/// assert_ready_ne!(a, b);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Poll<i8> = Ready(1);
                                                  +/// let b: Poll<i8> = Ready(1);
                                                  +/// assert_ready_ne!(a, b);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_ready_ne!(a, b)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Ready(1)`,
                                                  +/// //  a inner: `1`,
                                                  +/// //  b label: `b`,
                                                  +/// //  b debug: `Ready(1)`,
                                                  +/// //  b inner: `1`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_ready_ne!(a, b)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Ready(1)`,\n",
                                                  +/// #     " a inner: `1`,\n",
                                                  +/// #     " b label: `b`,\n",
                                                  +/// #     " b debug: `Ready(1)`,\n",
                                                  +/// #     " b inner: `1`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ready_ne`](macro@crate::assert_ready_ne)
                                                  +/// * [`assert_ready_ne_as_result`](macro@crate::assert_ready_ne_as_result)
                                                  +/// * [`debug_assert_ready_ne`](macro@crate::debug_assert_ready_ne)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_ready_ne {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match assert_ready_ne_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($a:expr, $b:expr, $($message:tt)+) => ({
                                                  +        match assert_ready_ne_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Ready(_) and their values are not equal.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_ready_ne`](macro.assert_ready_ne.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_ready_ne`](macro@crate::assert_ready_ne)
                                                  +/// * [`assert_ready_ne`](macro@crate::assert_ready_ne)
                                                  +/// * [`debug_assert_ready_ne`](macro@crate::debug_assert_ready_ne)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_ready_ne {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_ready_ne!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_result/assert_result_err.rs.html b/doc/src/lib/assert_result/assert_result_err.rs.html index b170b1c3d..e5fd82cc4 100644 --- a/doc/src/lib/assert_result/assert_result_err.rs.html +++ b/doc/src/lib/assert_result/assert_result_err.rs.html @@ -177,6 +177,9 @@ 177 178 179 +180 +181 +182
                                                  //! Assert expression is Err(_).
                                                   //!
                                                   //! # Example
                                                  @@ -213,7 +216,8 @@
                                                   /// * [`assert_result_err_as_result`](macro@crate::assert_result_err_as_result)
                                                   /// * [`debug_assert_result_err`](macro@crate::debug_assert_result_err)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_result_err_as_result` to `assert_err_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_result_err_as_result {
                                                       ($result:expr $(,)?) => ({
                                                           match (&$result) {
                                                  @@ -304,7 +308,8 @@
                                                   /// * [`assert_result_err_as_result`](macro@crate::assert_result_err_as_result)
                                                   /// * [`debug_assert_result_err`](macro@crate::debug_assert_result_err)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_result_err` to `assert_err` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_result_err {
                                                       ($result:expr $(,)?) => ({
                                                           match assert_result_err_as_result!($result) {
                                                  @@ -348,7 +353,8 @@
                                                   /// * [`assert_result_err`](macro@crate::assert_result_err)
                                                   /// * [`debug_assert_result_err`](macro@crate::debug_assert_result_err)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `deubg_assert_result_err` to `debug_assert_err` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_result_err {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_result/assert_result_ok.rs.html b/doc/src/lib/assert_result/assert_result_ok.rs.html
                                                  index 422fc6bdf..17d4693d5 100644
                                                  --- a/doc/src/lib/assert_result/assert_result_ok.rs.html
                                                  +++ b/doc/src/lib/assert_result/assert_result_ok.rs.html
                                                  @@ -177,6 +177,9 @@
                                                   177
                                                   178
                                                   179
                                                  +180
                                                  +181
                                                  +182
                                                   
                                                  //! Assert expression is Ok(_).
                                                   //!
                                                   //! # Example
                                                  @@ -213,7 +216,8 @@
                                                   /// * [`assert_result_ok_as_result`](macro@crate::assert_result_ok_as_result)
                                                   /// * [`debug_assert_result_ok`](macro@crate::debug_assert_result_ok)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_result_ok_as_result` to `assert_ok_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_result_ok_as_result {
                                                       ($result:expr $(,)?) => ({
                                                           match (&$result) {
                                                  @@ -304,7 +308,8 @@
                                                   /// * [`assert_result_ok_as_result`](macro@crate::assert_result_ok_as_result)
                                                   /// * [`debug_assert_result_ok`](macro@crate::debug_assert_result_ok)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_result_ok` to `assert_ok` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_result_ok {
                                                       ($result:expr $(,)?) => ({
                                                           match assert_result_ok_as_result!($result) {
                                                  @@ -348,7 +353,8 @@
                                                   /// * [`assert_result_ok`](macro@crate::assert_result_ok)
                                                   /// * [`debug_assert_result_ok`](macro@crate::debug_assert_result_ok)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_result_ok` to `debug_assert_ok` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_result_ok {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_result/assert_result_ok_eq.rs.html b/doc/src/lib/assert_result/assert_result_ok_eq.rs.html
                                                  index bcd82ad94..1091dab55 100644
                                                  --- a/doc/src/lib/assert_result/assert_result_ok_eq.rs.html
                                                  +++ b/doc/src/lib/assert_result/assert_result_ok_eq.rs.html
                                                  @@ -237,6 +237,9 @@
                                                   237
                                                   238
                                                   239
                                                  +240
                                                  +241
                                                  +242
                                                   
                                                  //! Assert two expressions are Ok(_) and their values are equal.
                                                   //!
                                                   //! # Example
                                                  @@ -274,7 +277,8 @@
                                                   /// * [`assert_result_ok_eq_as_result`](macro@crate::assert_result_ok_eq_as_result)
                                                   /// * [`debug_assert_result_ok_eq`](macro@crate::debug_assert_result_ok_eq)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_result_ok_eq_as_result` to `assert_ok_eq_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_result_ok_eq_as_result {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match (&$a, &$b) {
                                                  @@ -424,7 +428,8 @@
                                                   /// * [`assert_result_ok_eq_as_result`](macro@crate::assert_result_ok_eq_as_result)
                                                   /// * [`debug_assert_result_ok_eq`](macro@crate::debug_assert_result_ok_eq)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_result_ok_eq` to `assert_ok_eq` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_result_ok_eq {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match assert_result_ok_eq_as_result!($a, $b) {
                                                  @@ -468,7 +473,8 @@
                                                   /// * [`assert_result_ok_eq`](macro@crate::assert_result_ok_eq)
                                                   /// * [`debug_assert_result_ok_eq`](macro@crate::debug_assert_result_ok_eq)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_result_ok_eq` to `debug_assert_result_ok_eq` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_result_ok_eq {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_result/assert_result_ok_ne.rs.html b/doc/src/lib/assert_result/assert_result_ok_ne.rs.html
                                                  index 5c85e2482..118f0e169 100644
                                                  --- a/doc/src/lib/assert_result/assert_result_ok_ne.rs.html
                                                  +++ b/doc/src/lib/assert_result/assert_result_ok_ne.rs.html
                                                  @@ -237,6 +237,9 @@
                                                   237
                                                   238
                                                   239
                                                  +240
                                                  +241
                                                  +242
                                                   
                                                  //! Assert two expressions are Ok(_) and their values are not equal.
                                                   //!
                                                   //! # Example
                                                  @@ -274,7 +277,8 @@
                                                   /// * [`assert_result_ok_ne_as_result`](macro@crate::assert_result_ok_ne_as_result)
                                                   /// * [`debug_assert_result_ok_ne`](macro@crate::debug_assert_result_ok_ne)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_result_ok_ne_as_result` to `assert_ok_ne_as_result` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_result_ok_ne_as_result {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match (&$a, &$b) {
                                                  @@ -424,7 +428,8 @@
                                                   /// * [`assert_result_ok_ne_as_result`](macro@crate::assert_result_ok_ne_as_result)
                                                   /// * [`debug_assert_result_ok_ne`](macro@crate::debug_assert_result_ok_ne)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `assert_result_ok_ne` to `assert_ok_ne` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! assert_result_ok_ne {
                                                       ($a:expr, $b:expr $(,)?) => ({
                                                           match assert_result_ok_ne_as_result!($a, $b) {
                                                  @@ -468,7 +473,8 @@
                                                   /// * [`assert_result_ok_ne`](macro@crate::assert_result_ok_ne)
                                                   /// * [`debug_assert_result_ok_ne`](macro@crate::debug_assert_result_ok_ne)
                                                   ///
                                                  -#[macro_export]
                                                  +#[deprecated(note = "Please rename from `debug_assert_result_ok_ne` to `debug_result_ok_ne` because more developers prefer the shorter name.")]
                                                  +#[macro_export]
                                                   macro_rules! debug_assert_result_ok_ne {
                                                       ($($arg:tt)*) => {
                                                           if $crate::cfg!(debug_assertions) {
                                                  diff --git a/doc/src/lib/assert_some.rs.html b/doc/src/lib/assert_some.rs.html
                                                  new file mode 100644
                                                  index 000000000..724da7682
                                                  --- /dev/null
                                                  +++ b/doc/src/lib/assert_some.rs.html
                                                  @@ -0,0 +1,359 @@
                                                  +assert_some.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +
                                                  //!Assert expression is Some(_).
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! # fn main() {
                                                  +//! let a: Option<i8> = Option::Some(1);
                                                  +//! assert_some!(a);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_some`](macro@crate::assert_some)
                                                  +//! * [`assert_some_as_result`](macro@crate::assert_some_as_result)
                                                  +//! * [`debug_assert_some`](macro@crate::debug_assert_some)
                                                  +
                                                  +/// Assert an expression.is_some() is true.
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_some`](macro.assert_some.html),
                                                  +/// except this macro returns a Result, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_some`](macro@crate::assert_some)
                                                  +/// * [`assert_some_as_result`](macro@crate::assert_some_as_result)
                                                  +/// * [`debug_assert_some`](macro@crate::debug_assert_some)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_some_as_result {
                                                  +    ($option:expr $(,)?) => ({
                                                  +        match (&$option) {
                                                  +            option => {
                                                  +                match (option) {
                                                  +                    Some(_) => {
                                                  +                        Ok(())
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_some!(a)`\n",
                                                  +                                " option label: `{}`,\n",
                                                  +                                " option debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($option),
                                                  +                            option
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_some_as_result_x_success() {
                                                  +        let a: Option<i8> = Option::Some(1);
                                                  +        let result = assert_some_as_result!(a);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_some_as_result_x_failure() {
                                                  +        let a: Option<i8> = Option::None;
                                                  +        let result = assert_some_as_result!(a);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_some!(a)`\n",
                                                  +                " option label: `a`,\n",
                                                  +                " option debug: `None`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +}
                                                  +
                                                  +///Assert expression is Some(_).
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// # fn main() {
                                                  +/// let a: Option<i8> = Option::Some(1);
                                                  +/// assert_some!(a);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Option<i8> = Option::None;
                                                  +/// assert_some!(a);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_some!(a)`
                                                  +/// //  option label: `a`,
                                                  +/// //  option debug: `None`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_some!(a)`\n",
                                                  +/// #     " option label: `a`,\n",
                                                  +/// #     " option debug: `None`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_some`](macro@crate::assert_some)
                                                  +/// * [`assert_some_as_result`](macro@crate::assert_some_as_result)
                                                  +/// * [`debug_assert_some`](macro@crate::debug_assert_some)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_some {
                                                  +    ($option:expr $(,)?) => ({
                                                  +        match assert_some_as_result!($option) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($option:expr, $($message:tt)+) => ({
                                                  +        match assert_some_as_result!($option) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +///Assert expression is Some(_).
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_some`](macro.assert_some.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_some`](macro@crate::assert_some)
                                                  +/// * [`assert_some`](macro@crate::assert_some)
                                                  +/// * [`debug_assert_some`](macro@crate::debug_assert_some)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_some {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_some!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_some_eq.rs.html b/doc/src/lib/assert_some_eq.rs.html new file mode 100644 index 000000000..04bbbbbdb --- /dev/null +++ b/doc/src/lib/assert_some_eq.rs.html @@ -0,0 +1,479 @@ +assert_some_eq.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +180
                                                  +181
                                                  +182
                                                  +183
                                                  +184
                                                  +185
                                                  +186
                                                  +187
                                                  +188
                                                  +189
                                                  +190
                                                  +191
                                                  +192
                                                  +193
                                                  +194
                                                  +195
                                                  +196
                                                  +197
                                                  +198
                                                  +199
                                                  +200
                                                  +201
                                                  +202
                                                  +203
                                                  +204
                                                  +205
                                                  +206
                                                  +207
                                                  +208
                                                  +209
                                                  +210
                                                  +211
                                                  +212
                                                  +213
                                                  +214
                                                  +215
                                                  +216
                                                  +217
                                                  +218
                                                  +219
                                                  +220
                                                  +221
                                                  +222
                                                  +223
                                                  +224
                                                  +225
                                                  +226
                                                  +227
                                                  +228
                                                  +229
                                                  +230
                                                  +231
                                                  +232
                                                  +233
                                                  +234
                                                  +235
                                                  +236
                                                  +237
                                                  +238
                                                  +239
                                                  +
                                                  //! Assert two expressions are Some(_) and their values are equal.
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! # fn main() {
                                                  +//! let a: Option<i8> = Option::Some(1);
                                                  +//! let b: Option<i8> = Option::Some(1);
                                                  +//! assert_some_eq!(a, b);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_some_eq`](macro@crate::assert_some_eq)
                                                  +//! * [`assert_some_eq_as_result`](macro@crate::assert_some_eq_as_result)
                                                  +//! * [`debug_assert_some_eq`](macro@crate::debug_assert_some_eq)
                                                  +
                                                  +/// Assert a.is_some() and a.unwrap() are equal to another.
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_some_eq`](macro.assert_some_eq.html),
                                                  +/// except this macro returns a Option, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_some_eq`](macro@crate::assert_some_eq)
                                                  +/// * [`assert_some_eq_as_result`](macro@crate::assert_some_eq_as_result)
                                                  +/// * [`debug_assert_some_eq`](macro@crate::debug_assert_some_eq)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_some_eq_as_result {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match (&$a, &$b) {
                                                  +            (a, b) => {
                                                  +                match (a, b) {
                                                  +                    (Some(a_inner), Some(b_inner)) => {
                                                  +                        if a_inner == b_inner {
                                                  +                            Ok(())
                                                  +                        } else {
                                                  +                            Err(format!(
                                                  +                                concat!(
                                                  +                                    "assertion failed: `assert_some_eq!(a, b)`\n",
                                                  +                                    " a label: `{}`,\n",
                                                  +                                    " a debug: `{:?}`,\n",
                                                  +                                    " a inner: `{:?}`,\n",
                                                  +                                    " b label: `{}`,\n",
                                                  +                                    " b debug: `{:?}`,\n",
                                                  +                                    " b inner: `{:?}`"
                                                  +                                ),
                                                  +                                stringify!($a),
                                                  +                                a,
                                                  +                                a_inner,
                                                  +                                stringify!($b),
                                                  +                                b,
                                                  +                                b_inner
                                                  +                            ))
                                                  +                        }
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_some_eq!(a, b)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`,\n",
                                                  +                                " b label: `{}`,\n",
                                                  +                                " b debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($a),
                                                  +                            a,
                                                  +                            stringify!($b),
                                                  +                            b,
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_some_eq_as_result_x_success() {
                                                  +        let a: Option<i8> = Option::Some(1);
                                                  +        let b: Option<i8> = Option::Some(1);
                                                  +        let result = assert_some_eq_as_result!(a, b);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_some_eq_as_result_x_failure_because_ne() {
                                                  +        let a: Option<i8> = Option::Some(1);
                                                  +        let b: Option<i8> = Option::Some(2);
                                                  +        let result = assert_some_eq_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_some_eq!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Some(1)`,\n",
                                                  +                " a inner: `1`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Some(2)`,\n",
                                                  +                " b inner: `2`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_some_eq_as_result_x_failure_because_not_some() {
                                                  +        let a: Option<i8> = Option::Some(1);
                                                  +        let b: Option<i8> = Option::None;
                                                  +        let result = assert_some_eq_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_some_eq!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Some(1)`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `None`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Some(_) and their values are equal.
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// # fn main() {
                                                  +/// let a: Option<i8> = Option::Some(1);
                                                  +/// let b: Option<i8> = Option::Some(1);
                                                  +/// assert_some_eq!(a, b);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Option<i8> = Option::Some(1);
                                                  +/// let b: Option<i8> = Option::Some(2);
                                                  +/// assert_some_eq!(a, b);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_some_eq!(a, b)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Some(1)`,
                                                  +/// //  a inner: `1`,
                                                  +/// //  b label: `b`,
                                                  +/// //  b debug: `Some(2)`,
                                                  +/// //  b inner: `2`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_some_eq!(a, b)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Some(1)`,\n",
                                                  +/// #     " a inner: `1`,\n",
                                                  +/// #     " b label: `b`,\n",
                                                  +/// #     " b debug: `Some(2)`,\n",
                                                  +/// #     " b inner: `2`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_some_eq`](macro@crate::assert_some_eq)
                                                  +/// * [`assert_some_eq_as_result`](macro@crate::assert_some_eq_as_result)
                                                  +/// * [`debug_assert_some_eq`](macro@crate::debug_assert_some_eq)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_some_eq {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match assert_some_eq_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($a:expr, $b:expr, $($message:tt)+) => ({
                                                  +        match assert_some_eq_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Some(_) and their values are equal.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_some_eq`](macro.assert_some_eq.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_some_eq`](macro@crate::assert_some_eq)
                                                  +/// * [`assert_some_eq`](macro@crate::assert_some_eq)
                                                  +/// * [`debug_assert_some_eq`](macro@crate::debug_assert_some_eq)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_some_eq {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_some_eq!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/assert_some_ne.rs.html b/doc/src/lib/assert_some_ne.rs.html new file mode 100644 index 000000000..97cb49498 --- /dev/null +++ b/doc/src/lib/assert_some_ne.rs.html @@ -0,0 +1,479 @@ +assert_some_ne.rs - source
                                                  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
                                                  +74
                                                  +75
                                                  +76
                                                  +77
                                                  +78
                                                  +79
                                                  +80
                                                  +81
                                                  +82
                                                  +83
                                                  +84
                                                  +85
                                                  +86
                                                  +87
                                                  +88
                                                  +89
                                                  +90
                                                  +91
                                                  +92
                                                  +93
                                                  +94
                                                  +95
                                                  +96
                                                  +97
                                                  +98
                                                  +99
                                                  +100
                                                  +101
                                                  +102
                                                  +103
                                                  +104
                                                  +105
                                                  +106
                                                  +107
                                                  +108
                                                  +109
                                                  +110
                                                  +111
                                                  +112
                                                  +113
                                                  +114
                                                  +115
                                                  +116
                                                  +117
                                                  +118
                                                  +119
                                                  +120
                                                  +121
                                                  +122
                                                  +123
                                                  +124
                                                  +125
                                                  +126
                                                  +127
                                                  +128
                                                  +129
                                                  +130
                                                  +131
                                                  +132
                                                  +133
                                                  +134
                                                  +135
                                                  +136
                                                  +137
                                                  +138
                                                  +139
                                                  +140
                                                  +141
                                                  +142
                                                  +143
                                                  +144
                                                  +145
                                                  +146
                                                  +147
                                                  +148
                                                  +149
                                                  +150
                                                  +151
                                                  +152
                                                  +153
                                                  +154
                                                  +155
                                                  +156
                                                  +157
                                                  +158
                                                  +159
                                                  +160
                                                  +161
                                                  +162
                                                  +163
                                                  +164
                                                  +165
                                                  +166
                                                  +167
                                                  +168
                                                  +169
                                                  +170
                                                  +171
                                                  +172
                                                  +173
                                                  +174
                                                  +175
                                                  +176
                                                  +177
                                                  +178
                                                  +179
                                                  +180
                                                  +181
                                                  +182
                                                  +183
                                                  +184
                                                  +185
                                                  +186
                                                  +187
                                                  +188
                                                  +189
                                                  +190
                                                  +191
                                                  +192
                                                  +193
                                                  +194
                                                  +195
                                                  +196
                                                  +197
                                                  +198
                                                  +199
                                                  +200
                                                  +201
                                                  +202
                                                  +203
                                                  +204
                                                  +205
                                                  +206
                                                  +207
                                                  +208
                                                  +209
                                                  +210
                                                  +211
                                                  +212
                                                  +213
                                                  +214
                                                  +215
                                                  +216
                                                  +217
                                                  +218
                                                  +219
                                                  +220
                                                  +221
                                                  +222
                                                  +223
                                                  +224
                                                  +225
                                                  +226
                                                  +227
                                                  +228
                                                  +229
                                                  +230
                                                  +231
                                                  +232
                                                  +233
                                                  +234
                                                  +235
                                                  +236
                                                  +237
                                                  +238
                                                  +239
                                                  +
                                                  //! Assert two expressions are Some(_) and their values are not equal.
                                                  +//!
                                                  +//! # Example
                                                  +//!
                                                  +//! ```rust
                                                  +//! # #[macro_use] extern crate assertables;
                                                  +//! # fn main() {
                                                  +//! let a: Option<i8> = Option::Some(1);
                                                  +//! let b: Option<i8> = Option::Some(2);
                                                  +//! assert_some_ne!(a, b);
                                                  +//! # }
                                                  +//! ```
                                                  +//!
                                                  +//! # Module macros
                                                  +//!
                                                  +//! * [`assert_some_ne`](macro@crate::assert_some_ne)
                                                  +//! * [`assert_some_ne_as_result`](macro@crate::assert_some_ne_as_result)
                                                  +//! * [`debug_assert_some_ne`](macro@crate::debug_assert_some_ne)
                                                  +
                                                  +/// Assert two expressions are Some(_) and their values are not equal.
                                                  +///
                                                  +/// * If true, return Result `Ok(())`.
                                                  +///
                                                  +/// * Otherwise, return Result `Err` with a diagnostic message.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_some_ne`](macro.assert_some_ne.html),
                                                  +/// except this macro returns a Option, rather than doing a panic.
                                                  +///
                                                  +/// This macro is useful for runtime checks, such as checking parameters,
                                                  +/// or sanitizing inputs, or handling different results in different ways.
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_some_ne`](macro@crate::assert_some_ne)
                                                  +/// * [`assert_some_ne_as_result`](macro@crate::assert_some_ne_as_result)
                                                  +/// * [`debug_assert_some_ne`](macro@crate::debug_assert_some_ne)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_some_ne_as_result {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match (&$a, &$b) {
                                                  +            (a, b) => {
                                                  +                match (a, b) {
                                                  +                    (Some(a_inner), Some(b_inner)) => {
                                                  +                        if a_inner != b_inner {
                                                  +                            Ok(())
                                                  +                        } else {
                                                  +                            Err(format!(
                                                  +                                concat!(
                                                  +                                    "assertion failed: `assert_some_ne!(a, b)`\n",
                                                  +                                    " a label: `{}`,\n",
                                                  +                                    " a debug: `{:?}`,\n",
                                                  +                                    " a inner: `{:?}`,\n",
                                                  +                                    " b label: `{}`,\n",
                                                  +                                    " b debug: `{:?}`,\n",
                                                  +                                    " b inner: `{:?}`"
                                                  +                                ),
                                                  +                                stringify!($a),
                                                  +                                a,
                                                  +                                a_inner,
                                                  +                                stringify!($b),
                                                  +                                b,
                                                  +                                b_inner
                                                  +                            ))
                                                  +                        }
                                                  +                    },
                                                  +                    _ => {
                                                  +                        Err(format!(
                                                  +                            concat!(
                                                  +                                "assertion failed: `assert_some_ne!(a, b)`\n",
                                                  +                                " a label: `{}`,\n",
                                                  +                                " a debug: `{:?}`,\n",
                                                  +                                " b label: `{}`,\n",
                                                  +                                " b debug: `{:?}`",
                                                  +                            ),
                                                  +                            stringify!($a),
                                                  +                            a,
                                                  +                            stringify!($b),
                                                  +                            b,
                                                  +                        ))
                                                  +                    }
                                                  +                }
                                                  +            }
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +#[cfg(test)]
                                                  +mod tests {
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_some_ne_as_result_x_success() {
                                                  +        let a: Option<i8> = Option::Some(1);
                                                  +        let b: Option<i8> = Option::Some(2);
                                                  +        let result = assert_some_ne_as_result!(a, b);
                                                  +        assert_eq!(result, Ok(()));
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_some_ne_as_result_x_failure_because_eq() {
                                                  +        let a: Option<i8> = Option::Some(1);
                                                  +        let b: Option<i8> = Option::Some(1);
                                                  +        let result = assert_some_ne_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_some_ne!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Some(1)`,\n",
                                                  +                " a inner: `1`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `Some(1)`,\n",
                                                  +                " b inner: `1`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +    #[test]
                                                  +    fn test_assert_some_ne_as_result_x_failure_because_not_some() {
                                                  +        let a: Option<i8> = Option::Some(1);
                                                  +        let b: Option<i8> = Option::None;
                                                  +        let result = assert_some_ne_as_result!(a, b);
                                                  +        assert!(result.is_err());
                                                  +        assert_eq!(
                                                  +            result.unwrap_err(),
                                                  +            concat!(
                                                  +                "assertion failed: `assert_some_ne!(a, b)`\n",
                                                  +                " a label: `a`,\n",
                                                  +                " a debug: `Some(1)`,\n",
                                                  +                " b label: `b`,\n",
                                                  +                " b debug: `None`",
                                                  +            )
                                                  +        );
                                                  +    }
                                                  +
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Some(_) and their values are not equal.
                                                  +///
                                                  +/// * If true, return `()`.
                                                  +///
                                                  +/// * Otherwise, call [`panic!`] with a message and the values of the
                                                  +///   expressions with their debug representations.
                                                  +///
                                                  +/// # Examples
                                                  +///
                                                  +/// ```rust
                                                  +/// # #[macro_use] extern crate assertables;
                                                  +/// # use std::panic;
                                                  +/// # fn main() {
                                                  +/// let a: Option<i8> = Option::Some(1);
                                                  +/// let b: Option<i8> = Option::Some(2);
                                                  +/// assert_some_ne!(a, b);
                                                  +///
                                                  +/// # let result = panic::catch_unwind(|| {
                                                  +/// let a: Option<i8> = Option::Some(1);
                                                  +/// let b: Option<i8> = Option::Some(1);
                                                  +/// assert_some_ne!(a, b);
                                                  +/// # });
                                                  +/// // assertion failed: `assert_some_ne!(a, b)`
                                                  +/// //  a label: `a`,
                                                  +/// //  a debug: `Some(1)`,
                                                  +/// //  b label: `b`,
                                                  +/// //  b debug: `Some(1)`,
                                                  +/// //  a inner: `1`,
                                                  +/// //  b inner: `1`
                                                  +/// # let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
                                                  +/// # let expect = concat!(
                                                  +/// #     "assertion failed: `assert_some_ne!(a, b)`\n",
                                                  +/// #     " a label: `a`,\n",
                                                  +/// #     " a debug: `Some(1)`,\n",
                                                  +/// #     " a inner: `1`,\n",
                                                  +/// #     " b label: `b`,\n",
                                                  +/// #     " b debug: `Some(1)`,\n",
                                                  +/// #     " b inner: `1`",
                                                  +/// # );
                                                  +/// # assert_eq!(actual, expect);
                                                  +/// # }
                                                  +/// ```
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_some_ne`](macro@crate::assert_some_ne)
                                                  +/// * [`assert_some_ne_as_result`](macro@crate::assert_some_ne_as_result)
                                                  +/// * [`debug_assert_some_ne`](macro@crate::debug_assert_some_ne)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! assert_some_ne {
                                                  +    ($a:expr, $b:expr $(,)?) => ({
                                                  +        match assert_some_ne_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(err) => panic!("{}", err),
                                                  +        }
                                                  +    });
                                                  +    ($a:expr, $b:expr, $($message:tt)+) => ({
                                                  +        match assert_some_ne_as_result!($a, $b) {
                                                  +            Ok(()) => (),
                                                  +            Err(_err) => panic!("{}", $($message)+),
                                                  +        }
                                                  +    });
                                                  +}
                                                  +
                                                  +/// Assert two expressions are Some(_) and their values are not equal.
                                                  +///
                                                  +/// This macro provides the same statements as [`assert_some_ne`](macro.assert_some_ne.html),
                                                  +/// except this macro's statements are only enabled in non-optimized
                                                  +/// builds by default. An optimized build will not execute this macro's
                                                  +/// statements unless `-C debug-assertions` is passed to the compiler.
                                                  +///
                                                  +/// This macro is useful for checks that are too expensive to be present
                                                  +/// in a release build but may be helpful during development.
                                                  +///
                                                  +/// The result of expanding this macro is always type checked.
                                                  +///
                                                  +/// An unchecked assertion allows a program in an inconsistent state to
                                                  +/// keep running, which might have unexpected consequences but does not
                                                  +/// introduce unsafety as long as this only happens in safe code. The
                                                  +/// performance cost of assertions, however, is not measurable in general.
                                                  +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged
                                                  +/// after thorough profiling, and more importantly, only in safe code!
                                                  +///
                                                  +/// This macro is intended to work in a similar way to
                                                  +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html).
                                                  +///
                                                  +/// # Module macros
                                                  +///
                                                  +/// * [`assert_some_ne`](macro@crate::assert_some_ne)
                                                  +/// * [`assert_some_ne`](macro@crate::assert_some_ne)
                                                  +/// * [`debug_assert_some_ne`](macro@crate::debug_assert_some_ne)
                                                  +///
                                                  +#[macro_export]
                                                  +macro_rules! debug_assert_some_ne {
                                                  +    ($($arg:tt)*) => {
                                                  +        if $crate::cfg!(debug_assertions) {
                                                  +            $crate::assert_some_ne!($($arg)*);
                                                  +        }
                                                  +    };
                                                  +}
                                                  +
                                                  \ No newline at end of file diff --git a/doc/src/lib/lib.rs.html b/doc/src/lib/lib.rs.html index d2ee85e5a..fa73b6b4b 100644 --- a/doc/src/lib/lib.rs.html +++ b/doc/src/lib/lib.rs.html @@ -238,6 +238,22 @@ 238 239 240 +241 +242 +243 +244 +245 +246 +247 +248 +249 +250 +251 +252 +253 +254 +255 +256
                                                  //! # Assertables: Rust crate of assert macros for testing
                                                   //!
                                                   //! The `assertables` Rust crate provides many assert macros to improve your
                                                  @@ -256,17 +272,17 @@
                                                   //! The Rust programming language provides assert macros to test code:
                                                   //!
                                                   //! * [`assert!()`](https://doc.rust-lang.org/std/macro.assert.html)
                                                  -//! * [`assert_eq!(a, b)`](https://doc.rust-lang.org/std/macro.assert_eq.html)
                                                  -//! * [`assert_ne!(a, b)`](https://doc.rust-lang.org/std/macro.assert_ne.html)
                                                  +//! * [`assert_eq!(a, b)`](https://doc.rust-lang.org/std/macro.assert_eq.html) `// equal` 
                                                  +//! * [`assert_ne!(a, b)`](https://doc.rust-lang.org/std/macro.assert_ne.html) `// not equal`
                                                   //!
                                                   //! The assertables crate provides many more, so you can write smarter tests.
                                                   //!
                                                   //! For values:
                                                   //!
                                                   //! * [`assert_lt!(a, b)`](macro@crate::assert_lt) `// less than`
                                                  -//! * [`assert_le!(a, b)`](macro@crate::assert_le) `// less than or equal to`
                                                  +//! * [`assert_le!(a, b)`](macro@crate::assert_le) `// less than or equal`
                                                   //! * [`assert_gt!(a, b)`](macro@crate::assert_gt) `// greater than`
                                                  -//! * [`assert_ge!(a, b)`](macro@crate::assert_ge) `// greater than or equal to`
                                                  +//! * [`assert_ge!(a, b)`](macro@crate::assert_ge) `// greater than or equal`
                                                   //!
                                                   //! For strings:
                                                   //!
                                                  @@ -288,26 +304,26 @@
                                                   //! * [`assert_in_delta!(a, b, delta)`](macro@crate::assert_in_delta)
                                                   //! * [`assert_in_epsilon!(a, b, epsilon)`](macro@crate::assert_in_epsilon)
                                                   //!
                                                  -//! For results:
                                                  +//! For Result:
                                                   //!
                                                  -//! * [`assert_result_ok!(a)`](macro@crate::assert_result_ok)
                                                  -//! * [`assert_result_ok_eq!(a)`](macro@crate::assert_result_ok_eq)
                                                  -//! * [`assert_result_ok_ne!(a)`](macro@crate::assert_result_ok_ne)
                                                  -//! * [`assert_result_err!(a)`](macro@crate::assert_result_err)
                                                  +//! * [`assert_ok!(a)`](macro@crate::assert_ok)
                                                  +//! * [`assert_ok_eq!(a)`](macro@crate::assert_ok_eq)
                                                  +//! * [`assert_ok_ne!(a)`](macro@crate::assert_ok_ne)
                                                  +//! * [`assert_err!(a)`](macro@crate::assert_err)
                                                   //!
                                                  -//! For options:
                                                  +//! For Option:
                                                   //!
                                                  -//! * [`assert_option_some!(a)`](macro@crate::assert_option_some)
                                                  -//! * [`assert_option_some_eq!(a)`](macro@crate::assert_option_some_eq)
                                                  -//! * [`assert_option_some_ne!(a)`](macro@crate::assert_option_some_ne)
                                                  -//! * [`assert_option_none!(a)`](macro@crate::assert_option_none)
                                                  +//! * [`assert_some!(a)`](macro@crate::assert_some)
                                                  +//! * [`assert_some_eq!(a)`](macro@crate::assert_some_eq)
                                                  +//! * [`assert_some_ne!(a)`](macro@crate::assert_some_ne)
                                                  +//! * [`assert_none!(a)`](macro@crate::assert_none)
                                                   //!
                                                  -//! For polls:
                                                  +//! For Poll:
                                                   //!
                                                  -//! * [`assert_poll_ready!(a)`](macro@crate::assert_poll_ready)
                                                  -//! * [`assert_poll_ready_eq!(a, b)`](macro@crate::assert_poll_ready_eq)
                                                  -//! * [`assert_poll_ready_ne!(a, b)`](macro@crate::assert_poll_ready_ne)
                                                  -//! * [`assert_poll_pending!(a)`](macro@crate::assert_poll_pending)
                                                  +//! * [`assert_ready!(a)`](macro@crate::assert_ready)
                                                  +//! * [`assert_ready_eq!(a, b)`](macro@crate::assert_ready_eq)
                                                  +//! * [`assert_ready_ne!(a, b)`](macro@crate::assert_ready_ne)
                                                  +//! * [`assert_pending!(a)`](macro@crate::assert_pending)
                                                   //!
                                                   //! For collections such as arrays, vectors, maps, sets:
                                                   //!
                                                  @@ -424,9 +440,9 @@
                                                   //! ## Tracking
                                                   //!
                                                   //! * Package: assertables-rust-crate
                                                  -//! * Version: 8.6.0
                                                  +//! * Version: 8.7.0
                                                   //! * Created: 2021-03-30T15:47:49Z
                                                  -//! * Updated: 2024-09-16T22:18:33Z
                                                  +//! * Updated: 2024-09-18T14:51:06Z
                                                   //! * 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)
                                                   
                                                  @@ -454,12 +470,28 @@
                                                   pub mod assert_not_starts_with;
                                                   pub mod assert_starts_with;
                                                   
                                                  -// For maybes
                                                  -pub mod assert_result;
                                                  -pub mod assert_option;
                                                  -pub mod assert_poll;
                                                  +// For Result Ok/Err 
                                                  +pub mod assert_ok;
                                                  +pub mod assert_ok_eq;
                                                  +pub mod assert_ok_ne;
                                                  +pub mod assert_err;
                                                  +pub mod assert_result; // Deprecated
                                                   
                                                  -// For collections
                                                  +// For Option Some/None
                                                  +pub mod assert_some;
                                                  +pub mod assert_some_eq;
                                                  +pub mod assert_some_ne;
                                                  +pub mod assert_none;
                                                  +pub mod assert_option; // Deprecated
                                                  +
                                                  +// For Poll Ready/Pending
                                                  +pub mod assert_ready;
                                                  +pub mod assert_ready_eq;
                                                  +pub mod assert_ready_ne;
                                                  +pub mod assert_pending;
                                                  +pub mod assert_poll; // Deprecated
                                                  +
                                                  +// For collections
                                                   pub mod assert_set;
                                                   pub mod assert_bag;
                                                   
                                                  diff --git a/help/comparisons/claims/index.md b/help/comparisons/claims/index.md
                                                  index f49154f6b..cd628304c 100644
                                                  --- a/help/comparisons/claims/index.md
                                                  +++ b/help/comparisons/claims/index.md
                                                  @@ -120,10 +120,10 @@ Match
                                                   
                                                   Result 
                                                   
                                                  -assert_result_ok
                                                  -assert_result_ok_eq
                                                  -assert_result_ok_ne
                                                  -assert_result_err +assert_ok
                                                  +assert_ok_eq
                                                  +assert_ok_ne
                                                  +assert_err assert_ok
                                                  @@ -136,10 +136,10 @@ Match Option -assert_option_some
                                                  -assert_option_some_eq (eta v8.5)
                                                  -assert_option_some_ne (eta v8.5)
                                                  -assert_option_none +assert_some
                                                  +assert_some_eq (eta v8.5)
                                                  +assert_some_ne (eta v8.5)
                                                  +assert_none assert_some
                                                  @@ -152,12 +152,12 @@ Match Poll -assert_poll_ready
                                                  -assert_poll_ready_eq
                                                  -assert_poll_ready_ne
                                                  -assert_poll_ready_ok(eta 8.6)
                                                  -assert_poll_ready_err(eta 8.6)
                                                  -assert_poll_pending +assert_ready
                                                  +assert_ready_eq
                                                  +assert_ready_ne
                                                  +assert_ready_ok(eta 8.7)
                                                  +assert_ready_err(eta 8.7)
                                                  +assert_pending assert_ready
                                                  diff --git a/src/assert.rs b/src/assert.rs index 57362ba52..8863409ff 100644 --- a/src/assert.rs +++ b/src/assert.rs @@ -41,6 +41,7 @@ macro_rules! assert_as_result { Err(format!( concat!( "assertion failed: `assert!(condition)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert.html\n", " condition label: `{}`,\n", " condition debug: `{:?}`,\n", ), @@ -71,6 +72,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert!(condition)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert.html\n", " condition label: `a`,\n", " condition debug: `false`,\n", ); diff --git a/src/assert_bag/assert_bag_eq.rs b/src/assert_bag/assert_bag_eq.rs index 50b9fe70f..f899a8ed1 100644 --- a/src/assert_bag/assert_bag_eq.rs +++ b/src/assert_bag/assert_bag_eq.rs @@ -48,6 +48,7 @@ macro_rules! assert_bag_eq_as_result { Err(format!( concat!( "assertion failed: `assert_bag_eq!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -89,6 +90,7 @@ mod test_as_result { result.unwrap_err(), concat!( "assertion failed: `assert_bag_eq!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_eq.html\n", " a label: `&a`,\n", " a debug: `[1, 1]`,\n", " b label: `&b`,\n", @@ -123,6 +125,7 @@ mod test_as_result { /// assert_bag_eq!(&a, &b); /// # }); /// // assertion failed: `assert_bag_eq!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_eq.html /// // a label: `&a`, /// // a debug: `[1, 1]`, /// // b label: `&b`, @@ -132,6 +135,7 @@ mod test_as_result { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_bag_eq!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_eq.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 1]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_bag/assert_bag_ne.rs b/src/assert_bag/assert_bag_ne.rs index c7889e8dc..09d815b4c 100644 --- a/src/assert_bag/assert_bag_ne.rs +++ b/src/assert_bag/assert_bag_ne.rs @@ -50,6 +50,7 @@ macro_rules! assert_bag_ne_as_result { Err(format!( concat!( "assertion failed: `assert_bag_ne!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -91,6 +92,7 @@ mod test_assert_x_result { result.unwrap_err(), concat!( "assertion failed: `assert_bag_ne!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_ne.html\n", " a label: `&a`,\n", " a debug: `[1, 1]`,\n", " b label: `&b`,\n", @@ -125,6 +127,7 @@ mod test_assert_x_result { /// assert_bag_ne!(&a, &b); /// # }); /// // assertion failed: `assert_bag_ne!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_ne.html /// // a label: `&a`, /// // a debug: `[1, 1]`, /// // b label: `&b`, @@ -134,6 +137,7 @@ mod test_assert_x_result { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_bag_ne!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_ne.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 1]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_bag/assert_bag_subbag.rs b/src/assert_bag/assert_bag_subbag.rs index 94a05bfb5..6c525bd8a 100644 --- a/src/assert_bag/assert_bag_subbag.rs +++ b/src/assert_bag/assert_bag_subbag.rs @@ -54,6 +54,7 @@ macro_rules! assert_bag_subbag_as_result { Err(format!( concat!( "assertion failed: `assert_bag_subbag!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_subbag.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -95,6 +96,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_bag_subbag!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_subbag.html\n", " a label: `&a`,\n", " a debug: `[1, 1]`,\n", " b label: `&b`,\n", @@ -115,6 +117,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_bag_subbag!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_subbag.html\n", " a label: `&a`,\n", " a debug: `[1, 1, 1]`,\n", " b label: `&b`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_bag_subbag!(&a, &b); /// # }); /// // assertion failed: `assert_bag_subbag!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_subbag.html /// // a label: `&a`, /// // a debug: `[1, 1, 1]`, /// // b label: `&b`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_bag_subbag!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_subbag.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 1, 1]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_bag/assert_bag_superbag.rs b/src/assert_bag/assert_bag_superbag.rs index a6059a253..90728d875 100644 --- a/src/assert_bag/assert_bag_superbag.rs +++ b/src/assert_bag/assert_bag_superbag.rs @@ -54,6 +54,7 @@ macro_rules! assert_bag_superbag_as_result { Err(format!( concat!( "assertion failed: `assert_bag_superbag!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_superbag.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -95,6 +96,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_bag_superbag!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_superbag.html\n", " a label: `&a`,\n", " a debug: `[1, 1]`,\n", " b label: `&b`,\n", @@ -115,6 +117,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_bag_superbag!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_superbag.html\n", " a label: `&a`,\n", " a debug: `[1, 1]`,\n", " b label: `&b`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_bag_superbag!(&a, &b); /// # }); /// // assertion failed: `assert_bag_superbag!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_superbag.html /// // a label: `&a`, /// // a debug: `[1, 1]`, /// // b label: `&b`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_bag_superbag!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_bag_superbag.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 1]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_command/assert_command_stderr_contains.rs b/src/assert_command/assert_command_stderr_contains.rs index fbbc1fdb8..ca649d9e7 100644 --- a/src/assert_command/assert_command_stderr_contains.rs +++ b/src/assert_command/assert_command_stderr_contains.rs @@ -48,6 +48,7 @@ macro_rules! assert_command_stderr_contains_as_result { Err(format!( concat!( "assertion failed: `assert_command_stderr_contains!(command, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_contains.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_command_stderr_contains_as_result { Err(format!( concat!( "assertion failed: `assert_command_stderr_contains!(command, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_contains.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -110,6 +112,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_command_stderr_contains!(command, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_contains.html\n", " command label: `a`,\n", " command debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`,\n", " containee label: `b`,\n", @@ -152,6 +155,7 @@ mod tests { /// assert_command_stderr_contains!(command, &containee); /// # }); /// // assertion failed: `assert_command_stderr_contains!(command, containee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_contains.html /// // command label: `command`, /// // command debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`, /// // containee label: `&containee`, @@ -160,6 +164,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_command_stderr_contains!(command, containee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_contains.html\n", /// # " command label: `command`,\n", /// # " command debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`,\n", /// # " containee label: `&containee`,\n", diff --git a/src/assert_command/assert_command_stderr_eq.rs b/src/assert_command/assert_command_stderr_eq.rs index 775f4fd26..ffa7a9b40 100644 --- a/src/assert_command/assert_command_stderr_eq.rs +++ b/src/assert_command/assert_command_stderr_eq.rs @@ -48,6 +48,7 @@ macro_rules! assert_command_stderr_eq_as_result { Err(format!( concat!( "assertion failed: `assert_command_stderr_eq!(a_command, b_command)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -71,6 +72,7 @@ macro_rules! assert_command_stderr_eq_as_result { Err(format!( concat!( "assertion failed: `assert_command_stderr_eq!(a_command, b_command)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -115,6 +117,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_command_stderr_eq!(a_command, b_command)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq.html\n", " a label: `a`,\n", " a debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`,\n", " b label: `b`,\n", @@ -155,6 +158,7 @@ mod tests { /// assert_command_stderr_eq!(a, b); /// # }); /// // assertion failed: `assert_command_stderr_eq!(a_command, b_command)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq.html /// // a label: `a`, /// // a debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`, /// // b label: `b`, @@ -164,6 +168,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_command_stderr_eq!(a_command, b_command)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq.html\n", /// # " a label: `a`,\n", /// # " a debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_command/assert_command_stderr_eq_expr.rs b/src/assert_command/assert_command_stderr_eq_expr.rs index 4354ba1d3..6f9f8a94f 100644 --- a/src/assert_command/assert_command_stderr_eq_expr.rs +++ b/src/assert_command/assert_command_stderr_eq_expr.rs @@ -48,6 +48,7 @@ macro_rules! assert_command_stderr_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_command_stderr_eq_expr!(command, expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq_expr.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " expr label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_command_stderr_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_command_stderr_eq_expr!(command, expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq_expr.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " expr label: `{}`,\n", @@ -112,6 +114,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_command_stderr_eq_expr!(command, expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq_expr.html\n", " command label: `a`,\n", " command debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`,\n", " expr label: `b`,\n", @@ -150,6 +153,7 @@ mod tests { /// assert_command_stderr_eq_expr!(command, s); /// # }); /// // assertion failed: `assert_command_stderr_eq_expr!(command, expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq_expr.html /// // command label: `command`, /// // command debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`, /// // expr label: `s`, @@ -159,6 +163,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_command_stderr_eq_expr!(command, expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_eq_expr.html\n", /// # " command label: `command`,\n", /// # " command debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`,\n", /// # " expr label: `s`,\n", diff --git a/src/assert_command/assert_command_stderr_is_match.rs b/src/assert_command/assert_command_stderr_is_match.rs index 8b43ee48d..8744cc746 100644 --- a/src/assert_command/assert_command_stderr_is_match.rs +++ b/src/assert_command/assert_command_stderr_is_match.rs @@ -49,6 +49,7 @@ macro_rules! assert_command_stderr_is_match_as_result { Err(format!( concat!( "assertion failed: `assert_command_stderr_is_match!(command, matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_is_match.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " matcher label: `{}`,\n", @@ -69,6 +70,7 @@ macro_rules! assert_command_stderr_is_match_as_result { Err(format!( concat!( "assertion failed: `assert_command_stderr_is_match!(command, matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_is_match.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " matcher label: `{}`,\n", @@ -114,6 +116,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_command_stderr_is_match!(command, matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_is_match.html\n", " command label: `a`,\n", " command debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`,\n", " matcher label: `b`,\n", @@ -153,6 +156,7 @@ mod tests { /// assert_command_stderr_is_match!(command, &matcher); /// # }); /// // assertion failed: `assert_command_stderr_is_match!(command, matcher)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_is_match.html /// // command label: `command`, /// // command debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`, /// // matcher label: `&matcher`, @@ -162,6 +166,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_command_stderr_is_match!(command, matcher)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stderr_is_match.html\n", /// # " command label: `command`,\n", /// # " command debug: `\"bin/printf-stderr\" \"%s\" \"hello\"`,\n", /// # " matcher label: `&matcher`,\n", diff --git a/src/assert_command/assert_command_stdout_contains.rs b/src/assert_command/assert_command_stdout_contains.rs index 5ee77d595..46e24d4d7 100644 --- a/src/assert_command/assert_command_stdout_contains.rs +++ b/src/assert_command/assert_command_stdout_contains.rs @@ -48,6 +48,7 @@ macro_rules! assert_command_stdout_contains_as_result { Err(format!( concat!( "assertion failed: `assert_command_stdout_contains!(command, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_contains.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_command_stdout_contains_as_result { Err(format!( concat!( "assertion failed: `assert_command_stdout_contains!(command, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_contains.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -110,6 +112,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_command_stdout_contains!(command, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_contains.html\n", " command label: `a`,\n", " command debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`,\n", " containee label: `b`,\n", @@ -152,6 +155,7 @@ mod tests { /// assert_command_stdout_contains!(command, &containee); /// # }); /// // assertion failed: `assert_command_stdout_contains!(command, containee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_contains.html /// // command label: `command`, /// // command debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`, /// // containee label: `&containee`, @@ -160,6 +164,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_command_stdout_contains!(command, containee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_contains.html\n", /// # " command label: `command`,\n", /// # " command debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`,\n", /// # " containee label: `&containee`,\n", diff --git a/src/assert_command/assert_command_stdout_eq.rs b/src/assert_command/assert_command_stdout_eq.rs index e54d32678..04fbf1814 100644 --- a/src/assert_command/assert_command_stdout_eq.rs +++ b/src/assert_command/assert_command_stdout_eq.rs @@ -49,6 +49,7 @@ macro_rules! assert_command_stdout_eq_as_result { Err(format!( concat!( "assertion failed: `assert_command_stdout_eq!(a_command, b_command)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -72,6 +73,7 @@ macro_rules! assert_command_stdout_eq_as_result { Err(format!( concat!( "assertion failed: `assert_command_stdout_eq!(a_command, b_command)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_command_stdout_eq!(a_command, b_command)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq.html\n", " a label: `a`,\n", " a debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`,\n", " b label: `b`,\n", @@ -156,6 +159,7 @@ mod tests { /// assert_command_stdout_eq!(a, b); /// # }); /// // assertion failed: `assert_command_stdout_eq!(a_command, b_command)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq.html /// // a label: `a`, /// // a debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`, /// // b label: `b`, @@ -165,6 +169,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_command_stdout_eq!(a_command, b_command)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq.html\n", /// # " a label: `a`,\n", /// # " a debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_command/assert_command_stdout_eq_expr.rs b/src/assert_command/assert_command_stdout_eq_expr.rs index 64f6309b9..75a57a0a2 100644 --- a/src/assert_command/assert_command_stdout_eq_expr.rs +++ b/src/assert_command/assert_command_stdout_eq_expr.rs @@ -48,6 +48,7 @@ macro_rules! assert_command_stdout_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_command_stdout_eq_expr!(a_command, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq_expr.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_command_stdout_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_command_stdout_eq_expr!(a_command, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq_expr.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -112,6 +114,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_command_stdout_eq_expr!(a_command, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq_expr.html\n", " a label: `a`,\n", " a debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`,\n", " b label: `b`,\n", @@ -150,6 +153,7 @@ mod tests { /// assert_command_stdout_eq_expr!(command, s); /// # }); /// // assertion failed: `assert_command_stdout_eq_expr!(a_command, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq_expr.html /// // a label: `command`, /// // a debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`, /// // b label: `s`, @@ -159,6 +163,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_command_stdout_eq_expr!(a_command, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_eq_expr.html\n", /// # " a label: `command`,\n", /// # " a debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`,\n", /// # " b label: `s`,\n", diff --git a/src/assert_command/assert_command_stdout_is_match.rs b/src/assert_command/assert_command_stdout_is_match.rs index 03fe4d550..efd3c0050 100644 --- a/src/assert_command/assert_command_stdout_is_match.rs +++ b/src/assert_command/assert_command_stdout_is_match.rs @@ -49,6 +49,7 @@ macro_rules! assert_command_stdout_is_match_as_result { Err(format!( concat!( "assertion failed: `assert_command_stdout_is_match!(command, matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_is_match.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " matcher label: `{}`,\n", @@ -69,6 +70,7 @@ macro_rules! assert_command_stdout_is_match_as_result { Err(format!( concat!( "assertion failed: `assert_command_stdout_is_match!(command, matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_is_match.html\n", " command label: `{}`,\n", " command debug: `{:?}`,\n", " matcher label: `{}`,\n", @@ -114,6 +116,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_command_stdout_is_match!(command, matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_is_match.html\n", " command label: `a`,\n", " command debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`,\n", " matcher label: `b`,\n", @@ -153,6 +156,7 @@ mod tests { /// assert_command_stdout_is_match!(command, &matcher); /// # }); /// // assertion failed: `assert_command_stdout_is_match!(command, matcher)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_is_match.html /// // command label: `command`, /// // command debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`, /// // matcher label: `&matcher`, @@ -162,6 +166,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_command_stdout_is_match!(command, matcher)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_is_match.html\n", /// # " command label: `command`,\n", /// # " command debug: `\"bin/printf-stdout\" \"%s\" \"hello\"`,\n", /// # " matcher label: `&matcher`,\n", diff --git a/src/assert_contains.rs b/src/assert_contains.rs index 6d8314dc8..8bc2a25a4 100644 --- a/src/assert_contains.rs +++ b/src/assert_contains.rs @@ -52,6 +52,7 @@ macro_rules! assert_contains_as_result { Err(format!( concat!( "assertion failed: `assert_contains!(container, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_contains.html\n", " container label: `{}`,\n", " container debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -89,6 +90,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_contains!(container, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_contains.html\n", " container label: `a`,\n", " container debug: `\"alfa\"`,\n", " containee label: `b`,\n", @@ -115,6 +117,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_contains!(container, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_contains.html\n", " container label: `a`,\n", " container debug: `1..5`,\n", " containee label: `&b`,\n", @@ -154,6 +157,7 @@ mod tests { /// assert_contains!(a, b); /// # }); /// // assertion failed: `assert_contains!(container, containee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_contains.html /// // container label: `a`, /// // container debug: `\"alfa\"`, /// // containee label: `b`, @@ -161,6 +165,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_contains!(container, containee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_contains.html\n", /// # " container label: `a`,\n", /// # " container debug: `\"alfa\"`,\n", /// # " containee label: `b`,\n", diff --git a/src/assert_ends_with.rs b/src/assert_ends_with.rs index 3708a477b..f4deaf4ce 100644 --- a/src/assert_ends_with.rs +++ b/src/assert_ends_with.rs @@ -46,6 +46,7 @@ macro_rules! assert_ends_with_as_result { Err(format!( concat!( "assertion failed: `assert_ends_with!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ends_with.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -81,6 +82,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_ends_with!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ends_with.html\n", " a label: `a`,\n", " a debug: `\"alfa\"`,\n", " b label: `b`,\n", @@ -113,6 +115,7 @@ mod tests { /// assert_ends_with!(a, b); /// # }); /// // assertion failed: `assert_ends_with!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_ends_with.html /// // a label: `a`, /// // a debug: `\"alfa\"`, /// // b label: `b`, @@ -120,6 +123,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_ends_with!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ends_with.html\n", /// # " a label: `a`,\n", /// # " a debug: `\"alfa\"`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_eq.rs b/src/assert_eq.rs index 9130241fe..1de2c18d7 100644 --- a/src/assert_eq.rs +++ b/src/assert_eq.rs @@ -51,6 +51,7 @@ macro_rules! assert_eq_as_result { Err(format!( concat!( "assertion failed: `assert_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -88,6 +89,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_eq.html\n", " a label: `a`,\n", " a debug: `1`,\n", " b label: `b`,\n", diff --git a/src/assert_err.rs b/src/assert_err.rs new file mode 100644 index 000000000..4dc20a1c5 --- /dev/null +++ b/src/assert_err.rs @@ -0,0 +1,183 @@ +//! Assert expression is Err(_). +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! # fn main() { +//! let a: Result<(), i8> = Err(1); +//! assert_err!(a); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_err`](macro@crate::assert_err) +//! * [`assert_err_as_result`](macro@crate::assert_err_as_result) +//! * [`debug_assert_err`](macro@crate::debug_assert_err) + +/// Assert expression is Err(_). +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_err`](macro.assert_err.html), +/// except this macro returns a Result, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_err`](macro@crate::assert_err) +/// * [`assert_err_as_result`](macro@crate::assert_err_as_result) +/// * [`debug_assert_err`](macro@crate::debug_assert_err) +/// +#[macro_export] +macro_rules! assert_err_as_result { + ($result:expr $(,)?) => ({ + match (&$result) { + result => { + match (result) { + Err(_) => { + Ok(()) + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_err!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_err.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`", + ), + stringify!($result), + result + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + + #[test] + fn test_assert_err_as_result_x_success() { + let a: Result<(), i8> = Err(1); + let result = assert_err_as_result!(a); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_err_as_result_x_failure() { + let a: Result<(), i8> = Ok(()); + let result = assert_err_as_result!(a); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_err!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_err.html\n", + " a label: `a`,\n", + " a debug: `Ok(())`", + ) + ); + } +} + +/// Assert expression is Err(_). +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// # fn main() { +/// let a: Result<(), i8> = Err(1); +/// assert_err!(a); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Result<(), i8> = Ok(()); +/// assert_err!(a); +/// # }); +/// // assertion failed: `assert_err!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_err.html +/// // a label: `a`, +/// // a debug: `Ok(())` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_err!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_err.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Ok(())`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_err`](macro@crate::assert_err) +/// * [`assert_err_as_result`](macro@crate::assert_err_as_result) +/// * [`debug_assert_err`](macro@crate::debug_assert_err) +/// +#[macro_export] +macro_rules! assert_err { + ($result:expr $(,)?) => ({ + match assert_err_as_result!($result) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($result:expr, $($message:tt)+) => ({ + match assert_err_as_result!($result) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert expression is Err(_). +/// +/// This macro provides the same statements as [`assert_err`](macro.assert_err.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_err`](macro@crate::assert_err) +/// * [`assert_err`](macro@crate::assert_err) +/// * [`debug_assert_err`](macro@crate::debug_assert_err) +/// +#[macro_export] +macro_rules! debug_assert_err { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_err!($($arg)*); + } + }; +} diff --git a/src/assert_fn/assert_fn_eq.rs b/src/assert_fn/assert_fn_eq.rs index e9384052f..ded88aab2 100644 --- a/src/assert_fn/assert_fn_eq.rs +++ b/src/assert_fn/assert_fn_eq.rs @@ -51,6 +51,7 @@ macro_rules! assert_fn_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_eq!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_eq!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -133,6 +135,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_eq!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -170,6 +173,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_eq!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq.html\n", " a_function label: `f`,\n", " b_function label: `g`,\n", " a: `1`,\n", @@ -204,6 +208,7 @@ mod tests { /// assert_fn_eq!(i8::abs, a, i8::abs, b); /// # }); /// // assertion failed: `assert_fn_eq!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `-1`, @@ -215,6 +220,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_eq!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-1`,\n", diff --git a/src/assert_fn/assert_fn_eq_expr.rs b/src/assert_fn/assert_fn_eq_expr.rs index 454ffbe41..1e88b42b9 100644 --- a/src/assert_fn/assert_fn_eq_expr.rs +++ b/src/assert_fn/assert_fn_eq_expr.rs @@ -50,6 +50,7 @@ macro_rules! assert_fn_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_eq_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -83,6 +84,7 @@ macro_rules! assert_fn_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_eq_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -131,6 +133,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_eq_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -165,6 +168,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_eq_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `2`,\n", @@ -200,6 +204,7 @@ mod tests { /// assert_fn_eq_expr!(i8::abs, a, b); /// # }); /// // assertion failed: `assert_fn_eq_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq_expr.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `-1`, @@ -210,6 +215,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_eq_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_eq_expr.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-1`,\n", diff --git a/src/assert_fn/assert_fn_ge.rs b/src/assert_fn/assert_fn_ge.rs index aad0be05e..188a044ca 100644 --- a/src/assert_fn/assert_fn_ge.rs +++ b/src/assert_fn/assert_fn_ge.rs @@ -51,6 +51,7 @@ macro_rules! assert_fn_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ge!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ge!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -141,6 +143,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ge!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -184,6 +187,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ge!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge.html\n", " a_function label: `f`,\n", " b_function label: `g`,\n", " a: `1`,\n", @@ -218,6 +222,7 @@ mod tests { /// assert_fn_ge!(i8::abs, a, i8::abs, b); /// # }); /// // assertion failed: `assert_fn_ge!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -229,6 +234,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ge!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fn/assert_fn_ge_expr.rs b/src/assert_fn/assert_fn_ge_expr.rs index 2373172ea..78cd0917f 100644 --- a/src/assert_fn/assert_fn_ge_expr.rs +++ b/src/assert_fn/assert_fn_ge_expr.rs @@ -50,6 +50,7 @@ macro_rules! assert_fn_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ge_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -83,6 +84,7 @@ macro_rules! assert_fn_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ge_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -139,6 +141,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ge_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -184,6 +187,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ge_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `2`,\n", @@ -219,6 +223,7 @@ mod tests { /// assert_fn_ge_expr!(i8::abs, a, b); /// # }); /// // assertion failed: `assert_fn_ge_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge_expr.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `-1`, @@ -229,6 +234,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ge_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ge_expr.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-1`,\n", diff --git a/src/assert_fn/assert_fn_gt.rs b/src/assert_fn/assert_fn_gt.rs index b910f39c6..ac5020633 100644 --- a/src/assert_fn/assert_fn_gt.rs +++ b/src/assert_fn/assert_fn_gt.rs @@ -51,6 +51,7 @@ macro_rules! assert_fn_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -133,6 +135,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -155,6 +158,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -192,6 +196,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt.html\n", " a_function label: `f`,\n", " b_function label: `f`,\n", " a: `1`,\n", @@ -208,6 +213,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt.html\n", " a_function label: `f`,\n", " b_function label: `g`,\n", " a: `1`,\n", @@ -242,6 +248,7 @@ mod tests { /// assert_fn_gt!(i8::abs, a, i8::abs, b); /// # }); /// // assertion failed: `assert_fn_gt!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -253,6 +260,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_gt!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fn/assert_fn_gt_expr.rs b/src/assert_fn/assert_fn_gt_expr.rs index 4345acb56..7c98b3c2f 100644 --- a/src/assert_fn/assert_fn_gt_expr.rs +++ b/src/assert_fn/assert_fn_gt_expr.rs @@ -50,6 +50,7 @@ macro_rules! assert_fn_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -83,6 +84,7 @@ macro_rules! assert_fn_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -131,6 +133,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -152,6 +155,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -186,6 +190,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `1`,\n", @@ -204,6 +209,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `2`,\n", @@ -239,6 +245,7 @@ mod tests { /// assert_fn_gt_expr!(i8::abs, a, b); /// # }); /// // assertion failed: `assert_fn_gt_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt_expr.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `-1`, @@ -249,6 +256,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_gt_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_gt_expr.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-1`,\n", diff --git a/src/assert_fn/assert_fn_le.rs b/src/assert_fn/assert_fn_le.rs index 87c8bb82d..8480b495f 100644 --- a/src/assert_fn/assert_fn_le.rs +++ b/src/assert_fn/assert_fn_le.rs @@ -53,6 +53,7 @@ macro_rules! assert_fn_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_le!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -87,6 +88,7 @@ macro_rules! assert_fn_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_le!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -143,6 +145,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_le!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `2`,\n", @@ -186,6 +189,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_le!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le.html\n", " a_function label: `g`,\n", " b_function label: `f`,\n", " a: `2`,\n", @@ -220,6 +224,7 @@ mod tests { /// assert_fn_le!(i8::abs, a, i8::abs, b); /// # }); /// // assertion failed: `assert_fn_le!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `-2`, @@ -231,6 +236,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_le!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-2`,\n", diff --git a/src/assert_fn/assert_fn_le_expr.rs b/src/assert_fn/assert_fn_le_expr.rs index cc1690988..6a0e5e7a5 100644 --- a/src/assert_fn/assert_fn_le_expr.rs +++ b/src/assert_fn/assert_fn_le_expr.rs @@ -53,6 +53,7 @@ macro_rules! assert_fn_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_le_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -86,6 +87,7 @@ macro_rules! assert_fn_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_le_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -142,6 +144,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_le_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `2`,\n", @@ -183,6 +186,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_le_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `0`,\n", @@ -218,6 +222,7 @@ mod tests { /// assert_fn_le_expr!(i8::abs, a, b); /// # }); /// // assertion failed: `assert_fn_le_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le_expr.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `-2`, @@ -228,6 +233,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_le_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_le_expr.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-2`,\n", diff --git a/src/assert_fn/assert_fn_lt.rs b/src/assert_fn/assert_fn_lt.rs index 4224701ae..0cfe5696e 100644 --- a/src/assert_fn/assert_fn_lt.rs +++ b/src/assert_fn/assert_fn_lt.rs @@ -51,6 +51,7 @@ macro_rules! assert_fn_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -133,6 +135,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -155,6 +158,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `2`,\n", @@ -192,6 +196,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt.html\n", " a_function label: `f`,\n", " b_function label: `f`,\n", " a: `1`,\n", @@ -208,6 +213,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt.html\n", " a_function label: `g`,\n", " b_function label: `f`,\n", " a: `2`,\n", @@ -242,6 +248,7 @@ mod tests { /// assert_fn_lt!(i8::abs, a, i8::abs, b); /// # }); /// // assertion failed: `assert_fn_lt!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `-2`, @@ -253,6 +260,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_lt!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-2`,\n", diff --git a/src/assert_fn/assert_fn_lt_expr.rs b/src/assert_fn/assert_fn_lt_expr.rs index 7c9e813a1..9ba11266b 100644 --- a/src/assert_fn/assert_fn_lt_expr.rs +++ b/src/assert_fn/assert_fn_lt_expr.rs @@ -50,6 +50,7 @@ macro_rules! assert_fn_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_lt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -83,6 +84,7 @@ macro_rules! assert_fn_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_lt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -131,6 +133,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_lt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -152,6 +155,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_lt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -186,6 +190,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_lt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `1`,\n", @@ -204,6 +209,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_lt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `0`,\n", @@ -239,6 +245,7 @@ mod tests { /// assert_fn_lt_expr!(i8::abs, a, b); /// # }); /// // assertion failed: `assert_fn_lt_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt_expr.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `-2`, @@ -249,6 +256,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_lt_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_lt_expr.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-2`,\n", diff --git a/src/assert_fn/assert_fn_ne.rs b/src/assert_fn/assert_fn_ne.rs index 1632d8e79..a595d34b8 100644 --- a/src/assert_fn/assert_fn_ne.rs +++ b/src/assert_fn/assert_fn_ne.rs @@ -51,6 +51,7 @@ macro_rules! assert_fn_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ne!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ne!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -129,6 +131,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ne!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne.html\n", " a_function label: `f`,\n", " b_function label: `f`,\n", " a: `1`,\n", @@ -166,6 +169,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ne!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -204,6 +208,7 @@ mod tests { /// assert_fn_ne!(i8::abs, a, i8::abs, b); /// # }); /// // assertion failed: `assert_fn_ne!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne.html /// // a_function label: `i8::abs`, /// // a_param label: `a`, /// // a_param debug: `-1`, @@ -215,6 +220,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ne!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-1`,\n", diff --git a/src/assert_fn/assert_fn_ne_expr.rs b/src/assert_fn/assert_fn_ne_expr.rs index e5ecb5b30..707de70f9 100644 --- a/src/assert_fn/assert_fn_ne_expr.rs +++ b/src/assert_fn/assert_fn_ne_expr.rs @@ -50,6 +50,7 @@ macro_rules! assert_fn_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ne_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -83,6 +84,7 @@ macro_rules! assert_fn_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ne_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -131,6 +133,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ne_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -165,6 +168,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ne_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `1`,\n", @@ -209,6 +213,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ne_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ne_expr.html\n", /// # " a_function label: `i8::abs`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `-1`,\n", diff --git a/src/assert_fn_err/assert_fn_err_eq.rs b/src/assert_fn_err/assert_fn_err_eq.rs index 80d4ad2a6..51275dc6b 100644 --- a/src/assert_fn_err/assert_fn_err_eq.rs +++ b/src/assert_fn_err/assert_fn_err_eq.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_err_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_err_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_err_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_err_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -188,6 +192,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_eq!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -225,6 +230,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_eq!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html\n", " a_function label: `f`,\n", " b_function label: `g`,\n", " a: `1`,\n", @@ -266,6 +272,7 @@ mod tests { /// assert_fn_err_eq!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_err_eq!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `10`, @@ -277,6 +284,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_eq!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `10`,\n", diff --git a/src/assert_fn_err/assert_fn_err_eq_expr.rs b/src/assert_fn_err/assert_fn_err_eq_expr.rs index d8dc46235..da82f05fc 100644 --- a/src/assert_fn_err/assert_fn_err_eq_expr.rs +++ b/src/assert_fn_err/assert_fn_err_eq_expr.rs @@ -50,6 +50,7 @@ macro_rules! assert_fn_err_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -72,6 +73,7 @@ macro_rules! assert_fn_err_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -105,6 +107,7 @@ macro_rules! assert_fn_err_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -123,6 +126,7 @@ macro_rules! assert_fn_err_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -172,6 +176,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_eq_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -205,6 +210,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_eq_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `2`,\n", @@ -247,6 +253,7 @@ mod tests { /// assert_fn_err_eq_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_err_eq_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `10`, @@ -257,6 +264,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_eq_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `10`,\n", diff --git a/src/assert_fn_err/assert_fn_err_ge.rs b/src/assert_fn_err/assert_fn_err_ge.rs index 7594af15c..e5254ed79 100644 --- a/src/assert_fn_err/assert_fn_err_ge.rs +++ b/src/assert_fn_err/assert_fn_err_ge.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_err_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_err_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ge!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_err_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_eq!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_eq.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_err_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ge!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -196,6 +200,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_ge!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -239,6 +244,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_ge!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge.html\n", " a_function label: `f`,\n", " b_function label: `g`,\n", " a: `1`,\n", @@ -280,6 +286,7 @@ mod tests { /// assert_fn_err_ge!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_err_ge!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `10`, @@ -291,6 +298,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_ge!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `10`,\n", diff --git a/src/assert_fn_err/assert_fn_err_ge_expr.rs b/src/assert_fn_err/assert_fn_err_ge_expr.rs index cfae94767..330a8de02 100644 --- a/src/assert_fn_err/assert_fn_err_ge_expr.rs +++ b/src/assert_fn_err/assert_fn_err_ge_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_err_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ge_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_err_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ge_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_err_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ge_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_err_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ge_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -186,6 +190,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_ge_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -227,6 +232,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_ge_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `2`,\n", @@ -269,6 +275,7 @@ mod tests { /// assert_fn_err_ge_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_err_ge_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `10`, @@ -279,6 +286,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_ge_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `10`,\n", diff --git a/src/assert_fn_err/assert_fn_err_gt.rs b/src/assert_fn_err/assert_fn_err_gt.rs index d23b1ef7f..850278a7b 100644 --- a/src/assert_fn_err/assert_fn_err_gt.rs +++ b/src/assert_fn_err/assert_fn_err_gt.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_err_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_err_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_err_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_err_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -188,6 +192,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -210,6 +215,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -247,6 +253,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `f`,\n", " b_function label: `f`,\n", " a: `1`,\n", @@ -263,6 +270,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `f`,\n", " b_function label: `g`,\n", " a: `1`,\n", @@ -304,6 +312,7 @@ mod tests { /// assert_fn_err_gt!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_err_gt!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `10`, @@ -315,6 +324,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_gt!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `10`,\n", diff --git a/src/assert_fn_err/assert_fn_err_gt_expr.rs b/src/assert_fn_err/assert_fn_err_gt_expr.rs index 60a06dd08..55ee2b282 100644 --- a/src/assert_fn_err/assert_fn_err_gt_expr.rs +++ b/src/assert_fn_err/assert_fn_err_gt_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_err_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_err_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_err_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_err_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -178,6 +182,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -199,6 +204,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -233,6 +239,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `1`,\n", @@ -251,6 +258,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `2`,\n", @@ -293,6 +301,7 @@ mod tests { /// assert_fn_err_gt_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_err_gt_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `10`, @@ -303,6 +312,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_gt_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `10`,\n", diff --git a/src/assert_fn_err/assert_fn_err_le.rs b/src/assert_fn_err/assert_fn_err_le.rs index 3d8e0cf95..12e093aa7 100644 --- a/src/assert_fn_err/assert_fn_err_le.rs +++ b/src/assert_fn_err/assert_fn_err_le.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_err_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_err_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_err_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_err_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -196,6 +200,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_le!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `2`,\n", @@ -239,6 +244,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_le!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html\n", " a_function label: `g`,\n", " b_function label: `f`,\n", " a: `2`,\n", @@ -280,6 +286,7 @@ mod tests { /// assert_fn_err_le!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_err_le!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `20`, @@ -291,6 +298,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_le!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `20`,\n", diff --git a/src/assert_fn_err/assert_fn_err_le_expr.rs b/src/assert_fn_err/assert_fn_err_le_expr.rs index 48df39cbd..a9611b951 100644 --- a/src/assert_fn_err/assert_fn_err_le_expr.rs +++ b/src/assert_fn_err/assert_fn_err_le_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_err_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_err_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_err_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_err_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -186,6 +190,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_le_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `2`,\n", @@ -227,6 +232,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_le_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `0`,\n", @@ -269,6 +275,7 @@ mod tests { /// assert_fn_err_le_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_err_le_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `20`, @@ -279,6 +286,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_le_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `20`,\n", diff --git a/src/assert_fn_err/assert_fn_err_lt.rs b/src/assert_fn_err/assert_fn_err_lt.rs index 4d00856fd..2355ffa3a 100644 --- a/src/assert_fn_err/assert_fn_err_lt.rs +++ b/src/assert_fn_err/assert_fn_err_lt.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_err_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_err_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_err_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_err_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -188,6 +192,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -210,6 +215,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `2`,\n", @@ -247,6 +253,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `f`,\n", " b_function label: `f`,\n", " a: `1`,\n", @@ -263,6 +270,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `g`,\n", " b_function label: `f`,\n", " a: `2`,\n", @@ -304,6 +312,7 @@ mod tests { /// assert_fn_err_lt!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_err_lt!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `20`, @@ -315,6 +324,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_lt!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `20`,\n", diff --git a/src/assert_fn_err/assert_fn_err_lt_expr.rs b/src/assert_fn_err/assert_fn_err_lt_expr.rs index f947a011d..8334c96e3 100644 --- a/src/assert_fn_err/assert_fn_err_lt_expr.rs +++ b/src/assert_fn_err/assert_fn_err_lt_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_err_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_err_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_err_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_err_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -178,6 +182,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_lt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -199,6 +204,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_lt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -233,6 +239,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_lt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `1`,\n", @@ -251,6 +258,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_lt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `0`,\n", @@ -293,6 +301,7 @@ mod tests { /// assert_fn_err_lt_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_err_lt_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `20`, @@ -303,6 +312,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_lt_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `20`,\n", diff --git a/src/assert_fn_err/assert_fn_err_ne.rs b/src/assert_fn_err/assert_fn_err_ne.rs index 71241b016..750f89f5a 100644 --- a/src/assert_fn_err/assert_fn_err_ne.rs +++ b/src/assert_fn_err/assert_fn_err_ne.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_err_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_err_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_err_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_err_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -188,6 +192,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_ne!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -225,6 +230,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_ne!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html\n", " a_function label: `f`,\n", " b_function label: `f`,\n", " a: `1`,\n", @@ -266,6 +272,7 @@ mod tests { /// assert_fn_err_ne!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_err_ne!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `10`, @@ -277,6 +284,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_ne!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `10`,\n", diff --git a/src/assert_fn_err/assert_fn_err_ne_expr.rs b/src/assert_fn_err/assert_fn_err_ne_expr.rs index 8ad1862a5..6e54a9837 100644 --- a/src/assert_fn_err/assert_fn_err_ne_expr.rs +++ b/src/assert_fn_err/assert_fn_err_ne_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_err_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_err_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_err_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_err_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -178,6 +182,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_ne_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -212,6 +217,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_err_ne_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `1`,\n", @@ -254,6 +260,7 @@ mod tests { /// assert_fn_err_ne_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_err_ne_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `10`, @@ -264,6 +271,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_err_ne_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `10`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_eq.rs b/src/assert_fn_ok/assert_fn_ok_eq.rs index c431e4934..78d2d516a 100644 --- a/src/assert_fn_ok/assert_fn_ok_eq.rs +++ b/src/assert_fn_ok/assert_fn_ok_eq.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_ok_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_eq!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_ok_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_eq!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_ok_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_eq!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_ok_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_eq!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -188,6 +192,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_eq!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -225,6 +230,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_eq!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq.html\n", " a_function label: `f`,\n", " b_function label: `g`,\n", " a: `1`,\n", @@ -266,6 +272,7 @@ mod tests { /// assert_fn_ok_eq!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_ok_eq!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -277,6 +284,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_eq!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_eq_expr.rs b/src/assert_fn_ok/assert_fn_ok_eq_expr.rs index acdb99f1b..0c59264b5 100644 --- a/src/assert_fn_ok/assert_fn_ok_eq_expr.rs +++ b/src/assert_fn_ok/assert_fn_ok_eq_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_ok_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_eq_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_ok_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_eq_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_ok_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_eq_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_ok_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_eq_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -178,6 +182,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_eq_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -212,6 +217,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_eq_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `2`,\n", @@ -254,6 +260,7 @@ mod tests { /// assert_fn_ok_eq_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_ok_eq_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -264,6 +271,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_eq_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_eq_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_ge.rs b/src/assert_fn_ok/assert_fn_ok_ge.rs index a94a2f4d9..76940deea 100644 --- a/src/assert_fn_ok/assert_fn_ok_ge.rs +++ b/src/assert_fn_ok/assert_fn_ok_ge.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_ok_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ge!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_ok_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ge!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_ok_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ge!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ge.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_ok_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ge!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -196,6 +200,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_ge!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -239,6 +244,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_ge!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge.html\n", " a_function label: `f`,\n", " b_function label: `g`,\n", " a: `1`,\n", @@ -280,6 +286,7 @@ mod tests { /// assert_fn_ok_ge!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_ok_ge!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -291,6 +298,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_ge!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_ge_expr.rs b/src/assert_fn_ok/assert_fn_ok_ge_expr.rs index 09cc9263a..0fa2ed02e 100644 --- a/src/assert_fn_ok/assert_fn_ok_ge_expr.rs +++ b/src/assert_fn_ok/assert_fn_ok_ge_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_ok_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ge_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_ok_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ge_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_ok_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ge_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_ok_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ge_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -186,6 +190,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_ge_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -227,6 +232,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_ge_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `2`,\n", @@ -269,6 +275,7 @@ mod tests { /// assert_fn_ok_ge_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_ok_ge_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -279,6 +286,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_ge_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ge_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_gt.rs b/src/assert_fn_ok/assert_fn_ok_gt.rs index 6af4fc38f..9f03f3ae7 100644 --- a/src/assert_fn_ok/assert_fn_ok_gt.rs +++ b/src/assert_fn_ok/assert_fn_ok_gt.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_ok_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_ok_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_ok_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_gt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_ok_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -188,6 +192,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -210,6 +215,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_gt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -247,6 +253,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt.html\n", " a_function label: `f`,\n", " b_function label: `f`,\n", " a: `1`,\n", @@ -263,6 +270,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_gt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt.html\n", " a_function label: `f`,\n", " b_function label: `g`,\n", " a: `1`,\n", @@ -304,6 +312,7 @@ mod tests { /// assert_fn_ok_gt!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_ok_gt!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -315,6 +324,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_gt!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_gt_expr.rs b/src/assert_fn_ok/assert_fn_ok_gt_expr.rs index 689c59a65..378548796 100644 --- a/src/assert_fn_ok/assert_fn_ok_gt_expr.rs +++ b/src/assert_fn_ok/assert_fn_ok_gt_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_ok_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_ok_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_ok_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_ok_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -178,6 +182,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -199,6 +204,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_gt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -233,6 +239,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `1`,\n", @@ -251,6 +258,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_gt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `2`,\n", @@ -293,6 +301,7 @@ mod tests { /// assert_fn_ok_gt_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_ok_gt_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -303,6 +312,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_gt_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_gt_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_le.rs b/src/assert_fn_ok/assert_fn_ok_le.rs index 48cafb216..d58a1eeee 100644 --- a/src/assert_fn_ok/assert_fn_ok_le.rs +++ b/src/assert_fn_ok/assert_fn_ok_le.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_ok_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_ok_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_le!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_ok_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_le!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_le.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_ok_le_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_le!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -196,6 +200,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_le!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `2`,\n", @@ -239,6 +244,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_le!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le.html\n", " a_function label: `g`,\n", " b_function label: `f`,\n", " a: `2`,\n", @@ -280,6 +286,7 @@ mod tests { /// assert_fn_ok_le!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_ok_le!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `2`, @@ -291,6 +298,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_le!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `2`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_le_expr.rs b/src/assert_fn_ok/assert_fn_ok_le_expr.rs index e1a9fa45c..7c85735b6 100644 --- a/src/assert_fn_ok/assert_fn_ok_le_expr.rs +++ b/src/assert_fn_ok/assert_fn_ok_le_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_ok_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_le_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_ok_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_le_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_ok_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_le_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_ok_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_le_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -186,6 +190,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_le_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `2`,\n", @@ -227,6 +232,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_le_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `0`,\n", @@ -270,6 +276,7 @@ mod tests { /// assert_fn_ok_le_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_ok_le_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `2`, @@ -280,6 +287,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_le_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `2`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_lt.rs b/src/assert_fn_ok/assert_fn_ok_lt.rs index 68617ddcb..1dd8565fb 100644 --- a/src/assert_fn_ok/assert_fn_ok_lt.rs +++ b/src/assert_fn_ok/assert_fn_ok_lt.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_ok_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_ok_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_ok_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_lt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_ok_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -188,6 +192,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -210,6 +215,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_lt!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `2`,\n", @@ -247,6 +253,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt.html\n", " a_function label: `f`,\n", " b_function label: `f`,\n", " a: `1`,\n", @@ -263,6 +270,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_lt!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt.html\n", " a_function label: `g`,\n", " b_function label: `f`,\n", " a: `2`,\n", @@ -314,6 +322,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_lt!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `2`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_lt_expr.rs b/src/assert_fn_ok/assert_fn_ok_lt_expr.rs index 60c29a4f9..18006bb15 100644 --- a/src/assert_fn_ok/assert_fn_ok_lt_expr.rs +++ b/src/assert_fn_ok/assert_fn_ok_lt_expr.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_ok_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_le_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -80,6 +81,7 @@ macro_rules! assert_fn_ok_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_lt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -113,6 +115,7 @@ macro_rules! assert_fn_ok_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_le_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_le_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -131,6 +134,7 @@ macro_rules! assert_fn_ok_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_lt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -180,6 +184,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_lt_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -214,6 +219,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_lt_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `1`,\n", @@ -256,6 +262,7 @@ mod tests { /// assert_fn_ok_lt_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_ok_lt_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `2`, @@ -266,6 +273,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_lt_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_lt_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `2`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_ne.rs b/src/assert_fn_ok/assert_fn_ok_ne.rs index 8daa664ad..b45b9fafd 100644 --- a/src/assert_fn_ok/assert_fn_ok_ne.rs +++ b/src/assert_fn_ok/assert_fn_ok_ne.rs @@ -58,6 +58,7 @@ macro_rules! assert_fn_ok_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -85,6 +86,7 @@ macro_rules! assert_fn_ok_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ne!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -120,6 +122,7 @@ macro_rules! assert_fn_ok_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_err_ne!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_err_ne.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -139,6 +142,7 @@ macro_rules! assert_fn_ok_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ne!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne.html\n", " a_function label: `{}`,\n", " b_function label: `{}`,\n", " a: `{:?}`,\n", @@ -188,6 +192,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_ne!(a_function, a_param, b_function, b_param)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -225,6 +230,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_ne!(a_function, b_function)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne.html\n", " a_function label: `f`,\n", " b_function label: `f`,\n", " a: `1`,\n", @@ -266,6 +272,7 @@ mod tests { /// assert_fn_ok_ne!(f, a, f, b); /// # }); /// // assertion failed: `assert_fn_ok_ne!(a_function, a_param, b_function, b_param)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -277,6 +284,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_ne!(a_function, a_param, b_function, b_param)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fn_ok/assert_fn_ok_ne_expr.rs b/src/assert_fn_ok/assert_fn_ok_ne_expr.rs index efff6babe..58a16f5cf 100644 --- a/src/assert_fn_ok/assert_fn_ok_ne_expr.rs +++ b/src/assert_fn_ok/assert_fn_ok_ne_expr.rs @@ -56,6 +56,7 @@ macro_rules! assert_fn_ok_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ne_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -78,6 +79,7 @@ macro_rules! assert_fn_ok_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ne_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne_expr.html\n", " a_function label: `{}`,\n", " a_param label: `{}`,\n", " a_param debug: `{:?}`,\n", @@ -111,6 +113,7 @@ macro_rules! assert_fn_ok_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ne_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -129,6 +132,7 @@ macro_rules! assert_fn_ok_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fn_ok_ne_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne_expr.html\n", " a_function label: `{}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", @@ -178,6 +182,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_ne_expr!(a_function, a_param, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne_expr.html\n", " a_function label: `f`,\n", " a_param label: `a`,\n", " a_param debug: `1`,\n", @@ -212,6 +217,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_fn_ok_ne_expr!(a_function, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne_expr.html\n", " a_function label: `f`,\n", " b_expr label: `b`,\n", " b_expr debug: `1`,\n", @@ -254,6 +260,7 @@ mod tests { /// assert_fn_ok_ne_expr!(f, a, b); /// # }); /// // assertion failed: `assert_fn_ok_ne_expr!(a_function, a_param, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne_expr.html /// // a_function label: `f`, /// // a_param label: `a`, /// // a_param debug: `1`, @@ -264,6 +271,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fn_ok_ne_expr!(a_function, a_param, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fn_ok_ne_expr.html\n", /// # " a_function label: `f`,\n", /// # " a_param label: `a`,\n", /// # " a_param debug: `1`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_contains.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_contains.rs index 93f5c32f1..7d2a64b9b 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_contains.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_contains.rs @@ -45,6 +45,7 @@ macro_rules! assert_fs_read_to_string_contains_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_contains!(path, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_contains.html\n", " path label: `{}`,\n", " path debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -65,6 +66,7 @@ macro_rules! assert_fs_read_to_string_contains_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_contains!(path, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_contains.html\n", " path label: `{}`,\n", " path debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -115,13 +117,17 @@ mod tests { assert!(result.is_err()); assert_eq!( result.unwrap_err(), - format!("{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_contains!(path, containee)`\n", - " path label: `&path`,\n", - " path debug: `\"", path.to_string_lossy(), "\"`,\n", - " containee label: `&containee`,\n", - " containee debug: `\"zzz\"`,\n", - " read string: `\"alfa\\n\"`", + format!( + concat!( + "assertion failed: `assert_fs_read_to_string_contains!(path, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_contains.html\n", + " path label: `&path`,\n", + " path debug: `{:?}`,\n", + " containee label: `&containee`,\n", + " containee debug: `\"zzz\"`,\n", + " read string: `\"alfa\\n\"`", + ), + path ) ); } @@ -152,6 +158,7 @@ mod tests { /// assert_fs_read_to_string_contains!(&path, &containee); /// # }); /// // assertion failed: `assert_fs_read_to_string_contains!(path, containee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_contains.html /// // path label: `&path`, /// // path debug: `\"alfa.txt\"`, /// // containee label: `&containee`, @@ -160,6 +167,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_contains!(path, containee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_contains.html\n", /// # " path label: `&path`,\n", /// # " path debug: `\"alfa.txt\"`,\n", /// # " containee label: `&containee`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_eq.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_eq.rs index 0faf9b743..e8d18b2b4 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_eq.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_eq.rs @@ -48,6 +48,7 @@ macro_rules! assert_fs_read_to_string_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_eq!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_fs_read_to_string_eq_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_eq!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -121,18 +123,18 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_eq!(a_path, b_path)`\n", - " a_path label: `&a`,\n", - " a_path debug: `\"", - a.to_string_lossy(), - "\"`,\n", - " b_path label: `&b`,\n", - " b_path debug: `\"", - b.to_string_lossy(), - "\"`,\n", - " a string: `\"alfa\\n\"`,\n", - " b string: `\"bravo\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_eq!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq.html\n", + " a_path label: `&a`,\n", + " a_path debug: `{:?}`,\n", + " b_path label: `&b`,\n", + " b_path debug: `{:?}`,\n", + " a string: `\"alfa\\n\"`,\n", + " b string: `\"bravo\\n\"`" + ), + a, + b ) ); } @@ -163,6 +165,7 @@ mod tests { /// assert_fs_read_to_string_eq!(&a, &b); /// # }); /// // assertion failed: `assert_fs_read_to_string_eq!(a_path, b_path)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq.html /// // a_path label: `&a`, /// // a_path debug: `\"alfa.txt\"`, /// // b_path label: `&b`, @@ -172,6 +175,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_eq!(a_path, b_path)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq.html\n", /// # " a_path label: `&a`,\n", /// # " a_path debug: `\"alfa.txt\"`,\n", /// # " b_path label: `&b`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_eq_expr.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_eq_expr.rs index 2d8d432de..32caf6fa3 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_eq_expr.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_eq_expr.rs @@ -45,6 +45,7 @@ macro_rules! assert_fs_read_to_string_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_eq_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -66,6 +67,7 @@ macro_rules! assert_fs_read_to_string_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_eq_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -119,16 +121,17 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_eq_expr!(a_path, b_expr)`\n", - " a_path label: `&path`,\n", - " a_path debug: `\"", - path.to_string_lossy(), - "\"`,\n", - " b_expr label: `&value`,\n", - " b_expr debug: `\"bravo\\n\"`,\n", - " a string: `\"alfa\\n\"`,\n", - " b string: `\"bravo\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_eq_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq_expr.html\n", + " a_path label: `&path`,\n", + " a_path debug: `{:?}`,\n", + " b_expr label: `&value`,\n", + " b_expr debug: `\"bravo\\n\"`,\n", + " a string: `\"alfa\\n\"`,\n", + " b string: `\"bravo\\n\"`" + ), + path ) ); } @@ -159,6 +162,7 @@ mod tests { /// assert_fs_read_to_string_eq_expr!(&path, &value); /// # }); /// // assertion failed: `assert_fs_read_to_string_eq_expr!(a_path, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq_expr.html /// // a_path label: `&path`, /// // a_path debug: `\"alfa.txt\"`, /// // b_expr label: `&value`, @@ -168,6 +172,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_eq_expr!(a_path, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq_expr.html\n", /// # " a_path label: `&path`,\n", /// # " a_path debug: `\"alfa.txt\"`,\n", /// # " b_expr label: `&value`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_ge.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_ge.rs index 9a5326d50..16c707714 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_ge.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_ge.rs @@ -48,6 +48,7 @@ macro_rules! assert_fs_read_to_string_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_ge!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_fs_read_to_string_ge_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_ge!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -121,18 +123,18 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_ge!(a_path, b_path)`\n", - " a_path label: `&a`,\n", - " a_path debug: `\"", - a.to_string_lossy(), - "\"`,\n", - " b_path label: `&b`,\n", - " b_path debug: `\"", - b.to_string_lossy(), - "\"`,\n", - " a string: `\"alfa\\n\"`,\n", - " b string: `\"bravo\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_ge!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge.html\n", + " a_path label: `&a`,\n", + " a_path debug: `{:?}`,\n", + " b_path label: `&b`,\n", + " b_path debug: `{:?}`,\n", + " a string: `\"alfa\\n\"`,\n", + " b string: `\"bravo\\n\"`" + ), + a, + b ) ); } @@ -163,6 +165,7 @@ mod tests { /// assert_fs_read_to_string_ge!(&a, &b); /// # }); /// // assertion failed: `assert_fs_read_to_string_ge!(a_path, b_path)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge.html /// // a_path label: `&a`, /// // a_path debug: `\"alfa.txt\"`, /// // b_path label: `&b`, @@ -172,6 +175,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_ge!(a_path, b_path)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge.html\n", /// # " a_path label: `&a`,\n", /// # " a_path debug: `\"alfa.txt\"`,\n", /// # " b_path label: `&b`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_ge_expr.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_ge_expr.rs index 7c31ceae1..d274064e8 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_ge_expr.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_ge_expr.rs @@ -45,6 +45,7 @@ macro_rules! assert_fs_read_to_string_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_ge_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -66,12 +67,13 @@ macro_rules! assert_fs_read_to_string_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_ge_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", - " a: `{:?}`,\n", - " b: `{:?}`", + " a string: `{:?}`,\n", + " b string: `{:?}`", ), stringify!($a_path), a_path, @@ -119,16 +121,17 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_ge_expr!(a_path, b_expr)`\n", - " a_path label: `&path`,\n", - " a_path debug: `\"", - path.to_string_lossy(), - "\"`,\n", - " b_expr label: `&value`,\n", - " b_expr debug: `\"bravo\\n\"`,\n", - " a: `\"alfa\\n\"`,\n", - " b: `\"bravo\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_ge_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge_expr.html\n", + " a_path label: `&path`,\n", + " a_path debug: `{:?}`,\n", + " b_expr label: `&value`,\n", + " b_expr debug: `\"bravo\\n\"`,\n", + " a string: `\"alfa\\n\"`,\n", + " b string: `\"bravo\\n\"`" + ), + path ) ); } @@ -159,21 +162,23 @@ mod tests { /// assert_fs_read_to_string_ge_expr!(&path, &value); /// # }); /// // assertion failed: `assert_fs_read_to_string_ge_expr!(a_path, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge_expr.html /// // a_path label: `&path`, /// // a_path debug: `\"alfa.txt\"`, /// // b_expr label: `&value`, /// // b_expr debug: `\"bravo\\n\"`, -/// // a: `\"alfa\\n\"`, -/// // b: `\"bravo\\n\"` +/// // a string: `\"alfa\\n\"`, +/// // b string: `\"bravo\\n\"` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_ge_expr!(a_path, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ge_expr.html\n", /// # " a_path label: `&path`,\n", /// # " a_path debug: `\"alfa.txt\"`,\n", /// # " b_expr label: `&value`,\n", /// # " b_expr debug: `\"bravo\\n\"`,\n", -/// # " a: `\"alfa\\n\"`,\n", -/// # " b: `\"bravo\\n\"`" +/// # " a string: `\"alfa\\n\"`,\n", +/// # " b string: `\"bravo\\n\"`" /// # ); /// # assert_eq!(actual, expect); /// # } diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_gt.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_gt.rs index 8f27ab89a..2731cc62e 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_gt.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_gt.rs @@ -48,6 +48,7 @@ macro_rules! assert_fs_read_to_string_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_gt!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_fs_read_to_string_gt_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_gt!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -121,18 +123,18 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_gt!(a_path, b_path)`\n", - " a_path label: `&a`,\n", - " a_path debug: `\"", - a.to_string_lossy(), - "\"`,\n", - " b_path label: `&b`,\n", - " b_path debug: `\"", - b.to_string_lossy(), - "\"`,\n", - " a string: `\"alfa\\n\"`,\n", - " b string: `\"bravo\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_gt!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt.html\n", + " a_path label: `&a`,\n", + " a_path debug: `{:?}`,\n", + " b_path label: `&b`,\n", + " b_path debug: `{:?}`,\n", + " a string: `\"alfa\\n\"`,\n", + " b string: `\"bravo\\n\"`" + ), + a, + b ) ); } @@ -163,6 +165,7 @@ mod tests { /// assert_fs_read_to_string_gt!(&a, &b); /// # }); /// // assertion failed: `assert_fs_read_to_string_gt!(a_path, b_path)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt.html /// // a_path label: `&a`, /// // a_path debug: `\"alfa.txt\"`, /// // b_path label: `&b`, @@ -172,6 +175,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_gt!(a_path, b_path)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt.html\n", /// # " a_path label: `&a`,\n", /// # " a_path debug: `\"alfa.txt\"`,\n", /// # " b_path label: `&b`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_gt_expr.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_gt_expr.rs index c0ba5111a..73db4a9d7 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_gt_expr.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_gt_expr.rs @@ -45,6 +45,7 @@ macro_rules! assert_fs_read_to_string_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_gt_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -66,12 +67,13 @@ macro_rules! assert_fs_read_to_string_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_gt_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", - " a: `{:?}`,\n", - " b: `{:?}`", + " a string: `{:?}`,\n", + " b string: `{:?}`", ), stringify!($a_path), a_path, @@ -119,14 +121,17 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_gt_expr!(a_path, b_expr)`\n", - " a_path label: `&path`,\n", - " a_path debug: `\"", path.to_string_lossy(), "\"`,\n", - " b_expr label: `&value`,\n", - " b_expr debug: `\"bravo\\n\"`,\n", - " a: `\"alfa\\n\"`,\n", - " b: `\"bravo\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_gt_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt_expr.html\n", + " a_path label: `&path`,\n", + " a_path debug: `{:?}`,\n", + " b_expr label: `&value`,\n", + " b_expr debug: `\"bravo\\n\"`,\n", + " a string: `\"alfa\\n\"`,\n", + " b string: `\"bravo\\n\"`" + ), + path ) ); } @@ -157,21 +162,23 @@ mod tests { /// assert_fs_read_to_string_gt_expr!(&path, &value); /// # }); /// // assertion failed: `assert_fs_read_to_string_gt_expr!(a_path, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt_expr.html /// // a_path label: `&path`, /// // a_path debug: `\"alfa.txt\"`, /// // b_expr label: `&value`, /// // b_expr debug: `\"bravo\\n\"`, -/// // a: `\"alfa\\n\"`, -/// // b: `\"bravo\\n\"` +/// // a string: `\"alfa\\n\"`, +/// // b string: `\"bravo\\n\"` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_gt_expr!(a_path, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_gt_expr.html\n", /// # " a_path label: `&path`,\n", /// # " a_path debug: `\"alfa.txt\"`,\n", /// # " b_expr label: `&value`,\n", /// # " b_expr debug: `\"bravo\\n\"`,\n", -/// # " a: `\"alfa\\n\"`,\n", -/// # " b: `\"bravo\\n\"`" +/// # " a string: `\"alfa\\n\"`,\n", +/// # " b string: `\"bravo\\n\"`" /// # ); /// # assert_eq!(actual, expect); /// # } diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_le.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_le.rs index 3e3596c2b..77f3400ab 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_le.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_le.rs @@ -48,6 +48,7 @@ macro_rules! assert_fs_read_to_string_le_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_le!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_fs_read_to_string_le_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_le!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -121,18 +123,18 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_le!(a_path, b_path)`\n", - " a_path label: `&a`,\n", - " a_path debug: `\"", - a.to_string_lossy(), - "\"`,\n", - " b_path label: `&b`,\n", - " b_path debug: `\"", - b.to_string_lossy(), - "\"`,\n", - " a string: `\"bravo\\n\"`,\n", - " b string: `\"alfa\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_le!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le.html\n", + " a_path label: `&a`,\n", + " a_path debug: `{:?}`,\n", + " b_path label: `&b`,\n", + " b_path debug: `{:?}`,\n", + " a string: `\"bravo\\n\"`,\n", + " b string: `\"alfa\\n\"`" + ), + a, + b ) ); } @@ -163,6 +165,7 @@ mod tests { /// assert_fs_read_to_string_le!(&a, &b); /// # }); /// // assertion failed: `assert_fs_read_to_string_le!(a_path, b_path)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le.html /// // a_path label: `&a`, /// // a_path debug: `\"bravo.txt\"`, /// // b_path label: `&b`, @@ -172,6 +175,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_le!(a_path, b_path)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le.html\n", /// # " a_path label: `&a`,\n", /// # " a_path debug: `\"bravo.txt\"`,\n", /// # " b_path label: `&b`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_le_expr.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_le_expr.rs index 4c83edbc9..a0d94454f 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_le_expr.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_le_expr.rs @@ -45,6 +45,7 @@ macro_rules! assert_fs_read_to_string_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_le_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -66,12 +67,13 @@ macro_rules! assert_fs_read_to_string_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_le_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", - " a: `{:?}`,\n", - " b: `{:?}`", + " a string: `{:?}`,\n", + " b string: `{:?}`", ), stringify!($a_path), a_path, @@ -119,16 +121,17 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_le_expr!(a_path, b_expr)`\n", - " a_path label: `&path`,\n", - " a_path debug: `\"", - path.to_string_lossy(), - "\"`,\n", - " b_expr label: `&value`,\n", - " b_expr debug: `\"alfa\\n\"`,\n", - " a: `\"bravo\\n\"`,\n", - " b: `\"alfa\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_le_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le_expr.html\n", + " a_path label: `&path`,\n", + " a_path debug: `{:?}`,\n", + " b_expr label: `&value`,\n", + " b_expr debug: `\"alfa\\n\"`,\n", + " a string: `\"bravo\\n\"`,\n", + " b string: `\"alfa\\n\"`" + ), + path ) ); } @@ -159,21 +162,23 @@ mod tests { /// assert_fs_read_to_string_le_expr!(&path, &value); /// # }); /// // assertion failed: `assert_fs_read_to_string_le_expr!(a_path, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le_expr.html /// // a_path label: `&path`, /// // a_path debug: `\"bravo.txt\"`, /// // b_expr label: `&value`, /// // b_expr debug: `\"alfa\\n\"`, -/// // a: `\"bravo\\n\"`, -/// // b: `\"alfa\\n\"` +/// // a string: `\"bravo\\n\"`, +/// // b string: `\"alfa\\n\"` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_le_expr!(a_path, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_le_expr.html\n", /// # " a_path label: `&path`,\n", /// # " a_path debug: `\"bravo.txt\"`,\n", /// # " b_expr label: `&value`,\n", /// # " b_expr debug: `\"alfa\\n\"`,\n", -/// # " a: `\"bravo\\n\"`,\n", -/// # " b: `\"alfa\\n\"`" +/// # " a string: `\"bravo\\n\"`,\n", +/// # " b string: `\"alfa\\n\"`" /// # ); /// # assert_eq!(actual, expect); /// # } diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_lt.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_lt.rs index 7f3f01f4c..bdc56df53 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_lt.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_lt.rs @@ -48,6 +48,7 @@ macro_rules! assert_fs_read_to_string_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_lt!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_fs_read_to_string_lt_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_lt!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -121,18 +123,18 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_lt!(a_path, b_path)`\n", - " a_path label: `&a`,\n", - " a_path debug: `\"", - a.to_string_lossy(), - "\"`,\n", - " b_path label: `&b`,\n", - " b_path debug: `\"", - b.to_string_lossy(), - "\"`,\n", - " a string: `\"bravo\\n\"`,\n", - " b string: `\"alfa\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_lt!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt.html\n", + " a_path label: `&a`,\n", + " a_path debug: `{:?}`,\n", + " b_path label: `&b`,\n", + " b_path debug: `{:?}`,\n", + " a string: `\"bravo\\n\"`,\n", + " b string: `\"alfa\\n\"`" + ), + a, + b ) ); } @@ -163,6 +165,7 @@ mod tests { /// assert_fs_read_to_string_lt!(&a, &b); /// # }); /// // assertion failed: `assert_fs_read_to_string_lt!(a_path, b_path)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt.html /// // a_path label: `&a`, /// // a_path debug: `\"bravo.txt\"`, /// // b_path label: `&b`, @@ -172,6 +175,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_lt!(a_path, b_path)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt.html\n", /// # " a_path label: `&a`,\n", /// # " a_path debug: `\"bravo.txt\"`,\n", /// # " b_path label: `&b`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_lt_expr.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_lt_expr.rs index bafcd03d4..b960a50fe 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_lt_expr.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_lt_expr.rs @@ -45,6 +45,7 @@ macro_rules! assert_fs_read_to_string_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_lt_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -66,12 +67,13 @@ macro_rules! assert_fs_read_to_string_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_lt_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", - " a: `{:?}`,\n", - " b: `{:?}`", + " a string: `{:?}`,\n", + " b string: `{:?}`", ), stringify!($a_path), a_path, @@ -119,16 +121,17 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_lt_expr!(a_path, b_expr)`\n", - " a_path label: `&path`,\n", - " a_path debug: `\"", - path.to_string_lossy(), - "\"`,\n", - " b_expr label: `&value`,\n", - " b_expr debug: `\"alfa\\n\"`,\n", - " a: `\"bravo\\n\"`,\n", - " b: `\"alfa\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_lt_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt_expr.html\n", + " a_path label: `&path`,\n", + " a_path debug: `{:?}`,\n", + " b_expr label: `&value`,\n", + " b_expr debug: `\"alfa\\n\"`,\n", + " a string: `\"bravo\\n\"`,\n", + " b string: `\"alfa\\n\"`" + ), + path ) ); } @@ -159,21 +162,23 @@ mod tests { /// assert_fs_read_to_string_lt_expr!(&path, &value); /// # }); /// // assertion failed: `assert_fs_read_to_string_lt_expr!(a_path, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt_expr.html /// // a_path label: `&path`, /// // a_path debug: `\"bravo.txt\"`, /// // b_expr label: `&value`, /// // b_expr debug: `\"alfa\\n\"`, -/// // a: `\"bravo\\n\"`, -/// // b: `\"alfa\\n\"` +/// // a string: `\"bravo\\n\"`, +/// // b string: `\"alfa\\n\"` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_lt_expr!(a_path, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_lt_expr.html\n", /// # " a_path label: `&path`,\n", /// # " a_path debug: `\"bravo.txt\"`,\n", /// # " b_expr label: `&value`,\n", /// # " b_expr debug: `\"alfa\\n\"`,\n", -/// # " a: `\"bravo\\n\"`,\n", -/// # " b: `\"alfa\\n\"`" +/// # " a string: `\"bravo\\n\"`,\n", +/// # " b string: `\"alfa\\n\"`" /// # ); /// # assert_eq!(actual, expect); /// # } diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_matches.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_matches.rs index 3e7041795..e300a909b 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_matches.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_matches.rs @@ -47,6 +47,7 @@ macro_rules! assert_fs_read_to_string_matches_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_matches!(path, matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_matches.html\n", " path label: `{}`,\n", " path debug: `{:?}`,\n", " matcher label: `{}`,\n", @@ -67,6 +68,7 @@ macro_rules! assert_fs_read_to_string_matches_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_matches!(path, matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_matches.html\n", " path label: `{}`,\n", " path debug: `{:?}`,\n", " matcher label: `{}`,\n", @@ -117,15 +119,16 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_matches!(path, matcher)`\n", - " path label: `&path`,\n", - " path debug: `\"", - path.to_string_lossy(), - "\"`,\n", - " matcher label: `&matcher`,\n", - " matcher debug: `Regex(\"zzz\")`,\n", - " read string: `\"alfa\\n\"`", + concat!( + "assertion failed: `assert_fs_read_to_string_matches!(path, matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_matches.html\n", + " path label: `&path`,\n", + " path debug: `{:?}`,\n", + " matcher label: `&matcher`,\n", + " matcher debug: `Regex(\"zzz\")`,\n", + " read string: `\"alfa\\n\"`", + ), + path ) ); } @@ -157,6 +160,7 @@ mod tests { /// assert_fs_read_to_string_matches!(&path, &matcher); /// # }); /// // assertion failed: `assert_fs_read_to_string_matches!(path, matcher)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_matches.html /// // path label: `&path`, /// // path debug: `\"alfa.txt\"`, /// // matcher label: `&matcher`, @@ -165,6 +169,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_matches!(path, matcher)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_matches.html\n", /// # " path label: `&path`,\n", /// # " path debug: `\"alfa.txt\"`,\n", /// # " matcher label: `&matcher`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_ne.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_ne.rs index e9bb2510a..62da206ac 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_ne.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_ne.rs @@ -48,6 +48,7 @@ macro_rules! assert_fs_read_to_string_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_ne!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_fs_read_to_string_ne_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_ne!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_path label: `{}`,\n", @@ -121,18 +123,18 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_ne!(a_path, b_path)`\n", - " a_path label: `&a`,\n", - " a_path debug: `\"", - a.to_string_lossy(), - "\"`,\n", - " b_path label: `&b`,\n", - " b_path debug: `\"", - b.to_string_lossy(), - "\"`,\n", - " a string: `\"alfa\\n\"`,\n", - " b string: `\"alfa\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_ne!(a_path, b_path)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne.html\n", + " a_path label: `&a`,\n", + " a_path debug: `{:?}`,\n", + " b_path label: `&b`,\n", + " b_path debug: `{:?}`,\n", + " a string: `\"alfa\\n\"`,\n", + " b string: `\"alfa\\n\"`" + ), + a, + b ) ); } @@ -162,6 +164,7 @@ mod tests { /// let b = "alfa.txt"; /// assert_fs_read_to_string_ne!(&a, &b); /// // assertion failed: `assert_fs_read_to_string_ne!(a_path, b_path)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne.html /// // a_path label: `&a`, /// // a_path debug: `\"alfa.txt\"`, /// // b_path label: `&b`, @@ -172,6 +175,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_ne!(a_path, b_path)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne.html\n", /// # " a_path label: `&a`,\n", /// # " a_path debug: `\"alfa.txt\"`,\n", /// # " b_path label: `&b`,\n", diff --git a/src/assert_fs_read_to_string/assert_fs_read_to_string_ne_expr.rs b/src/assert_fs_read_to_string/assert_fs_read_to_string_ne_expr.rs index 05c637a14..d823230ff 100644 --- a/src/assert_fs_read_to_string/assert_fs_read_to_string_ne_expr.rs +++ b/src/assert_fs_read_to_string/assert_fs_read_to_string_ne_expr.rs @@ -45,6 +45,7 @@ macro_rules! assert_fs_read_to_string_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_ne_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -66,12 +67,13 @@ macro_rules! assert_fs_read_to_string_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_fs_read_to_string_ne_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne_expr.html\n", " a_path label: `{}`,\n", " a_path debug: `{:?}`,\n", " b_expr label: `{}`,\n", " b_expr debug: `{:?}`,\n", - " a: `{:?}`,\n", - " b: `{:?}`", + " a string: `{:?}`,\n", + " b string: `{:?}`", ), stringify!($a_path), a_path, @@ -119,16 +121,17 @@ mod tests { assert_eq!( result.unwrap_err(), format!( - "{}{}{}{}{}{}{}{}{}", - "assertion failed: `assert_fs_read_to_string_ne_expr!(a_path, b_expr)`\n", - " a_path label: `&path`,\n", - " a_path debug: `\"", - path.to_string_lossy(), - "\"`,\n", - " b_expr label: `&value`,\n", - " b_expr debug: `\"alfa\\n\"`,\n", - " a: `\"alfa\\n\"`,\n", - " b: `\"alfa\\n\"`" + concat!( + "assertion failed: `assert_fs_read_to_string_ne_expr!(a_path, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne_expr.html\n", + " a_path label: `&path`,\n", + " a_path debug: `{:?}`,\n", + " b_expr label: `&value`,\n", + " b_expr debug: `\"alfa\\n\"`,\n", + " a string: `\"alfa\\n\"`,\n", + " b string: `\"alfa\\n\"`" + ), + path ) ); } @@ -159,21 +162,23 @@ mod tests { /// assert_fs_read_to_string_ne_expr!(&path, &value); /// # }); /// // assertion failed: `assert_fs_read_to_string_ne_expr!(a_path, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne_expr.html /// // a_path label: `&path`, /// // a_path debug: `\"alfa.txt\"`, /// // b_expr label: `&value`, /// // b_expr debug: `\"alfa\\n\"`, -/// // a: `\"alfa\\n\"`, -/// // b: `\"alfa\\n\"` +/// // a string: `\"alfa\\n\"`, +/// // b string: `\"alfa\\n\"` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_fs_read_to_string_ne_expr!(a_path, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_ne_expr.html\n", /// # " a_path label: `&path`,\n", /// # " a_path debug: `\"alfa.txt\"`,\n", /// # " b_expr label: `&value`,\n", /// # " b_expr debug: `\"alfa\\n\"`,\n", -/// # " a: `\"alfa\\n\"`,\n", -/// # " b: `\"alfa\\n\"`" +/// # " a string: `\"alfa\\n\"`,\n", +/// # " b string: `\"alfa\\n\"`" /// # ); /// # assert_eq!(actual, expect); /// # } diff --git a/src/assert_ge.rs b/src/assert_ge.rs index ca84c4c08..68d412504 100644 --- a/src/assert_ge.rs +++ b/src/assert_ge.rs @@ -46,6 +46,7 @@ macro_rules! assert_ge_as_result { Err(format!( concat!( "assertion failed: `assert_ge!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ge.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -83,6 +84,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_ge!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ge.html\n", " a label: `a`,\n", " a debug: `1`,\n", " b label: `b`,\n", @@ -115,6 +117,7 @@ mod tests { /// assert_ge!(a, b); /// # }); /// // assertion failed: `assert_ge!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_ge.html /// // a label: `a`, /// // a debug: `1`, /// // b label: `b`, @@ -122,6 +125,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_ge!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ge.html\n", /// # " a label: `a`,\n", /// # " a debug: `1`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_gt.rs b/src/assert_gt.rs index 961961301..fa9e271cd 100644 --- a/src/assert_gt.rs +++ b/src/assert_gt.rs @@ -46,6 +46,7 @@ macro_rules! assert_gt_as_result { Err(format!( concat!( "assertion failed: `assert_gt!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_gt.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -83,6 +84,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_gt!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_gt.html\n", " a label: `a`,\n", " a debug: `1`,\n", " b label: `b`,\n", @@ -115,6 +117,7 @@ mod tests { /// assert_gt!(a, b); /// # }); /// // assertion failed: `assert_gt!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_gt.html /// // a label: `a`, /// // a debug: `1`, /// // b label: `b`, @@ -122,6 +125,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_gt!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_gt.html\n", /// # " a label: `a`,\n", /// # " a debug: `1`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_in_delta.rs b/src/assert_in_delta.rs index 5858b4569..c6f84521e 100644 --- a/src/assert_in_delta.rs +++ b/src/assert_in_delta.rs @@ -74,6 +74,7 @@ macro_rules! assert_in_delta_as_result { Err(format!( concat!( "assertion failed: `assert_in_delta!(a, b, delta)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_in_delta.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -122,6 +123,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_in_delta!(a, b, delta)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_in_delta.html\n", " a label: `a`,\n", " a debug: `10`,\n", " b label: `b`,\n", @@ -162,6 +164,7 @@ mod tests { /// assert_in_delta!(a, b, delta); /// # }); /// // assertion failed: `assert_in_delta!(a, b, delta)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_in_delta.html /// // a label: `a`, /// // a debug: `10`, /// // b label: `b`, @@ -173,6 +176,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_in_delta!(a, b, delta)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_in_delta.html\n", /// # " a label: `a`,\n", /// # " a debug: `10`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_in_epsilon.rs b/src/assert_in_epsilon.rs index 8e548ff6c..48e709988 100644 --- a/src/assert_in_epsilon.rs +++ b/src/assert_in_epsilon.rs @@ -75,6 +75,7 @@ macro_rules! assert_in_epsilon_as_result { Err(format!( concat!( "assertion failed: `assert_in_epsilon!(a, b, epsilon)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_in_epsilon.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -125,6 +126,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_in_epsilon!(a, b, epsilon)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_in_epsilon.html\n", " a label: `a`,\n", " a debug: `10`,\n", " b label: `b`,\n", @@ -166,6 +168,7 @@ mod tests { /// assert_in_epsilon!(a, b, e); /// # }); /// // assertion failed: `assert_in_epsilon!(a, b, epsilon)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_in_epsilon.html /// // a label: `a`, /// // a debug: `10`, /// // b label: `b`, @@ -178,6 +181,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_in_epsilon!(a, b, epsilon)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_in_epsilon.html\n", /// # " a label: `a`,\n", /// # " a debug: `10`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_infix.rs b/src/assert_infix.rs index da50389ff..b4d6f21c8 100644 --- a/src/assert_infix.rs +++ b/src/assert_infix.rs @@ -92,6 +92,7 @@ macro_rules! assert_infix_as_result { Err(format!( concat!( "assertion failed: `assert_infix!(a {} b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_infix.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -130,6 +131,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_infix!(a == b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_infix.html\n", " a label: `a`,\n", " a debug: `1`,\n", " b label: `b`,\n", @@ -142,6 +144,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_infix!(a >= b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_infix.html\n", " a label: `a`,\n", " a debug: `1`,\n", " b label: `b`,\n", @@ -174,6 +177,7 @@ mod tests { /// assert_infix!(a == b); /// # }); /// // assertion failed: `assert_infix!(a == b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_infix.html /// // a label: `a`, /// // a debug: `1`, /// // b label: `b`, @@ -181,6 +185,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_infix!(a == b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_infix.html\n", /// # " a label: `a`,\n", /// # " a debug: `1`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_contains.rs b/src/assert_io_read_to_string/assert_io_read_to_string_contains.rs index bf5fd3eb7..ac56a4d5f 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_contains.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_contains.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_contains_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_contains!(reader, &containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_contains.html\n", " reader label: `{}`,\n", " reader debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -68,6 +69,7 @@ macro_rules! assert_io_read_to_string_contains_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_contains!(reader, &containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_contains.html\n", " reader label: `{}`,\n", " reader debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -110,6 +112,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_contains!(reader, &containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_contains.html\n", " reader label: `reader`,\n", " reader debug: `[]`,\n", " containee label: `&containee`,\n", @@ -145,6 +148,7 @@ mod tests { /// assert_io_read_to_string_contains!(reader, &containee); /// # }); /// // assertion failed: `assert_io_read_to_string_contains!(reader, &containee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_contains.html /// // reader label: `&reader`, /// // reader debug: `[]`, /// // containee label: `&containee`, @@ -153,6 +157,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_contains!(reader, &containee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_contains.html\n", /// # " reader label: `reader`,\n", /// # " reader debug: `[]`,\n", /// # " containee label: `&containee`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_eq.rs b/src/assert_io_read_to_string/assert_io_read_to_string_eq.rs index 112ac61a2..daccfb08a 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_eq.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_eq.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_eq_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_eq!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -71,6 +72,7 @@ macro_rules! assert_io_read_to_string_eq_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_eq!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_eq!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq.html\n", " a label: `a`,\n", " a debug: `[]`,\n", " b label: `b`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_eq!(a, b); /// # }); /// // assertion failed: `assert_io_read_to_string_eq!(a_reader, b_reader)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq.html /// // a label: `a`, /// // a debug: `[]`, /// // b label: `b`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_eq!(a_reader, b_reader)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq.html\n", /// # " a label: `a`,\n", /// # " a debug: `[]`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_eq_expr.rs b/src/assert_io_read_to_string/assert_io_read_to_string_eq_expr.rs index 5fcc97db5..e87adbf28 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_eq_expr.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_eq_expr.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_eq_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -69,6 +70,7 @@ macro_rules! assert_io_read_to_string_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_eq_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_eq_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq_expr.html\n", " a_reader label: `reader`,\n", " a_reader debug: `[]`,\n", " b_expr label: `&value`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_eq_expr!(reader, &value); /// # }); /// // assertion failed: `assert_io_read_to_string_eq_expr!(a_reader, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq_expr.html /// // a_reader label: `reader`, /// // a_reader debug: `[]`, /// // b_expr label: `&value`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_eq_expr!(a_reader, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_eq_expr.html\n", /// # " a_reader label: `reader`,\n", /// # " a_reader debug: `[]`,\n", /// # " b_expr label: `&value`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_ge.rs b/src/assert_io_read_to_string/assert_io_read_to_string_ge.rs index 6f31d2731..ed6d9191e 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_ge.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_ge.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_ge_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_ge!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -71,6 +72,7 @@ macro_rules! assert_io_read_to_string_ge_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_ge!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_ge!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge.html\n", " a label: `a`,\n", " a debug: `[]`,\n", " b label: `b`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_ge!(a, b); /// # }); /// // assertion failed: `assert_io_read_to_string_ge!(a_reader, b_reader)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge.html /// // a label: `a`, /// // a debug: `[]`, /// // b label: `b`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_ge!(a_reader, b_reader)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge.html\n", /// # " a label: `a`,\n", /// # " a debug: `[]`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_ge_expr.rs b/src/assert_io_read_to_string/assert_io_read_to_string_ge_expr.rs index 3ec49cf3b..ae6344dbe 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_ge_expr.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_ge_expr.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_ge_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -69,6 +70,7 @@ macro_rules! assert_io_read_to_string_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_ge_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_ge_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge_expr.html\n", " a_reader label: `reader`,\n", " a_reader debug: `[]`,\n", " b_expr label: `&value`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_ge_expr!(reader, &value); /// # }); /// // assertion failed: `assert_io_read_to_string_ge_expr!(a_reader, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge_expr.html /// // a_reader label: `reader`, /// // a_reader debug: `[]`, /// // b_expr label: `&value`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_ge_expr!(a_reader, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ge_expr.html\n", /// # " a_reader label: `reader`,\n", /// # " a_reader debug: `[]`,\n", /// # " b_expr label: `&value`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_gt.rs b/src/assert_io_read_to_string/assert_io_read_to_string_gt.rs index 6645ff4ac..4be4b904f 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_gt.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_gt.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_gt_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_gt!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -71,6 +72,7 @@ macro_rules! assert_io_read_to_string_gt_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_gt!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_gt!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt.html\n", " a label: `a`,\n", " a debug: `[]`,\n", " b label: `b`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_gt!(a, b); /// # }); /// // assertion failed: `assert_io_read_to_string_gt!(a_reader, b_reader)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt.html /// // a label: `a`, /// // a debug: `[]`, /// // b label: `b`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_gt!(a_reader, b_reader)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt.html\n", /// # " a label: `a`,\n", /// # " a debug: `[]`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_gt_expr.rs b/src/assert_io_read_to_string/assert_io_read_to_string_gt_expr.rs index 9a9dc5000..59ddff61e 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_gt_expr.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_gt_expr.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_gt_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -69,6 +70,7 @@ macro_rules! assert_io_read_to_string_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_gt_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_gt_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt_expr.html\n", " a_reader label: `reader`,\n", " a_reader debug: `[]`,\n", " b_expr label: `&value`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_gt_expr!(reader, &value); /// # }); /// // assertion failed: `assert_io_read_to_string_gt_expr!(a_reader, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt_expr.html /// // a_reader label: `reader`, /// // a_reader debug: `[]`, /// // b_expr label: `&value`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_gt_expr!(a_reader, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_gt_expr.html\n", /// # " a_reader label: `reader`,\n", /// # " a_reader debug: `[]`,\n", /// # " b_expr label: `&value`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_le.rs b/src/assert_io_read_to_string/assert_io_read_to_string_le.rs index 74ab9165b..1510d024b 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_le.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_le.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_le_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_le!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -71,6 +72,7 @@ macro_rules! assert_io_read_to_string_le_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_le!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_le!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le.html\n", " a label: `a`,\n", " a debug: `[]`,\n", " b label: `b`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_le!(a, b); /// # }); /// // assertion failed: `assert_io_read_to_string_le!(a_reader, b_reader)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le.html /// // a label: `a`, /// // a debug: `[]`, /// // b label: `b`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_le!(a_reader, b_reader)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le.html\n", /// # " a label: `a`,\n", /// # " a debug: `[]`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_le_expr.rs b/src/assert_io_read_to_string/assert_io_read_to_string_le_expr.rs index 6f8d30a8e..98ea08daf 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_le_expr.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_le_expr.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_le_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -69,6 +70,7 @@ macro_rules! assert_io_read_to_string_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_le_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_le_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le_expr.html\n", " a_reader label: `reader`,\n", " a_reader debug: `[]`,\n", " b_expr label: `&value`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_le_expr!(reader, &value); /// # }); /// // assertion failed: `assert_io_read_to_string_le_expr!(a_reader, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le_expr.html /// // a_reader label: `reader`, /// // a_reader debug: `[]`, /// // b_expr label: `&value`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_le_expr!(a_reader, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_le_expr.html\n", /// # " a_reader label: `reader`,\n", /// # " a_reader debug: `[]`,\n", /// # " b_expr label: `&value`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_lt.rs b/src/assert_io_read_to_string/assert_io_read_to_string_lt.rs index 5c3efdaab..916e717e6 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_lt.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_lt.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_lt_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_lt!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -71,6 +72,7 @@ macro_rules! assert_io_read_to_string_lt_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_lt!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_lt!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt.html\n", " a label: `a`,\n", " a debug: `[]`,\n", " b label: `b`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_lt!(a, b); /// # }); /// // assertion failed: `assert_io_read_to_string_lt!(a_reader, b_reader)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt.html /// // a label: `a`, /// // a debug: `[]`, /// // b label: `b`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_lt!(a_reader, b_reader)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt.html\n", /// # " a label: `a`,\n", /// # " a debug: `[]`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_lt_expr.rs b/src/assert_io_read_to_string/assert_io_read_to_string_lt_expr.rs index df3c2b85f..469626290 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_lt_expr.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_lt_expr.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_lt_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -69,6 +70,7 @@ macro_rules! assert_io_read_to_string_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_lt_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_lt_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt_expr.html\n", " a_reader label: `reader`,\n", " a_reader debug: `[]`,\n", " b_expr label: `&value`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_lt_expr!(reader, &value); /// # }); /// // assertion failed: `assert_io_read_to_string_lt_expr!(a_reader, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt_expr.html /// // a_reader label: `reader`, /// // a_reader debug: `[]`, /// // b_expr label: `&value`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_lt_expr!(a_reader, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_lt_expr.html\n", /// # " a_reader label: `reader`,\n", /// # " a_reader debug: `[]`,\n", /// # " b_expr label: `&value`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_matches.rs b/src/assert_io_read_to_string/assert_io_read_to_string_matches.rs index 50b53bf6e..63c9e2197 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_matches.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_matches.rs @@ -49,6 +49,7 @@ macro_rules! assert_io_read_to_string_matches_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_matches!(a_reader, &matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_matches.html\n", " reader label: `{}`,\n", " reader debug: `{:?}`,\n", " matcher label: `{}`,\n", @@ -69,6 +70,7 @@ macro_rules! assert_io_read_to_string_matches_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_matches!(a_reader, &matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_matches.html\n", " reader label: `{}`,\n", " reader debug: `{:?}`,\n", " matcher label: `{}`,\n", @@ -111,6 +113,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_matches!(a_reader, &matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_matches.html\n", " reader label: `reader`,\n", " reader debug: `[]`,\n", " matcher label: `&matcher`,\n", @@ -147,6 +150,7 @@ mod tests { /// assert_io_read_to_string_matches!(reader, &matcher); /// # }); /// // assertion failed: `assert_io_read_to_string_matches!(a_reader, &matcher)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_matches.html /// // reader label: `reader`, /// // reader debug: `[]`, /// // matcher label: `&matcher`, @@ -155,6 +159,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_matches!(a_reader, &matcher)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_matches.html\n", /// # " reader label: `reader`,\n", /// # " reader debug: `[]`,\n", /// # " matcher label: `&matcher`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_ne.rs b/src/assert_io_read_to_string/assert_io_read_to_string_ne.rs index 96a79578b..4e79b2a32 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_ne.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_ne.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_ne_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_ne!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -71,6 +72,7 @@ macro_rules! assert_io_read_to_string_ne_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_ne!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_ne!(a_reader, b_reader)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne.html\n", " a label: `a`,\n", " a debug: `[]`,\n", " b label: `b`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_ne!(a, b); /// # }); /// // assertion failed: `assert_io_read_to_string_ne!(a_reader, b_reader)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne.html /// // a label: `a`, /// // a debug: `[]`, /// // b label: `b`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_ne!(a_reader, b_reader)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne.html\n", /// # " a label: `a`,\n", /// # " a debug: `[]`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_io_read_to_string/assert_io_read_to_string_ne_expr.rs b/src/assert_io_read_to_string/assert_io_read_to_string_ne_expr.rs index 369af7194..952172479 100644 --- a/src/assert_io_read_to_string/assert_io_read_to_string_ne_expr.rs +++ b/src/assert_io_read_to_string/assert_io_read_to_string_ne_expr.rs @@ -48,6 +48,7 @@ macro_rules! assert_io_read_to_string_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_ne_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -69,6 +70,7 @@ macro_rules! assert_io_read_to_string_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_io_read_to_string_ne_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne_expr.html\n", " a_reader label: `{}`,\n", " a_reader debug: `{:?}`,\n", " b_expr label: `{}`,\n", @@ -113,6 +115,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_io_read_to_string_ne_expr!(a_reader, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne_expr.html\n", " a_reader label: `reader`,\n", " a_reader debug: `[]`,\n", " b_expr label: `&value`,\n", @@ -149,6 +152,7 @@ mod tests { /// assert_io_read_to_string_ne_expr!(reader, &value); /// # }); /// // assertion failed: `assert_io_read_to_string_ne_expr!(a_reader, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne_expr.html /// // a_reader label: `reader`, /// // a_reader debug: `[]`, /// // b_expr label: `&value`, @@ -158,6 +162,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_io_read_to_string_ne_expr!(a_reader, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_io_read_to_string_ne_expr.html\n", /// # " a_reader label: `reader`,\n", /// # " a_reader debug: `[]`,\n", /// # " b_expr label: `&value`,\n", diff --git a/src/assert_is_match.rs b/src/assert_is_match.rs index 489e44b82..166b716ad 100644 --- a/src/assert_is_match.rs +++ b/src/assert_is_match.rs @@ -49,6 +49,7 @@ macro_rules! assert_is_match_as_result { Err(format!( concat!( "assertion failed: `assert_is_match!(matcher, matchee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_is_match.html\n", " matcher label: `{}`,\n", " matcher debug: `{:?}`,\n", " matchee label: `{}`,\n", @@ -86,6 +87,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_is_match!(matcher, matchee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_is_match.html\n", " matcher label: `a`,\n", " matcher debug: `Regex(\"lf\")`,\n", " matchee label: `b`,\n", @@ -121,6 +123,7 @@ mod tests { /// assert_is_match!(a, b); /// # }); /// // assertion failed: `assert_is_match!(matcher, matchee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_is_match.html /// // matcher label: `a`, /// // matcher debug: `Regex(\"lf\")`, /// // matchee label: `b`, @@ -128,6 +131,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_is_match!(matcher, matchee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_is_match.html\n", /// # " matcher label: `a`,\n", /// # " matcher debug: `Regex(\"lf\")`,\n", /// # " matchee label: `b`,\n", diff --git a/src/assert_le.rs b/src/assert_le.rs index 27599e0b3..16a40c814 100644 --- a/src/assert_le.rs +++ b/src/assert_le.rs @@ -46,6 +46,7 @@ macro_rules! assert_le_as_result { Err(format!( concat!( "assertion failed: `assert_le!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_le.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -83,6 +84,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_le!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_le.html\n", " a label: `a`,\n", " a debug: `2`,\n", " b label: `b`,\n", @@ -115,6 +117,7 @@ mod tests { /// assert_le!(a, b); /// # }); /// // assertion failed: `assert_le!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_le.html /// // a label: `a`, /// // a debug: `2`, /// // b label: `b`, @@ -122,6 +125,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_le!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_le.html\n", /// # " a label: `a`,\n", /// # " a debug: `2`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_lt.rs b/src/assert_lt.rs index 3844cd433..b4e570436 100644 --- a/src/assert_lt.rs +++ b/src/assert_lt.rs @@ -47,6 +47,7 @@ macro_rules! assert_lt_as_result { Err(format!( concat!( "assertion failed: `assert_lt!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_lt.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -84,6 +85,7 @@ mod test_assert_x_result { result.unwrap_err(), concat!( "assertion failed: `assert_lt!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_lt.html\n", " a label: `a`,\n", " a debug: `2`,\n", " b label: `b`,\n", @@ -116,6 +118,7 @@ mod test_assert_x_result { /// assert_lt!(a, b); /// # }); /// // assertion failed: `assert_lt!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_lt.html /// // a label: `a`, /// // a debug: `2`, /// // b label: `b`, @@ -123,6 +126,7 @@ mod test_assert_x_result { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_lt!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_lt.html\n", /// # " a label: `a`,\n", /// # " a debug: `2`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_ne.rs b/src/assert_ne.rs index 327e8b342..3560d1363 100644 --- a/src/assert_ne.rs +++ b/src/assert_ne.rs @@ -53,6 +53,7 @@ macro_rules! assert_ne_as_result { Err(format!( concat!( "assertion failed: `assert_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -90,6 +91,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ne.html\n", " a label: `a`,\n", " a debug: `1`,\n", " b label: `b`,\n", diff --git a/src/assert_none.rs b/src/assert_none.rs new file mode 100644 index 000000000..c290dc2aa --- /dev/null +++ b/src/assert_none.rs @@ -0,0 +1,183 @@ +//! Assert expression is None. +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! # fn main() { +//! let a: Option = Option::None; +//! assert_none!(a); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_none`](macro@crate::assert_none) +//! * [`assert_none_as_result`](macro@crate::assert_none_as_result) +//! * [`debug_assert_none`](macro@crate::debug_assert_none) + +/// Assert an expression.is_none() is true. +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_none`](macro.assert_none.html), +/// except this macro returns a Result, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_none`](macro@crate::assert_none) +/// * [`assert_none_as_result`](macro@crate::assert_none_as_result) +/// * [`debug_assert_none`](macro@crate::debug_assert_none) +/// +#[macro_export] +macro_rules! assert_none_as_result { + ($a:expr $(,)?) => ({ + match (&$a) { + a => { + match (a) { + None => { + Ok(()) + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_none!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_none.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`", + ), + stringify!($a), + a + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + + #[test] + fn test_assert_none_as_result_x_success() { + let a: Option = Option::None; + let result = assert_none_as_result!(a); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_none_as_result_x_failure() { + let a: Option = Option::Some(1); + let result = assert_none_as_result!(a); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_none!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_none.html\n", + " a label: `a`,\n", + " a debug: `Some(1)`", + ) + ); + } +} + +/// Assert expression is None. +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// # fn main() { +/// let a: Option = Option::None; +/// assert_none!(a); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Option = Option::Some(1); +/// assert_none!(a); +/// # }); +/// // assertion failed: `assert_none!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_none.html +/// // a label: `a`, +/// // a debug: `Some(1)` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_none!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_none.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Some(1)`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_none`](macro@crate::assert_none) +/// * [`assert_none_as_result`](macro@crate::assert_none_as_result) +/// * [`debug_assert_none`](macro@crate::debug_assert_none) +/// +#[macro_export] +macro_rules! assert_none { + ($option:expr $(,)?) => ({ + match assert_none_as_result!($option) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($option:expr, $($message:tt)+) => ({ + match assert_none_as_result!($option) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert expression is None. +/// +/// This macro provides the same statements as [`assert_none`](macro.assert_none.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_none`](macro@crate::assert_none) +/// * [`assert_none`](macro@crate::assert_none) +/// * [`debug_assert_none`](macro@crate::debug_assert_none) +/// +#[macro_export] +macro_rules! debug_assert_none { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_none!($($arg)*); + } + }; +} diff --git a/src/assert_not_contains.rs b/src/assert_not_contains.rs index d41b6682c..cd21ac9a2 100644 --- a/src/assert_not_contains.rs +++ b/src/assert_not_contains.rs @@ -52,6 +52,7 @@ macro_rules! assert_not_contains_as_result { Err(format!( concat!( "assertion failed: `assert_not_contains!(container, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_contains.html\n", " container label: `{}`,\n", " container debug: `{:?}`,\n", " containee label: `{}`,\n", @@ -89,6 +90,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_not_contains!(container, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_contains.html\n", " container label: `a`,\n", " container debug: `\"alfa\"`,\n", " containee label: `b`,\n", @@ -115,6 +117,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_not_contains!(container, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_contains.html\n", " container label: `a`,\n", " container debug: `1..5`,\n", " containee label: `&b`,\n", @@ -155,6 +158,7 @@ mod tests { /// assert_not_contains!(a, b); /// # }); /// // assertion failed: `assert_not_contains!(container, containee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_contains.html /// // container label: `a`, /// // container debug: `\"alfa\"`, /// // containee label: `b`, @@ -162,6 +166,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_not_contains!(container, containee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_contains.html\n", /// # " container label: `a`,\n", /// # " container debug: `\"alfa\"`,\n", /// # " containee label: `b`,\n", diff --git a/src/assert_not_ends_with.rs b/src/assert_not_ends_with.rs index d9761eee6..42b2be1da 100644 --- a/src/assert_not_ends_with.rs +++ b/src/assert_not_ends_with.rs @@ -46,6 +46,7 @@ macro_rules! assert_not_ends_with_as_result { Err(format!( concat!( "assertion failed: `assert_not_ends_with!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_ends_with.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -81,6 +82,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_not_ends_with!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_ends_with.html\n", " a label: `a`,\n", " a debug: `\"alfa\"`,\n", " b label: `b`,\n", @@ -113,6 +115,7 @@ mod tests { /// assert_not_ends_with!(a, b); /// # }); /// // assertion failed: `assert_not_ends_with!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_ends_with.html /// // a label: `a`, /// // a debug: `\"alfa\"`, /// // b label: `b`, @@ -120,6 +123,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_not_ends_with!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_ends_with.html\n", /// # " a label: `a`,\n", /// # " a debug: `\"alfa\"`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_not_match.rs b/src/assert_not_match.rs index 8d546a4b2..cb5088ff5 100644 --- a/src/assert_not_match.rs +++ b/src/assert_not_match.rs @@ -49,6 +49,7 @@ macro_rules! assert_not_match_as_result { Err(format!( concat!( "assertion failed: `assert_not_match!(matcher, matchee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_match.html\n", " matcher label: `{}`,\n", " matcher debug: `{:?}`,\n", " matchee label: `{}`,\n", @@ -86,6 +87,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_not_match!(matcher, matchee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_match.html\n", " matcher label: `a`,\n", " matcher debug: `Regex(\"lf\")`,\n", " matchee label: `b`,\n", @@ -121,6 +123,7 @@ mod tests { /// assert_not_match!(a, b); /// # }); /// // assertion failed: `assert_not_match!(matcher, matchee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_match.html /// // matcher label: `a`, /// // matcher debug: `Regex(\"lf\")`, /// // matchee label: `b`, @@ -128,6 +131,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_not_match!(matcher, matchee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_match.html\n", /// # " matcher label: `a`,\n", /// # " matcher debug: `Regex(\"lf\")`,\n", /// # " matchee label: `b`,\n", diff --git a/src/assert_not_starts_with.rs b/src/assert_not_starts_with.rs index 280ecc080..96b1bcac3 100644 --- a/src/assert_not_starts_with.rs +++ b/src/assert_not_starts_with.rs @@ -46,6 +46,7 @@ macro_rules! assert_not_starts_with_as_result { Err(format!( concat!( "assertion failed: `assert_not_starts_with!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_starts_with.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -81,6 +82,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_not_starts_with!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_starts_with.html\n", " a label: `a`,\n", " a debug: `\"alfa\"`,\n", " b label: `b`,\n", @@ -113,6 +115,7 @@ mod tests { /// assert_not_starts_with!(a, b); /// # }); /// // assertion failed: `assert_not_starts_with!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_starts_with.html /// // a label: `a`, /// // a debug: `\"alfa\"`, /// // b label: `b`, @@ -120,6 +123,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_not_starts_with!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_not_starts_with.html\n", /// # " a label: `a`,\n", /// # " a debug: `\"alfa\"`,\n", /// # " b label: `b`,\n", diff --git a/src/assert_ok.rs b/src/assert_ok.rs new file mode 100644 index 000000000..d2cbc7db4 --- /dev/null +++ b/src/assert_ok.rs @@ -0,0 +1,183 @@ +//! Assert expression is Ok(_). +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! # fn main() { +//! let a: Result<(), i8> = Ok(()); +//! assert_ok!(a); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_ok`](macro@crate::assert_ok) +//! * [`assert_ok_as_result`](macro@crate::assert_ok_as_result) +//! * [`debug_assert_ok`](macro@crate::debug_assert_ok) + +/// Assert expression is Ok(_). +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_ok`](macro.assert_ok.html), +/// except this macro returns a Result, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_ok`](macro@crate::assert_ok) +/// * [`assert_ok_as_result`](macro@crate::assert_ok_as_result) +/// * [`debug_assert_ok`](macro@crate::debug_assert_ok) +/// +#[macro_export] +macro_rules! assert_ok_as_result { + ($result:expr $(,)?) => ({ + match (&$result) { + result => { + match (result) { + Ok(_) => { + Ok(()) + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_ok!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`", + ), + stringify!($result), + result + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + + #[test] + fn test_assert_ok_as_result_x_success() { + let a: Result<(), i8> = Ok(()); + let result = assert_ok_as_result!(a); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_ok_as_result_x_failure() { + let a: Result<(), i8> = Err(1); + let result = assert_ok_as_result!(a); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ok!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok.html\n", + " a label: `a`,\n", + " a debug: `Err(1)`", + ) + ); + } +} + +/// Assert expression is Ok(_). +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// # fn main() { +/// let a: Result<(), i8> = Ok(()); +/// assert_ok!(a); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Result<(), i8> = Err(1); +/// assert_ok!(a); +/// # }); +/// // assertion failed: `assert_ok!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok.html +/// // a label: `a`, +/// // a debug: `Err(1)` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_ok!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Err(1)`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_ok`](macro@crate::assert_ok) +/// * [`assert_ok_as_result`](macro@crate::assert_ok_as_result) +/// * [`debug_assert_ok`](macro@crate::debug_assert_ok) +/// +#[macro_export] +macro_rules! assert_ok { + ($result:expr $(,)?) => ({ + match assert_ok_as_result!($result) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($result:expr, $($message:tt)+) => ({ + match assert_ok_as_result!($result) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert expression is Ok(_). +/// +/// This macro provides the same statements as [`assert_ok`](macro.assert_ok.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_ok`](macro@crate::assert_ok) +/// * [`assert_ok`](macro@crate::assert_ok) +/// * [`debug_assert_ok`](macro@crate::debug_assert_ok) +/// +#[macro_export] +macro_rules! debug_assert_ok { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_ok!($($arg)*); + } + }; +} diff --git a/src/assert_ok_eq.rs b/src/assert_ok_eq.rs new file mode 100644 index 000000000..6d110e169 --- /dev/null +++ b/src/assert_ok_eq.rs @@ -0,0 +1,245 @@ +//! Assert two expressions are Ok(_) and their values are equal. +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! # fn main() { +//! let a: Result = Ok(1); +//! let b: Result = Ok(1); +//! assert_ok_eq!(a, b); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_ok_eq`](macro@crate::assert_ok_eq) +//! * [`assert_ok_eq_as_result`](macro@crate::assert_ok_eq_as_result) +//! * [`debug_assert_ok_eq`](macro@crate::debug_assert_ok_eq) + +/// Assert two expressions are Ok(_) and their values are equal. +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_ok_eq`](macro.assert_ok_eq.html), +/// except this macro returns a Result, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_ok_eq`](macro@crate::assert_ok_eq) +/// * [`assert_ok_eq_as_result`](macro@crate::assert_ok_eq_as_result) +/// * [`debug_assert_ok_eq`](macro@crate::debug_assert_ok_eq) +/// +#[macro_export] +macro_rules! assert_ok_eq_as_result { + ($a:expr, $b:expr $(,)?) => ({ + match (&$a, &$b) { + (a, b) => { + match (a, b) { + (Ok(a_inner), Ok(b_inner)) => { + if a_inner == b_inner { + Ok(()) + } else { + Err(format!( + concat!( + "assertion failed: `assert_ok_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_eq.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " a inner: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`,\n", + " b inner: `{:?}`" + ), + stringify!($a), + a, + a_inner, + stringify!($b), + b, + b_inner + )) + } + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_ok_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_eq.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`", + ), + stringify!($a), + a, + stringify!($b), + b, + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + + #[test] + fn test_assert_ok_eq_as_result_x_success() { + let a: Result = Ok(1); + let b: Result = Ok(1); + let result = assert_ok_eq_as_result!(a, b); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_ok_eq_as_result_x_failure_because_ne() { + let a: Result = Ok(1); + let b: Result = Ok(2); + let result = assert_ok_eq_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ok_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_eq.html\n", + " a label: `a`,\n", + " a debug: `Ok(1)`,\n", + " a inner: `1`,\n", + " b label: `b`,\n", + " b debug: `Ok(2)`,\n", + " b inner: `2`", + ) + ); + } + + #[test] + fn test_assert_ok_eq_as_result_x_failure_because_not_ok() { + let a: Result = Ok(1); + let b: Result = Err(1); + let result = assert_ok_eq_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ok_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_eq.html\n", + " a label: `a`,\n", + " a debug: `Ok(1)`,\n", + " b label: `b`,\n", + " b debug: `Err(1)`", + ) + ); + } + +} + +/// Assert two expressions are Ok(_) and their values are equal. +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// # fn main() { +/// let a: Result = Ok(1); +/// let b: Result = Ok(1); +/// assert_ok_eq!(a, b); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Result = Ok(1); +/// let b: Result = Ok(2); +/// assert_ok_eq!(a, b); +/// # }); +/// // assertion failed: `assert_ok_eq!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_eq.html +/// // a label: `a`, +/// // a debug: `Ok(1)`, +/// // a inner: `1`, +/// // b label: `b`, +/// // b debug: `Ok(2)`, +/// // b inner: `2` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_ok_eq!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_eq.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Ok(1)`,\n", +/// # " a inner: `1`,\n", +/// # " b label: `b`,\n", +/// # " b debug: `Ok(2)`,\n", +/// # " b inner: `2`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_ok_eq`](macro@crate::assert_ok_eq) +/// * [`assert_ok_eq_as_result`](macro@crate::assert_ok_eq_as_result) +/// * [`debug_assert_ok_eq`](macro@crate::debug_assert_ok_eq) +/// +#[macro_export] +macro_rules! assert_ok_eq { + ($a:expr, $b:expr $(,)?) => ({ + match assert_ok_eq_as_result!($a, $b) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($a:expr, $b:expr, $($message:tt)+) => ({ + match assert_ok_eq_as_result!($a, $b) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert two expressions are Ok(_) and their values are equal. +/// +/// This macro provides the same statements as [`assert_ok_eq`](macro.assert_ok_eq.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_ok_eq`](macro@crate::assert_ok_eq) +/// * [`assert_ok_eq`](macro@crate::assert_ok_eq) +/// * [`debug_assert_ok_eq`](macro@crate::debug_assert_ok_eq) +/// +#[macro_export] +macro_rules! debug_assert_ok_eq { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_ok_eq!($($arg)*); + } + }; +} diff --git a/src/assert_ok_ne.rs b/src/assert_ok_ne.rs new file mode 100644 index 000000000..793b35882 --- /dev/null +++ b/src/assert_ok_ne.rs @@ -0,0 +1,245 @@ +//! Assert two expressions are Ok(_) and their values are not equal. +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! # fn main() { +//! let a: Result = Ok(1); +//! let b: Result = Ok(2); +//! assert_ok_ne!(a, b); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_ok_ne`](macro@crate::assert_ok_ne) +//! * [`assert_ok_ne_as_result`](macro@crate::assert_ok_ne_as_result) +//! * [`debug_assert_ok_ne`](macro@crate::debug_assert_ok_ne) + +/// Assert two expressions are Ok(_) and their values are not equal. +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_ok_ne`](macro.assert_ok_ne.html), +/// except this macro returns a Result, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_ok_ne`](macro@crate::assert_ok_ne) +/// * [`assert_ok_ne_as_result`](macro@crate::assert_ok_ne_as_result) +/// * [`debug_assert_ok_ne`](macro@crate::debug_assert_ok_ne) +/// +#[macro_export] +macro_rules! assert_ok_ne_as_result { + ($a:expr, $b:expr $(,)?) => ({ + match (&$a, &$b) { + (a, b) => { + match (a, b) { + (Ok(a_inner), Ok(b_inner)) => { + if a_inner != b_inner { + Ok(()) + } else { + Err(format!( + concat!( + "assertion failed: `assert_ok_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_ne.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " a inner: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`,\n", + " b inner: `{:?}`" + ), + stringify!($a), + a, + a_inner, + stringify!($b), + b, + b_inner + )) + } + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_ok_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_ne.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`", + ), + stringify!($a), + a, + stringify!($b), + b, + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + + #[test] + fn test_assert_ok_ne_as_result_x_success() { + let a: Result = Ok(1); + let b: Result = Ok(2); + let result = assert_ok_ne_as_result!(a, b); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_ok_ne_as_result_x_failure_because_eq() { + let a: Result = Ok(1); + let b: Result = Ok(1); + let result = assert_ok_ne_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ok_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_ne.html\n", + " a label: `a`,\n", + " a debug: `Ok(1)`,\n", + " a inner: `1`,\n", + " b label: `b`,\n", + " b debug: `Ok(1)`,\n", + " b inner: `1`", + ) + ); + } + + #[test] + fn test_assert_ok_ne_as_result_x_failure_because_not_ok() { + let a: Result = Ok(1); + let b: Result = Err(1); + let result = assert_ok_ne_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ok_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_ne.html\n", + " a label: `a`,\n", + " a debug: `Ok(1)`,\n", + " b label: `b`,\n", + " b debug: `Err(1)`", + ) + ); + } + +} + +/// Assert two expressions are Ok(_) and their values are not equal. +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// # fn main() { +/// let a: Result = Ok(1); +/// let b: Result = Ok(2); +/// assert_ok_ne!(a, b); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Result = Ok(1); +/// let b: Result = Ok(1); +/// assert_ok_ne!(a, b); +/// # }); +/// // assertion failed: `assert_ok_ne!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_ne.html +/// // a label: `a`, +/// // a debug: `Ok(1)`, +/// // a inner: `1`, +/// // b label: `b`, +/// // b debug: `Ok(1)`, +/// // b inner: `1` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_ok_ne!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ok_ne.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Ok(1)`,\n", +/// # " a inner: `1`,\n", +/// # " b label: `b`,\n", +/// # " b debug: `Ok(1)`,\n", +/// # " b inner: `1`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_ok_ne`](macro@crate::assert_ok_ne) +/// * [`assert_ok_ne_as_result`](macro@crate::assert_ok_ne_as_result) +/// * [`debug_assert_ok_ne`](macro@crate::debug_assert_ok_ne) +/// +#[macro_export] +macro_rules! assert_ok_ne { + ($a:expr, $b:expr $(,)?) => ({ + match assert_ok_ne_as_result!($a, $b) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($a:expr, $b:expr, $($message:tt)+) => ({ + match assert_ok_ne_as_result!($a, $b) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert two expressions are Ok(_) and their values are not equal. +/// +/// This macro provides the same statements as [`assert_ok_ne`](macro.assert_ok_ne.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_ok_ne`](macro@crate::assert_ok_ne) +/// * [`assert_ok_ne`](macro@crate::assert_ok_ne) +/// * [`debug_assert_ok_ne`](macro@crate::debug_assert_ok_ne) +/// +#[macro_export] +macro_rules! debug_assert_ok_ne { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_ok_ne!($($arg)*); + } + }; +} diff --git a/src/assert_option/assert_option_none.rs b/src/assert_option/assert_option_none.rs index d286188ee..96e984ace 100644 --- a/src/assert_option/assert_option_none.rs +++ b/src/assert_option/assert_option_none.rs @@ -34,6 +34,7 @@ /// * [`assert_option_none_as_result`](macro@crate::assert_option_none_as_result) /// * [`debug_assert_option_none`](macro@crate::debug_assert_option_none) /// +#[deprecated(note = "Please rename from `assert_option_none_as_result` to `assert_none_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_option_none_as_result { ($a:expr $(,)?) => ({ @@ -47,6 +48,7 @@ macro_rules! assert_option_none_as_result { Err(format!( concat!( "assertion failed: `assert_option_none!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_none.html\n", " a label: `{}`,\n", " a debug: `{:?}`", ), @@ -79,6 +81,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_option_none!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_none.html\n", " a label: `a`,\n", " a debug: `Some(1)`", ) @@ -107,11 +110,13 @@ mod tests { /// assert_option_none!(a); /// # }); /// // assertion failed: `assert_option_none!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_none.html /// // a label: `a`, /// // a debug: `Some(1)` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_option_none!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_none.html\n", /// # " a label: `a`,\n", /// # " a debug: `Some(1)`", /// # ); @@ -125,6 +130,7 @@ mod tests { /// * [`assert_option_none_as_result`](macro@crate::assert_option_none_as_result) /// * [`debug_assert_option_none`](macro@crate::debug_assert_option_none) /// +#[deprecated(note = "Please rename from `assert_option_none` to `assert_none` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_option_none { ($option:expr $(,)?) => ({ @@ -169,6 +175,7 @@ macro_rules! assert_option_none { /// * [`assert_option_none`](macro@crate::assert_option_none) /// * [`debug_assert_option_none`](macro@crate::debug_assert_option_none) /// +#[deprecated(note = "Please rename from `debug_assert_option_none` to `debug_assert_none` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_option_none { ($($arg:tt)*) => { diff --git a/src/assert_option/assert_option_some.rs b/src/assert_option/assert_option_some.rs index 1be2757d0..f000ba81e 100644 --- a/src/assert_option/assert_option_some.rs +++ b/src/assert_option/assert_option_some.rs @@ -34,6 +34,7 @@ /// * [`assert_option_some_as_result`](macro@crate::assert_option_some_as_result) /// * [`debug_assert_option_some`](macro@crate::debug_assert_option_some) /// +#[deprecated(note = "Please rename from `assert_option_some_as_result` to `assert_some_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_option_some_as_result { ($option:expr $(,)?) => ({ @@ -47,6 +48,7 @@ macro_rules! assert_option_some_as_result { Err(format!( concat!( "assertion failed: `assert_option_some!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some.html\n", " option label: `{}`,\n", " option debug: `{:?}`", ), @@ -79,6 +81,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_option_some!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some.html\n", " option label: `a`,\n", " option debug: `None`", ) @@ -107,11 +110,13 @@ mod tests { /// assert_option_some!(a); /// # }); /// // assertion failed: `assert_option_some!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some.html /// // option label: `a`, /// // option debug: `None` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_option_some!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some.html\n", /// # " option label: `a`,\n", /// # " option debug: `None`", /// # ); @@ -125,6 +130,7 @@ mod tests { /// * [`assert_option_some_as_result`](macro@crate::assert_option_some_as_result) /// * [`debug_assert_option_some`](macro@crate::debug_assert_option_some) /// +#[deprecated(note = "Please rename from `assert_option_some` to `assert_some` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_option_some { ($option:expr $(,)?) => ({ @@ -169,11 +175,12 @@ macro_rules! assert_option_some { /// * [`assert_option_some`](macro@crate::assert_option_some) /// * [`debug_assert_option_some`](macro@crate::debug_assert_option_some) /// +#[deprecated(note = "Please rename from `debug_assert_option_some` to `debug_assert_some` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_option_some { - ($($optionrg:tt)*) => { + ($($arg:tt)*) => { if $crate::cfg!(debug_assertions) { - $crate::assert_option_some!($($optionrg)*); + $crate::assert_option_some!($($arg)*); } }; } diff --git a/src/assert_option/assert_option_some_eq.rs b/src/assert_option/assert_option_some_eq.rs index 73f0e5a6a..7a5395904 100644 --- a/src/assert_option/assert_option_some_eq.rs +++ b/src/assert_option/assert_option_some_eq.rs @@ -35,6 +35,7 @@ /// * [`assert_option_some_eq_as_result`](macro@crate::assert_option_some_eq_as_result) /// * [`debug_assert_option_some_eq`](macro@crate::debug_assert_option_some_eq) /// +#[deprecated(note = "Please rename from `assert_option_some_eq_as_result` to `assert_some_eq_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_option_some_eq_as_result { ($a:expr, $b:expr $(,)?) => ({ @@ -48,6 +49,7 @@ macro_rules! assert_option_some_eq_as_result { Err(format!( concat!( "assertion failed: `assert_option_some_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " a inner: `{:?}`,\n", @@ -68,6 +70,7 @@ macro_rules! assert_option_some_eq_as_result { Err(format!( concat!( "assertion failed: `assert_option_some_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -106,6 +109,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_option_some_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_eq.html\n", " a label: `a`,\n", " a debug: `Some(1)`,\n", " a inner: `1`,\n", @@ -126,6 +130,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_option_some_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_eq.html\n", " a label: `a`,\n", " a debug: `Some(1)`,\n", " b label: `b`,\n", @@ -159,6 +164,7 @@ mod tests { /// assert_option_some_eq!(a, b); /// # }); /// // assertion failed: `assert_option_some_eq!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_eq.html /// // a label: `a`, /// // a debug: `Some(1)`, /// // a inner: `1`, @@ -168,6 +174,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_option_some_eq!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_eq.html\n", /// # " a label: `a`,\n", /// # " a debug: `Some(1)`,\n", /// # " a inner: `1`,\n", @@ -185,6 +192,7 @@ mod tests { /// * [`assert_option_some_eq_as_result`](macro@crate::assert_option_some_eq_as_result) /// * [`debug_assert_option_some_eq`](macro@crate::debug_assert_option_some_eq) /// +#[deprecated(note = "Please rename from `assert_option_some_eq` to `assert_some_eq` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_option_some_eq { ($a:expr, $b:expr $(,)?) => ({ @@ -229,6 +237,7 @@ macro_rules! assert_option_some_eq { /// * [`assert_option_some_eq`](macro@crate::assert_option_some_eq) /// * [`debug_assert_option_some_eq`](macro@crate::debug_assert_option_some_eq) /// +#[deprecated(note = "Please rename from `debug_assert_option_some_eq` to `debug_assert_some_eq` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_option_some_eq { ($($arg:tt)*) => { diff --git a/src/assert_option/assert_option_some_ne.rs b/src/assert_option/assert_option_some_ne.rs index c14be1a63..89e4ec26f 100644 --- a/src/assert_option/assert_option_some_ne.rs +++ b/src/assert_option/assert_option_some_ne.rs @@ -35,6 +35,7 @@ /// * [`assert_option_some_ne_as_result`](macro@crate::assert_option_some_ne_as_result) /// * [`debug_assert_option_some_ne`](macro@crate::debug_assert_option_some_ne) /// +#[deprecated(note = "Please rename from `assert_option_some_ne_as_result` to `assert_some_ne_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_option_some_ne_as_result { ($a:expr, $b:expr $(,)?) => ({ @@ -48,6 +49,7 @@ macro_rules! assert_option_some_ne_as_result { Err(format!( concat!( "assertion failed: `assert_option_some_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " a inner: `{:?}`,\n", @@ -68,6 +70,7 @@ macro_rules! assert_option_some_ne_as_result { Err(format!( concat!( "assertion failed: `assert_option_some_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -106,6 +109,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_option_some_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_ne.html\n", " a label: `a`,\n", " a debug: `Some(1)`,\n", " a inner: `1`,\n", @@ -126,6 +130,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_option_some_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_ne.html\n", " a label: `a`,\n", " a debug: `Some(1)`,\n", " b label: `b`,\n", @@ -159,6 +164,7 @@ mod tests { /// assert_option_some_ne!(a, b); /// # }); /// // assertion failed: `assert_option_some_ne!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_ne.html /// // a label: `a`, /// // a debug: `Some(1)`, /// // b label: `b`, @@ -168,6 +174,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_option_some_ne!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_option_some_ne.html\n", /// # " a label: `a`,\n", /// # " a debug: `Some(1)`,\n", /// # " a inner: `1`,\n", @@ -185,6 +192,7 @@ mod tests { /// * [`assert_option_some_ne_as_result`](macro@crate::assert_option_some_ne_as_result) /// * [`debug_assert_option_some_ne`](macro@crate::debug_assert_option_some_ne) /// +#[deprecated(note = "Please rename from `assert_option_some_ne` to `assert_some_ne` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_option_some_ne { ($a:expr, $b:expr $(,)?) => ({ @@ -229,6 +237,7 @@ macro_rules! assert_option_some_ne { /// * [`assert_option_some_ne`](macro@crate::assert_option_some_ne) /// * [`debug_assert_option_some_ne`](macro@crate::debug_assert_option_some_ne) /// +#[deprecated(note = "Please rename from `debug_assert_option_some_ne` to `debug_assert_some_ne` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_option_some_ne { ($($arg:tt)*) => { diff --git a/src/assert_pending.rs b/src/assert_pending.rs new file mode 100644 index 000000000..3e45af732 --- /dev/null +++ b/src/assert_pending.rs @@ -0,0 +1,190 @@ +//! Assert an expression is Pending. +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! use std::task::Poll; +//! use std::task::Poll::*; +//! +//! # fn main() { +//! let a: Poll = Pending; +//! assert_pending!(a); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_pending`](macro@crate::assert_pending) +//! * [`assert_pending_as_result`](macro@crate::assert_pending_as_result) +//! * [`debug_assert_pending`](macro@crate::debug_assert_pending) + +/// Assert an expression.is_pending() is true. +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_pending`](macro.assert_pending.html), +/// except this macro returns a Result, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_pending`](macro@crate::assert_pending) +/// * [`assert_pending_as_result`](macro@crate::assert_pending_as_result) +/// * [`debug_assert_pending`](macro@crate::debug_assert_pending) +/// +#[macro_export] +macro_rules! assert_pending_as_result { + ($a:expr $(,)?) => ({ + match (&$a) { + a => { + match (a) { + Pending => { + Ok(()) + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_pending!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_pending.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`", + ), + stringify!($a), + a + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + use std::task::Poll; + use std::task::Poll::*; + + #[test] + fn test_assert_pending_as_result_x_success() { + let a: Poll = Pending; + let result = assert_pending_as_result!(a); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_pending_as_result_x_failure() { + let a: Poll = Ready(1); + let result = assert_pending_as_result!(a); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_pending!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_pending.html\n", + " a label: `a`,\n", + " a debug: `Ready(1)`" + ) + ); + } +} + +/// Assert an expression is Pending. +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// use std::task::Poll; +/// use std::task::Poll::*; +/// # fn main() { +/// let a: Poll = Pending; +/// assert_pending!(a); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Poll = Ready(1); +/// assert_pending!(a); +/// # }); +/// // assertion failed: `assert_pending!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_pending.html +/// // a label: `a`, +/// // a debug: `Ready(1)` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_pending!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_pending.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Ready(1)`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_pending`](macro@crate::assert_pending) +/// * [`assert_pending_as_result`](macro@crate::assert_pending_as_result) +/// * [`debug_assert_pending`](macro@crate::debug_assert_pending) +/// +#[macro_export] +macro_rules! assert_pending { + ($poll:expr $(,)?) => ({ + match assert_pending_as_result!($poll) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($poll:expr, $($message:tt)+) => ({ + match assert_pending_as_result!($poll) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert an expression is Pending. +/// +/// This macro provides the same statements as [`assert_pending`](macro.assert_pending.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_pending`](macro@crate::assert_pending) +/// * [`assert_pending`](macro@crate::assert_pending) +/// * [`debug_assert_pending`](macro@crate::debug_assert_pending) +/// +#[macro_export] +macro_rules! debug_assert_pending { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_pending!($($arg)*); + } + }; +} diff --git a/src/assert_poll/assert_poll_pending.rs b/src/assert_poll/assert_poll_pending.rs index 8e7579c5c..8f2ca9e6e 100644 --- a/src/assert_poll/assert_poll_pending.rs +++ b/src/assert_poll/assert_poll_pending.rs @@ -37,6 +37,7 @@ /// * [`assert_poll_pending_as_result`](macro@crate::assert_poll_pending_as_result) /// * [`debug_assert_poll_pending`](macro@crate::debug_assert_poll_pending) /// +#[deprecated(note = "Please rename from `assert_poll_pending_as_result` to `assert_pending_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_poll_pending_as_result { ($a:expr $(,)?) => ({ @@ -50,6 +51,7 @@ macro_rules! assert_poll_pending_as_result { Err(format!( concat!( "assertion failed: `assert_poll_pending!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_pending.html\n", " a label: `{}`,\n", " a debug: `{:?}`", ), @@ -84,6 +86,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_poll_pending!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_pending.html\n", " a label: `a`,\n", " a debug: `Ready(1)`" ) @@ -114,11 +117,13 @@ mod tests { /// assert_poll_pending!(a); /// # }); /// // assertion failed: `assert_poll_pending!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_pending.html /// // a label: `a`, /// // a debug: `Ready(1)` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_poll_pending!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_pending.html\n", /// # " a label: `a`,\n", /// # " a debug: `Ready(1)`", /// # ); @@ -132,6 +137,7 @@ mod tests { /// * [`assert_poll_pending_as_result`](macro@crate::assert_poll_pending_as_result) /// * [`debug_assert_poll_pending`](macro@crate::debug_assert_poll_pending) /// +#[deprecated(note = "Please rename from `assert_poll_pending` to `assert_pending` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_poll_pending { ($poll:expr $(,)?) => ({ @@ -176,6 +182,7 @@ macro_rules! assert_poll_pending { /// * [`assert_poll_pending`](macro@crate::assert_poll_pending) /// * [`debug_assert_poll_pending`](macro@crate::debug_assert_poll_pending) /// +#[deprecated(note = "Please rename from `debug_assert_poll_pending` to `debug_assert_pending` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_poll_pending { ($($arg:tt)*) => { diff --git a/src/assert_poll/assert_poll_ready.rs b/src/assert_poll/assert_poll_ready.rs index 13f4cef54..79339274f 100644 --- a/src/assert_poll/assert_poll_ready.rs +++ b/src/assert_poll/assert_poll_ready.rs @@ -37,6 +37,7 @@ /// * [`assert_poll_ready_as_result`](macro@crate::assert_poll_ready_as_result) /// * [`debug_assert_poll_ready`](macro@crate::debug_assert_poll_ready) /// +#[deprecated(note = "Please rename from `assert_poll_ready_as_result` to `assert_ready_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_poll_ready_as_result { ($a:expr $(,)?) => ({ @@ -50,6 +51,7 @@ macro_rules! assert_poll_ready_as_result { Err(format!( concat!( "assertion failed: `assert_poll_ready!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready.html\n", " a label: `{}`,\n", " a debug: `{:?}`", ), @@ -84,6 +86,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_poll_ready!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready.html\n", " a label: `a`,\n", " a debug: `Pending`", ) @@ -114,11 +117,13 @@ mod tests { /// assert_poll_ready!(a); /// # }); /// // assertion failed: `assert_poll_ready!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready.html /// // a label: `a`, /// // a debug: `Pending` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_poll_ready!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready.html\n", /// # " a label: `a`,\n", /// # " a debug: `Pending`", /// # ); @@ -132,6 +137,7 @@ mod tests { /// * [`assert_poll_ready_as_result`](macro@crate::assert_poll_ready_as_result) /// * [`debug_assert_poll_ready`](macro@crate::debug_assert_poll_ready) /// +#[deprecated(note = "Please rename from `assert_poll_ready` to `assert_ready` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_poll_ready { ($poll:expr $(,)?) => ({ @@ -176,6 +182,7 @@ macro_rules! assert_poll_ready { /// * [`assert_poll_ready`](macro@crate::assert_poll_ready) /// * [`debug_assert_poll_ready`](macro@crate::debug_assert_poll_ready) /// +#[deprecated(note = "Please rename from `debug_assert_poll_ready` to `debug_assert_ready` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_poll_ready { ($($arg:tt)*) => { diff --git a/src/assert_poll/assert_poll_ready_eq.rs b/src/assert_poll/assert_poll_ready_eq.rs index 38f01d68e..93efd14aa 100644 --- a/src/assert_poll/assert_poll_ready_eq.rs +++ b/src/assert_poll/assert_poll_ready_eq.rs @@ -37,6 +37,7 @@ /// * [`assert_poll_ready_eq_as_result`](macro@crate::assert_poll_ready_eq_as_result) /// * [`debug_assert_poll_ready_eq`](macro@crate::debug_assert_poll_ready_eq) /// +#[deprecated(note = "Please rename from `assert_poll_ready_eq_as_result` to `assert_ready_eq_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_poll_ready_eq_as_result { ($a:expr, $b:expr $(,)?) => ({ @@ -50,6 +51,7 @@ macro_rules! assert_poll_ready_eq_as_result { Err(format!( concat!( "assertion failed: `assert_poll_ready_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " a inner: `{:?}`,\n", @@ -70,6 +72,7 @@ macro_rules! assert_poll_ready_eq_as_result { Err(format!( concat!( "assertion failed: `assert_poll_ready_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -110,6 +113,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_poll_ready_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_eq.html\n", " a label: `a`,\n", " a debug: `Ready(1)`,\n", " a inner: `1`,\n", @@ -130,6 +134,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_poll_ready_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_eq.html\n", " a label: `a`,\n", " a debug: `Ready(1)`,\n", " b label: `b`,\n", @@ -165,6 +170,7 @@ mod tests { /// assert_poll_ready_eq!(a, b); /// # }); /// // assertion failed: `assert_poll_ready_eq!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_eq.html /// // a label: `a`, /// // a debug: `Ready(1)`, /// // a inner: `1`, @@ -174,6 +180,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_poll_ready_eq!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_eq.html\n", /// # " a label: `a`,\n", /// # " a debug: `Ready(1)`,\n", /// # " a inner: `1`,\n", @@ -191,6 +198,7 @@ mod tests { /// * [`assert_poll_ready_eq_as_result`](macro@crate::assert_poll_ready_eq_as_result) /// * [`debug_assert_poll_ready_eq`](macro@crate::debug_assert_poll_ready_eq) /// +#[deprecated(note = "Please rename from `assert_poll_ready_eq` to `assert_ready_eq` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_poll_ready_eq { ($a:expr, $b:expr $(,)?) => ({ @@ -235,6 +243,7 @@ macro_rules! assert_poll_ready_eq { /// * [`assert_poll_ready_eq`](macro@crate::assert_poll_ready_eq) /// * [`debug_assert_poll_ready_eq`](macro@crate::debug_assert_poll_ready_eq) /// +#[deprecated(note = "Please rename from `debug_assert_poll_ready_eq` to `debug_assert_ready_eq` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_poll_ready_eq { ($($arg:tt)*) => { diff --git a/src/assert_poll/assert_poll_ready_ne.rs b/src/assert_poll/assert_poll_ready_ne.rs index 5b0de16c0..2bad9c669 100644 --- a/src/assert_poll/assert_poll_ready_ne.rs +++ b/src/assert_poll/assert_poll_ready_ne.rs @@ -37,6 +37,7 @@ /// * [`assert_poll_ready_ne_as_result`](macro@crate::assert_poll_ready_ne_as_result) /// * [`debug_assert_poll_ready_ne`](macro@crate::debug_assert_poll_ready_ne) /// +#[deprecated(note = "Please rename from `assert_poll_ready_ne_as_result` to `assert_ready_ne_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_poll_ready_ne_as_result { ($a:expr, $b:expr $(,)?) => ({ @@ -50,6 +51,7 @@ macro_rules! assert_poll_ready_ne_as_result { Err(format!( concat!( "assertion failed: `assert_poll_ready_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " a inner: `{:?}`,\n", @@ -70,6 +72,7 @@ macro_rules! assert_poll_ready_ne_as_result { Err(format!( concat!( "assertion failed: `assert_poll_ready_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -110,6 +113,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_poll_ready_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_ne.html\n", " a label: `a`,\n", " a debug: `Ready(1)`,\n", " a inner: `1`,\n", @@ -130,6 +134,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_poll_ready_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_ne.html\n", " a label: `a`,\n", " a debug: `Ready(1)`,\n", " b label: `b`,\n", @@ -165,6 +170,7 @@ mod tests { /// assert_poll_ready_ne!(a, b); /// # }); /// // assertion failed: `assert_poll_ready_ne!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_ne.html /// // a label: `a`, /// // a debug: `Ready(1)`, /// // a inner: `1`, @@ -174,6 +180,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_poll_ready_ne!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_poll_ready_ne.html\n", /// # " a label: `a`,\n", /// # " a debug: `Ready(1)`,\n", /// # " a inner: `1`,\n", @@ -191,6 +198,7 @@ mod tests { /// * [`assert_poll_ready_ne_as_result`](macro@crate::assert_poll_ready_ne_as_result) /// * [`debug_assert_poll_ready_ne`](macro@crate::debug_assert_poll_ready_ne) /// +#[deprecated(note = "Please rename from `assert_poll_ready_ne` to `assert_ready_ne` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_poll_ready_ne { ($a:expr, $b:expr $(,)?) => ({ diff --git a/src/assert_program_args/assert_program_args_stderr_contains.rs b/src/assert_program_args/assert_program_args_stderr_contains.rs index 766ce8f8a..b777cd8b9 100644 --- a/src/assert_program_args/assert_program_args_stderr_contains.rs +++ b/src/assert_program_args/assert_program_args_stderr_contains.rs @@ -51,6 +51,7 @@ macro_rules! assert_program_args_stderr_contains_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_contains!(a_program, a_args, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_contains.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -75,6 +76,7 @@ macro_rules! assert_program_args_stderr_contains_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_contains!(a_program, a_args, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_contains.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -121,6 +123,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_contains!(a_program, a_args, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_contains.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -165,6 +168,7 @@ mod tests { /// assert_program_args_stderr_contains!(&program, &args, &containee); /// # }); /// // assertion failed: `assert_program_args_stderr_contains!(a_program, a_args, containee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_contains.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&args`, @@ -176,6 +180,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_contains!(a_program, a_args, containee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_contains.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_eq.rs b/src/assert_program_args/assert_program_args_stderr_eq.rs index 67bde9eb2..7b454579a 100644 --- a/src/assert_program_args/assert_program_args_stderr_eq.rs +++ b/src/assert_program_args/assert_program_args_stderr_eq.rs @@ -48,6 +48,7 @@ macro_rules! assert_program_args_stderr_eq_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_eq!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -79,6 +80,7 @@ macro_rules! assert_program_args_stderr_eq_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_eq!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -131,6 +133,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_eq!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -174,6 +177,7 @@ mod tests { /// assert_program_args_stderr_eq!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stderr_eq!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&a_args`, @@ -187,6 +191,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_eq!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_eq_expr.rs b/src/assert_program_args/assert_program_args_stderr_eq_expr.rs index 591045292..738add74a 100644 --- a/src/assert_program_args/assert_program_args_stderr_eq_expr.rs +++ b/src/assert_program_args/assert_program_args_stderr_eq_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stderr_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_eq_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stderr_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_eq_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_eq_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -154,6 +157,7 @@ mod tests { /// assert_program_args_stderr_eq_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stderr_eq_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&args`, @@ -165,6 +169,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_eq_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_eq_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_ge.rs b/src/assert_program_args/assert_program_args_stderr_ge.rs index 76617f4ee..80f3111a9 100644 --- a/src/assert_program_args/assert_program_args_stderr_ge.rs +++ b/src/assert_program_args/assert_program_args_stderr_ge.rs @@ -48,6 +48,7 @@ macro_rules! assert_program_args_stderr_ge_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_ge!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -79,6 +80,7 @@ macro_rules! assert_program_args_stderr_ge_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_ge!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -141,6 +143,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_ge!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -184,6 +187,7 @@ mod tests { /// assert_program_args_stderr_ge!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stderr_ge!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&a_args`, @@ -197,6 +201,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_ge!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_ge_expr.rs b/src/assert_program_args/assert_program_args_stderr_ge_expr.rs index e7f97fa89..9d8348dc6 100644 --- a/src/assert_program_args/assert_program_args_stderr_ge_expr.rs +++ b/src/assert_program_args/assert_program_args_stderr_ge_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stderr_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_ge_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stderr_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_ge_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_ge_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -161,6 +164,7 @@ mod tests { /// assert_program_args_stderr_ge_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stderr_ge_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&args`, @@ -172,6 +176,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_ge_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ge_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_gt.rs b/src/assert_program_args/assert_program_args_stderr_gt.rs index 16a014701..5c76a3014 100644 --- a/src/assert_program_args/assert_program_args_stderr_gt.rs +++ b/src/assert_program_args/assert_program_args_stderr_gt.rs @@ -48,6 +48,7 @@ macro_rules! assert_program_args_stderr_gt_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_gt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -79,6 +80,7 @@ macro_rules! assert_program_args_stderr_gt_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_gt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -131,6 +133,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_gt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -174,6 +177,7 @@ mod tests { /// assert_program_args_stderr_gt!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stderr_gt!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&a_args`, @@ -187,6 +191,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_gt!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_gt_expr.rs b/src/assert_program_args/assert_program_args_stderr_gt_expr.rs index 06e62c1d8..6affb2cf6 100644 --- a/src/assert_program_args/assert_program_args_stderr_gt_expr.rs +++ b/src/assert_program_args/assert_program_args_stderr_gt_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stderr_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_gt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stderr_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_gt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_gt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -154,6 +157,7 @@ mod tests { /// assert_program_args_stderr_gt_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stderr_gt_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&args`, @@ -165,6 +169,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_gt_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_gt_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_is_match.rs b/src/assert_program_args/assert_program_args_stderr_is_match.rs index fa0c98ef4..fe58dfd3b 100644 --- a/src/assert_program_args/assert_program_args_stderr_is_match.rs +++ b/src/assert_program_args/assert_program_args_stderr_is_match.rs @@ -48,6 +48,7 @@ macro_rules! assert_program_args_stderr_is_match_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_is_match!(a_program, b_matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_is_match.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -72,6 +73,7 @@ macro_rules! assert_program_args_stderr_is_match_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_is_match!(a_program, b_matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_is_match.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -120,6 +122,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_is_match!(a_program, b_matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_is_match.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -160,6 +163,7 @@ mod tests { /// assert_program_args_stderr_is_match!(&program, &args, &matcher); /// # }); /// // assertion failed: `assert_program_args_stderr_is_match!(a_program, b_matcher)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_is_match.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&args`, @@ -171,6 +175,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_is_match!(a_program, b_matcher)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_is_match.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_le.rs b/src/assert_program_args/assert_program_args_stderr_le.rs index c61731451..9ab48e16a 100644 --- a/src/assert_program_args/assert_program_args_stderr_le.rs +++ b/src/assert_program_args/assert_program_args_stderr_le.rs @@ -48,6 +48,7 @@ macro_rules! assert_program_args_stderr_le_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_le!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -79,6 +80,7 @@ macro_rules! assert_program_args_stderr_le_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_le!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -131,6 +133,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_le!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -174,6 +177,7 @@ mod tests { /// assert_program_args_stderr_le!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stderr_le!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&a_args`, @@ -187,6 +191,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_le!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_le_expr.rs b/src/assert_program_args/assert_program_args_stderr_le_expr.rs index 796bbd4eb..e26291f46 100644 --- a/src/assert_program_args/assert_program_args_stderr_le_expr.rs +++ b/src/assert_program_args/assert_program_args_stderr_le_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stderr_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_le_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stderr_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_le_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_le_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -154,6 +157,7 @@ mod tests { /// assert_program_args_stderr_le_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stderr_le_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&args`, @@ -165,6 +169,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_le_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_le_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_lt.rs b/src/assert_program_args/assert_program_args_stderr_lt.rs index 00c7881d2..925a4600e 100644 --- a/src/assert_program_args/assert_program_args_stderr_lt.rs +++ b/src/assert_program_args/assert_program_args_stderr_lt.rs @@ -48,6 +48,7 @@ macro_rules! assert_program_args_stderr_lt_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_lt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -79,6 +80,7 @@ macro_rules! assert_program_args_stderr_lt_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_lt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -131,6 +133,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_lt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -174,6 +177,7 @@ mod tests { /// assert_program_args_stderr_lt!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stderr_lt!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&a_args`, @@ -187,6 +191,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_lt!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_lt_expr.rs b/src/assert_program_args/assert_program_args_stderr_lt_expr.rs index e3dbe8a0d..ca6def0f3 100644 --- a/src/assert_program_args/assert_program_args_stderr_lt_expr.rs +++ b/src/assert_program_args/assert_program_args_stderr_lt_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stderr_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_lt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stderr_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_lt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_lt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -154,6 +157,7 @@ mod tests { /// assert_program_args_stderr_lt_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stderr_lt_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&args`, @@ -165,6 +169,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_lt_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_lt_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_ne.rs b/src/assert_program_args/assert_program_args_stderr_ne.rs index 65e1ffc49..097ef814d 100644 --- a/src/assert_program_args/assert_program_args_stderr_ne.rs +++ b/src/assert_program_args/assert_program_args_stderr_ne.rs @@ -48,6 +48,7 @@ macro_rules! assert_program_args_stderr_ne_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_ne!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -79,6 +80,7 @@ macro_rules! assert_program_args_stderr_ne_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_ne!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -131,6 +133,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_ne!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -174,6 +177,7 @@ mod tests { /// assert_program_args_stderr_ne!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stderr_ne!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&a_args`, @@ -187,6 +191,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_ne!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stderr_ne_expr.rs b/src/assert_program_args/assert_program_args_stderr_ne_expr.rs index 6e547c27e..66f510057 100644 --- a/src/assert_program_args/assert_program_args_stderr_ne_expr.rs +++ b/src/assert_program_args/assert_program_args_stderr_ne_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stderr_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_ne_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stderr_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stderr_ne_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stderr_ne_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stderr\"`,\n", " a_args label: `&a_args`,\n", @@ -154,6 +157,7 @@ mod tests { /// assert_program_args_stderr_ne_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stderr_ne_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stderr\"`, /// // a_args label: `&args`, @@ -165,6 +169,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stderr_ne_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stderr_ne_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stderr\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_contains.rs b/src/assert_program_args/assert_program_args_stdout_contains.rs index fd189d623..8752d40da 100644 --- a/src/assert_program_args/assert_program_args_stdout_contains.rs +++ b/src/assert_program_args/assert_program_args_stdout_contains.rs @@ -51,6 +51,7 @@ macro_rules! assert_program_args_stdout_contains_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_contains!(a_program, a_args, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_contains.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -75,6 +76,7 @@ macro_rules! assert_program_args_stdout_contains_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_contains!(a_program, a_args, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_contains.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -121,6 +123,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_contains!(a_program, a_args, containee)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_contains.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -165,6 +168,7 @@ mod tests { /// assert_program_args_stdout_contains!(&program, &args, &containee); /// # }); /// // assertion failed: `assert_program_args_stdout_contains!(a_program, a_args, containee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_contains.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&args`, @@ -176,6 +180,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_contains!(a_program, a_args, containee)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_contains.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_eq.rs b/src/assert_program_args/assert_program_args_stdout_eq.rs index 62e282a79..2c6fb9f62 100644 --- a/src/assert_program_args/assert_program_args_stdout_eq.rs +++ b/src/assert_program_args/assert_program_args_stdout_eq.rs @@ -49,6 +49,7 @@ macro_rules! assert_program_args_stdout_eq_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_eq!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -80,6 +81,7 @@ macro_rules! assert_program_args_stdout_eq_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_eq!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -132,6 +134,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_eq!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -175,6 +178,7 @@ mod tests { /// assert_program_args_stdout_eq!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stdout_eq!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&a_args`, @@ -188,6 +192,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_eq!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_eq_expr.rs b/src/assert_program_args/assert_program_args_stdout_eq_expr.rs index 4abe84002..3a5b97471 100644 --- a/src/assert_program_args/assert_program_args_stdout_eq_expr.rs +++ b/src/assert_program_args/assert_program_args_stdout_eq_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stdout_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_eq_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stdout_eq_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_eq_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_eq_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -155,6 +158,7 @@ mod tests { /// assert_program_args_stdout_eq_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stdout_eq_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&args`, @@ -166,6 +170,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_eq_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_eq_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_ge.rs b/src/assert_program_args/assert_program_args_stdout_ge.rs index 5ca34022e..275d69d49 100644 --- a/src/assert_program_args/assert_program_args_stdout_ge.rs +++ b/src/assert_program_args/assert_program_args_stdout_ge.rs @@ -49,6 +49,7 @@ macro_rules! assert_program_args_stdout_ge_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_ge!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -80,6 +81,7 @@ macro_rules! assert_program_args_stdout_ge_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_ge!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -142,6 +144,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_ge!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -185,6 +188,7 @@ mod tests { /// assert_program_args_stdout_ge!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stdout_ge!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&a_args`, @@ -198,6 +202,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_ge!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_ge_expr.rs b/src/assert_program_args/assert_program_args_stdout_ge_expr.rs index 67c0deff4..f0e9f6c7f 100644 --- a/src/assert_program_args/assert_program_args_stdout_ge_expr.rs +++ b/src/assert_program_args/assert_program_args_stdout_ge_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stdout_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_ge_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stdout_ge_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_ge_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -125,6 +127,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_ge_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -164,6 +167,7 @@ mod tests { /// assert_program_args_stdout_ge_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stdout_ge_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&args`, @@ -175,6 +179,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_ge_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ge_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_gt.rs b/src/assert_program_args/assert_program_args_stdout_gt.rs index 196626442..4ef85ba32 100644 --- a/src/assert_program_args/assert_program_args_stdout_gt.rs +++ b/src/assert_program_args/assert_program_args_stdout_gt.rs @@ -49,6 +49,7 @@ macro_rules! assert_program_args_stdout_gt_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_gt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -80,6 +81,7 @@ macro_rules! assert_program_args_stdout_gt_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_gt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -132,6 +134,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_gt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -175,6 +178,7 @@ mod tests { /// assert_program_args_stdout_gt!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stdout_gt!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&a_args`, @@ -188,6 +192,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_gt!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_gt_expr.rs b/src/assert_program_args/assert_program_args_stdout_gt_expr.rs index 921d31e87..cd18f39cf 100644 --- a/src/assert_program_args/assert_program_args_stdout_gt_expr.rs +++ b/src/assert_program_args/assert_program_args_stdout_gt_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stdout_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_gt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stdout_gt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_gt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_gt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -155,6 +158,7 @@ mod tests { /// assert_program_args_stdout_gt_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stdout_gt_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&args`, @@ -166,6 +170,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_gt_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_gt_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_is_match.rs b/src/assert_program_args/assert_program_args_stdout_is_match.rs index d6b69888b..9f6b1bf2b 100644 --- a/src/assert_program_args/assert_program_args_stdout_is_match.rs +++ b/src/assert_program_args/assert_program_args_stdout_is_match.rs @@ -48,6 +48,7 @@ macro_rules! assert_program_args_stdout_is_match_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_is_match!(a_program, b_matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_is_match.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -72,6 +73,7 @@ macro_rules! assert_program_args_stdout_is_match_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_is_match!(a_program, b_matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_is_match.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -120,6 +122,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_is_match!(a_program, b_matcher)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_is_match.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -160,6 +163,7 @@ mod tests { /// assert_program_args_stdout_is_match!(&program, &args, &matcher); /// # }); /// // assertion failed: `assert_program_args_stdout_is_match!(a_program, b_matcher)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_is_match.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&args`, @@ -171,6 +175,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_is_match!(a_program, b_matcher)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_is_match.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_le.rs b/src/assert_program_args/assert_program_args_stdout_le.rs index 78715a7f2..7fe328e0f 100644 --- a/src/assert_program_args/assert_program_args_stdout_le.rs +++ b/src/assert_program_args/assert_program_args_stdout_le.rs @@ -49,6 +49,7 @@ macro_rules! assert_program_args_stdout_le_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_le!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -80,6 +81,7 @@ macro_rules! assert_program_args_stdout_le_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_le!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -142,6 +144,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_le!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -185,6 +188,7 @@ mod tests { /// assert_program_args_stdout_le!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stdout_le!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&a_args`, @@ -198,6 +202,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_le!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_le_expr.rs b/src/assert_program_args/assert_program_args_stdout_le_expr.rs index c81280538..3615e1be8 100644 --- a/src/assert_program_args/assert_program_args_stdout_le_expr.rs +++ b/src/assert_program_args/assert_program_args_stdout_le_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stdout_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_le_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stdout_le_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_le_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -125,6 +127,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_le_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -164,6 +167,7 @@ mod tests { /// assert_program_args_stdout_le_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stdout_le_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&args`, @@ -175,6 +179,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_le_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_le_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_lt.rs b/src/assert_program_args/assert_program_args_stdout_lt.rs index 7cc411800..81cfee9c6 100644 --- a/src/assert_program_args/assert_program_args_stdout_lt.rs +++ b/src/assert_program_args/assert_program_args_stdout_lt.rs @@ -49,6 +49,7 @@ macro_rules! assert_program_args_stdout_lt_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_lt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -80,6 +81,7 @@ macro_rules! assert_program_args_stdout_lt_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_lt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -132,6 +134,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_lt!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -175,6 +178,7 @@ mod tests { /// assert_program_args_stdout_lt!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stdout_lt!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&a_args`, @@ -188,6 +192,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_lt!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_lt_expr.rs b/src/assert_program_args/assert_program_args_stdout_lt_expr.rs index 8d86f26b7..728c607a0 100644 --- a/src/assert_program_args/assert_program_args_stdout_lt_expr.rs +++ b/src/assert_program_args/assert_program_args_stdout_lt_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stdout_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_lt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stdout_lt_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_lt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_lt_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -155,6 +158,7 @@ mod tests { /// assert_program_args_stdout_lt_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stdout_lt_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&args`, @@ -166,6 +170,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_lt_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_lt_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_ne.rs b/src/assert_program_args/assert_program_args_stdout_ne.rs index d36db4709..97e961484 100644 --- a/src/assert_program_args/assert_program_args_stdout_ne.rs +++ b/src/assert_program_args/assert_program_args_stdout_ne.rs @@ -49,6 +49,7 @@ macro_rules! assert_program_args_stdout_ne_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_ne!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -80,6 +81,7 @@ macro_rules! assert_program_args_stdout_ne_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_ne!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -132,6 +134,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_ne!(a_program, a_args, b_program, b_args)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -175,6 +178,7 @@ mod tests { /// assert_program_args_stdout_ne!(&a_program, &a_args, &b_program, &b_args); /// # }); /// // assertion failed: `assert_program_args_stdout_ne!(a_program, a_args, b_program, b_args)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne.html /// // a_program label: `&a_program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&a_args`, @@ -188,6 +192,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_ne!(a_program, a_args, b_program, b_args)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne.html\n", /// # " a_program label: `&a_program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&a_args`,\n", diff --git a/src/assert_program_args/assert_program_args_stdout_ne_expr.rs b/src/assert_program_args/assert_program_args_stdout_ne_expr.rs index b7004e7cd..df558197f 100644 --- a/src/assert_program_args/assert_program_args_stdout_ne_expr.rs +++ b/src/assert_program_args/assert_program_args_stdout_ne_expr.rs @@ -46,6 +46,7 @@ macro_rules! assert_program_args_stdout_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_ne_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -70,6 +71,7 @@ macro_rules! assert_program_args_stdout_ne_expr_as_result { Err(format!( concat!( "assertion failed: `assert_program_args_stdout_ne_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne_expr.html\n", " a_program label: `{}`,\n", " a_program debug: `{:?}`,\n", " a_args label: `{}`,\n", @@ -116,6 +118,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_program_args_stdout_ne_expr!(a_program, a_args, b_expr)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne_expr.html\n", " a_program label: `&a_program`,\n", " a_program debug: `\"bin/printf-stdout\"`,\n", " a_args label: `&a_args`,\n", @@ -155,6 +158,7 @@ mod tests { /// assert_program_args_stdout_ne_expr!(&program, &args, s); /// # }); /// // assertion failed: `assert_program_args_stdout_ne_expr!(a_program, a_args, b_expr)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne_expr.html /// // a_program label: `&program`, /// // a_program debug: `\"bin/printf-stdout\"`, /// // a_args label: `&args`, @@ -166,6 +170,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_program_args_stdout_ne_expr!(a_program, a_args, b_expr)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_program_args_stdout_ne_expr.html\n", /// # " a_program label: `&program`,\n", /// # " a_program debug: `\"bin/printf-stdout\"`,\n", /// # " a_args label: `&args`,\n", diff --git a/src/assert_ready.rs b/src/assert_ready.rs new file mode 100644 index 000000000..22b53368b --- /dev/null +++ b/src/assert_ready.rs @@ -0,0 +1,190 @@ +//! Assert an expression is Ready(_). +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! use std::task::Poll; +//! use std::task::Poll::*; +//! +//! # fn main() { +//! let a: Poll = Ready(1); +//! assert_ready!(a); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_ready`](macro@crate::assert_ready) +//! * [`assert_ready_as_result`](macro@crate::assert_ready_as_result) +//! * [`debug_assert_ready`](macro@crate::debug_assert_ready) + +/// Assert an expression is Ready(_). +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_ready`](macro.assert_ready.html), +/// except this macro returns a Result, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_ready`](macro@crate::assert_ready) +/// * [`assert_ready_as_result`](macro@crate::assert_ready_as_result) +/// * [`debug_assert_ready`](macro@crate::debug_assert_ready) +/// +#[macro_export] +macro_rules! assert_ready_as_result { + ($a:expr $(,)?) => ({ + match (&$a) { + a => { + match (a) { + Ready(_) => { + Ok(()) + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_ready!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`", + ), + stringify!($a), + a, + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + use std::task::Poll; + use std::task::Poll::*; + + #[test] + fn test_assert_ready_as_result_x_success() { + let a: Poll = Ready(1); + let result = assert_ready_as_result!(a); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_ready_as_result_x_failure() { + let a: Poll = Pending; + let result = assert_ready_as_result!(a); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ready!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready.html\n", + " a label: `a`,\n", + " a debug: `Pending`", + ) + ); + } +} + +/// Assert an expression is Ready(_). +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// use std::task::Poll; +/// use std::task::Poll::*; +/// # fn main() { +/// let a: Poll = Ready(1); +/// assert_ready!(a); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Poll = Pending; +/// assert_ready!(a); +/// # }); +/// // assertion failed: `assert_ready!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready.html +/// // a label: `a`, +/// // a debug: `Pending` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_ready!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Pending`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_ready`](macro@crate::assert_ready) +/// * [`assert_ready_as_result`](macro@crate::assert_ready_as_result) +/// * [`debug_assert_ready`](macro@crate::debug_assert_ready) +/// +#[macro_export] +macro_rules! assert_ready { + ($poll:expr $(,)?) => ({ + match assert_ready_as_result!($poll) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($poll:expr, $($message:tt)+) => ({ + match assert_ready_as_result!($poll) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert poll.is_ready() is true. +/// +/// This macro provides the same statements as [`assert_ready`](macro.assert_ready.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_ready`](macro@crate::assert_ready) +/// * [`assert_ready`](macro@crate::assert_ready) +/// * [`debug_assert_ready`](macro@crate::debug_assert_ready) +/// +#[macro_export] +macro_rules! debug_assert_ready { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_ready!($($arg)*); + } + }; +} diff --git a/src/assert_ready_eq.rs b/src/assert_ready_eq.rs new file mode 100644 index 000000000..c6527eae5 --- /dev/null +++ b/src/assert_ready_eq.rs @@ -0,0 +1,251 @@ +//! Assert two expressions are Ready(_) and their values are equal. +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! use std::task::Poll; +//! use std::task::Poll::*; +//! # fn main() { +//! let a: Poll = Ready(1); +//! let b: Poll = Ready(1); +//! assert_ready_eq!(a, b); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_ready_eq`](macro@crate::assert_ready_eq) +//! * [`assert_ready_eq_as_result`](macro@crate::assert_ready_eq_as_result) +//! * [`debug_assert_ready_eq`](macro@crate::debug_assert_ready_eq) + +/// Assert two expressions are Ready(_) and their values are equal. +/// +/// * If true, return Result `Some(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_ready_eq`](macro.assert_ready_eq.html), +/// except this macro returns a Option, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_ready_eq`](macro@crate::assert_ready_eq) +/// * [`assert_ready_eq_as_result`](macro@crate::assert_ready_eq_as_result) +/// * [`debug_assert_ready_eq`](macro@crate::debug_assert_ready_eq) +/// +#[macro_export] +macro_rules! assert_ready_eq_as_result { + ($a:expr, $b:expr $(,)?) => ({ + match (&$a, &$b) { + (a, b) => { + match (a, b) { + (Ready(a_inner), Ready(b_inner)) => { + if a_inner == b_inner { + Ok(()) + } else { + Err(format!( + concat!( + "assertion failed: `assert_ready_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_eq.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " a inner: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`,\n", + " b inner: `{:?}`" + ), + stringify!($a), + a, + a_inner, + stringify!($b), + b, + b_inner + )) + } + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_ready_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_eq.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`", + ), + stringify!($a), + a, + stringify!($b), + $b + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + use std::task::Poll; + use std::task::Poll::*; + + #[test] + fn test_assert_ready_eq_as_result_x_success() { + let a: Poll = Ready(1); + let b: Poll = Ready(1); + let result = assert_ready_eq_as_result!(a, b); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_ready_eq_as_result_x_failure_because_ne() { + let a: Poll = Ready(1); + let b: Poll = Ready(2); + let result = assert_ready_eq_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ready_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_eq.html\n", + " a label: `a`,\n", + " a debug: `Ready(1)`,\n", + " a inner: `1`,\n", + " b label: `b`,\n", + " b debug: `Ready(2)`,\n", + " b inner: `2`", + ) + ); + } + + #[test] + fn test_assert_ready_eq_as_result_x_failure_because_not_ready() { + let a: Poll = Ready(1); + let b: Poll = Pending; + let result = assert_ready_eq_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ready_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_eq.html\n", + " a label: `a`,\n", + " a debug: `Ready(1)`,\n", + " b label: `b`,\n", + " b debug: `Pending`", + ) + ); + } + +} + +/// Assert two expressions are Ready(_) and their values are equal. +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// use std::task::Poll; +/// use std::task::Poll::*; +/// # fn main() { +/// let a: Poll = Ready(1); +/// let b: Poll = Ready(1); +/// assert_ready_eq!(a, b); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Poll = Ready(1); +/// let b: Poll = Ready(2); +/// assert_ready_eq!(a, b); +/// # }); +/// // assertion failed: `assert_ready_eq!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_eq.html +/// // a label: `a`, +/// // a debug: `Ready(1)`, +/// // a inner: `1`, +/// // b label: `b`, +/// // b debug: `Ready(2)`, +/// // b inner: `2` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_ready_eq!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_eq.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Ready(1)`,\n", +/// # " a inner: `1`,\n", +/// # " b label: `b`,\n", +/// # " b debug: `Ready(2)`,\n", +/// # " b inner: `2`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_ready_eq`](macro@crate::assert_ready_eq) +/// * [`assert_ready_eq_as_result`](macro@crate::assert_ready_eq_as_result) +/// * [`debug_assert_ready_eq`](macro@crate::debug_assert_ready_eq) +/// +#[macro_export] +macro_rules! assert_ready_eq { + ($a:expr, $b:expr $(,)?) => ({ + match assert_ready_eq_as_result!($a, $b) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($a:expr, $b:expr, $($message:tt)+) => ({ + match assert_ready_eq_as_result!($a, $b) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert two expressions are Ready(_) and their values are equal. +/// +/// This macro provides the same statements as [`assert_ready_eq`](macro.assert_ready_eq.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_ready_eq`](macro@crate::assert_ready_eq) +/// * [`assert_ready_eq`](macro@crate::assert_ready_eq) +/// * [`debug_assert_ready_eq`](macro@crate::debug_assert_ready_eq) +/// +#[macro_export] +macro_rules! debug_assert_ready_eq { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_ready_eq!($($arg)*); + } + }; +} diff --git a/src/assert_ready_ne.rs b/src/assert_ready_ne.rs new file mode 100644 index 000000000..1a708d6af --- /dev/null +++ b/src/assert_ready_ne.rs @@ -0,0 +1,251 @@ +//! Assert two expressions are Ready(_) and their values are not equal. +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! use std::task::Poll; +//! use std::task::Poll::*; +//! # fn main() { +//! let a: Poll = Ready(1); +//! let b: Poll = Ready(2); +//! assert_ready_ne!(a, b); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_ready_ne`](macro@crate::assert_ready_ne) +//! * [`assert_ready_ne_as_result`](macro@crate::assert_ready_ne_as_result) +//! * [`debug_assert_ready_ne`](macro@crate::debug_assert_ready_ne) + +/// Assert two expressions are Ready(_) and their values are not equal. +/// +/// * If true, return Result `Some(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_ready_ne`](macro.assert_ready_ne.html), +/// except this macro returns a Option, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_ready_ne`](macro@crate::assert_ready_ne) +/// * [`assert_ready_ne_as_result`](macro@crate::assert_ready_ne_as_result) +/// * [`debug_assert_ready_ne`](macro@crate::debug_assert_ready_ne) +/// +#[macro_export] +macro_rules! assert_ready_ne_as_result { + ($a:expr, $b:expr $(,)?) => ({ + match (&$a, &$b) { + (a, b) => { + match (a, b) { + (Ready(a_inner), Ready(b_inner)) => { + if a_inner != b_inner { + Ok(()) + } else { + Err(format!( + concat!( + "assertion failed: `assert_ready_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_ne.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " a inner: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`,\n", + " b inner: `{:?}`" + ), + stringify!($a), + a, + a_inner, + stringify!($b), + b, + b_inner + )) + } + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_ready_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_ne.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`", + ), + stringify!($a), + a, + stringify!($b), + $b + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + use std::task::Poll; + use std::task::Poll::*; + + #[test] + fn test_assert_ready_ne_as_result_x_success() { + let a: Poll = Ready(1); + let b: Poll = Ready(2); + let result = assert_ready_ne_as_result!(a, b); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_ready_ne_as_result_x_failure_because_ne() { + let a: Poll = Ready(1); + let b: Poll = Ready(1); + let result = assert_ready_ne_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ready_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_ne.html\n", + " a label: `a`,\n", + " a debug: `Ready(1)`,\n", + " a inner: `1`,\n", + " b label: `b`,\n", + " b debug: `Ready(1)`,\n", + " b inner: `1`", + ) + ); + } + + #[test] + fn test_assert_ready_ne_as_result_x_failure_because_not_ready() { + let a: Poll = Ready(1); + let b: Poll = Pending; + let result = assert_ready_ne_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_ready_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_ne.html\n", + " a label: `a`,\n", + " a debug: `Ready(1)`,\n", + " b label: `b`,\n", + " b debug: `Pending`", + ) + ); + } + +} + +/// Assert two expressions are Ready(_) and their values are not equal. +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// use std::task::Poll; +/// use std::task::Poll::*; +/// # fn main() { +/// let a: Poll = Ready(1); +/// let b: Poll = Ready(2); +/// assert_ready_ne!(a, b); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Poll = Ready(1); +/// let b: Poll = Ready(1); +/// assert_ready_ne!(a, b); +/// # }); +/// // assertion failed: `assert_ready_ne!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_ne.html +/// // a label: `a`, +/// // a debug: `Ready(1)`, +/// // a inner: `1`, +/// // b label: `b`, +/// // b debug: `Ready(1)`, +/// // b inner: `1` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_ready_ne!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_ready_ne.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Ready(1)`,\n", +/// # " a inner: `1`,\n", +/// # " b label: `b`,\n", +/// # " b debug: `Ready(1)`,\n", +/// # " b inner: `1`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_ready_ne`](macro@crate::assert_ready_ne) +/// * [`assert_ready_ne_as_result`](macro@crate::assert_ready_ne_as_result) +/// * [`debug_assert_ready_ne`](macro@crate::debug_assert_ready_ne) +/// +#[macro_export] +macro_rules! assert_ready_ne { + ($a:expr, $b:expr $(,)?) => ({ + match assert_ready_ne_as_result!($a, $b) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($a:expr, $b:expr, $($message:tt)+) => ({ + match assert_ready_ne_as_result!($a, $b) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert two expressions are Ready(_) and their values are not equal. +/// +/// This macro provides the same statements as [`assert_ready_ne`](macro.assert_ready_ne.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_ready_ne`](macro@crate::assert_ready_ne) +/// * [`assert_ready_ne`](macro@crate::assert_ready_ne) +/// * [`debug_assert_ready_ne`](macro@crate::debug_assert_ready_ne) +/// +#[macro_export] +macro_rules! debug_assert_ready_ne { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_ready_ne!($($arg)*); + } + }; +} diff --git a/src/assert_result/assert_result_err.rs b/src/assert_result/assert_result_err.rs index 24ad51563..f9a3d8116 100644 --- a/src/assert_result/assert_result_err.rs +++ b/src/assert_result/assert_result_err.rs @@ -34,6 +34,7 @@ /// * [`assert_result_err_as_result`](macro@crate::assert_result_err_as_result) /// * [`debug_assert_result_err`](macro@crate::debug_assert_result_err) /// +#[deprecated(note = "Please rename from `assert_result_err_as_result` to `assert_err_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_result_err_as_result { ($result:expr $(,)?) => ({ @@ -47,6 +48,7 @@ macro_rules! assert_result_err_as_result { Err(format!( concat!( "assertion failed: `assert_result_err!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_err.html\n", " a label: `{}`,\n", " a debug: `{:?}`", ), @@ -79,6 +81,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_result_err!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_err.html\n", " a label: `a`,\n", " a debug: `Ok(())`", ) @@ -107,11 +110,13 @@ mod tests { /// assert_result_err!(a); /// # }); /// // assertion failed: `assert_result_err!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_err.html /// // a label: `a`, /// // a debug: `Ok(())` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_result_err!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_err.html\n", /// # " a label: `a`,\n", /// # " a debug: `Ok(())`", /// # ); @@ -125,6 +130,7 @@ mod tests { /// * [`assert_result_err_as_result`](macro@crate::assert_result_err_as_result) /// * [`debug_assert_result_err`](macro@crate::debug_assert_result_err) /// +#[deprecated(note = "Please rename from `assert_result_err` to `assert_err` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_result_err { ($result:expr $(,)?) => ({ @@ -169,6 +175,7 @@ macro_rules! assert_result_err { /// * [`assert_result_err`](macro@crate::assert_result_err) /// * [`debug_assert_result_err`](macro@crate::debug_assert_result_err) /// +#[deprecated(note = "Please rename from `deubg_assert_result_err` to `debug_assert_err` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_result_err { ($($arg:tt)*) => { diff --git a/src/assert_result/assert_result_ok.rs b/src/assert_result/assert_result_ok.rs index a7df5120c..0aef9a896 100644 --- a/src/assert_result/assert_result_ok.rs +++ b/src/assert_result/assert_result_ok.rs @@ -34,6 +34,7 @@ /// * [`assert_result_ok_as_result`](macro@crate::assert_result_ok_as_result) /// * [`debug_assert_result_ok`](macro@crate::debug_assert_result_ok) /// +#[deprecated(note = "Please rename from `assert_result_ok_as_result` to `assert_ok_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_result_ok_as_result { ($result:expr $(,)?) => ({ @@ -47,6 +48,7 @@ macro_rules! assert_result_ok_as_result { Err(format!( concat!( "assertion failed: `assert_result_ok!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok.html\n", " a label: `{}`,\n", " a debug: `{:?}`", ), @@ -79,6 +81,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_result_ok!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok.html\n", " a label: `a`,\n", " a debug: `Err(1)`", ) @@ -107,11 +110,13 @@ mod tests { /// assert_result_ok!(a); /// # }); /// // assertion failed: `assert_result_ok!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok.html /// // a label: `a`, /// // a debug: `Err(1)` /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_result_ok!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok.html\n", /// # " a label: `a`,\n", /// # " a debug: `Err(1)`", /// # ); @@ -125,6 +130,7 @@ mod tests { /// * [`assert_result_ok_as_result`](macro@crate::assert_result_ok_as_result) /// * [`debug_assert_result_ok`](macro@crate::debug_assert_result_ok) /// +#[deprecated(note = "Please rename from `assert_result_ok` to `assert_ok` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_result_ok { ($result:expr $(,)?) => ({ @@ -169,6 +175,7 @@ macro_rules! assert_result_ok { /// * [`assert_result_ok`](macro@crate::assert_result_ok) /// * [`debug_assert_result_ok`](macro@crate::debug_assert_result_ok) /// +#[deprecated(note = "Please rename from `debug_assert_result_ok` to `debug_assert_ok` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_result_ok { ($($arg:tt)*) => { diff --git a/src/assert_result/assert_result_ok_eq.rs b/src/assert_result/assert_result_ok_eq.rs index 5c06f6171..fdf4c1f8b 100644 --- a/src/assert_result/assert_result_ok_eq.rs +++ b/src/assert_result/assert_result_ok_eq.rs @@ -35,6 +35,7 @@ /// * [`assert_result_ok_eq_as_result`](macro@crate::assert_result_ok_eq_as_result) /// * [`debug_assert_result_ok_eq`](macro@crate::debug_assert_result_ok_eq) /// +#[deprecated(note = "Please rename from `assert_result_ok_eq_as_result` to `assert_ok_eq_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_result_ok_eq_as_result { ($a:expr, $b:expr $(,)?) => ({ @@ -48,6 +49,7 @@ macro_rules! assert_result_ok_eq_as_result { Err(format!( concat!( "assertion failed: `assert_result_ok_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " a inner: `{:?}`,\n", @@ -68,6 +70,7 @@ macro_rules! assert_result_ok_eq_as_result { Err(format!( concat!( "assertion failed: `assert_result_ok_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -106,6 +109,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_result_ok_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_eq.html\n", " a label: `a`,\n", " a debug: `Ok(1)`,\n", " a inner: `1`,\n", @@ -126,6 +130,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_result_ok_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_eq.html\n", " a label: `a`,\n", " a debug: `Ok(1)`,\n", " b label: `b`,\n", @@ -159,6 +164,7 @@ mod tests { /// assert_result_ok_eq!(a, b); /// # }); /// // assertion failed: `assert_result_ok_eq!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_eq.html /// // a label: `a`, /// // a debug: `Ok(1)`, /// // a inner: `1`, @@ -168,6 +174,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_result_ok_eq!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_eq.html\n", /// # " a label: `a`,\n", /// # " a debug: `Ok(1)`,\n", /// # " a inner: `1`,\n", @@ -185,6 +192,7 @@ mod tests { /// * [`assert_result_ok_eq_as_result`](macro@crate::assert_result_ok_eq_as_result) /// * [`debug_assert_result_ok_eq`](macro@crate::debug_assert_result_ok_eq) /// +#[deprecated(note = "Please rename from `assert_result_ok_eq` to `assert_ok_eq` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_result_ok_eq { ($a:expr, $b:expr $(,)?) => ({ @@ -229,6 +237,7 @@ macro_rules! assert_result_ok_eq { /// * [`assert_result_ok_eq`](macro@crate::assert_result_ok_eq) /// * [`debug_assert_result_ok_eq`](macro@crate::debug_assert_result_ok_eq) /// +#[deprecated(note = "Please rename from `debug_assert_result_ok_eq` to `debug_assert_result_ok_eq` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_result_ok_eq { ($($arg:tt)*) => { diff --git a/src/assert_result/assert_result_ok_ne.rs b/src/assert_result/assert_result_ok_ne.rs index b0cb9d2ff..3f0eb2b4e 100644 --- a/src/assert_result/assert_result_ok_ne.rs +++ b/src/assert_result/assert_result_ok_ne.rs @@ -35,6 +35,7 @@ /// * [`assert_result_ok_ne_as_result`](macro@crate::assert_result_ok_ne_as_result) /// * [`debug_assert_result_ok_ne`](macro@crate::debug_assert_result_ok_ne) /// +#[deprecated(note = "Please rename from `assert_result_ok_ne_as_result` to `assert_ok_ne_as_result` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_result_ok_ne_as_result { ($a:expr, $b:expr $(,)?) => ({ @@ -48,6 +49,7 @@ macro_rules! assert_result_ok_ne_as_result { Err(format!( concat!( "assertion failed: `assert_result_ok_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " a inner: `{:?}`,\n", @@ -68,6 +70,7 @@ macro_rules! assert_result_ok_ne_as_result { Err(format!( concat!( "assertion failed: `assert_result_ok_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -106,6 +109,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_result_ok_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_ne.html\n", " a label: `a`,\n", " a debug: `Ok(1)`,\n", " a inner: `1`,\n", @@ -126,6 +130,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_result_ok_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_ne.html\n", " a label: `a`,\n", " a debug: `Ok(1)`,\n", " b label: `b`,\n", @@ -159,6 +164,7 @@ mod tests { /// assert_result_ok_ne!(a, b); /// # }); /// // assertion failed: `assert_result_ok_ne!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_ne.html /// // a label: `a`, /// // a debug: `Ok(1)`, /// // a inner: `1`, @@ -168,6 +174,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_result_ok_ne!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_result_ok_ne.html\n", /// # " a label: `a`,\n", /// # " a debug: `Ok(1)`,\n", /// # " a inner: `1`,\n", @@ -185,6 +192,7 @@ mod tests { /// * [`assert_result_ok_ne_as_result`](macro@crate::assert_result_ok_ne_as_result) /// * [`debug_assert_result_ok_ne`](macro@crate::debug_assert_result_ok_ne) /// +#[deprecated(note = "Please rename from `assert_result_ok_ne` to `assert_ok_ne` because more developers prefer the shorter name.")] #[macro_export] macro_rules! assert_result_ok_ne { ($a:expr, $b:expr $(,)?) => ({ @@ -229,6 +237,7 @@ macro_rules! assert_result_ok_ne { /// * [`assert_result_ok_ne`](macro@crate::assert_result_ok_ne) /// * [`debug_assert_result_ok_ne`](macro@crate::debug_assert_result_ok_ne) /// +#[deprecated(note = "Please rename from `debug_assert_result_ok_ne` to `debug_result_ok_ne` because more developers prefer the shorter name.")] #[macro_export] macro_rules! debug_assert_result_ok_ne { ($($arg:tt)*) => { diff --git a/src/assert_set/assert_set_disjoint.rs b/src/assert_set/assert_set_disjoint.rs index 8caaf5a5f..c67950982 100644 --- a/src/assert_set/assert_set_disjoint.rs +++ b/src/assert_set/assert_set_disjoint.rs @@ -50,6 +50,7 @@ macro_rules! assert_set_disjoint_as_result { Err(format!( concat!( "assertion failed: `assert_set_disjoint!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_disjoint.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -91,6 +92,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_set_disjoint!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_disjoint.html\n", " a label: `&a`,\n", " a debug: `[1, 2]`,\n", " b label: `&b`,\n", @@ -125,6 +127,7 @@ mod tests { /// assert_set_disjoint!(&a, &b); /// # }); /// // assertion failed: `assert_set_disjoint!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_disjoint.html /// // a label: `&a`, /// // a debug: `[1, 2]`, /// // b label: `&b`, @@ -134,6 +137,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_set_disjoint!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_disjoint.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 2]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_set/assert_set_eq.rs b/src/assert_set/assert_set_eq.rs index 6443e273a..c04f2c828 100644 --- a/src/assert_set/assert_set_eq.rs +++ b/src/assert_set/assert_set_eq.rs @@ -52,6 +52,7 @@ macro_rules! assert_set_eq_as_result { Err(format!( concat!( "assertion failed: `assert_set_eq!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_eq.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -93,6 +94,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_set_eq!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_eq.html\n", " a label: `&a`,\n", " a debug: `[1, 2]`,\n", " b label: `&b`,\n", @@ -127,6 +129,7 @@ mod tests { /// assert_set_eq!(&a, &b); /// # }); /// // assertion failed: `assert_set_eq!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_eq.html /// // a label: `&a`, /// // a debug: `[1, 2]`, /// // b label: `&b`, @@ -136,6 +139,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_set_eq!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_eq.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 2]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_set/assert_set_joint.rs b/src/assert_set/assert_set_joint.rs index e9844b6dc..3d96e4589 100644 --- a/src/assert_set/assert_set_joint.rs +++ b/src/assert_set/assert_set_joint.rs @@ -50,6 +50,7 @@ macro_rules! assert_set_joint_as_result { Err(format!( concat!( "assertion failed: `assert_set_joint!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_joint.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -91,6 +92,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_set_joint!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_joint.html\n", " a label: `&a`,\n", " a debug: `[1, 2]`,\n", " b label: `&b`,\n", @@ -125,6 +127,7 @@ mod tests { /// assert_set_joint!(&a, &b); /// # }); /// // assertion failed: `assert_set_joint!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_joint.html /// // a label: `&a`, /// // a debug: `[1, 2]`, /// // b label: `&b`, @@ -134,6 +137,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_set_joint!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_joint.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 2]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_set/assert_set_ne.rs b/src/assert_set/assert_set_ne.rs index 3dbf38df4..521848ed5 100644 --- a/src/assert_set/assert_set_ne.rs +++ b/src/assert_set/assert_set_ne.rs @@ -50,6 +50,7 @@ macro_rules! assert_set_ne_as_result { Err(format!( concat!( "assertion failed: `assert_set_ne!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_ne.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -91,6 +92,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_set_ne!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_ne.html\n", " a label: `&a`,\n", " a debug: `[1, 2]`,\n", " b label: `&b`,\n", @@ -125,6 +127,7 @@ mod tests { /// assert_set_ne!(&a, &b); /// # }); /// // assertion failed: `assert_set_ne!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_ne.html /// // a label: `&a`, /// // a debug: `[1, 2]`, /// // b label: `&b`, @@ -134,6 +137,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_set_ne!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_ne.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 2]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_set/assert_set_subset.rs b/src/assert_set/assert_set_subset.rs index c55fa9229..6f97551e8 100644 --- a/src/assert_set/assert_set_subset.rs +++ b/src/assert_set/assert_set_subset.rs @@ -50,6 +50,7 @@ macro_rules! assert_set_subset_as_result { Err(format!( concat!( "assertion failed: `assert_set_subset!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_subset.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -91,6 +92,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_set_subset!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_subset.html\n", " a label: `&a`,\n", " a debug: `[1, 2, 3]`,\n", " b label: `&b`,\n", @@ -125,6 +127,7 @@ mod tests { /// assert_set_subset!(&a, &b); /// # }); /// // assertion failed: `assert_set_subset!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_subset.html /// // a label: `&a`, /// // a debug: `[1, 2, 3]`, /// // b label: `&b`, @@ -134,6 +137,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_set_subset!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_subset.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 2, 3]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_set/assert_set_superset.rs b/src/assert_set/assert_set_superset.rs index 5fda7b0d3..d760e6de1 100644 --- a/src/assert_set/assert_set_superset.rs +++ b/src/assert_set/assert_set_superset.rs @@ -52,6 +52,7 @@ macro_rules! assert_set_superset_as_result { Err(format!( concat!( "assertion failed: `assert_set_superset!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_superset.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -93,6 +94,7 @@ mod tests { result.unwrap_err(), concat!( "assertion failed: `assert_set_superset!(a_collection, b_collection)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_superset.html\n", " a label: `&a`,\n", " a debug: `[1, 2]`,\n", " b label: `&b`,\n", @@ -127,6 +129,7 @@ mod tests { /// assert_set_superset!(&a, &b); /// # }); /// // assertion failed: `assert_set_superset!(a_collection, b_collection)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_superset.html /// // a label: `&a`, /// // a debug: `[1, 2]`, /// // b label: `&b`, @@ -136,6 +139,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_set_superset!(a_collection, b_collection)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_set_superset.html\n", /// # " a label: `&a`,\n", /// # " a debug: `[1, 2]`,\n", /// # " b label: `&b`,\n", diff --git a/src/assert_some.rs b/src/assert_some.rs new file mode 100644 index 000000000..fa72de16f --- /dev/null +++ b/src/assert_some.rs @@ -0,0 +1,183 @@ +//!Assert expression is Some(_). +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! # fn main() { +//! let a: Option = Option::Some(1); +//! assert_some!(a); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_some`](macro@crate::assert_some) +//! * [`assert_some_as_result`](macro@crate::assert_some_as_result) +//! * [`debug_assert_some`](macro@crate::debug_assert_some) + +/// Assert an expression.is_some() is true. +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_some`](macro.assert_some.html), +/// except this macro returns a Result, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_some`](macro@crate::assert_some) +/// * [`assert_some_as_result`](macro@crate::assert_some_as_result) +/// * [`debug_assert_some`](macro@crate::debug_assert_some) +/// +#[macro_export] +macro_rules! assert_some_as_result { + ($option:expr $(,)?) => ({ + match (&$option) { + option => { + match (option) { + Some(_) => { + Ok(()) + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_some!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some.html\n", + " option label: `{}`,\n", + " option debug: `{:?}`", + ), + stringify!($option), + option + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + + #[test] + fn test_assert_some_as_result_x_success() { + let a: Option = Option::Some(1); + let result = assert_some_as_result!(a); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_some_as_result_x_failure() { + let a: Option = Option::None; + let result = assert_some_as_result!(a); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_some!(a)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some.html\n", + " option label: `a`,\n", + " option debug: `None`", + ) + ); + } +} + +///Assert expression is Some(_). +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// # fn main() { +/// let a: Option = Option::Some(1); +/// assert_some!(a); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Option = Option::None; +/// assert_some!(a); +/// # }); +/// // assertion failed: `assert_some!(a)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_some.html +/// // option label: `a`, +/// // option debug: `None` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_some!(a)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some.html\n", +/// # " option label: `a`,\n", +/// # " option debug: `None`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_some`](macro@crate::assert_some) +/// * [`assert_some_as_result`](macro@crate::assert_some_as_result) +/// * [`debug_assert_some`](macro@crate::debug_assert_some) +/// +#[macro_export] +macro_rules! assert_some { + ($option:expr $(,)?) => ({ + match assert_some_as_result!($option) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($option:expr, $($message:tt)+) => ({ + match assert_some_as_result!($option) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +///Assert expression is Some(_). +/// +/// This macro provides the same statements as [`assert_some`](macro.assert_some.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_some`](macro@crate::assert_some) +/// * [`assert_some`](macro@crate::assert_some) +/// * [`debug_assert_some`](macro@crate::debug_assert_some) +/// +#[macro_export] +macro_rules! debug_assert_some { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_some!($($arg)*); + } + }; +} diff --git a/src/assert_some_eq.rs b/src/assert_some_eq.rs new file mode 100644 index 000000000..745ab0b48 --- /dev/null +++ b/src/assert_some_eq.rs @@ -0,0 +1,245 @@ +//! Assert two expressions are Some(_) and their values are equal. +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! # fn main() { +//! let a: Option = Option::Some(1); +//! let b: Option = Option::Some(1); +//! assert_some_eq!(a, b); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_some_eq`](macro@crate::assert_some_eq) +//! * [`assert_some_eq_as_result`](macro@crate::assert_some_eq_as_result) +//! * [`debug_assert_some_eq`](macro@crate::debug_assert_some_eq) + +/// Assert a.is_some() and a.unwrap() are equal to another. +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_some_eq`](macro.assert_some_eq.html), +/// except this macro returns a Option, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_some_eq`](macro@crate::assert_some_eq) +/// * [`assert_some_eq_as_result`](macro@crate::assert_some_eq_as_result) +/// * [`debug_assert_some_eq`](macro@crate::debug_assert_some_eq) +/// +#[macro_export] +macro_rules! assert_some_eq_as_result { + ($a:expr, $b:expr $(,)?) => ({ + match (&$a, &$b) { + (a, b) => { + match (a, b) { + (Some(a_inner), Some(b_inner)) => { + if a_inner == b_inner { + Ok(()) + } else { + Err(format!( + concat!( + "assertion failed: `assert_some_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_eq.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " a inner: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`,\n", + " b inner: `{:?}`" + ), + stringify!($a), + a, + a_inner, + stringify!($b), + b, + b_inner + )) + } + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_some_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_eq.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`", + ), + stringify!($a), + a, + stringify!($b), + b, + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + + #[test] + fn test_assert_some_eq_as_result_x_success() { + let a: Option = Option::Some(1); + let b: Option = Option::Some(1); + let result = assert_some_eq_as_result!(a, b); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_some_eq_as_result_x_failure_because_ne() { + let a: Option = Option::Some(1); + let b: Option = Option::Some(2); + let result = assert_some_eq_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_some_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_eq.html\n", + " a label: `a`,\n", + " a debug: `Some(1)`,\n", + " a inner: `1`,\n", + " b label: `b`,\n", + " b debug: `Some(2)`,\n", + " b inner: `2`", + ) + ); + } + + #[test] + fn test_assert_some_eq_as_result_x_failure_because_not_some() { + let a: Option = Option::Some(1); + let b: Option = Option::None; + let result = assert_some_eq_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_some_eq!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_eq.html\n", + " a label: `a`,\n", + " a debug: `Some(1)`,\n", + " b label: `b`,\n", + " b debug: `None`", + ) + ); + } + +} + +/// Assert two expressions are Some(_) and their values are equal. +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// # fn main() { +/// let a: Option = Option::Some(1); +/// let b: Option = Option::Some(1); +/// assert_some_eq!(a, b); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Option = Option::Some(1); +/// let b: Option = Option::Some(2); +/// assert_some_eq!(a, b); +/// # }); +/// // assertion failed: `assert_some_eq!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_eq.html +/// // a label: `a`, +/// // a debug: `Some(1)`, +/// // a inner: `1`, +/// // b label: `b`, +/// // b debug: `Some(2)`, +/// // b inner: `2` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_some_eq!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_eq.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Some(1)`,\n", +/// # " a inner: `1`,\n", +/// # " b label: `b`,\n", +/// # " b debug: `Some(2)`,\n", +/// # " b inner: `2`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_some_eq`](macro@crate::assert_some_eq) +/// * [`assert_some_eq_as_result`](macro@crate::assert_some_eq_as_result) +/// * [`debug_assert_some_eq`](macro@crate::debug_assert_some_eq) +/// +#[macro_export] +macro_rules! assert_some_eq { + ($a:expr, $b:expr $(,)?) => ({ + match assert_some_eq_as_result!($a, $b) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($a:expr, $b:expr, $($message:tt)+) => ({ + match assert_some_eq_as_result!($a, $b) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert two expressions are Some(_) and their values are equal. +/// +/// This macro provides the same statements as [`assert_some_eq`](macro.assert_some_eq.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_some_eq`](macro@crate::assert_some_eq) +/// * [`assert_some_eq`](macro@crate::assert_some_eq) +/// * [`debug_assert_some_eq`](macro@crate::debug_assert_some_eq) +/// +#[macro_export] +macro_rules! debug_assert_some_eq { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_some_eq!($($arg)*); + } + }; +} diff --git a/src/assert_some_ne.rs b/src/assert_some_ne.rs new file mode 100644 index 000000000..727589ab1 --- /dev/null +++ b/src/assert_some_ne.rs @@ -0,0 +1,245 @@ +//! Assert two expressions are Some(_) and their values are not equal. +//! +//! # Example +//! +//! ```rust +//! # #[macro_use] extern crate assertables; +//! # fn main() { +//! let a: Option = Option::Some(1); +//! let b: Option = Option::Some(2); +//! assert_some_ne!(a, b); +//! # } +//! ``` +//! +//! # Module macros +//! +//! * [`assert_some_ne`](macro@crate::assert_some_ne) +//! * [`assert_some_ne_as_result`](macro@crate::assert_some_ne_as_result) +//! * [`debug_assert_some_ne`](macro@crate::debug_assert_some_ne) + +/// Assert two expressions are Some(_) and their values are not equal. +/// +/// * If true, return Result `Ok(())`. +/// +/// * Otherwise, return Result `Err` with a diagnostic message. +/// +/// This macro provides the same statements as [`assert_some_ne`](macro.assert_some_ne.html), +/// except this macro returns a Option, rather than doing a panic. +/// +/// This macro is useful for runtime checks, such as checking parameters, +/// or sanitizing inputs, or handling different results in different ways. +/// +/// # Module macros +/// +/// * [`assert_some_ne`](macro@crate::assert_some_ne) +/// * [`assert_some_ne_as_result`](macro@crate::assert_some_ne_as_result) +/// * [`debug_assert_some_ne`](macro@crate::debug_assert_some_ne) +/// +#[macro_export] +macro_rules! assert_some_ne_as_result { + ($a:expr, $b:expr $(,)?) => ({ + match (&$a, &$b) { + (a, b) => { + match (a, b) { + (Some(a_inner), Some(b_inner)) => { + if a_inner != b_inner { + Ok(()) + } else { + Err(format!( + concat!( + "assertion failed: `assert_some_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_ne.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " a inner: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`,\n", + " b inner: `{:?}`" + ), + stringify!($a), + a, + a_inner, + stringify!($b), + b, + b_inner + )) + } + }, + _ => { + Err(format!( + concat!( + "assertion failed: `assert_some_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_ne.html\n", + " a label: `{}`,\n", + " a debug: `{:?}`,\n", + " b label: `{}`,\n", + " b debug: `{:?}`", + ), + stringify!($a), + a, + stringify!($b), + b, + )) + } + } + } + } + }); +} + +#[cfg(test)] +mod tests { + + #[test] + fn test_assert_some_ne_as_result_x_success() { + let a: Option = Option::Some(1); + let b: Option = Option::Some(2); + let result = assert_some_ne_as_result!(a, b); + assert_eq!(result, Ok(())); + } + + #[test] + fn test_assert_some_ne_as_result_x_failure_because_eq() { + let a: Option = Option::Some(1); + let b: Option = Option::Some(1); + let result = assert_some_ne_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_some_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_ne.html\n", + " a label: `a`,\n", + " a debug: `Some(1)`,\n", + " a inner: `1`,\n", + " b label: `b`,\n", + " b debug: `Some(1)`,\n", + " b inner: `1`", + ) + ); + } + + #[test] + fn test_assert_some_ne_as_result_x_failure_because_not_some() { + let a: Option = Option::Some(1); + let b: Option = Option::None; + let result = assert_some_ne_as_result!(a, b); + assert!(result.is_err()); + assert_eq!( + result.unwrap_err(), + concat!( + "assertion failed: `assert_some_ne!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_ne.html\n", + " a label: `a`,\n", + " a debug: `Some(1)`,\n", + " b label: `b`,\n", + " b debug: `None`", + ) + ); + } + +} + +/// Assert two expressions are Some(_) and their values are not equal. +/// +/// * If true, return `()`. +/// +/// * Otherwise, call [`panic!`] with a message and the values of the +/// expressions with their debug representations. +/// +/// # Examples +/// +/// ```rust +/// # #[macro_use] extern crate assertables; +/// # use std::panic; +/// # fn main() { +/// let a: Option = Option::Some(1); +/// let b: Option = Option::Some(2); +/// assert_some_ne!(a, b); +/// +/// # let result = panic::catch_unwind(|| { +/// let a: Option = Option::Some(1); +/// let b: Option = Option::Some(1); +/// assert_some_ne!(a, b); +/// # }); +/// // assertion failed: `assert_some_ne!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_ne.html +/// // a label: `a`, +/// // a debug: `Some(1)`, +/// // b label: `b`, +/// // b debug: `Some(1)`, +/// // a inner: `1`, +/// // b inner: `1` +/// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); +/// # let expect = concat!( +/// # "assertion failed: `assert_some_ne!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_some_ne.html\n", +/// # " a label: `a`,\n", +/// # " a debug: `Some(1)`,\n", +/// # " a inner: `1`,\n", +/// # " b label: `b`,\n", +/// # " b debug: `Some(1)`,\n", +/// # " b inner: `1`", +/// # ); +/// # assert_eq!(actual, expect); +/// # } +/// ``` +/// +/// # Module macros +/// +/// * [`assert_some_ne`](macro@crate::assert_some_ne) +/// * [`assert_some_ne_as_result`](macro@crate::assert_some_ne_as_result) +/// * [`debug_assert_some_ne`](macro@crate::debug_assert_some_ne) +/// +#[macro_export] +macro_rules! assert_some_ne { + ($a:expr, $b:expr $(,)?) => ({ + match assert_some_ne_as_result!($a, $b) { + Ok(()) => (), + Err(err) => panic!("{}", err), + } + }); + ($a:expr, $b:expr, $($message:tt)+) => ({ + match assert_some_ne_as_result!($a, $b) { + Ok(()) => (), + Err(_err) => panic!("{}", $($message)+), + } + }); +} + +/// Assert two expressions are Some(_) and their values are not equal. +/// +/// This macro provides the same statements as [`assert_some_ne`](macro.assert_some_ne.html), +/// except this macro's statements are only enabled in non-optimized +/// builds by default. An optimized build will not execute this macro's +/// statements unless `-C debug-assertions` is passed to the compiler. +/// +/// This macro is useful for checks that are too expensive to be present +/// in a release build but may be helpful during development. +/// +/// The result of expanding this macro is always type checked. +/// +/// An unchecked assertion allows a program in an inconsistent state to +/// keep running, which might have unexpected consequences but does not +/// introduce unsafety as long as this only happens in safe code. The +/// performance cost of assertions, however, is not measurable in general. +/// Replacing `assert*!` with `debug_assert*!` is thus only encouraged +/// after thorough profiling, and more importantly, only in safe code! +/// +/// This macro is intended to work in a similar way to +/// [`std::debug_assert`](https://doc.rust-lang.org/std/macro.debug_assert.html). +/// +/// # Module macros +/// +/// * [`assert_some_ne`](macro@crate::assert_some_ne) +/// * [`assert_some_ne`](macro@crate::assert_some_ne) +/// * [`debug_assert_some_ne`](macro@crate::debug_assert_some_ne) +/// +#[macro_export] +macro_rules! debug_assert_some_ne { + ($($arg:tt)*) => { + if $crate::cfg!(debug_assertions) { + $crate::assert_some_ne!($($arg)*); + } + }; +} diff --git a/src/assert_starts_with.rs b/src/assert_starts_with.rs index 5a999cfcd..c752dabcb 100644 --- a/src/assert_starts_with.rs +++ b/src/assert_starts_with.rs @@ -46,6 +46,7 @@ macro_rules! assert_starts_with_as_result { Err(format!( concat!( "assertion failed: `assert_starts_with!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_starts_with.html\n", " a label: `{}`,\n", " a debug: `{:?}`,\n", " b label: `{}`,\n", @@ -81,6 +82,7 @@ mod tests { let actual = result.unwrap_err(); let expect = concat!( "assertion failed: `assert_starts_with!(a, b)`\n", + "https://docs.rs/assertables/8.7.0/assertables/macro.assert_starts_with.html\n", " a label: `a`,\n", " a debug: `\"alfa\"`,\n", " b label: `b`,\n", @@ -112,6 +114,7 @@ mod tests { /// let b = "fa"; /// assert_starts_with!(a, b); /// // assertion failed: `assert_starts_with!(a, b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_starts_with.html /// // a label: `a`, /// // a debug: `\"alfa\"`, /// // b label: `b`, @@ -120,6 +123,7 @@ mod tests { /// # let actual = result.unwrap_err().downcast::().unwrap().to_string(); /// # let expect = concat!( /// # "assertion failed: `assert_starts_with!(a, b)`\n", +/// # "https://docs.rs/assertables/8.7.0/assertables/macro.assert_starts_with.html\n", /// # " a label: `a`,\n", /// # " a debug: `\"alfa\"`,\n", /// # " b label: `b`,\n", diff --git a/src/lib.rs b/src/lib.rs index 38b473cde..c52e040cd 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,17 +16,17 @@ //! The Rust programming language provides assert macros to test code: //! //! * [`assert!()`](https://doc.rust-lang.org/std/macro.assert.html) -//! * [`assert_eq!(a, b)`](https://doc.rust-lang.org/std/macro.assert_eq.html) -//! * [`assert_ne!(a, b)`](https://doc.rust-lang.org/std/macro.assert_ne.html) +//! * [`assert_eq!(a, b)`](https://doc.rust-lang.org/std/macro.assert_eq.html) `// equal` +//! * [`assert_ne!(a, b)`](https://doc.rust-lang.org/std/macro.assert_ne.html) `// not equal` //! //! The assertables crate provides many more, so you can write smarter tests. //! //! For values: //! //! * [`assert_lt!(a, b)`](macro@crate::assert_lt) `// less than` -//! * [`assert_le!(a, b)`](macro@crate::assert_le) `// less than or equal to` +//! * [`assert_le!(a, b)`](macro@crate::assert_le) `// less than or equal` //! * [`assert_gt!(a, b)`](macro@crate::assert_gt) `// greater than` -//! * [`assert_ge!(a, b)`](macro@crate::assert_ge) `// greater than or equal to` +//! * [`assert_ge!(a, b)`](macro@crate::assert_ge) `// greater than or equal` //! //! For strings: //! @@ -48,26 +48,26 @@ //! * [`assert_in_delta!(a, b, delta)`](macro@crate::assert_in_delta) //! * [`assert_in_epsilon!(a, b, epsilon)`](macro@crate::assert_in_epsilon) //! -//! For results: +//! For Result: //! -//! * [`assert_result_ok!(a)`](macro@crate::assert_result_ok) -//! * [`assert_result_ok_eq!(a)`](macro@crate::assert_result_ok_eq) -//! * [`assert_result_ok_ne!(a)`](macro@crate::assert_result_ok_ne) -//! * [`assert_result_err!(a)`](macro@crate::assert_result_err) +//! * [`assert_ok!(a)`](macro@crate::assert_ok) +//! * [`assert_ok_eq!(a)`](macro@crate::assert_ok_eq) +//! * [`assert_ok_ne!(a)`](macro@crate::assert_ok_ne) +//! * [`assert_err!(a)`](macro@crate::assert_err) //! -//! For options: +//! For Option: //! -//! * [`assert_option_some!(a)`](macro@crate::assert_option_some) -//! * [`assert_option_some_eq!(a)`](macro@crate::assert_option_some_eq) -//! * [`assert_option_some_ne!(a)`](macro@crate::assert_option_some_ne) -//! * [`assert_option_none!(a)`](macro@crate::assert_option_none) +//! * [`assert_some!(a)`](macro@crate::assert_some) +//! * [`assert_some_eq!(a)`](macro@crate::assert_some_eq) +//! * [`assert_some_ne!(a)`](macro@crate::assert_some_ne) +//! * [`assert_none!(a)`](macro@crate::assert_none) //! -//! For polls: +//! For Poll: //! -//! * [`assert_poll_ready!(a)`](macro@crate::assert_poll_ready) -//! * [`assert_poll_ready_eq!(a, b)`](macro@crate::assert_poll_ready_eq) -//! * [`assert_poll_ready_ne!(a, b)`](macro@crate::assert_poll_ready_ne) -//! * [`assert_poll_pending!(a)`](macro@crate::assert_poll_pending) +//! * [`assert_ready!(a)`](macro@crate::assert_ready) +//! * [`assert_ready_eq!(a, b)`](macro@crate::assert_ready_eq) +//! * [`assert_ready_ne!(a, b)`](macro@crate::assert_ready_ne) +//! * [`assert_pending!(a)`](macro@crate::assert_pending) //! //! For collections such as arrays, vectors, maps, sets: //! @@ -184,9 +184,9 @@ //! ## Tracking //! //! * Package: assertables-rust-crate -//! * Version: 8.6.0 +//! * Version: 8.7.0 //! * Created: 2021-03-30T15:47:49Z -//! * Updated: 2024-09-18T03:02:31Z +//! * Updated: 2024-09-18T14:51:06Z //! * 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) @@ -214,10 +214,26 @@ pub mod assert_not_match; pub mod assert_not_starts_with; pub mod assert_starts_with; -// For maybes -pub mod assert_result; -pub mod assert_option; -pub mod assert_poll; +// For Result Ok/Err +pub mod assert_ok; +pub mod assert_ok_eq; +pub mod assert_ok_ne; +pub mod assert_err; +pub mod assert_result; // Deprecated + +// For Option Some/None +pub mod assert_some; +pub mod assert_some_eq; +pub mod assert_some_ne; +pub mod assert_none; +pub mod assert_option; // Deprecated + +// For Poll Ready/Pending +pub mod assert_ready; +pub mod assert_ready_eq; +pub mod assert_ready_ne; +pub mod assert_pending; +pub mod assert_poll; // Deprecated // For collections pub mod assert_set; diff --git a/tests/comparison_examples.rs b/tests/comparison_examples.rs index 67ea746a4..5a113e7b3 100644 --- a/tests/comparison_examples.rs +++ b/tests/comparison_examples.rs @@ -24,6 +24,7 @@ use assertables::*; /// /// assert_infix!(a > b); /// // assertion failed: `assert_infix!(a > b)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_infix.html /// // a label: `a`, /// // a debug: `1`, /// // b label: `b`, @@ -58,6 +59,7 @@ fn greater_than() { /// /// assert_infix!(a, b, delta); /// // assertion failed: `assert_in_delta!(a, b, delta)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_in_delta.html /// // a label: `a`, /// // a debug: `10`, /// // b label: `b`, @@ -98,6 +100,7 @@ fn are_two_numbers_near() { /// /// assert_fs_read_to_string_eq!(a_path, b_path); /// // assertion failed: `assert_fs_read_to_string_eq!(a_path, b_path)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_fs_read_to_string_eq.html /// // a_path label: `a_path`, /// // a_path debug: `"alfa.txt"`, /// // b_path label: `b_path`, @@ -135,6 +138,7 @@ fn compare_text_file_strings() { /// /// assert_command_stdout_contains!(command, containee); /// // assertion failed: `assert_command_stdout_contains!(command, containee)` +/// // https://docs.rs/assertables/8.7.0/assertables/macro.assert_command_stdout_contains.html /// // command label: `command`, /// // command debug: `"echo" "alfa"`, /// // containee label: `containee`, diff --git a/tests/smoke_test.rs b/tests/smoke_test.rs index f5d7d3b90..ebf11a3ca 100644 --- a/tests/smoke_test.rs +++ b/tests/smoke_test.rs @@ -32,35 +32,35 @@ fn assert_inners() { #[test] fn assert_return_enum() { let a: Result = Result::Ok(1); - assert_result_ok!(a); + assert_ok!(a); let a: Result = Result::Ok(1); let b: Result = Result::Ok(1); - assert_result_ok_eq!(a, b); + assert_ok_eq!(a, b); let a: Result = Result::Ok(1); let b: Result = Result::Ok(2); - assert_result_ok_ne!(a, b); + assert_ok_ne!(a, b); let a: Result = Result::Err(2); - assert_result_err!(a); + assert_err!(a); } #[test] fn assert_option_enum() { let a: Option = Option::Some(1); - assert_option_some!(a); + assert_some!(a); let a: Option = Option::Some(1); let b: Option = Option::Some(1); - assert_option_some_eq!(a, b); + assert_some_eq!(a, b); let a: Option = Option::Some(1); let b: Option = Option::Some(2); - assert_option_some_ne!(a, b); + assert_some_ne!(a, b); let a: Option = Option::None; - assert_option_none!(a); + assert_none!(a); } #[test] @@ -69,18 +69,18 @@ fn assert_poll_enum() { use std::task::Poll::*; let a: Poll = Ready(1); - assert_poll_ready!(a); + assert_ready!(a); let a: Poll = Ready(1); let b: Poll = Ready(1); - assert_poll_ready_eq!(a, b); + assert_ready_eq!(a, b); let a: Poll = Ready(1); let b: Poll = Ready(2); - assert_poll_ready_ne!(a, b); + assert_ready_ne!(a, b); let a: Poll = Pending; - assert_poll_pending!(a); + assert_pending!(a); } #[test] diff --git a/tests/validation_examples.rs b/tests/validation_examples.rs index 91addca0c..e91270a0b 100644 --- a/tests/validation_examples.rs +++ b/tests/validation_examples.rs @@ -18,15 +18,15 @@ fn validate_email_address() { // Success let result = validate_email_address("alice@example.com"); - assert_result_ok!(result); + assert_ok!(result); // Failure because the string is missing the @ sign let result = validate_email_address("alfa"); - assert_result_err!(result); + assert_err!(result); // Failure because the string is too short let result = validate_email_address("@"); - assert_result_err!(result); + assert_err!(result); } @@ -40,15 +40,15 @@ fn validate_point_nearness() { // Success let result = validate_point_nearness(1.01, 2.01, 1.02, 2.02); - assert_result_ok!(result); + assert_ok!(result); // Failure because the x coordinates are far let result = validate_point_nearness(1.01, 2.01, 9.02, 2.02); - assert_result_err!(result); + assert_err!(result); // Failure because the y coordinates are far let result = validate_point_nearness(1.01, 2.01, 1.02, 9.02); - assert_result_err!(result); + assert_err!(result); } @@ -62,14 +62,14 @@ fn validate_positive_percentage() { // Success let result = validate_positive_percentage(1.0); - assert_result_ok!(result); + assert_ok!(result); // Failure because the number is too low let result = validate_positive_percentage(0.0); - assert_result_err!(result); + assert_err!(result); // Failure because the number is too high let result = validate_positive_percentage(101.0); - assert_result_err!(result); + assert_err!(result); }