Sign in
webkit
/
WebKit
/
c25f028e88f8f7365b75d7f2fd90f40a04d1d3fa
/
.
/
JSTests
/
wasm
/
modules
/
js-wasm-function.js
blob: 0be5b81f3a00851f7f28b414d6262a7c085f7bfb [
file
] [
log
] [
blame
]
import
{
sum
}
from
"./sum.wasm"
import
*
as assert from
'../assert.js'
;
assert
.
isFunction
(
sum
);
assert
.
eq
(
sum
(
32
,
42
),
74
);
assert
.
eq
(
sum
(-
2
,
42
),
40
);
assert
.
throws
(()
=>
{
sum
=
32
;
},
TypeError
,
`
Attempted
to assign to readonly property
.`);