Remove old fixtures. (#54)
Remove all old test fixtures that migrated in this repo from the parity-wasm. Also, use .wast files instead of compiled .wasm. I believe this is more convenient than testing a .wasm file and having a corresponding .wast file, which might go out of sync.
This commit is contained in:
parent
93423d9393
commit
4e8d113f84
Binary file not shown.
Binary file not shown.
|
@ -1,24 +0,0 @@
|
||||||
(module
|
|
||||||
(type (;0;) (func (result i32)))
|
|
||||||
(func (;0;) (type 0) (result i32)
|
|
||||||
i64.const 9223372036854775807
|
|
||||||
i64.const -9223372036854775808
|
|
||||||
i64.const -1152894205662152753
|
|
||||||
i64.const -8192
|
|
||||||
i32.const 1024
|
|
||||||
i32.const 2048
|
|
||||||
i32.const 4096
|
|
||||||
i32.const 8192
|
|
||||||
i32.const 16384
|
|
||||||
i32.const 32767
|
|
||||||
i32.const -1024
|
|
||||||
i32.const -2048
|
|
||||||
i32.const -4096
|
|
||||||
i32.const -8192
|
|
||||||
i32.const -16384
|
|
||||||
i32.const -32768
|
|
||||||
i32.const -2147483648
|
|
||||||
i32.const 2147483647
|
|
||||||
return
|
|
||||||
)
|
|
||||||
)
|
|
Binary file not shown.
39560
res/cases/v1/hello.wast
39560
res/cases/v1/hello.wast
File diff suppressed because one or more lines are too long
Binary file not shown.
|
@ -1,16 +0,0 @@
|
||||||
(module
|
|
||||||
(type (;0;) (func (result i32)))
|
|
||||||
(func (;0;) (type 0) (result i32)
|
|
||||||
(local i32)
|
|
||||||
i32.const 0
|
|
||||||
set_local 0
|
|
||||||
i32.const 0
|
|
||||||
if i32
|
|
||||||
i32.const 5
|
|
||||||
else
|
|
||||||
i32.const 7
|
|
||||||
end
|
|
||||||
set_local 0
|
|
||||||
get_local 0
|
|
||||||
return)
|
|
||||||
)
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,11 +0,0 @@
|
||||||
(module
|
|
||||||
(import "env" "memory" (memory (;0;) 256 256))
|
|
||||||
(type (;0;) (func (result i32)))
|
|
||||||
(func (;0;) (type 0) (result i32)
|
|
||||||
(local i32)
|
|
||||||
get_local 0
|
|
||||||
i64.const 72340172838076673
|
|
||||||
i64.store offset=32 align=1
|
|
||||||
i32.const 1
|
|
||||||
)
|
|
||||||
)
|
|
Binary file not shown.
|
@ -1,20 +0,0 @@
|
||||||
(module
|
|
||||||
(type (;0;) (func (param i32 i32) (result i32)))
|
|
||||||
(type (;1;) (func (param i32)))
|
|
||||||
(type (;2;) (func (param i32) (result i64)))
|
|
||||||
(type (;3;) (func (param i32 i32 i32)))
|
|
||||||
(type (;4;) (func (param i32 i32 i32 i32)))
|
|
||||||
(type (;5;) (func (result i32)))
|
|
||||||
(type (;6;) (func))
|
|
||||||
(type (;7;) (func (param i32 i32 i32) (result i32)))
|
|
||||||
(type (;8;) (func (param i32 i32)))
|
|
||||||
(type (;9;) (func (param i32) (result i32)))
|
|
||||||
(type (;10;) (func (param i32 i32 i32 i32) (result i32)))
|
|
||||||
(type (;11;) (func (param i32 i32 i32 i32 i32)))
|
|
||||||
(type (;12;) (func (param i32 i32 i64 i32 i32) (result i32)))
|
|
||||||
(type (;13;) (func (param i32 i32 i32 i32 i32 i32) (result i32)))
|
|
||||||
(type (;14;) (func (param i32 i32 i32 i32 i32 i32 i32)))
|
|
||||||
(type (;15;) (func (param i32 i32 i32 i32 i32 i32) (result i32)))
|
|
||||||
(type (;16;) (func (param i32 i32 i32 i32 i32) (result i32)))
|
|
||||||
(type (;17;) (func (param i32 i32) (result i64)))
|
|
||||||
)
|
|
Binary file not shown.
|
@ -1,5 +0,0 @@
|
||||||
(module
|
|
||||||
(type (;0;) (func (param i32 i32) (result i32)))
|
|
||||||
(type (;1;) (func (param i32)))
|
|
||||||
(import "env" "abort" (func (;0;) (type 1)))
|
|
||||||
)
|
|
Binary file not shown.
|
@ -1,21 +0,0 @@
|
||||||
(module
|
|
||||||
(type (;0;) (func (param i32) (result i32)))
|
|
||||||
(global (;0;) (mut i32) (i32.const 0))
|
|
||||||
(func (;55;) (type 0) (param i32) (result i32)
|
|
||||||
(local i32)
|
|
||||||
block i32 ;; label = @1
|
|
||||||
get_global 0
|
|
||||||
set_local 1
|
|
||||||
get_global 0
|
|
||||||
get_local 0
|
|
||||||
i32.add
|
|
||||||
set_global 0
|
|
||||||
get_global 0
|
|
||||||
i32.const 15
|
|
||||||
i32.add
|
|
||||||
i32.const -16
|
|
||||||
i32.and
|
|
||||||
set_global 0
|
|
||||||
get_local 1
|
|
||||||
end)
|
|
||||||
)
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -1,26 +0,0 @@
|
||||||
#![feature(link_args)]
|
|
||||||
#![feature(lang_items)]
|
|
||||||
#![feature(start)]
|
|
||||||
#![no_std]
|
|
||||||
|
|
||||||
#[lang="panic_fmt"]
|
|
||||||
extern fn panic_fmt(_: ::core::fmt::Arguments, _: &'static str, _: u32) -> ! {
|
|
||||||
}
|
|
||||||
|
|
||||||
#[lang = "eh_personality"]
|
|
||||||
extern fn eh_personality() {
|
|
||||||
}
|
|
||||||
|
|
||||||
#[link_args = "-s EXPORTED_FUNCTIONS=['_hello_world']"]
|
|
||||||
extern {}
|
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
pub fn hello_world() -> isize {
|
|
||||||
45 + 99
|
|
||||||
}
|
|
||||||
|
|
||||||
#[start]
|
|
||||||
fn main(argc: isize, argv: *const *const u8) -> isize {
|
|
||||||
/* Intentionally left blank */
|
|
||||||
0
|
|
||||||
}
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,21 +0,0 @@
|
||||||
#![feature(link_args)]
|
|
||||||
#![feature(lang_items)]
|
|
||||||
#![feature(start)]
|
|
||||||
#![no_std]
|
|
||||||
#![no_main]
|
|
||||||
|
|
||||||
#[lang="panic_fmt"]
|
|
||||||
extern fn panic_fmt(_: ::core::fmt::Arguments, _: &'static str, _: u32) {
|
|
||||||
}
|
|
||||||
|
|
||||||
#[lang = "eh_personality"]
|
|
||||||
extern fn eh_personality() {
|
|
||||||
}
|
|
||||||
|
|
||||||
#[link_args = "-s WASM=1 -s NO_EXIT_RUNTIME=1 -s NO_FILESYSTEM=1"]
|
|
||||||
extern {}
|
|
||||||
|
|
||||||
#[no_mangle]
|
|
||||||
pub fn hello_world() -> isize {
|
|
||||||
45 + 99
|
|
||||||
}
|
|
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
@ -75,7 +75,8 @@ fn load_from_file(filename: &str) -> Module {
|
||||||
let mut file = File::open(filename).unwrap();
|
let mut file = File::open(filename).unwrap();
|
||||||
let mut buf = Vec::new();
|
let mut buf = Vec::new();
|
||||||
file.read_to_end(&mut buf).unwrap();
|
file.read_to_end(&mut buf).unwrap();
|
||||||
Module::from_buffer(buf).unwrap()
|
let wasm_buf = ::wabt::wat2wasm(&buf).unwrap();
|
||||||
|
Module::from_buffer(wasm_buf).unwrap()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
@ -83,7 +84,7 @@ fn interpreter_inc_i32() {
|
||||||
// Name of function contained in WASM file (note the leading underline)
|
// Name of function contained in WASM file (note the leading underline)
|
||||||
const FUNCTION_NAME: &'static str = "_inc_i32";
|
const FUNCTION_NAME: &'static str = "_inc_i32";
|
||||||
// The WASM file containing the module and function
|
// The WASM file containing the module and function
|
||||||
const WASM_FILE: &str = &"res/cases/v1/inc_i32.wasm";
|
const WASM_FILE: &str = &"res/fixtures/inc_i32.wast";
|
||||||
|
|
||||||
let module = load_from_file(WASM_FILE);
|
let module = load_from_file(WASM_FILE);
|
||||||
|
|
||||||
|
@ -111,7 +112,7 @@ fn interpreter_accumulate_u8() {
|
||||||
// Name of function contained in WASM file (note the leading underline)
|
// Name of function contained in WASM file (note the leading underline)
|
||||||
const FUNCTION_NAME: &'static str = "_accumulate_u8";
|
const FUNCTION_NAME: &'static str = "_accumulate_u8";
|
||||||
// The WASM file containing the module and function
|
// The WASM file containing the module and function
|
||||||
const WASM_FILE: &str = &"res/cases/v1/accumulate_u8.wasm";
|
const WASM_FILE: &str = &"res/fixtures/accumulate_u8.wast";
|
||||||
// The octet sequence being accumulated
|
// The octet sequence being accumulated
|
||||||
const BUF: &[u8] = &[9,8,7,6,5,4,3,2,1];
|
const BUF: &[u8] = &[9,8,7,6,5,4,3,2,1];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue