[wasm] binary and test for hosts' integration tests
Ensure wasm binaries intended to be used in hosts of v8, such as chromium, are up to date. See https://codereview.chromium.org/2255673003/ BUG=v8:5072 Review-Url: https://codereview.chromium.org/2259693002 Cr-Commit-Position: refs/heads/master@{#38694}
This commit is contained in:
parent
3310b44e53
commit
93b7251f74
18
test/mjsunit/wasm/ensure-wasm-binaries-up-to-date.js
Normal file
18
test/mjsunit/wasm/ensure-wasm-binaries-up-to-date.js
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright 2016 the V8 project authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --expose-wasm
|
||||
|
||||
// Ensure checked in wasm binaries used by integration tests from v8 hosts
|
||||
// (such as chromium) are up to date.
|
||||
|
||||
load('test/mjsunit/mjsunit.js');
|
||||
|
||||
(function ensure_incrementer() {
|
||||
var buff = readbuffer("test/mjsunit/wasm/incrementer.wasm");
|
||||
var mod = new WebAssembly.Module(buff);
|
||||
var inst = new WebAssembly.Instance(mod);
|
||||
var inc = inst.exports.increment;
|
||||
assertEquals(3, inc(2));
|
||||
}())
|
BIN
test/mjsunit/wasm/incrementer.wasm
Normal file
BIN
test/mjsunit/wasm/incrementer.wasm
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user