mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
wasm_interp: move tests inside the crate
This commit is contained in:
parent
42a15d07b3
commit
ffd35f5884
9 changed files with 18 additions and 8 deletions
|
@ -1,6 +1,7 @@
|
|||
mod call_stack;
|
||||
mod instance;
|
||||
pub mod test_utils;
|
||||
mod tests;
|
||||
mod value_stack;
|
||||
pub mod wasi;
|
||||
|
||||
|
|
9
crates/wasm_interp/src/tests/mod.rs
Normal file
9
crates/wasm_interp/src/tests/mod.rs
Normal 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;
|
|
@ -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,
|
|
@ -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]
|
|
@ -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) {
|
|
@ -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) {
|
|
@ -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) {
|
|
@ -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) {
|
|
@ -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},
|
Loading…
Add table
Add a link
Reference in a new issue