We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5f18357 commit e7b3af0Copy full SHA for e7b3af0
1 file changed
src/lib.rs
@@ -242,14 +242,18 @@ mod tests {
242
#[test]
243
fn test_register_infix_op() {
244
register_infix_op(
245
- "---",
+ "right_minus",
246
100,
247
InfixOpType::CALC,
248
InfixOpAssociativity::RIGHT,
249
Arc::new(|left, right| Ok(Value::from(left.integer()? - right.integer()?))),
250
);
251
- let input = "100---55---44";
+ let input = "100 right_minus 55 right_minus 44";
252
let ans = execute(input, create_context!());
253
+ match &ans {
254
+ Ok(_) => {}
255
+ Err(e) => print!("err is {}", e),
256
+ }
257
assert!(ans.is_ok());
258
assert_eq!(ans.unwrap(), Value::from(89));
259
}
0 commit comments