Fine tune some tests.
This commit is contained in:
@@ -62,39 +62,31 @@ fn test_bool_op_short_circuit() -> Result<(), EvalAltResult> {
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_bool_op_no_short_circuit1() {
|
||||
let mut engine = Engine::new();
|
||||
|
||||
assert_eq!(
|
||||
engine
|
||||
.eval::<bool>(
|
||||
r"
|
||||
assert!(engine
|
||||
.eval::<bool>(
|
||||
r"
|
||||
let this = true;
|
||||
|
||||
this | { throw; }
|
||||
"
|
||||
)
|
||||
.unwrap(),
|
||||
false
|
||||
);
|
||||
)
|
||||
.is_err());
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[should_panic]
|
||||
fn test_bool_op_no_short_circuit2() {
|
||||
let mut engine = Engine::new();
|
||||
|
||||
assert_eq!(
|
||||
engine
|
||||
.eval::<bool>(
|
||||
r"
|
||||
assert!(engine
|
||||
.eval::<bool>(
|
||||
r"
|
||||
let this = false;
|
||||
|
||||
this & { throw; }
|
||||
"
|
||||
)
|
||||
.unwrap(),
|
||||
false
|
||||
);
|
||||
)
|
||||
.is_err());
|
||||
}
|
||||
|
Reference in New Issue
Block a user