mirror of
https://github.com/fluencelabs/parity-wasm
synced 2025-05-24 13:11:34 +00:00
wasm_conversions
This commit is contained in:
parent
e56c334391
commit
328e08358d
@ -26,7 +26,9 @@ run_test!("break-drop", wasm_break_drop);
|
||||
run_test!("call_indirect", wasm_call_indirect);
|
||||
run_test!("call", wasm_call);
|
||||
run_test!("comments", wasm_comments);
|
||||
// TODO: run_test!("conversions", wasm_conversions);
|
||||
// TODO: commented out until sNaN issue is resolved:
|
||||
// https://github.com/NikVolf/parity-wasm/blob/b5aaf103cf28f1e36df832f4883f55043e67894b/src/interpreter/value.rs#L510
|
||||
// run_test!("conversions", wasm_conversions);
|
||||
// TODO: run_test!("custom_section", wasm_custom_section);
|
||||
run_test!("endianness", wasm_endianness);
|
||||
run_test!("f32_exports", wasm_exports);
|
||||
|
@ -274,7 +274,9 @@ macro_rules! impl_try_truncate_into {
|
||||
return Err(Error::Value("invalid float value for this operation".into()));
|
||||
}
|
||||
|
||||
if self < $into::MIN as $from || self > $into::MAX as $from {
|
||||
// range check
|
||||
let result = self as $into;
|
||||
if result as $from != self.trunc() {
|
||||
return Err(Error::Value("invalid float value for this operation".into()));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user