1014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// Copyright 2015 the V8 project authors. All rights reserved.
2014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// Use of this source code is governed by a BSD-style license that can be
3014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// found in the LICENSE file.
4014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
5014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch(function() {
6014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
7014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch"use strict";
8014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
9014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochvar _oldLoad = load;
10014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
11014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// Filter load paths in the ecmascript_simd tests that
12014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// assume the test is run with a current working directory
13014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// set to the directory containing the test.
14014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochload = function(filename) {
15014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch  // Decide if this is the compliance test or the benchmarks.
16014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch  if (filename === 'ecmascript_simd.js' ||
17014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch      filename === 'ecmascript_simd_tests.js') {
18014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch    _oldLoad('test/simdjs/data/src/' + filename);
19014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch  } else {
20014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch    _oldLoad('test/simdjs/data/src/benchmarks/' + filename);
21014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch  }
22014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch};
23014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
24014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// To enable SIMD polyfill, load ecmascript_simd.js here,
25014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// add to resources in SimdJs.json as well as the script
26014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// to re-generate SimdJs.json.
27014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
28014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochload('base.js');
29014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
30014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch})();
31014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
32014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// ecmascript_simd_tests logs errors to the console.
33014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochvar console = {
34014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch  log: function(x) { print(x); },
35014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch};
36014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
37014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch
38014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// Disable value type tests for now. The value semantics tests are incorrect.
39014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdoch// TODO(bbudge): Drop when tests are fixed.
40014dc512cdd3e367bee49a713fdc5ed92584a3e5Ben Murdochvar skipValueTests = true;
41