Files
wasmtime/misc_testsuite/div-rem.wast
Dan Gohman e691bf36f3 Reorganize tests (#523)
* Refactor Lightbeam's tests.

This refactors Lightbeam's tests.rs file into several pieces, separating
quickcheck tests into their own file, and moving tests which can be run as
wast tests into `tests/misc_testsuite`, and creating a tests directory
for the rest.

* Remove the old filetests tests.

These are all covered by misc_testsuite and spec_testsuite tests.

* rustfmt

* Remove the "bench" feature.
2019-11-08 16:16:12 -06:00

32 lines
835 B
Plaintext

(module
(func (export "i32.div_s") (param i32) (param i32) (result i32)
(i32.div_s (local.get 0) (local.get 1))
)
)
(assert_return (invoke "i32.div_s" (i32.const -1) (i32.const -1)) (i32.const 1))
(module
(func (export "i32.rem_s") (param i32) (param i32) (result i32)
(i32.rem_s (local.get 0) (local.get 1))
)
)
(assert_return (invoke "i32.rem_s" (i32.const 123121) (i32.const -1)) (i32.const 0))
(module
(func (export "i64.div_s") (param i64) (param i64) (result i64)
(i64.div_s (local.get 0) (local.get 1))
)
)
(assert_return (invoke "i64.div_s" (i64.const -1) (i64.const -1)) (i64.const 1))
(module
(func (export "i64.rem_s") (param i64) (param i64) (result i64)
(i64.rem_s (local.get 0) (local.get 1))
)
)
(assert_return (invoke "i64.rem_s" (i64.const 123121) (i64.const -1)) (i64.const 0))