v8/test/mjsunit/wasm/asm-with-wasm-off.js
Michael Starzinger 4d7e7acdf2 Fix test to not teach ClusterFuzz ugly tricks.
R=bradnelson@chromium.org
TEST=mjsunit/wasm/asm-with-wasm-off
BUG=chromium:696655

Change-Id: I9375d8ac2f111009233dc480529fd0f0e00fe811
Reviewed-on: https://chromium-review.googlesource.com/447398
Reviewed-by: Michael Achenbach <machenbach@chromium.org>
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43472}
2017-02-28 10:25:50 +00:00

21 lines
568 B
JavaScript

// Copyright 2017 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: --validate-asm --allow-natives-syntax
// NOTE: This is in it's own file because it calls %DisallowCodegenFromStrings,
// which messes with the isolate's state.
(function testAsmWithWasmOff() {
%DisallowCodegenFromStrings();
function Module() {
'use asm';
function foo() {
return 0;
}
return {foo: foo};
}
Module();
assertTrue(%IsAsmWasmCode(Module));
})();