Macro assert_status_code_value_lt

Source
macro_rules! assert_status_code_value_lt {
    ($a_process:expr, $b_process:expr $(,)?) => { ... };
    ($a_process:expr, $b_process:expr, $($message:tt)+) => { ... };
}
Expand description

Assert a status code value is less than another.

Pseudocode:
a ⇒ status ⇒ code ⇒ value < b ⇒ status ⇒ code ⇒ value

  • If true, return (a value, b value).

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

§Examples

use assertables::*;
use std::process::Command;

let mut a = Command::new("bin/exit-with-arg"); a.arg("1");
let mut b = Command::new("bin/exit-with-arg"); b.arg("2");
assert_status_code_value_lt!(a, b);

// This will panic
let mut a = Command::new("bin/exit-with-arg"); a.arg("2");
let mut b = Command::new("bin/exit-with-arg"); b.arg("1");
assert_status_code_value_lt!(a, b);
// assertion failed: `assert_status_code_value_lt!(a, b)`
// https://docs.rs/assertables/…/assertables/macro.assert_status_code_value_lt.html
//  a label: `a`,
//  a debug: `\"bin/exit-with-arg\" \"1\"`,
//  a value: `2`",
//  b label: `b`,
//  b debug: `\"bin/exit-with-arg\" \"1\"`,
//  b value: `1`"

§Module macros