This commit is contained in:
Liigo Zhuang
2018-07-12 09:54:58 +08:00
parent 823e5a4fd9
commit e666371ae3
2 changed files with 2 additions and 2 deletions

View File

@ -418,7 +418,7 @@ extern "C" {
#[wasm_bindgen(method, js_name = getInt8)]
pub fn get_int8(this: &DataView, byte_offset: usize) -> i8;
/// The getInt8() method gets a signed 8-bit integer (byte) at the specified
/// The getUint8() method gets a unsigned 8-bit integer (byte) at the specified
/// byte offset from the start of the DataView.
///
/// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView/getUint8

View File

@ -45,7 +45,7 @@ fn test() {
import * as wasm from "./out";
export function test() {
var bytes = new Int8Array(10);
const bytes = new Int8Array(10);
bytes[2] = 2;
wasm.test_data_view(bytes.buffer, 2, 8);
assert.equal(bytes[2], 42);