summaryrefslogtreecommitdiff
path: root/deps/v8/test
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-04-19 10:50:44 -0700
committerisaacs <i@izs.me>2013-04-19 10:50:44 -0700
commit50624a50ee484b8a53cd4f1155e4e53f19c803be (patch)
tree37c4d13efd0b9f615eceaff99ef31dd411da6696 /deps/v8/test
parent90266750617adb1ce1ca4ce43fe48f9b0fa11343 (diff)
downloadnode-new-50624a50ee484b8a53cd4f1155e4e53f19c803be.tar.gz
V8: Upgrade to 3.18.1
Diffstat (limited to 'deps/v8/test')
-rw-r--r--deps/v8/test/benchmarks/testcfg.py105
-rw-r--r--deps/v8/test/cctest/SConscript152
-rw-r--r--deps/v8/test/cctest/cctest.gyp4
-rw-r--r--deps/v8/test/cctest/testcfg.py97
-rw-r--r--deps/v8/test/es5conform/README14
-rw-r--r--deps/v8/test/es5conform/es5conform.status316
-rw-r--r--deps/v8/test/es5conform/testcfg.py114
-rw-r--r--deps/v8/test/message/testcfg.py115
-rw-r--r--deps/v8/test/mjsunit/harmony/generators-objects.js27
-rw-r--r--deps/v8/test/mjsunit/harmony/typedarrays.js2
-rw-r--r--deps/v8/test/mjsunit/regress/regress-grow-store-smi-check.js (renamed from deps/v8/test/es5conform/harness-adapt.js)69
-rw-r--r--deps/v8/test/mjsunit/string-fromcharcode.js21
-rw-r--r--deps/v8/test/mjsunit/testcfg.py133
-rw-r--r--deps/v8/test/mozilla/testcfg.py97
-rw-r--r--deps/v8/test/preparser/testcfg.py144
-rw-r--r--deps/v8/test/sputnik/README6
-rw-r--r--deps/v8/test/sputnik/sputnik.status231
-rw-r--r--deps/v8/test/sputnik/testcfg.py118
-rw-r--r--deps/v8/test/test262/testcfg.py112
19 files changed, 82 insertions, 1795 deletions
diff --git a/deps/v8/test/benchmarks/testcfg.py b/deps/v8/test/benchmarks/testcfg.py
deleted file mode 100644
index 5bbad7ac1b..0000000000
--- a/deps/v8/test/benchmarks/testcfg.py
+++ /dev/null
@@ -1,105 +0,0 @@
-# Copyright 2011 the V8 project authors. All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-import test
-import os
-from os.path import join, split
-
-def GetSuite(name, root):
- # Not implemented.
- return None
-
-
-def IsNumber(string):
- try:
- float(string)
- return True
- except ValueError:
- return False
-
-
-class BenchmarkTestCase(test.TestCase):
-
- def __init__(self, path, context, mode):
- super(BenchmarkTestCase, self).__init__(context, split(path), mode)
- self.root = path
-
- def GetLabel(self):
- return '%s benchmark %s' % (self.mode, self.GetName())
-
- def IsFailureOutput(self, output):
- if output.exit_code != 0:
- return True
- lines = output.stdout.splitlines()
- for line in lines:
- colon_index = line.find(':')
- if colon_index >= 0:
- if not IsNumber(line[colon_index+1:].strip()):
- return True
- return False
-
- def GetCommand(self):
- result = self.context.GetVmCommand(self, self.mode)
- result.append(join(self.root, 'run.js'))
- return result
-
- def GetName(self):
- return 'V8'
-
- def BeforeRun(self):
- os.chdir(self.root)
-
- def AfterRun(self, result):
- os.chdir(self.context.buildspace)
-
- def GetSource(self):
- return open(join(self.root, 'run.js')).read()
-
- def GetCustomFlags(self, mode):
- return []
-
-
-class BenchmarkTestConfiguration(test.TestConfiguration):
-
- def __init__(self, context, root):
- super(BenchmarkTestConfiguration, self).__init__(context, root)
-
- def ListTests(self, current_path, path, mode, variant_flags):
- path = self.context.workspace
- path = join(path, 'benchmarks')
- test = BenchmarkTestCase(path, self.context, mode)
- return [test]
-
- def GetBuildRequirements(self):
- return ['d8']
-
- def GetTestStatus(self, sections, defs):
- pass
-
-def GetConfiguration(context, root):
- return BenchmarkTestConfiguration(context, root)
diff --git a/deps/v8/test/cctest/SConscript b/deps/v8/test/cctest/SConscript
deleted file mode 100644
index ce42b0d72b..0000000000
--- a/deps/v8/test/cctest/SConscript
+++ /dev/null
@@ -1,152 +0,0 @@
-# Copyright 2012 the V8 project authors. All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-import sys
-from os.path import join, dirname, abspath
-root_dir = dirname(File('SConstruct').rfile().abspath)
-sys.path.append(join(root_dir, 'tools'))
-import js2c
-Import('context object_files tools')
-
-
-# Needed for test-log. Paths are relative to the cctest dir.
-JS_FILES_FOR_TESTS = [
- '../../../tools/splaytree.js',
- '../../../tools/codemap.js',
- '../../../tools/csvparser.js',
- '../../../tools/consarray.js',
- '../../../tools/profile.js',
- '../../../tools/profile_view.js',
- '../../../tools/logreader.js',
- 'log-eq-of-logging-and-traversal.js',
-]
-
-
-SOURCES = {
- 'all': [
- 'gay-fixed.cc',
- 'gay-precision.cc',
- 'gay-shortest.cc',
- 'test-accessors.cc',
- 'test-alloc.cc',
- 'test-api.cc',
- 'test-ast.cc',
- 'test-bignum-dtoa.cc',
- 'test-bignum.cc',
- 'test-circular-queue.cc',
- 'test-compiler.cc',
- 'test-conversions.cc',
- 'test-cpu-profiler.cc',
- 'test-dataflow.cc',
- 'test-date.cc',
- 'test-debug.cc',
- 'test-declarative-accessors.cc',
- 'test-decls.cc',
- 'test-deoptimization.cc',
- 'test-dictionary.cc',
- 'test-diy-fp.cc',
- 'test-double.cc',
- 'test-dtoa.cc',
- 'test-fast-dtoa.cc',
- 'test-fixed-dtoa.cc',
- 'test-flags.cc',
- 'test-func-name-inference.cc',
- 'test-hashing.cc',
- 'test-hashmap.cc',
- 'test-heap-profiler.cc',
- 'test-heap.cc',
- 'test-list.cc',
- 'test-liveedit.cc',
- 'test-lock.cc',
- 'test-lockers.cc',
- 'test-log.cc',
- 'test-mark-compact.cc',
- 'test-parsing.cc',
- 'test-platform-tls.cc',
- 'test-profile-generator.cc',
- 'test-random.cc',
- 'test-regexp.cc',
- 'test-reloc-info.cc',
- 'test-serialize.cc',
- 'test-sockets.cc',
- 'test-spaces.cc',
- 'test-strings.cc',
- 'test-symbols.cc',
- 'test-strtod.cc',
- 'test-thread-termination.cc',
- 'test-threads.cc',
- 'test-unbound-queue.cc',
- 'test-utils.cc',
- 'test-version.cc',
- 'test-weakmaps.cc'
- ],
- 'arch:arm': [
- 'test-assembler-arm.cc',
- 'test-disasm-arm.cc'
- ],
- 'arch:ia32': [
- 'test-assembler-ia32.cc',
- 'test-disasm-ia32.cc',
- 'test-log-stack-tracer.cc'
- ],
- 'arch:x64': ['test-assembler-x64.cc',
- 'test-macro-assembler-x64.cc',
- 'test-log-stack-tracer.cc',
- 'test-disasm-x64.cc'],
- 'arch:mips': ['test-assembler-mips.cc',
- 'test-disasm-mips.cc'],
- 'os:linux': ['test-platform-linux.cc'],
- 'os:macos': ['test-platform-macos.cc'],
- 'os:nullos': ['test-platform-nullos.cc'],
- 'os:win32': ['test-platform-win32.cc']
-}
-
-
-def Build():
- cctest_files = context.GetRelevantSources(SOURCES)
- env = Environment(tools=tools)
- env.Replace(**context.flags['cctest'])
- context.ApplyEnvOverrides(env)
- env['BUILDERS']['JS2C'] = Builder(action=js2c.JS2C)
-
- # Combine the JavaScript library files into a single C++ file and
- # compile it.
- js_files = [s for s in JS_FILES_FOR_TESTS]
- js_files_src = env.JS2C(
- ['js-files-for-cctest.cc'], js_files, **{'TYPE': 'TEST', 'COMPRESSION': 'off'})
- js_files_obj = context.ConfigureObject(env, js_files_src, CPPPATH=['.'])
-
- # There seems to be a glitch in the way scons decides where to put
- # PDB files when compiling using MSVC so we specify it manually.
- # This should not affect any other platforms.
- object_files.append(js_files_obj)
- return env.Program('cctest', ['cctest.cc', cctest_files, object_files],
- PDB='cctest.exe.pdb')
-
-
-program = Build()
-Return('program')
diff --git a/deps/v8/test/cctest/cctest.gyp b/deps/v8/test/cctest/cctest.gyp
index f58d958248..ecffeaa6f7 100644
--- a/deps/v8/test/cctest/cctest.gyp
+++ b/deps/v8/test/cctest/cctest.gyp
@@ -159,7 +159,9 @@
'dependencies': ['../../tools/gyp/v8.gyp:v8_snapshot'],
},
{
- 'dependencies': ['../../tools/gyp/v8.gyp:v8_nosnapshot'],
+ 'dependencies': [
+ '../../tools/gyp/v8.gyp:v8_nosnapshot.<(v8_target_arch)',
+ ],
}],
],
}, {
diff --git a/deps/v8/test/cctest/testcfg.py b/deps/v8/test/cctest/testcfg.py
index 4c2cd231c8..4ab5ab5b7d 100644
--- a/deps/v8/test/cctest/testcfg.py
+++ b/deps/v8/test/cctest/testcfg.py
@@ -84,100 +84,3 @@ class CcTestSuite(testsuite.TestSuite):
def GetSuite(name, root):
return CcTestSuite(name, root)
-
-
-# Deprecated definitions below.
-# TODO(jkummerow): Remove when SCons is no longer supported.
-
-
-from os.path import exists, join, normpath
-import test
-
-
-class CcTestCase(test.TestCase):
-
- def __init__(self, path, executable, mode, raw_name, dependency, context, variant_flags):
- super(CcTestCase, self).__init__(context, path, mode)
- self.executable = executable
- self.raw_name = raw_name
- self.dependency = dependency
- self.variant_flags = variant_flags
-
- def GetLabel(self):
- return "%s %s %s" % (self.mode, self.path[-2], self.path[-1])
-
- def GetName(self):
- return self.path[-1]
-
- def BuildCommand(self, name):
- serialization_file = ''
- if exists(join(self.context.buildspace, 'obj', 'test', self.mode)):
- serialization_file = join('obj', 'test', self.mode, 'serdes')
- else:
- serialization_file = join('obj', 'serdes')
- if not exists(join(self.context.buildspace, 'obj')):
- os.makedirs(join(self.context.buildspace, 'obj'))
- serialization_file += '_' + self.GetName()
- serialization_file = join(self.context.buildspace, serialization_file)
- serialization_file += ''.join(self.variant_flags).replace('-', '_')
- serialization_option = '--testing_serialization_file=' + serialization_file
- result = [ self.executable, name, serialization_option ]
- result += self.context.GetVmFlags(self, self.mode)
- return result
-
- def GetCommand(self):
- return self.BuildCommand(self.raw_name)
-
- def Run(self):
- if self.dependency != '':
- dependent_command = self.BuildCommand(self.dependency)
- output = self.RunCommand(dependent_command)
- if output.HasFailed():
- return output
- return test.TestCase.Run(self)
-
-
-class CcTestConfiguration(test.TestConfiguration):
-
- def __init__(self, context, root):
- super(CcTestConfiguration, self).__init__(context, root)
-
- def GetBuildRequirements(self):
- return ['cctests']
-
- def ListTests(self, current_path, path, mode, variant_flags):
- executable = 'cctest'
- if utils.IsWindows():
- executable += '.exe'
- executable = join(self.context.buildspace, executable)
- if not exists(executable):
- executable = join('obj', 'test', mode, 'cctest')
- if utils.IsWindows():
- executable += '.exe'
- executable = join(self.context.buildspace, executable)
- full_command = self.context.processor([executable, '--list'])
- output = test.Execute(full_command, self.context)
- if output.exit_code != 0:
- print output.stdout
- print output.stderr
- return []
- result = []
- for test_desc in output.stdout.strip().split():
- raw_test, dependency = test_desc.split('<')
- relative_path = raw_test.split('/')
- full_path = current_path + relative_path
- if dependency != '':
- dependency = relative_path[0] + '/' + dependency
- if self.Contains(path, full_path):
- result.append(CcTestCase(full_path, executable, mode, raw_test, dependency, self.context, variant_flags))
- result.sort()
- return result
-
- def GetTestStatus(self, sections, defs):
- status_file = join(self.root, 'cctest.status')
- if exists(status_file):
- test.ReadConfigurationInto(status_file, sections, defs)
-
-
-def GetConfiguration(context, root):
- return CcTestConfiguration(context, root)
diff --git a/deps/v8/test/es5conform/README b/deps/v8/test/es5conform/README
deleted file mode 100644
index 675249e0f1..0000000000
--- a/deps/v8/test/es5conform/README
+++ /dev/null
@@ -1,14 +0,0 @@
-This directory contains code for binding the es5conform test suite
-into the v8 test harness. To use the tests check out the es5conform
-tests from
-
- https://es5conform.svn.codeplex.com/svn
-
-in revision 71525 as 'data' in this directory. Using later version
-may be possible but the tests are only known to pass (and indeed run)
-with that revision.
-
-If you do update to a newer revision you may have to change the test
-harness adapter code since it uses internal functionality from the
-harness that comes bundled with the tests. You will most likely also
-have to update the test expectation file.
diff --git a/deps/v8/test/es5conform/es5conform.status b/deps/v8/test/es5conform/es5conform.status
deleted file mode 100644
index 12ebf903e9..0000000000
--- a/deps/v8/test/es5conform/es5conform.status
+++ /dev/null
@@ -1,316 +0,0 @@
-# Copyright 2009 the V8 project authors. All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-prefix es5conform
-def UNIMPLEMENTED = PASS || FAIL
-def FAIL_OK = FAIL, OKAY
-
-
-##############################################################################
-# Non UTF8 characters in test files.
-chapter10/10.4/10.4.2/10.4.2-3-c-2-s: FAIL_OK
-chapter10/10.4/10.4.2/10.4.2-3-c-1-s: FAIL_OK
-chapter10/10.4/10.4.2/10.4.2-2-c-1: FAIL_OK
-
-# We do not implement the error chekcs specified in the production rules
-# of 11.1.5 (Object initializer).
-# We are compatible with Safari and Firefox.
-chapter11/11.1/11.1.5: UNIMPLEMENTED
-
-# Our Function object has an "arguments" property which is used as a
-# non-property in the test.
-chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-183: FAIL_OK
-
-# Our Function object has a "caller" property which is used as a
-# non-property in in the test.
-chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-184: FAIL_OK
-
-# Our function object has a name property which is used as a
-# non-property in the test.
-chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-188: FAIL_OK
-
-# NOT IMPLEMENTED: RegExp.prototype.source
-chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-212: UNIMPLEMENTED
-
-# NOT IMPLEMENTED: RegExp.prototype.global
-chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-213: UNIMPLEMENTED
-
-# NOT IMPLEMENTED: RegExp.prototype.ignoreCase
-chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-214: UNIMPLEMENTED
-
-# NOT IMPLEMENTED: RegExp.prototype.multiline
-chapter15/15.2/15.2.3/15.2.3.3/15.2.3.3-4-215: UNIMPLEMENTED
-
-# All of the tests below marked SUBSETFAIL (in 15.2.3.4) fail because
-# the tests assumes that objects can not have more properties
-# than those described in the spec - but according to spec they can
-# have additional properties.
-# All compareArray calls in these tests could be exchanged with a
-# isSubsetOfArray call (I will upload a patch to the es5conform site).
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-1: FAIL_OK
-
-# SUBSETFAIL + we do not implement all methods on Object.
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-2: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-3: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-4: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-5: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-6: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-7: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-11: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-14: FAIL_OK
-
-# EvalError.prototype does not have message property.
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-15: FAIL
-
-# Rangeerror.prototype does not have message property.
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-16: FAIL
-
-# ReferenceError.prototype does not have message property.
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-17: FAIL
-
-# SyntaxError.prototype does not have message property.
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-18: FAIL
-
-# TypeError.prototype does not have message property.
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-19: FAIL
-
-# URIError.prototype does not have message property.
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-20: FAIL
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-22: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-23: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-24: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-25: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-26: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-27: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-28: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-29: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-30: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-31: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-32: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-33: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-34: FAIL_OK
-
-# SUBSETFAIL
-chapter15/15.2/15.2.3/15.2.3.4/15.2.3.4-4-35: FAIL_OK
-
-# Bad test - the test at the end should be "i === true".
-chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-8-10: FAIL_OK
-
-# Bad test - according to spec some returns a Boolean, not a number.
-chapter15/15.4/15.4.4/15.4.4.17/15.4.4.17-4-9: FAIL_OK
-
-# Bad test - uses unitialized variable a in precondition check.
-chapter15/15.4/15.4.4/15.4.4.19/15.4.4.19-9-3: FAIL_OK
-
-# We do not implement Array mapping functions correctly if array
-# entries are added for nonexistent entries smaller than length by
-# the callback function. We are compatible with JSC.
-# See http://code.google.com/p/v8/issues/detail?id=755
-chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-1: FAIL_OK
-
-# Bad tests, path in test file is wrong. This will crash the test
-# script so we mark it SKIP.
-chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4: SKIP
-chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-c-ii-4-s: SKIP
-
-# Bad test - deleting the property on o in callbackfn will
-# have no effect on the actual array on which reduceRight is called.
-chapter15/15.4/15.4.4/15.4.4.22/15.4.4.22-9-7: FAIL_OK
-
-##############################################################################
-# Unimplemented parts of strict mode
-# Setting expectations to fail only so that the tests trigger as soon as
-# the strict mode feature gets implemented
-
-# A directive preceeding an 'use strict' directive may not contain
-# an OctalEscapeSequence
-# Incorrect test - need double escape in eval.
-chapter07/7.8/7.8.4/7.8.4-1-s: FAIL
-
-# arguments.caller is non-configurable in strict mode
-# Invalid test case. Checks for "writable == true" and presence of "put"..
-chapter10/10.6/10.6-13-b-3-s: FAIL
-# arguments.callee is non-configurable in strict mode
-# Invalid test case. Checks for "put" property accessor.
-chapter10/10.6/10.6-13-c-3-s: FAIL
-
-# simple assignment throws TypeError if LeftHandSide is a property reference
-# with a primitive base value (this is undefined)
-chapter11/11.13/11.13.1/11.13.1-1-7-s: FAIL
-
-# simple assignment throws TypeError if LeftHandSide is a readonly property
-# in strict mode (Global.NaN)
-chapter11/11.13/11.13.1/11.13.1-4-2-s: FAIL
-# simple assignment throws TypeError if LeftHandSide is a readonly property
-# in strict mode (Global.Infinity)
-chapter11/11.13/11.13.1/11.13.1-4-3-s: FAIL
-# simple assignment throws TypeError if LeftHandSide is a readonly property
-# in strict mode (Global.length)
-chapter11/11.13/11.13.1/11.13.1-4-4-s: FAIL
-# simple assignment throws TypeError if LeftHandSide is a readonly property
-# in strict mode (Global.undefined)
-chapter11/11.13/11.13.1/11.13.1-4-27-s: FAIL
-
-# delete operator throws TypeError when when deleting a non-configurable
-# data property in strict mode (Global.NaN)
-# Invalid test case - "this" is not a global object within the test case.
-# (http://es5conform.codeplex.com/workitem/29151)
-chapter11/11.4/11.4.1/11.4.1-4.a-4-s: FAIL_OK
-
-# delete operator throws ReferenceError when deleting a direct reference
-# to a var in strict mode
-# Invalid test case. Test expects ReferenceError instead of SyntaxError.
-# http://es5conform.codeplex.com/workitem/29084
-chapter11/11.4/11.4.1/11.4.1-5-1-s: FAIL
-# delete operator throws ReferenceError when deleting a direct reference
-# to a function argument in strict mode
-# Invalid test case. Test expects ReferenceError instead of SyntaxError.
-# http://es5conform.codeplex.com/workitem/29084
-chapter11/11.4/11.4.1/11.4.1-5-2-s: FAIL
-# delete operator throws ReferenceError when deleting a direct reference
-# to a function name in strict mode
-# Invalid test case. Test expects ReferenceError instead of SyntaxError.
-# http://es5conform.codeplex.com/workitem/29084
-chapter11/11.4/11.4.1/11.4.1-5-3-s: FAIL
-
-# eval - a function declaring a var named 'eval' throws EvalError in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-1-s: FAIL
-# eval - a function assigning into 'eval' throws EvalError in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-2-s: FAIL
-# eval - a function expr declaring a var named 'eval' throws EvalError
-# in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-3-s: FAIL
-# eval - a function expr assigning into 'eval' throws a EvalError in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-4-s: FAIL
-# eval - a Function declaring var named 'eval' throws EvalError in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-5-s: FAIL
-# eval - a Function assigning into 'eval' throws EvalError in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-6-s: FAIL
-# eval - a direct eval declaring a var named 'eval' throws EvalError
-# in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-7-s: FAIL
-# eval - a direct eval assigning into 'eval' throws EvalError in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-8-s: FAIL
-# eval - an indirect eval declaring a var named 'eval' throws EvalError
-# in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-9-s: FAIL
-# eval - an indirect eval assigning into 'eval' throws EvalError in strict mode
-# Invalid test case. SyntaxError should be expected instead of EvalError.
-chapter12/12.2/12.2.1/12.2.1-10-s: FAIL
-
-# SyntaxError if eval used as function identifier in function declaration
-# with strict body
-# Test fails to return true on success (invalid test case).
-chapter13/13.1/13.1-3-3-s: FAIL
-# SyntaxError if eval used as function identifier in function expression
-# with strict body
-# Test fails to return true on success (invalid test case).
-chapter13/13.1/13.1-3-4-s: FAIL
-# SyntaxError if eval used as function identifier in function declaration
-# in strict code
-# Test fails to return true on success (invalid test case).
-chapter13/13.1/13.1-3-5-s: FAIL
-# SyntaxError if eval used as function identifier in function expression
-# in strict code
-# Test fails to return true on success (invalid test case).
-chapter13/13.1/13.1-3-6-s: FAIL
-# SyntaxError if arguments used as function identifier in function declaration
-# with strict body
-# Test fails to return true on success (invalid test case).
-chapter13/13.1/13.1-3-9-s: FAIL
-# SyntaxError if arguments used as function identifier in function expression
-# with strict body
-# Test fails to return true on success (invalid test case).
-chapter13/13.1/13.1-3-10-s: FAIL
-# SyntaxError if arguments used as function identifier in function declaration
-# in strict code
-# Test fails to return true on success (invalid test case).
-chapter13/13.1/13.1-3-11-s: FAIL
-# SyntaxError if arguments used as function identifier in function expression
-# in strict code
-# Test fails to return true on success (invalid test case).
-chapter13/13.1/13.1-3-12-s: FAIL
-
-# Duplicate combined parameter name allowed in Function constructor called
-# in strict mode if body not strict
-# Test fails to return true on success (invalid test case).
-chapter15/15.3/15.3.2/15.3.2.1/15.3.2.1-11-6-s: FAIL
-
-# Array.prototype.reduce - null passed as thisValue to strict callbackfn
-# Invalid test case: http://es5conform.codeplex.com/workitem/29085
-chapter15/15.4/15.4.4/15.4.4.21/15.4.4.21-9-c-ii-4-s: FAIL
diff --git a/deps/v8/test/es5conform/testcfg.py b/deps/v8/test/es5conform/testcfg.py
deleted file mode 100644
index 7de990d387..0000000000
--- a/deps/v8/test/es5conform/testcfg.py
+++ /dev/null
@@ -1,114 +0,0 @@
-# Copyright 2008 the V8 project authors. All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-import test
-import os
-from os.path import join, exists
-
-
-def GetSuite(name, root):
- # Not implemented.
- return None
-
-
-HARNESS_FILES = ['sth.js']
-
-
-class ES5ConformTestCase(test.TestCase):
-
- def __init__(self, filename, path, context, root, mode, framework):
- super(ES5ConformTestCase, self).__init__(context, path, mode)
- self.filename = filename
- self.framework = framework
- self.root = root
-
- def IsNegative(self):
- return self.filename.endswith('-n.js')
-
- def GetLabel(self):
- return "%s es5conform %s" % (self.mode, self.GetName())
-
- def IsFailureOutput(self, output):
- if output.exit_code != 0:
- return True
- return 'FAILED!' in output.stdout
-
- def GetCommand(self):
- result = self.context.GetVmCommand(self, self.mode)
- result += ['-e', 'var window = this']
- result += self.framework
- result.append(self.filename)
- result += ['-e', 'ES5Harness.startTesting()']
- return result
-
- def GetName(self):
- return self.path[-1]
-
- def GetSource(self):
- return open(self.filename).read()
-
-
-class ES5ConformTestConfiguration(test.TestConfiguration):
-
- def __init__(self, context, root):
- super(ES5ConformTestConfiguration, self).__init__(context, root)
-
- def ListTests(self, current_path, path, mode, variant_flags):
- tests = []
- current_root = join(self.root, 'data', 'TestCases')
- harness = []
- harness += [join(self.root, 'data', 'SimpleTestHarness', f) for f in HARNESS_FILES]
- harness += [join(self.root, 'harness-adapt.js')]
- for root, dirs, files in os.walk(current_root):
- for dotted in [x for x in dirs if x.startswith('.')]:
- dirs.remove(dotted)
- dirs.sort()
- root_path = root[len(self.root):].split(os.path.sep)
- root_path = current_path + [x for x in root_path if x]
- files.sort()
- for file in files:
- if file.endswith('.js'):
- full_path = root_path + [file[:-3]]
- full_path = [x for x in full_path if not (x in ['data', 'TestCases'])]
- if self.Contains(path, full_path):
- test = ES5ConformTestCase(join(root, file), full_path, self.context,
- self.root, mode, harness)
- tests.append(test)
- return tests
-
- def GetBuildRequirements(self):
- return ['d8']
-
- def GetTestStatus(self, sections, defs):
- status_file = join(self.root, 'es5conform.status')
- if exists(status_file):
- test.ReadConfigurationInto(status_file, sections, defs)
-
-
-def GetConfiguration(context, root):
- return ES5ConformTestConfiguration(context, root)
diff --git a/deps/v8/test/message/testcfg.py b/deps/v8/test/message/testcfg.py
index dba65a9a2e..11c0d19a3c 100644
--- a/deps/v8/test/message/testcfg.py
+++ b/deps/v8/test/message/testcfg.py
@@ -50,7 +50,7 @@ class MessageTestSuite(testsuite.TestSuite):
files.sort()
for filename in files:
if filename.endswith(".js"):
- testname = join(dirname[len(self.root) + 1:], filename[:-3])
+ testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3])
test = testcase.TestCase(self, testname)
tests.append(test)
return tests
@@ -109,116 +109,3 @@ class MessageTestSuite(testsuite.TestSuite):
def GetSuite(name, root):
return MessageTestSuite(name, root)
-
-
-# Deprecated definitions below.
-# TODO(jkummerow): Remove when SCons is no longer supported.
-
-
-import test
-from os.path import join, exists, basename, isdir
-
-class MessageTestCase(test.TestCase):
-
- def __init__(self, path, file, expected, mode, context, config):
- super(MessageTestCase, self).__init__(context, path, mode)
- self.file = file
- self.expected = expected
- self.config = config
-
- def IgnoreLine(self, str):
- """Ignore empty lines, valgrind output and Android output."""
- if not str: return True
- return (str.startswith('==') or str.startswith('**') or
- str.startswith('ANDROID'))
-
- def IsFailureOutput(self, output):
- f = file(self.expected)
- # Skip initial '#' comment and spaces
- for line in f:
- if (not line.startswith('#')) and (not line.strip()):
- break
- # Convert output lines to regexps that we can match
- env = { 'basename': basename(self.file) }
- patterns = [ ]
- for line in f:
- if not line.strip():
- continue
- pattern = re.escape(line.rstrip() % env)
- pattern = pattern.replace('\\*', '.*')
- pattern = '^%s$' % pattern
- patterns.append(pattern)
- # Compare actual output with the expected
- raw_lines = output.stdout.splitlines()
- outlines = [ s for s in raw_lines if not self.IgnoreLine(s) ]
- if len(outlines) != len(patterns):
- return True
- for i in xrange(len(patterns)):
- if not re.match(patterns[i], outlines[i]):
- return True
- return False
-
- def GetLabel(self):
- return "%s %s" % (self.mode, self.GetName())
-
- def GetName(self):
- return self.path[-1]
-
- def GetCommand(self):
- result = self.config.context.GetVmCommand(self, self.mode)
- source = open(self.file).read()
- flags_match = re.findall(FLAGS_PATTERN, source)
- for match in flags_match:
- result += match.strip().split()
- result.append(self.file)
- return result
-
- def GetSource(self):
- return (open(self.file).read()
- + "\n--- expected output ---\n"
- + open(self.expected).read())
-
-
-class MessageTestConfiguration(test.TestConfiguration):
-
- def __init__(self, context, root):
- super(MessageTestConfiguration, self).__init__(context, root)
-
- def Ls(self, path):
- if isdir(path):
- return [f[:-3] for f in os.listdir(path) if f.endswith('.js')]
- else:
- return []
-
- def ListTests(self, current_path, path, mode, variant_flags):
- mjsunit = [current_path + [t] for t in self.Ls(self.root)]
- regress = [current_path + ['regress', t] for t in self.Ls(join(self.root, 'regress'))]
- bugs = [current_path + ['bugs', t] for t in self.Ls(join(self.root, 'bugs'))]
- mjsunit.sort()
- regress.sort()
- bugs.sort()
- all_tests = mjsunit + regress + bugs
- result = []
- for test in all_tests:
- if self.Contains(path, test):
- file_prefix = join(self.root, reduce(join, test[1:], ""))
- file_path = file_prefix + ".js"
- output_path = file_prefix + ".out"
- if not exists(output_path):
- print "Could not find %s" % output_path
- continue
- result.append(MessageTestCase(test, file_path, output_path, mode,
- self.context, self))
- return result
-
- def GetBuildRequirements(self):
- return ['d8']
-
- def GetTestStatus(self, sections, defs):
- status_file = join(self.root, 'message.status')
- if exists(status_file):
- test.ReadConfigurationInto(status_file, sections, defs)
-
-
-def GetConfiguration(context, root):
- return MessageTestConfiguration(context, root)
diff --git a/deps/v8/test/mjsunit/harmony/generators-objects.js b/deps/v8/test/mjsunit/harmony/generators-objects.js
index 0c36818c8e..b717c303c8 100644
--- a/deps/v8/test/mjsunit/harmony/generators-objects.js
+++ b/deps/v8/test/mjsunit/harmony/generators-objects.js
@@ -25,7 +25,7 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-// Flags: --harmony-generators --harmony-scoping
+// Flags: --harmony-generators --harmony-scoping --allow-natives-syntax
// Test instantations of generators.
@@ -55,6 +55,8 @@ function TestGeneratorObject() {
var iter = g();
assertSame(g.prototype, Object.getPrototypeOf(iter));
assertTrue(iter instanceof g);
+ assertEquals("Generator", %ClassOf(iter));
+ assertEquals("[object Generator]", String(iter));
assertEquals([], Object.getOwnPropertyNames(iter));
assertTrue(iter !== g());
@@ -62,7 +64,30 @@ function TestGeneratorObject() {
iter = new g();
assertSame(g.prototype, Object.getPrototypeOf(iter));
assertTrue(iter instanceof g);
+ assertEquals("Generator", %ClassOf(iter));
+ assertEquals("[object Generator]", String(iter));
assertEquals([], Object.getOwnPropertyNames(iter));
assertTrue(iter !== new g());
}
TestGeneratorObject();
+
+
+// Test the methods of generator objects.
+function TestGeneratorObjectMethods() {
+ function* g() { yield 1; }
+ var iter = g();
+
+ function TestNonGenerator(non_generator) {
+ assertThrows(function() { iter.next.call(non_generator); }, TypeError);
+ assertThrows(function() { iter.send.call(non_generator, 1); }, TypeError);
+ assertThrows(function() { iter.throw.call(non_generator, 1); }, TypeError);
+ assertThrows(function() { iter.close.call(non_generator); }, TypeError);
+ }
+
+ TestNonGenerator(1);
+ TestNonGenerator({});
+ TestNonGenerator(function(){});
+ TestNonGenerator(g);
+ TestNonGenerator(g.prototype);
+}
+TestGeneratorObjectMethods();
diff --git a/deps/v8/test/mjsunit/harmony/typedarrays.js b/deps/v8/test/mjsunit/harmony/typedarrays.js
index 75ff3da42e..7f9c7631cd 100644
--- a/deps/v8/test/mjsunit/harmony/typedarrays.js
+++ b/deps/v8/test/mjsunit/harmony/typedarrays.js
@@ -45,9 +45,11 @@ function TestArrayBufferCreation() {
TestByteLength(0, 0);
+/* TODO[dslomov]: Reenable the test
assertThrows(function() {
var ab1 = new __ArrayBuffer(0xFFFFFFFFFFFF)
}, RangeError);
+*/
var ab = new __ArrayBuffer();
assertSame(0, ab.byteLength);
diff --git a/deps/v8/test/es5conform/harness-adapt.js b/deps/v8/test/mjsunit/regress/regress-grow-store-smi-check.js
index 396d4ed978..381141d523 100644
--- a/deps/v8/test/es5conform/harness-adapt.js
+++ b/deps/v8/test/mjsunit/regress/regress-grow-store-smi-check.js
@@ -1,4 +1,4 @@
-// Copyright 2009 the V8 project authors. All rights reserved.
+// Copyright 2013 the V8 project authors. All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
@@ -25,50 +25,29 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-var global = this;
-
-function ES5Error(ut) {
- this.ut = ut;
-}
-
-ES5Error.prototype.toString = function () {
- return this.ut.res;
-};
-
-// The harness uses the IE specific .description property of exceptions but
-// that's nothing we can't hack our way around.
-Error.prototype.__defineGetter__('description', function () {
- return this.message;
-});
-
-function TestHarness() {
- sth.call(this, global);
- this._testResults = []
-}
-
-// Borrow sth's registerTest method.
-TestHarness.prototype.registerTest = sth.prototype.registerTest;
-
-// Drop the before/after stuff, just run the test.
-TestHarness.prototype.startTesting = function () {
- sth.prototype.run.call(this);
- this.report();
-};
-
-TestHarness.prototype.report = function () {
- for (var i = 0; i < this._testResults.length; i++) {
- var ut = this._testResults[i];
- // We don't fail on preconditions. Yet.
- if (ut.res == "Precondition failed")
- continue;
- if (ut.res != 'pass')
- throw new ES5Error(ut);
+// Flags: --allow-natives-syntax
+
+// The below test function was generated from part of a WebKit layout
+// test library setup routine: fast/canvas/webgl/resources/pnglib.js
+
+function test(crc32) {
+ for (var i = 0; i < 256; i++) {
+ var c = i;
+ for (var j = 0; j < 8; j++) {
+ if (c & 1) {
+ c = -306674912 ^ ((c >> 1) & 0x7fffffff);
+ } else {
+ c = (c >> 1) & 0x7fffffff;
+ }
+ }
+ crc32[i] = c;
}
-};
+}
-TestHarness.prototype.startingTest = function (ut) {
- this.currentTest = ut;
- this._testResults.push(ut);
-};
+var a = [0.5];
+for (var i = 0; i < 256; ++i) a[i] = i;
-var ES5Harness = new TestHarness();
+test([0.5]);
+test(a);
+%OptimizeFunctionOnNextCall(test);
+test(a);
diff --git a/deps/v8/test/mjsunit/string-fromcharcode.js b/deps/v8/test/mjsunit/string-fromcharcode.js
index 1986dda0fb..631c04349f 100644
--- a/deps/v8/test/mjsunit/string-fromcharcode.js
+++ b/deps/v8/test/mjsunit/string-fromcharcode.js
@@ -25,8 +25,29 @@
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+// Flags: --allow-natives-syntax
+
// Test String.fromCharCode.
+// Test char codes larger than 0xffff.
+var expected = "";
+for (var i = 100; i < 500; i++) {
+ expected += String.fromCharCode(i);
+}
+
+function testCharCodeTruncation() {
+ var result = "";
+ for (var i = 0x100000 + 100; i < 0x100000 + 500; i++) {
+ result += String.fromCharCode(i);
+ }
+ assertEquals(String.fromCharCode(0xFFFF), String.fromCharCode(0xFFFFFFFF));
+ return result;
+}
+
+assertEquals(expected, testCharCodeTruncation());
+assertEquals(expected, testCharCodeTruncation());
+%OptimizeFunctionOnNextCall(testCharCodeTruncation);
+assertEquals(expected, testCharCodeTruncation());
// Test various receivers and arguments passed to String.fromCharCode.
diff --git a/deps/v8/test/mjsunit/testcfg.py b/deps/v8/test/mjsunit/testcfg.py
index 00d4500f1c..c960ce6b30 100644
--- a/deps/v8/test/mjsunit/testcfg.py
+++ b/deps/v8/test/mjsunit/testcfg.py
@@ -50,7 +50,7 @@ class MjsunitTestSuite(testsuite.TestSuite):
files.sort()
for filename in files:
if filename.endswith(".js") and filename != "mjsunit.js":
- testname = join(dirname[len(self.root) + 1:], filename[:-3])
+ testname = os.path.join(dirname[len(self.root) + 1:], filename[:-3])
test = testcase.TestCase(self, testname)
tests.append(test)
return tests
@@ -95,134 +95,3 @@ class MjsunitTestSuite(testsuite.TestSuite):
def GetSuite(name, root):
return MjsunitTestSuite(name, root)
-
-
-# Deprecated definitions below.
-# TODO(jkummerow): Remove when SCons is no longer supported.
-
-
-from os.path import dirname, exists, join, normpath
-import tempfile
-import test
-
-
-class MjsunitTestCase(test.TestCase):
-
- def __init__(self, path, file, mode, context, config, isolates):
- super(MjsunitTestCase, self).__init__(context, path, mode)
- self.file = file
- self.config = config
- self.self_script = False
- self.isolates = isolates
-
- def GetLabel(self):
- return "%s %s" % (self.mode, self.GetName())
-
- def GetName(self):
- return self.path[-1] + ["", "-isolates"][self.isolates]
-
- def TestsIsolates(self):
- return self.isolates
-
- def GetVmCommand(self, source):
- result = self.config.context.GetVmCommand(self, self.mode)
- flags_match = re.findall(FLAGS_PATTERN, source);
- for match in flags_match:
- result += match.strip().split()
- return result
-
- def GetVmArguments(self, source):
- result = []
- additional_files = []
- files_match = FILES_PATTERN.search(source);
- # Accept several lines of 'Files:'
- while True:
- if files_match:
- additional_files += files_match.group(1).strip().split()
- files_match = FILES_PATTERN.search(source, files_match.end())
- else:
- break
- for a_file in additional_files:
- result.append(join(dirname(self.config.root), '..', a_file))
- framework = join(dirname(self.config.root), 'mjsunit', 'mjsunit.js')
- if SELF_SCRIPT_PATTERN.search(source):
- result.append(self.CreateSelfScript())
- result += [framework, self.file]
- return result
-
- def GetCommand(self):
- source = open(self.file).read()
- result = self.GetVmCommand(source)
- result += self.GetVmArguments(source)
- if self.isolates:
- result.append("--isolate")
- result += self.GetVmArguments(source)
- return result
-
- def GetSource(self):
- return open(self.file).read()
-
- def CreateSelfScript(self):
- (fd_self_script, self_script) = tempfile.mkstemp(suffix=".js")
- def MakeJsConst(name, value):
- return "var %(name)s=\'%(value)s\';\n" % \
- {'name': name, \
- 'value': value.replace('\\', '\\\\').replace('\'', '\\\'') }
- try:
- os.write(fd_self_script, MakeJsConst('TEST_FILE_NAME', self.file))
- except IOError, e:
- test.PrintError("write() " + str(e))
- os.close(fd_self_script)
- self.self_script = self_script
- return self_script
-
- def AfterRun(self, result):
- if self.self_script and (not result or (not result.HasPreciousOutput())):
- test.CheckedUnlink(self.self_script)
-
-class MjsunitTestConfiguration(test.TestConfiguration):
-
- def __init__(self, context, root):
- super(MjsunitTestConfiguration, self).__init__(context, root)
-
- def Ls(self, path):
- def SelectTest(name):
- return name.endswith('.js') and name != 'mjsunit.js'
- return [f[:-3] for f in os.listdir(path) if SelectTest(f)]
-
- def ListTests(self, current_path, path, mode, variant_flags):
- mjsunit = [current_path + [t] for t in self.Ls(self.root)]
- regress = [current_path + ['regress', t] for t in self.Ls(join(self.root, 'regress'))]
- bugs = [current_path + ['bugs', t] for t in self.Ls(join(self.root, 'bugs'))]
- third_party = [current_path + ['third_party', t] for t in self.Ls(join(self.root, 'third_party'))]
- tools = [current_path + ['tools', t] for t in self.Ls(join(self.root, 'tools'))]
- compiler = [current_path + ['compiler', t] for t in self.Ls(join(self.root, 'compiler'))]
- harmony = [current_path + ['harmony', t] for t in self.Ls(join(self.root, 'harmony'))]
- mjsunit.sort()
- regress.sort()
- bugs.sort()
- third_party.sort()
- tools.sort()
- compiler.sort()
- harmony.sort()
- all_tests = mjsunit + regress + bugs + third_party + tools + compiler + harmony
- result = []
- for test in all_tests:
- if self.Contains(path, test):
- file_path = join(self.root, reduce(join, test[1:], "") + ".js")
- result.append(MjsunitTestCase(test, file_path, mode, self.context, self, False))
- result.append(MjsunitTestCase(test, file_path, mode, self.context, self, True))
- return result
-
- def GetBuildRequirements(self):
- return ['d8']
-
- def GetTestStatus(self, sections, defs):
- status_file = join(self.root, 'mjsunit.status')
- if exists(status_file):
- test.ReadConfigurationInto(status_file, sections, defs)
-
-
-
-def GetConfiguration(context, root):
- return MjsunitTestConfiguration(context, root)
diff --git a/deps/v8/test/mozilla/testcfg.py b/deps/v8/test/mozilla/testcfg.py
index 5aeac4cc67..775a239f07 100644
--- a/deps/v8/test/mozilla/testcfg.py
+++ b/deps/v8/test/mozilla/testcfg.py
@@ -104,7 +104,7 @@ class MozillaTestSuite(testsuite.TestSuite):
return testcase.flags + result
def GetSourceForTest(self, testcase):
- filename = join(self.testroot, testcase.path + ".js")
+ filename = os.path.join(self.testroot, testcase.path + ".js")
with open(filename) as f:
return f.read()
@@ -150,7 +150,7 @@ class MozillaTestSuite(testsuite.TestSuite):
if code != 0:
os.chdir(old_cwd)
raise Exception("Error checking out Mozilla test suite!")
- os.rename(join("mozilla", "js", "tests"), directory_name)
+ os.rename(os.path.join("mozilla", "js", "tests"), directory_name)
shutil.rmtree("mozilla")
with tarfile.open(archive_file, "w:gz") as tar:
tar.add("data")
@@ -161,96 +161,3 @@ class MozillaTestSuite(testsuite.TestSuite):
def GetSuite(name, root):
return MozillaTestSuite(name, root)
-
-
-# Deprecated definitions below.
-# TODO(jkummerow): Remove when SCons is no longer supported.
-
-
-from os.path import exists
-from os.path import join
-import test
-
-
-class MozillaTestCase(test.TestCase):
-
- def __init__(self, filename, path, context, root, mode, framework):
- super(MozillaTestCase, self).__init__(context, path, mode)
- self.filename = filename
- self.framework = framework
- self.root = root
-
- def IsNegative(self):
- return self.filename.endswith('-n.js')
-
- def GetLabel(self):
- return "%s mozilla %s" % (self.mode, self.GetName())
-
- def IsFailureOutput(self, output):
- if output.exit_code != 0:
- return True
- return 'FAILED!' in output.stdout
-
- def GetCommand(self):
- result = self.context.GetVmCommand(self, self.mode) + \
- [ '--expose-gc', join(self.root, 'mozilla-shell-emulation.js') ]
- result += [ '--es5_readonly' ] # Temporary hack until we can remove flag
- result += self.framework
- result.append(self.filename)
- return result
-
- def GetName(self):
- return self.path[-1]
-
- def GetSource(self):
- return open(self.filename).read()
-
-
-class MozillaTestConfiguration(test.TestConfiguration):
-
- def __init__(self, context, root):
- super(MozillaTestConfiguration, self).__init__(context, root)
-
- def ListTests(self, current_path, path, mode, variant_flags):
- tests = []
- for test_dir in TEST_DIRS:
- current_root = join(self.root, 'data', test_dir)
- for root, dirs, files in os.walk(current_root):
- for dotted in [x for x in dirs if x.startswith('.')]:
- dirs.remove(dotted)
- for excluded in EXCLUDED:
- if excluded in dirs:
- dirs.remove(excluded)
- dirs.sort()
- root_path = root[len(self.root):].split(os.path.sep)
- root_path = current_path + [x for x in root_path if x]
- framework = []
- for i in xrange(len(root_path)):
- if i == 0: dir = root_path[1:]
- else: dir = root_path[1:-i]
- script = join(self.root, reduce(join, dir, ''), 'shell.js')
- if exists(script):
- framework.append(script)
- framework.reverse()
- files.sort()
- for file in files:
- if (not file in FRAMEWORK) and file.endswith('.js'):
- full_path = root_path + [file[:-3]]
- full_path = [x for x in full_path if x != 'data']
- if self.Contains(path, full_path):
- test = MozillaTestCase(join(root, file), full_path, self.context,
- self.root, mode, framework)
- tests.append(test)
- return tests
-
- def GetBuildRequirements(self):
- return ['d8']
-
- def GetTestStatus(self, sections, defs):
- status_file = join(self.root, 'mozilla.status')
- if exists(status_file):
- test.ReadConfigurationInto(status_file, sections, defs)
-
-
-def GetConfiguration(context, root):
- return MozillaTestConfiguration(context, root)
diff --git a/deps/v8/test/preparser/testcfg.py b/deps/v8/test/preparser/testcfg.py
index 61c14c9bd3..566fd5ca44 100644
--- a/deps/v8/test/preparser/testcfg.py
+++ b/deps/v8/test/preparser/testcfg.py
@@ -42,7 +42,7 @@ class PreparserTestSuite(testsuite.TestSuite):
return "preparser"
def _GetExpectations(self):
- expects_file = join(self.root, "preparser.expectation")
+ expects_file = os.path.join(self.root, "preparser.expectation")
expectations_map = {}
if not os.path.exists(expects_file): return expectations_map
rule_regex = re.compile("^([\w\-]+)(?::([\w\-]+))?(?::(\d+),(\d+))?$")
@@ -58,7 +58,7 @@ class PreparserTestSuite(testsuite.TestSuite):
return expectations_map
def _ParsePythonTestTemplates(self, result, filename):
- pathname = join(self.root, filename + ".pyt")
+ pathname = os.path.join(self.root, filename + ".pyt")
def Test(name, source, expectation):
source = source.replace("\n", " ")
testname = os.path.join(filename, name)
@@ -118,143 +118,3 @@ class PreparserTestSuite(testsuite.TestSuite):
def GetSuite(name, root):
return PreparserTestSuite(name, root)
-
-
-# Deprecated definitions below.
-# TODO(jkummerow): Remove when SCons is no longer supported.
-
-
-from os.path import join, exists, isfile
-import test
-
-
-class PreparserTestCase(test.TestCase):
-
- def __init__(self, root, path, executable, mode, throws, context, source):
- super(PreparserTestCase, self).__init__(context, path, mode)
- self.executable = executable
- self.root = root
- self.throws = throws
- self.source = source
-
- def GetLabel(self):
- return "%s %s %s" % (self.mode, self.path[-2], self.path[-1])
-
- def GetName(self):
- return self.path[-1]
-
- def HasSource(self):
- return self.source is not None
-
- def GetSource(self):
- return self.source
-
- def BuildCommand(self, path):
- if (self.source is not None):
- result = [self.executable, "-e", self.source]
- else:
- testfile = join(self.root, self.GetName()) + ".js"
- result = [self.executable, testfile]
- if (self.throws):
- result += ['throws'] + self.throws
- return result
-
- def GetCommand(self):
- return self.BuildCommand(self.path)
-
- def Run(self):
- return test.TestCase.Run(self)
-
-
-class PreparserTestConfiguration(test.TestConfiguration):
-
- def __init__(self, context, root):
- super(PreparserTestConfiguration, self).__init__(context, root)
-
- def GetBuildRequirements(self):
- return ['preparser']
-
- def GetExpectations(self):
- expects_file = join(self.root, 'preparser.expectation')
- map = {}
- if exists(expects_file):
- rule_regex = re.compile("^([\w\-]+)(?::([\w\-]+))?(?::(\d+),(\d+))?$")
- for line in utils.ReadLinesFrom(expects_file):
- if (line[0] == '#'): continue
- rule_match = rule_regex.match(line)
- if rule_match:
- expects = []
- if (rule_match.group(2)):
- expects = expects + [rule_match.group(2)]
- if (rule_match.group(3)):
- expects = expects + [rule_match.group(3), rule_match.group(4)]
- map[rule_match.group(1)] = expects
- return map;
-
- def ParsePythonTestTemplates(self, result, filename,
- executable, current_path, mode):
- pathname = join(self.root, filename + ".pyt")
- def Test(name, source, expectation):
- throws = None
- if (expectation is not None):
- throws = [expectation]
- test = PreparserTestCase(self.root,
- current_path + [filename, name],
- executable,
- mode, throws, self.context,
- source.replace("\n", " "))
- result.append(test)
- def Template(name, source):
- def MkTest(replacement, expectation):
- testname = name
- testsource = source
- for key in replacement.keys():
- testname = testname.replace("$"+key, replacement[key]);
- testsource = testsource.replace("$"+key, replacement[key]);
- Test(testname, testsource, expectation)
- return MkTest
- execfile(pathname, {"Test": Test, "Template": Template})
-
- def ListTests(self, current_path, path, mode, variant_flags):
- executable = 'preparser'
- if utils.IsWindows():
- executable += '.exe'
- executable = join(self.context.buildspace, executable)
- if not isfile(executable):
- executable = join('obj', 'preparser', mode, 'preparser')
- if utils.IsWindows():
- executable += '.exe'
- executable = join(self.context.buildspace, executable)
- expectations = self.GetExpectations()
- result = []
- # Find all .js files in tests/preparser directory.
- filenames = [f[:-3] for f in os.listdir(self.root) if f.endswith(".js")]
- filenames.sort()
- for file in filenames:
- throws = None;
- if (file in expectations):
- throws = expectations[file]
- result.append(PreparserTestCase(self.root,
- current_path + [file], executable,
- mode, throws, self.context, None))
- # Find all .pyt files in test/preparser directory.
- filenames = [f[:-4] for f in os.listdir(self.root) if f.endswith(".pyt")]
- filenames.sort()
- for file in filenames:
- # Each file as a python source file to be executed in a specially
- # created environment (defining the Template and Test functions)
- self.ParsePythonTestTemplates(result, file,
- executable, current_path, mode)
- return result
-
- def GetTestStatus(self, sections, defs):
- status_file = join(self.root, 'preparser.status')
- if exists(status_file):
- test.ReadConfigurationInto(status_file, sections, defs)
-
- def VariantFlags(self):
- return [[]];
-
-
-def GetConfiguration(context, root):
- return PreparserTestConfiguration(context, root)
diff --git a/deps/v8/test/sputnik/README b/deps/v8/test/sputnik/README
deleted file mode 100644
index 36566340e1..0000000000
--- a/deps/v8/test/sputnik/README
+++ /dev/null
@@ -1,6 +0,0 @@
-To run the sputniktests you must check out the test suite from
-googlecode.com. The test expectations are currently relative to
-version 97. To get the tests run the following command within
-v8/test/sputnik/
-
- svn co http://sputniktests.googlecode.com/svn/trunk/ -r97 sputniktests
diff --git a/deps/v8/test/sputnik/sputnik.status b/deps/v8/test/sputnik/sputnik.status
deleted file mode 100644
index 67d1c75fe1..0000000000
--- a/deps/v8/test/sputnik/sputnik.status
+++ /dev/null
@@ -1,231 +0,0 @@
-# Copyright 2009 the V8 project authors. All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-prefix sputnik
-def FAIL_OK = FAIL, OKAY
-
-############################### BUGS ###################################
-
-# '__proto__' should be treated as a normal property in JSON.
-S15.12.2_A1: FAIL
-
-##################### DELIBERATE INCOMPATIBILITIES #####################
-
-# This tests precision of trignometric functions. We're slightly off
-# from the implementation in libc (~ 1e-17) but it's not clear if we
-# or they are closer to the right answer, or if it even matters.
-S15.8.2.16_A7: PASS || FAIL_OK
-S15.8.2.18_A7: PASS || FAIL_OK
-S15.8.2.13_A23: PASS || FAIL_OK
-
-# Sputnik tests (r97) assume RegExp.prototype is an Object, not a RegExp.
-S15.10.6_A2: FAIL_OK
-
-# We are silent in some regexp cases where the spec wants us to give
-# errors, for compatibility.
-S15.10.2.11_A1_T2: FAIL
-S15.10.2.11_A1_T3: FAIL
-
-# We are more lenient in which string character escapes we allow than
-# the spec (7.8.4 p. 19) wants us to be. This is for compatibility.
-S7.8.4_A4.3_T1: FAIL_OK
-S7.8.4_A4.3_T2: FAIL_OK
-S7.8.4_A4.3_T3: FAIL_OK
-S7.8.4_A4.3_T4: FAIL_OK
-S7.8.4_A6.4_T1: FAIL_OK
-S7.8.4_A6.4_T2: FAIL_OK
-S7.8.4_A7.4_T1: FAIL_OK
-S7.8.4_A7.4_T2: FAIL_OK
-
-# Sputnik expects unicode escape sequences in RegExp flags to be interpreted.
-# The specification requires them to be passed uninterpreted to the RegExp
-# constructor. We now implement that.
-S7.8.5_A3.1_T7: FAIL_OK
-S7.8.5_A3.1_T8: FAIL_OK
-S7.8.5_A3.1_T9: FAIL_OK
-
-# We allow some keywords to be used as identifiers.
-S7.5.3_A1.15: FAIL_OK
-S7.5.3_A1.18: FAIL_OK
-S7.5.3_A1.21: FAIL_OK
-S7.5.3_A1.22: FAIL_OK
-S7.5.3_A1.23: FAIL_OK
-S7.5.3_A1.24: FAIL_OK
-S7.5.3_A1.26: FAIL_OK
-
-# This checks for non-262 behavior
-S12.6.4_A14_T1: PASS || FAIL_OK
-S12.6.4_R1: PASS || FAIL_OK
-S12.6.4_R2: PASS || FAIL_OK
-S8.4_D2.1: PASS || FAIL_OK
-S8.4_D2.2: PASS || FAIL_OK
-S8.4_D2.3: PASS || FAIL_OK
-S8.4_D2.4: PASS || FAIL_OK
-S8.4_D2.5: PASS || FAIL_OK
-S8.4_D2.6: PASS || FAIL_OK
-S8.4_D2.7: PASS || FAIL_OK
-S8.4_D1.1: PASS || FAIL_OK
-S13.2_D1.2: PASS || FAIL_OK
-S11.4.3_D1.2: PASS || FAIL_OK
-S7.6_D1: PASS || FAIL_OK
-S7.6_D2: PASS || FAIL_OK
-S15.1.2.2_D1.2: PASS || FAIL_OK
-S13_D1_T1: PASS || FAIL_OK
-S14_D4_T3: PASS || FAIL_OK
-S14_D7: PASS || FAIL_OK
-S15.5.4.11_D1.1_T2: PASS || FAIL_OK
-S15.5.4.11_D1.1_T4: PASS || FAIL_OK
-S15.5.2_D2: PASS || FAIL_OK
-S15.5.4.11_D1.1_T1: PASS || FAIL_OK
-S15.5.4.11_D1.1_T3: PASS || FAIL_OK
-S12.6.4_D1: PASS || FAIL_OK
-S15.5.4.14_A1_T6: FAIL_OK
-S15.5.4.14_A1_T7: FAIL_OK
-S15.5.4.14_A1_T8: FAIL_OK
-S15.5.4.14_A1_T9: FAIL_OK
-S15.5.4.14_A2_T7: FAIL_OK
-S15.10.2.12_A1_T1: FAIL_OK
-S15.10.2.12_A2_T1: FAIL_OK
-
-# We allow function declarations within statements
-S12.6.2_A13_T1: FAIL_OK
-S12.6.2_A13_T2: FAIL_OK
-S12.6.4_A13_T1: FAIL_OK
-S12.6.4_A13_T2: FAIL_OK
-#S12.6.4_A13_T3: FAIL_OK
-S15.3.4.2_A1_T1: FAIL_OK
-
-# Linux and Mac defaults to extended 80 bit floating point format in the FPU.
-# We follow the other major JS engines by keeping this default.
-S8.5_A2.2: PASS, FAIL if $system == linux, FAIL if $system == macos
-S8.5_A2.1: PASS, FAIL if $system == linux, FAIL if $system == macos
-
-# The source field of RegExp objects is properly escaped. We match JSC.
-S15.10.4.1_A3_T1: FAIL_OK
-S15.10.4.1_A3_T2: FAIL_OK
-S15.10.4.1_A3_T3: FAIL_OK
-S15.10.4.1_A3_T4: FAIL_OK
-S15.10.4.1_A3_T5: FAIL_OK
-S15.10.4.1_A4_T2: FAIL_OK
-S15.10.4.1_A4_T3: FAIL_OK
-S15.10.4.1_A4_T5: FAIL_OK
-
-##################### ES3 TESTS #########################
-# These tests check for ES3 semantics, and differ from ES5.
-# When we follow ES5 semantics, it's ok to fail the test.
-
-# Allow keywords as names of properties in object initialisers and
-# in dot-notation property access.
-S11.1.5_A4.1: FAIL_OK
-S11.1.5_A4.2: FAIL_OK
-
-# Don't throw type errors when iterating through the undefined object.
-S9.9_A1: FAIL_OK
-S9.9_A2: FAIL_OK
-
-# The expected evaluation order of comparison operations changed.
-S11.8.2_A2.3_T1: FAIL_OK
-S11.8.3_A2.3_T1: FAIL_OK
-
-# Calls builtins without an explicit receiver which means that
-# undefined is passed to the builtin. The tests expect the global
-# object to be passed which was true in ES3 but not in ES5.
-S11.1.1_A2: FAIL_OK
-S15.5.4.4_A1_T3: FAIL_OK
-S15.5.4.5_A1_T3: FAIL_OK
-S15.5.4.6_A1_T3: FAIL_OK
-S15.5.4.7_A1_T3: FAIL_OK
-S15.5.4.8_A1_T3: FAIL_OK
-S15.5.4.9_A1_T3: FAIL_OK
-S15.5.4.10_A1_T3: FAIL_OK
-S15.5.4.11_A1_T3: FAIL_OK
-S15.5.4.12_A1_T3: FAIL_OK
-S15.5.4.13_A1_T3: FAIL_OK
-S15.5.4.14_A1_T3: FAIL_OK
-S15.5.4.15_A1_T3: FAIL_OK
-
-# NaN, Infinity and undefined are read-only according to ES5.
-S15.1.1.1_A2_T1: FAIL_OK # NaN
-S15.1.1.1_A2_T2: FAIL_OK # NaN
-S15.1.1.2_A2_T1: FAIL_OK # Infinity
-# S15.1.1.2_A2_T2 would fail if it weren't bogus in r97. sputnik bug #45.
-S15.1.1.3_A2_T1: FAIL_OK # undefined
-S15.1.1.3_A2_T2: FAIL_OK # undefined
-
-# Function.prototype.apply can handle arbitrary object as argument list.
-S15.3.4.3_A6_T1: FAIL_OK
-S15.3.4.3_A6_T4: FAIL_OK
-
-# Array.prototype.to[Locale]String is generic in ES5.
-S15.4.4.2_A2_T1: FAIL_OK
-S15.4.4.3_A2_T1: FAIL_OK
-
-##################### SKIPPED TESTS #####################
-
-# These tests take a looong time to run in debug mode.
-S15.1.3.2_A2.5_T1: PASS, SKIP if $mode == debug
-S15.1.3.1_A2.5_T1: PASS, SKIP if $mode == debug
-
-# V8 Bug: http://code.google.com/p/v8/issues/detail?id=1196
-S8.7_A5_T2: FAIL
-
-# Invalid test case (recent change adding var changes semantics)
-S8.3_A1_T1: FAIL
-# Test bug: http://code.google.com/p/sputniktests/issues/detail?id=35
-S15.5.4.8_A1_T1: FAIL
-# Invalid test case (recent change adding var changes semantics)
-S15.3_A3_T1: FAIL
-# Invalid test case (recent change adding var changes semantics)
-S15.3_A3_T3: FAIL
-
-[ $arch == arm ]
-
-# BUG(3251225): Tests that timeout with --nocrankshaft.
-S15.1.3.1_A2.5_T1: SKIP
-S15.1.3.2_A2.5_T1: SKIP
-S15.1.3.1_A2.4_T1: SKIP
-S15.1.3.1_A2.5_T1: SKIP
-S15.1.3.2_A2.4_T1: SKIP
-S15.1.3.2_A2.5_T1: SKIP
-S15.1.3.3_A2.3_T1: SKIP
-S15.1.3.4_A2.3_T1: SKIP
-S15.1.3.1_A2.5_T1: SKIP
-S15.1.3.2_A2.5_T1: SKIP
-
-[ $arch == mipsel ]
-
-# BUG(3251225): Tests that timeout with --nocrankshaft.
-S15.1.3.1_A2.5_T1: SKIP
-S15.1.3.2_A2.5_T1: SKIP
-S15.1.3.1_A2.4_T1: SKIP
-S15.1.3.1_A2.5_T1: SKIP
-S15.1.3.2_A2.4_T1: SKIP
-S15.1.3.2_A2.5_T1: SKIP
-S15.1.3.3_A2.3_T1: SKIP
-S15.1.3.4_A2.3_T1: SKIP
-S15.1.3.1_A2.5_T1: SKIP
-S15.1.3.2_A2.5_T1: SKIP
diff --git a/deps/v8/test/sputnik/testcfg.py b/deps/v8/test/sputnik/testcfg.py
deleted file mode 100644
index b6f374667c..0000000000
--- a/deps/v8/test/sputnik/testcfg.py
+++ /dev/null
@@ -1,118 +0,0 @@
-# Copyright 2009 the V8 project authors. All rights reserved.
-# Redistribution and use in source and binary forms, with or without
-# modification, are permitted provided that the following conditions are
-# met:
-#
-# * Redistributions of source code must retain the above copyright
-# notice, this list of conditions and the following disclaimer.
-# * Redistributions in binary form must reproduce the above
-# copyright notice, this list of conditions and the following
-# disclaimer in the documentation and/or other materials provided
-# with the distribution.
-# * Neither the name of Google Inc. nor the names of its
-# contributors may be used to endorse or promote products derived
-# from this software without specific prior written permission.
-#
-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-
-import os
-from os.path import join, exists
-import sys
-import test
-import time
-
-
-def GetSuite(name, root):
- # Not implemented.
- return None
-
-
-class SputnikTestCase(test.TestCase):
-
- def __init__(self, case, path, context, mode):
- super(SputnikTestCase, self).__init__(context, path, mode)
- self.case = case
- self.tmpfile = None
- self.source = None
-
- def IsNegative(self):
- return '@negative' in self.GetSource()
-
- def IsFailureOutput(self, output):
- if output.exit_code != 0:
- return True
- out = output.stdout
- return "SputnikError" in out
-
- def BeforeRun(self):
- self.tmpfile = sputnik.TempFile(suffix='.js', prefix='sputnik-', text=True)
- self.tmpfile.Write(self.GetSource())
- self.tmpfile.Close()
-
- def AfterRun(self, result):
- # Dispose the temporary file if everything looks okay.
- if result is None or not result.HasPreciousOutput(): self.tmpfile.Dispose()
- self.tmpfile = None
-
- def GetCommand(self):
- result = self.context.GetVmCommand(self, self.mode)
- result.append(self.tmpfile.name)
- return result
-
- def GetLabel(self):
- return "%s sputnik %s" % (self.mode, self.GetName())
-
- def GetName(self):
- return self.path[-1]
-
- def GetSource(self):
- if not self.source:
- self.source = self.case.GetSource()
- return self.source
-
-class SputnikTestConfiguration(test.TestConfiguration):
-
- def __init__(self, context, root):
- super(SputnikTestConfiguration, self).__init__(context, root)
-
- def ListTests(self, current_path, path, mode, variant_flags):
- # Import the sputnik test runner script as a module
- testroot = join(self.root, 'sputniktests')
- modroot = join(testroot, 'tools')
- sys.path.append(modroot)
- import sputnik
- globals()['sputnik'] = sputnik
- # Do not run strict mode tests yet. TODO(mmaly)
- test_suite = sputnik.TestSuite(testroot, False)
- test_suite.Validate()
- tests = test_suite.EnumerateTests([])
- result = []
- for test in tests:
- full_path = current_path + [test.GetPath()[-1]]
- if self.Contains(path, full_path):
- case = SputnikTestCase(test, full_path, self.context, mode)
- result.append(case)
- return result
-
- def GetBuildRequirements(self):
- return ['d8']
-
- def GetTestStatus(self, sections, defs):
- status_file = join(self.root, 'sputnik.status')
- if exists(status_file):
- test.ReadConfigurationInto(status_file, sections, defs)
-
-
-def GetConfiguration(context, root):
- return SputnikTestConfiguration(context, root)
diff --git a/deps/v8/test/test262/testcfg.py b/deps/v8/test/test262/testcfg.py
index f937442f5d..c07c30270c 100644
--- a/deps/v8/test/test262/testcfg.py
+++ b/deps/v8/test/test262/testcfg.py
@@ -121,115 +121,3 @@ class Test262TestSuite(testsuite.TestSuite):
def GetSuite(name, root):
return Test262TestSuite(name, root)
-
-
-# Deprecated definitions below.
-# TODO(jkummerow): Remove when SCons is no longer supported.
-
-
-from os.path import exists
-from os.path import join
-import test
-
-
-class Test262TestCase(test.TestCase):
-
- def __init__(self, filename, path, context, root, mode, framework):
- super(Test262TestCase, self).__init__(context, path, mode)
- self.filename = filename
- self.framework = framework
- self.root = root
-
- def IsNegative(self):
- return '@negative' in self.GetSource()
-
- def GetLabel(self):
- return "%s test262 %s" % (self.mode, self.GetName())
-
- def IsFailureOutput(self, output):
- if output.exit_code != 0:
- return True
- return 'FAILED!' in output.stdout
-
- def GetCommand(self):
- result = self.context.GetVmCommand(self, self.mode)
- result += [ '--es5_readonly' ] # Temporary hack until we can remove flag
- result += self.framework
- result.append(self.filename)
- return result
-
- def GetName(self):
- return self.path[-1]
-
- def GetSource(self):
- return open(self.filename).read()
-
-
-class Test262TestConfiguration(test.TestConfiguration):
-
- def __init__(self, context, root):
- super(Test262TestConfiguration, self).__init__(context, root)
-
- def ListTests(self, current_path, path, mode, variant_flags):
- testroot = join(self.root, 'data', 'test', 'suite')
- harness = [join(self.root, 'data', 'test', 'harness', f)
- for f in TEST_262_HARNESS]
- harness += [join(self.root, 'harness-adapt.js')]
- tests = []
- for root, dirs, files in os.walk(testroot):
- for dotted in [x for x in dirs if x.startswith('.')]:
- dirs.remove(dotted)
- for skipped in [x for x in dirs if x in TEST_262_SKIP]:
- dirs.remove(skipped)
- dirs.sort()
- root_path = root[len(self.root):].split(os.path.sep)
- root_path = current_path + [x for x in root_path if x]
- files.sort()
- for file in files:
- if file.endswith('.js'):
- test_path = ['test262', file[:-3]]
- if self.Contains(path, test_path):
- test = Test262TestCase(join(root, file), test_path, self.context,
- self.root, mode, harness)
- tests.append(test)
- return tests
-
- def DownloadData(self):
- revision = TEST_262_ARCHIVE_REVISION
- archive_url = TEST_262_URL % revision
- archive_name = join(self.root, 'test262-%s.tar.bz2' % revision)
- directory_name = join(self.root, 'data')
- directory_old_name = join(self.root, 'data.old')
- if not exists(archive_name):
- print "Downloading test data from %s ..." % archive_url
- urllib.urlretrieve(archive_url, archive_name)
- if exists(directory_name):
- os.rename(directory_name, directory_old_name)
- if not exists(directory_name):
- print "Extracting test262-%s.tar.bz2 ..." % revision
- md5 = hashlib.md5()
- with open(archive_name,'rb') as f:
- for chunk in iter(lambda: f.read(8192), ''):
- md5.update(chunk)
- if md5.hexdigest() != TEST_262_ARCHIVE_MD5:
- os.remove(archive_name)
- raise Exception("Hash mismatch of test data file")
- archive = tarfile.open(archive_name, 'r:bz2')
- if sys.platform in ('win32', 'cygwin'):
- # Magic incantation to allow longer path names on Windows.
- archive.extractall(u'\\\\?\\%s' % self.root)
- else:
- archive.extractall(self.root)
- os.rename(join(self.root, 'test262-%s' % revision), directory_name)
-
- def GetBuildRequirements(self):
- return ['d8']
-
- def GetTestStatus(self, sections, defs):
- status_file = join(self.root, 'test262.status')
- if exists(status_file):
- test.ReadConfigurationInto(status_file, sections, defs)
-
-
-def GetConfiguration(context, root):
- return Test262TestConfiguration(context, root)