Use the more-asserts crate in more places.

This provides assert_le, assert_lt, and so on, which can print the
values of the operands.
This commit is contained in:
Dan Gohman
2019-11-08 15:21:47 -08:00
parent a2b4148a91
commit 1a0ed6e388
37 changed files with 124 additions and 113 deletions

View File

@@ -4,6 +4,7 @@ use alloc::rc::Rc;
use core::cell::RefCell;
use cranelift_codegen::settings;
use cranelift_codegen::settings::Configurable;
use more_asserts::assert_gt;
use std::collections::HashMap;
use std::path::PathBuf;
use wasmtime_jit::{instantiate, CompilationStrategy, Compiler, NullResolver};
@@ -15,7 +16,7 @@ const PATH_MODULE_RS2WASM_ADD_FUNC: &str = r"tests/wat/rs2wasm-add-func.wat";
fn test_environ_translate() {
let path = PathBuf::from(PATH_MODULE_RS2WASM_ADD_FUNC);
let data = wat::parse_file(path).expect("expecting valid wat-file");
assert!(data.len() > 0);
assert_gt!(data.len(), 0);
let mut flag_builder = settings::builder();
flag_builder.enable("enable_verifier").unwrap();