diff options
Diffstat (limited to 'test/test262')
| -rw-r--r-- | test/test262/README | 4 | ||||
| -rw-r--r-- | test/test262/test262.status | 157 | ||||
| -rw-r--r-- | test/test262/testcfg.py | 28 |
3 files changed, 49 insertions, 140 deletions
diff --git a/test/test262/README b/test/test262/README index 094356fc..dae18433 100644 --- a/test/test262/README +++ b/test/test262/README @@ -4,11 +4,11 @@ tests from http://hg.ecmascript.org/tests/test262 -at revision 271 as 'data' in this directory. Using later version +at revision 309 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. -hg clone -r 271 http://hg.ecmascript.org/tests/test262 data +hg clone -r 309 http://hg.ecmascript.org/tests/test262 data 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 diff --git a/test/test262/test262.status b/test/test262/test262.status index 1da988ef..67607fff 100644 --- a/test/test262/test262.status +++ b/test/test262/test262.status @@ -33,72 +33,30 @@ def FAIL_OK = FAIL, OKAY # '__proto__' should be treated as a normal property in JSON. S15.12.2_A1: FAIL -# V8 Bug: http://code.google.com/p/v8/issues/detail?id=1196 -S8.7_A5_T2: FAIL - -# V8 Bug: http://code.google.com/p/v8/issues/detail?id=1624 -S10.4.2.1_A1: FAIL - # V8 Bug: http://code.google.com/p/v8/issues/detail?id=1475 15.2.3.6-4-405: FAIL 15.2.3.6-4-410: FAIL 15.2.3.6-4-415: FAIL 15.2.3.6-4-420: FAIL -# V8 Bug: http://code.google.com/p/v8/issues/detail?id=1772 -15.2.3.6-4-292-1: FAIL -15.2.3.6-4-293-2: FAIL -15.2.3.6-4-293-3: FAIL -15.2.3.6-4-294-1: FAIL -15.2.3.6-4-295-1: FAIL -15.2.3.6-4-296-1: FAIL -15.2.3.6-4-333-11: FAIL -15.2.3.7-6-a-281: FAIL -15.2.3.7-6-a-282: FAIL -15.2.3.7-6-a-283: FAIL -15.2.3.7-6-a-284: FAIL -15.2.3.7-6-a-285: FAIL - -# V8 Bug: http://code.google.com/p/v8/issues/detail?id=1790 -15.4.4.22-9-9: FAIL - -# Invalid test cases (recent change adding var changes semantics) -S8.3_A1_T1: FAIL -S15.3_A3_T1: FAIL -S15.3_A3_T3: FAIL - ##################### DELIBERATE INCOMPATIBILITIES ##################### # We deliberately treat arguments to parseInt() with a leading zero as # octal numbers in order to not break the web. S15.1.2.2_A5.1_T1: FAIL_OK -# 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. +# This tests precision of Math.tan and Math.sin. The implementation for those +# trigonometric functions are platform/compiler dependent. Furthermore, the +# expectation values by far deviates from the actual result given by an +# arbitrary-precision calculator, making those tests partly bogus. 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_T3: FAIL_OK -S7.8.4_A4.3_T4: FAIL_OK -S7.8.4_A4.3_T5: FAIL_OK -S7.8.4_A4.3_T6: FAIL_OK S7.8.4_A6.1_T4: FAIL_OK S7.8.4_A6.2_T1: FAIL_OK S7.8.4_A6.2_T2: FAIL_OK -S7.8.4_A6.4_T1: FAIL_OK -S7.8.4_A6.4_T2: FAIL_OK S7.8.4_A7.1_T4: FAIL_OK S7.8.4_A7.2_T1: FAIL_OK S7.8.4_A7.2_T2: FAIL_OK @@ -106,101 +64,24 @@ S7.8.4_A7.2_T3: FAIL_OK S7.8.4_A7.2_T4: FAIL_OK S7.8.4_A7.2_T5: FAIL_OK S7.8.4_A7.2_T6: 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 -S7.6_D1: PASS || FAIL_OK -S7.6_D2: PASS || FAIL_OK -S8.4_D1.1: 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 -S11.4.3_D1.2: PASS || FAIL_OK -S12.6.4_A14_T1: PASS || FAIL_OK -S12.6.4_D1: PASS || FAIL_OK -S12.6.4_R1: PASS || FAIL_OK -S12.6.4_R2: PASS || FAIL_OK -S13.2_D1.2: PASS || FAIL_OK -S13_D1_T1: PASS || FAIL_OK -S14_D4_T3: PASS || FAIL_OK -S14_D7: PASS || FAIL_OK -S15.1.2.2_D1.2: 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_T2: PASS || FAIL_OK -S15.5.4.11_D1.1_T3: PASS || FAIL_OK -S15.5.4.11_D1.1_T4: PASS || 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 -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 - -############################# 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 - -# 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 - -# 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 +S8.5_A2.2: PASS if ($system != linux || $arch == x64), FAIL_OK if ($system == linux && $arch != x64) +S8.5_A2.1: PASS if ($system != linux || $arch == x64), FAIL_OK if ($system == linux && $arch != x64) + +############################ INVALID TESTS ############################# + +# The reference value calculated by Test262 is incorrect if you run these tests +# in PST/PDT between first Sunday in March and first Sunday in April. The DST +# switch was moved in 2007 whereas Test262 bases the reference value on 2000. +# Test262 Bug: https://bugs.ecmascript.org/show_bug.cgi?id=293 +S15.9.3.1_A5_T1: PASS || FAIL_OK +S15.9.3.1_A5_T2: PASS || FAIL_OK +S15.9.3.1_A5_T3: PASS || FAIL_OK +S15.9.3.1_A5_T4: PASS || FAIL_OK +S15.9.3.1_A5_T5: PASS || FAIL_OK +S15.9.3.1_A5_T6: PASS || FAIL_OK ############################ SKIPPED TESTS ############################# diff --git a/test/test262/testcfg.py b/test/test262/testcfg.py index aefda196..294b39c9 100644 --- a/test/test262/testcfg.py +++ b/test/test262/testcfg.py @@ -29,8 +29,14 @@ import test import os from os.path import join, exists +import urllib +import hashlib +import tarfile +TEST_262_ARCHIVE_REVISION = '3a890174343c' # This is the r309 revision. +TEST_262_ARCHIVE_MD5 = 'be5d4cfbe69cef70430907b8f3a92b50' +TEST_262_URL = 'http://hg.ecmascript.org/tests/test262/archive/%s.tar.bz2' TEST_262_HARNESS = ['sta.js'] @@ -93,6 +99,28 @@ class Test262TestConfiguration(test.TestConfiguration): 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, "test262-%s" % revision) + if not exists(directory_name) or not exists(archive_name): + if not exists(archive_name): + print "Downloading test data from %s ..." % archive_url + urllib.urlretrieve(archive_url, archive_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: + raise Exception("Hash mismatch of test data file") + archive = tarfile.open(archive_name, 'r:bz2') + archive.extractall(join(self.root)) + if not exists(join(self.root, 'data')): + os.symlink(directory_name, join(self.root, 'data')) + def GetBuildRequirements(self): return ['d8'] |
