Refactor tests.

This commit is contained in:
Stephen Chung
2020-03-02 22:11:56 +08:00
parent ed8d2ac20f
commit 0707fad1ca
27 changed files with 338 additions and 317 deletions

View File

@@ -1,12 +1,11 @@
use rhai::Engine;
use rhai::{Engine, EvalAltResult};
#[test]
fn test_loop() {
fn test_loop() -> Result<(), EvalAltResult> {
let mut engine = Engine::new();
assert!(engine
.eval::<bool>(
"
assert!(engine.eval::<bool>(
r"
let x = 0;
let i = 0;
@@ -22,6 +21,7 @@ fn test_loop() {
x == 45
"
)
.unwrap())
)?);
Ok(())
}