Expand description
Assert a command (built with program and args) stderr string is greater than to another.
-
If true, return
(). -
Otherwise, call
panic!with a message and the values of the expressions with their debug representations.
§Examples
// Return Ok
let a_program = "bin/printf-stderr";
let a_args = ["%s", "hello"];
let b_program = "bin/printf-stderr";
let b_args = ["%s", "hallo"];
assert_program_args_stderr_gt!(&a_program, &a_args, &b_program, &b_args);
//-> ()
let a_program = "bin/printf-stderr";
let a_args = ["%s", "hello"];
let b_program = "bin/printf-stderr";
let b_args = ["%s", "hullo"];
assert_program_args_stderr_gt!(&a_program, &a_args, &b_program, &b_args);
//-> panic!("…")
let actual = result.unwrap_err().downcast::<String>().unwrap().to_string();
let expect = concat!(
"assertion failed: `assert_program_args_stderr_gt!(left_program, left_args, right_program, right_args)`\n",
" left_program label: `&a_program`,\n",
" left_program debug: `\"bin/printf-stderr\"`,\n",
" left_args label: `&a_args`,\n",
" left_args debug: `[\"%s\", \"hello\"]`,\n",
" right_program label: `&b_program`,\n",
" right_program debug: `\"bin/printf-stderr\"`,\n",
" right_args label: `&b_args`,\n",
" right_args debug: `[\"%s\", \"hullo\"]`,\n",
" left: `\"hello\"`,\n",
" right: `\"hullo\"`"
);
assert_eq!(actual, expect);/// # Module macros