Closed jdm closed 7 years ago
@jdm I would like to try this.
Nice! Let us know if you need any help :)
Thanks @emilio. If I'm correct, the test case should be look like this:
rooted!(in(cx) let rval = ptr::null_mut());
typedarray!(in(cx) let array: Uint8Array = rval.get());
assert!(array.is_err());
That looks right!
We should add a testcase to
tests/typedarray.rs
that uses thetypedarray!
macro onptr::null_mut()
, and write code that correctly returns an Err value if that's encountered.Code:
src/typedarray.rs