wasm_interp: move tests inside the crate

This commit is contained in:
Brian Carroll 2022-12-02 07:54:13 +00:00
parent 42a15d07b3
commit ffd35f5884
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
9 changed files with 18 additions and 8 deletions

View file

@ -1,6 +1,7 @@
mod call_stack;
mod instance;
pub mod test_utils;
mod tests;
mod value_stack;
pub mod wasi;

View file

@ -0,0 +1,9 @@
#![cfg(test)]
mod test_basics;
mod test_convert;
mod test_f32;
mod test_f64;
mod test_i32;
mod test_i64;
mod test_mem;

View file

@ -1,8 +1,8 @@
#![cfg(test)]
use crate::test_utils::{const_value, create_exported_function_no_locals, default_state};
use crate::{Action, ImportDispatcher, Instance, ValueStack, DEFAULT_IMPORTS};
use bumpalo::{collections::Vec, Bump};
use roc_wasm_interp::test_utils::{const_value, create_exported_function_no_locals, default_state};
use roc_wasm_interp::{Action, ImportDispatcher, Instance, ValueStack, DEFAULT_IMPORTS};
use roc_wasm_module::sections::{Import, ImportDesc};
use roc_wasm_module::{
opcodes::OpCode, sections::ElementSegment, Export, ExportType, SerialBuffer, Serialize,

View file

@ -1,6 +1,6 @@
#![cfg(test)]
use roc_wasm_interp::test_utils::test_op_example;
use crate::test_utils::test_op_example;
use roc_wasm_module::{opcodes::OpCode::*, Value};
#[test]

View file

@ -1,6 +1,6 @@
#![cfg(test)]
use roc_wasm_interp::test_utils::test_op_example;
use crate::test_utils::test_op_example;
use roc_wasm_module::{opcodes::OpCode, opcodes::OpCode::*, Value};
fn test_f32_comparison(op: OpCode, arg1: f32, arg2: f32, expected: bool) {

View file

@ -1,6 +1,6 @@
#![cfg(test)]
use roc_wasm_interp::test_utils::test_op_example;
use crate::test_utils::test_op_example;
use roc_wasm_module::{opcodes::OpCode, opcodes::OpCode::*, Value};
fn test_f64_comparison(op: OpCode, arg1: f64, arg2: f64, expected: bool) {

View file

@ -1,6 +1,6 @@
#![cfg(test)]
use roc_wasm_interp::test_utils::test_op_example;
use crate::test_utils::test_op_example;
use roc_wasm_module::{opcodes::OpCode, opcodes::OpCode::*, Value};
fn test_i32_binop(op: OpCode, arg1: i32, arg2: i32, expected: i32) {

View file

@ -1,6 +1,6 @@
#![cfg(test)]
use roc_wasm_interp::test_utils::test_op_example;
use crate::test_utils::test_op_example;
use roc_wasm_module::{opcodes::OpCode, opcodes::OpCode::*, Value};
fn test_i64_comparison(op: OpCode, arg1: i64, arg2: i64, expected: bool) {

View file

@ -1,5 +1,5 @@
use crate::{test_utils::create_exported_function_no_locals, Instance, DEFAULT_IMPORTS};
use bumpalo::{collections::Vec, Bump};
use roc_wasm_interp::{test_utils::create_exported_function_no_locals, Instance, DEFAULT_IMPORTS};
use roc_wasm_module::{
opcodes::OpCode,
sections::{DataMode, DataSegment, MemorySection},