[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:
mtrofin 2016-08-17 20:17:53 -07:00 committed by Commit bot
parent 3310b44e53
commit 93b7251f74
2 changed files with 18 additions and 0 deletions

View 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));
}())

Binary file not shown.