@babel/test262-stream 0.0.0-stage → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jshintignore +2 -0
- package/.jshintrc +6 -0
- package/.travis.yml +5 -0
- package/CONTRIBUTING.md +37 -0
- package/LICENSE-MICROSOFT.txt +27 -0
- package/LICENSE.txt +27 -0
- package/README.md +70 -2
- package/lib/builder.js +46 -0
- package/lib/compile.js +24 -0
- package/lib/create-scenarios.js +24 -0
- package/lib/index.js +187 -0
- package/lib/test-file.js +150 -0
- package/package.json +31 -4
- package/test/collateral/invalid-missing-harness/fake-test262/test/a-test-file.js +16 -0
- package/test/collateral/invalid-version-other-accepted/fake-test262/harness/assert.js +17 -0
- package/test/collateral/invalid-version-other-accepted/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/invalid-version-other-accepted/fake-test262/harness/sta.js +12 -0
- package/test/collateral/invalid-version-other-accepted/fake-test262/package.json +3 -0
- package/test/collateral/invalid-version-other-accepted/fake-test262/test/strict.js +9 -0
- package/test/collateral/invalid-version-unsupported/fake-test262/harness/assert.js +17 -0
- package/test/collateral/invalid-version-unsupported/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/invalid-version-unsupported/fake-test262/harness/sta.js +12 -0
- package/test/collateral/invalid-version-unsupported/fake-test262/package.json +3 -0
- package/test/collateral/invalid-version-unsupported/fake-test262/test/strict.js +9 -0
- package/test/collateral/valid-default/expected-content/test/asyncNegative_default.js +49 -0
- package/test/collateral/valid-default/expected-content/test/asyncNegative_strict_mode.js +50 -0
- package/test/collateral/valid-default/expected-content/test/async_default.js +48 -0
- package/test/collateral/valid-default/expected-content/test/async_strict_mode.js +49 -0
- package/test/collateral/valid-default/expected-content/test/bothStrict_default.js +46 -0
- package/test/collateral/valid-default/expected-content/test/bothStrict_strict_mode.js +47 -0
- package/test/collateral/valid-default/expected-content/test/error_default.js +39 -0
- package/test/collateral/valid-default/expected-content/test/error_strict_mode.js +40 -0
- package/test/collateral/valid-default/expected-content/test/module_default.js +37 -0
- package/test/collateral/valid-default/expected-content/test/module_strict_mode.js +38 -0
- package/test/collateral/valid-default/expected-content/test/negative-empty_default.js +37 -0
- package/test/collateral/valid-default/expected-content/test/negative-empty_strict_mode.js +38 -0
- package/test/collateral/valid-default/expected-content/test/noStrict_default.js +36 -0
- package/test/collateral/valid-default/expected-content/test/rawNoStrict_default.js +14 -0
- package/test/collateral/valid-default/expected-content/test/rawStrict_default.js +15 -0
- package/test/collateral/valid-default/expected-content/test/strict_strict_mode.js +41 -0
- package/test/collateral/valid-default/expected-metadata/test/asyncNegative_default.json +22 -0
- package/test/collateral/valid-default/expected-metadata/test/asyncNegative_strict_mode.json +22 -0
- package/test/collateral/valid-default/expected-metadata/test/async_default.json +18 -0
- package/test/collateral/valid-default/expected-metadata/test/async_strict_mode.json +18 -0
- package/test/collateral/valid-default/expected-metadata/test/bothStrict_default.json +24 -0
- package/test/collateral/valid-default/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test/collateral/valid-default/expected-metadata/test/error_default.json +19 -0
- package/test/collateral/valid-default/expected-metadata/test/error_strict_mode.json +19 -0
- package/test/collateral/valid-default/expected-metadata/test/module_default.json +17 -0
- package/test/collateral/valid-default/expected-metadata/test/module_strict_mode.json +17 -0
- package/test/collateral/valid-default/expected-metadata/test/negative-empty_default.json +19 -0
- package/test/collateral/valid-default/expected-metadata/test/negative-empty_strict_mode.json +19 -0
- package/test/collateral/valid-default/expected-metadata/test/noStrict_default.json +17 -0
- package/test/collateral/valid-default/expected-metadata/test/rawNoStrict_default.json +14 -0
- package/test/collateral/valid-default/expected-metadata/test/rawStrict_default.json +14 -0
- package/test/collateral/valid-default/expected-metadata/test/strict_strict_mode.json +21 -0
- package/test/collateral/valid-default/fake-test262/harness/assert.js +17 -0
- package/test/collateral/valid-default/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/valid-default/fake-test262/harness/sta.js +12 -0
- package/test/collateral/valid-default/fake-test262/test/async.js +10 -0
- package/test/collateral/valid-default/fake-test262/test/asyncNegative.js +11 -0
- package/test/collateral/valid-default/fake-test262/test/bothStrict.js +15 -0
- package/test/collateral/valid-default/fake-test262/test/error.js +8 -0
- package/test/collateral/valid-default/fake-test262/test/module.js +6 -0
- package/test/collateral/valid-default/fake-test262/test/module_FIXTURE.js +2 -0
- package/test/collateral/valid-default/fake-test262/test/negative-empty.js +6 -0
- package/test/collateral/valid-default/fake-test262/test/noStrict.js +5 -0
- package/test/collateral/valid-default/fake-test262/test/rawNoStrict.js +14 -0
- package/test/collateral/valid-default/fake-test262/test/rawStrict.js +15 -0
- package/test/collateral/valid-default/fake-test262/test/strict.js +9 -0
- package/test/collateral/valid-extra-files/expected-content/test/bothStrict_default.js +46 -0
- package/test/collateral/valid-extra-files/expected-content/test/bothStrict_strict_mode.js +47 -0
- package/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_default.json +24 -0
- package/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test/collateral/valid-extra-files/fake-test262/harness/assert.js +17 -0
- package/test/collateral/valid-extra-files/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/valid-extra-files/fake-test262/harness/sta.js +12 -0
- package/test/collateral/valid-extra-files/fake-test262/test/bothStrict.js +15 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-0_FIXTURE.js +2 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-1_FIXTURE.js +2 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-2_FIXTURE.js +2 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-3_FIXTURE.js +2 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-4_FIXTURE.js +2 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-5_FIXTURE.js +2 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-6_FIXTURE.js +2 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-7_FIXTURE.js +2 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-8_FIXTURE.js +2 -0
- package/test/collateral/valid-extra-files/fake-test262/test/zzz-9_FIXTURE.txt +2 -0
- package/test/collateral/valid-insertionindex-with-copyright/expected-content/test/raw_default.js +15 -0
- package/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_default.js +38 -0
- package/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_strict_mode.js +39 -0
- package/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/raw_default.json +14 -0
- package/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_default.json +15 -0
- package/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_strict_mode.json +15 -0
- package/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/assert.js +17 -0
- package/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/sta.js +12 -0
- package/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/raw.js +15 -0
- package/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/runtime.js +7 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_default.js +11 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_strict_mode.js +12 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/async_default.js +10 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/async_strict_mode.js +11 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_default.js +15 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_strict_mode.js +16 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/error_default.js +8 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/error_strict_mode.js +9 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/module_default.js +6 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/module_strict_mode.js +7 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_default.js +6 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_strict_mode.js +7 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/noStrict_default.js +5 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/rawNoStrict_default.js +14 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/rawStrict_default.js +15 -0
- package/test/collateral/valid-omit-runtime/expected-content/test/strict_strict_mode.js +10 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_default.json +18 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_strict_mode.json +18 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/async_default.json +14 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/async_strict_mode.json +14 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_default.json +21 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_strict_mode.json +21 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/error_default.json +16 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/error_strict_mode.json +16 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/module_default.json +14 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/module_strict_mode.json +14 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_default.json +16 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_strict_mode.json +16 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/noStrict_default.json +14 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/rawNoStrict_default.json +14 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/rawStrict_default.json +14 -0
- package/test/collateral/valid-omit-runtime/expected-metadata/test/strict_strict_mode.json +18 -0
- package/test/collateral/valid-omit-runtime/fake-test262/harness/assert.js +17 -0
- package/test/collateral/valid-omit-runtime/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/valid-omit-runtime/fake-test262/harness/sta.js +12 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/async.js +10 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/asyncNegative.js +11 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/bothStrict.js +15 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/error.js +8 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/module.js +6 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/module_FIXTURE.js +2 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/negative-empty.js +6 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/noStrict.js +5 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/rawNoStrict.js +14 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/rawStrict.js +15 -0
- package/test/collateral/valid-omit-runtime/fake-test262/test/strict.js +9 -0
- package/test/collateral/valid-version-ignored/expected-content/test/strict_strict_mode.js +41 -0
- package/test/collateral/valid-version-ignored/expected-metadata/test/strict_strict_mode.json +21 -0
- package/test/collateral/valid-version-ignored/fake-test262/harness/assert.js +17 -0
- package/test/collateral/valid-version-ignored/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/valid-version-ignored/fake-test262/harness/sta.js +12 -0
- package/test/collateral/valid-version-ignored/fake-test262/package.json +3 -0
- package/test/collateral/valid-version-ignored/fake-test262/test/strict.js +9 -0
- package/test/collateral/valid-version-supported/expected-content/test/strict_strict_mode.js +41 -0
- package/test/collateral/valid-version-supported/expected-metadata/test/strict_strict_mode.json +21 -0
- package/test/collateral/valid-version-supported/fake-test262/harness/assert.js +17 -0
- package/test/collateral/valid-version-supported/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/valid-version-supported/fake-test262/harness/sta.js +12 -0
- package/test/collateral/valid-version-supported/fake-test262/package.json +3 -0
- package/test/collateral/valid-version-supported/fake-test262/test/strict.js +9 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_default.js +44 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_strict_mode.js +45 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-and-license-on-same-line_default.js +20 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-multiline-block_default.js +18 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls_default.js +17 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-and-license-on-same-line_default.js +20 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-multiline-block_default.js +18 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps_default.js +17 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/rawWithLicense_default.js +21 -0
- package/test/collateral/valid-with-hashbang/expected-content/test/raw_default.js +17 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_default.json +22 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_strict_mode.json +22 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-and-license-on-same-line_default.json +21 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-multiline-block_default.json +21 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls_default.json +21 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-and-license-on-same-line_default.json +21 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-multiline-block_default.json +21 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps_default.json +21 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/rawWithLicense_default.json +21 -0
- package/test/collateral/valid-with-hashbang/expected-metadata/test/raw_default.json +21 -0
- package/test/collateral/valid-with-hashbang/fake-test262/harness/assert.js +17 -0
- package/test/collateral/valid-with-hashbang/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/valid-with-hashbang/fake-test262/harness/sta.js +12 -0
- package/test/collateral/valid-with-hashbang/fake-test262/test/missing-raw-flag.js +13 -0
- package/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-and-license-on-same-line.js +20 -0
- package/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-multiline-block.js +18 -0
- package/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls.js +17 -0
- package/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-and-license-on-same-line.js +20 -0
- package/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-multiline-block.js +18 -0
- package/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps.js +17 -0
- package/test/collateral/valid-with-hashbang/fake-test262/test/raw.js +17 -0
- package/test/collateral/valid-with-hashbang/fake-test262/test/rawWithLicense.js +21 -0
- package/test/collateral/valid-with-includes/custom-includes/assert.js +17 -0
- package/test/collateral/valid-with-includes/custom-includes/doneprintHandle.js +9 -0
- package/test/collateral/valid-with-includes/custom-includes/sta.js +13 -0
- package/test/collateral/valid-with-includes/expected-content/test/async_default.js +52 -0
- package/test/collateral/valid-with-includes/expected-content/test/async_strict_mode.js +53 -0
- package/test/collateral/valid-with-includes/expected-content/test/bothStrict_default.js +47 -0
- package/test/collateral/valid-with-includes/expected-content/test/bothStrict_strict_mode.js +48 -0
- package/test/collateral/valid-with-includes/expected-metadata/test/async_default.json +18 -0
- package/test/collateral/valid-with-includes/expected-metadata/test/async_strict_mode.json +18 -0
- package/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_default.json +24 -0
- package/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test/collateral/valid-with-includes/fake-test262/harness/assert.js +17 -0
- package/test/collateral/valid-with-includes/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/valid-with-includes/fake-test262/test/async.js +10 -0
- package/test/collateral/valid-with-includes/fake-test262/test/bothStrict.js +15 -0
- package/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_default.js +49 -0
- package/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_strict_mode.js +50 -0
- package/test/collateral/valid-with-paths/expected-content/test/async/async_default.js +48 -0
- package/test/collateral/valid-with-paths/expected-content/test/async/async_strict_mode.js +49 -0
- package/test/collateral/valid-with-paths/expected-content/test/bothStrict_default.js +46 -0
- package/test/collateral/valid-with-paths/expected-content/test/bothStrict_strict_mode.js +47 -0
- package/test/collateral/valid-with-paths/expected-content/test/strict/no/noStrict_default.js +36 -0
- package/test/collateral/valid-with-paths/expected-content/test/strict/no/rawNoStrict_default.js +14 -0
- package/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_default.json +22 -0
- package/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_strict_mode.json +22 -0
- package/test/collateral/valid-with-paths/expected-metadata/test/async/async_default.json +18 -0
- package/test/collateral/valid-with-paths/expected-metadata/test/async/async_strict_mode.json +18 -0
- package/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_default.json +24 -0
- package/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_strict_mode.json +24 -0
- package/test/collateral/valid-with-paths/expected-metadata/test/strict/no/noStrict_default.json +17 -0
- package/test/collateral/valid-with-paths/expected-metadata/test/strict/no/rawNoStrict_default.json +14 -0
- package/test/collateral/valid-with-paths/fake-test262/harness/assert.js +17 -0
- package/test/collateral/valid-with-paths/fake-test262/harness/doneprintHandle.js +6 -0
- package/test/collateral/valid-with-paths/fake-test262/harness/sta.js +12 -0
- package/test/collateral/valid-with-paths/fake-test262/test/async/async.js +10 -0
- package/test/collateral/valid-with-paths/fake-test262/test/async/asyncNegative.js +11 -0
- package/test/collateral/valid-with-paths/fake-test262/test/bothStrict.js +15 -0
- package/test/collateral/valid-with-paths/fake-test262/test/error.js +8 -0
- package/test/collateral/valid-with-paths/fake-test262/test/negative-empty.js +6 -0
- package/test/collateral/valid-with-paths/fake-test262/test/strict/no/noStrict.js +5 -0
- package/test/collateral/valid-with-paths/fake-test262/test/strict/no/rawNoStrict.js +14 -0
- package/test/collateral/valid-with-paths/fake-test262/test/strict/rawStrict.js +15 -0
- package/test/collateral/valid-with-paths/fake-test262/test/strict/strict.js +9 -0
- package/test/test.js +319 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function Test262Error(message) {
|
|
2
|
+
this.message = message || "";
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
Test262Error.prototype.toString = function () {
|
|
6
|
+
return "Test262Error: " + this.message;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
var $ERROR;
|
|
10
|
+
$ERROR = function $ERROR(message) {
|
|
11
|
+
throw new Test262Error(message);
|
|
12
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
function Test262Error(message) {
|
|
2
|
+
this.message = message || "";
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
Test262Error.prototype.toString = function () {
|
|
6
|
+
return "Test262Error: " + this.message;
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
var $ERROR;
|
|
10
|
+
$ERROR = function $ERROR(message) {
|
|
11
|
+
throw new Test262Error(message);
|
|
12
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// This is assert.js
|
|
2
|
+
|
|
3
|
+
'It has some contents';
|
|
4
|
+
|
|
5
|
+
/* that
|
|
6
|
+
*
|
|
7
|
+
* should
|
|
8
|
+
|
|
9
|
+
* not
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
`be ${ "modified" }`;
|
|
13
|
+
|
|
14
|
+
var including, trailing;
|
|
15
|
+
whitespace: ;
|
|
16
|
+
|
|
17
|
+
void "end of assert.js";
|
|
18
|
+
|
|
19
|
+
function Test262Error(message) {
|
|
20
|
+
this.message = message || "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Test262Error.prototype.toString = function () {
|
|
24
|
+
return "Test262Error: " + this.message;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var $ERROR;
|
|
28
|
+
$ERROR = function $ERROR(message) {
|
|
29
|
+
throw new Test262Error(message);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
function $DONE(){
|
|
33
|
+
if(!arguments[0])
|
|
34
|
+
print('Test262:AsyncTestComplete');
|
|
35
|
+
else
|
|
36
|
+
print('Error: ' + arguments[0]);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*---
|
|
40
|
+
description: Async negative test
|
|
41
|
+
negative:
|
|
42
|
+
phase: runtime
|
|
43
|
+
type: RangeError
|
|
44
|
+
flags: [async]
|
|
45
|
+
---*/
|
|
46
|
+
|
|
47
|
+
setTimeout(function() {
|
|
48
|
+
$DONE(new RangeError());
|
|
49
|
+
}, 1000);
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This is assert.js
|
|
3
|
+
|
|
4
|
+
'It has some contents';
|
|
5
|
+
|
|
6
|
+
/* that
|
|
7
|
+
*
|
|
8
|
+
* should
|
|
9
|
+
|
|
10
|
+
* not
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
`be ${ "modified" }`;
|
|
14
|
+
|
|
15
|
+
var including, trailing;
|
|
16
|
+
whitespace: ;
|
|
17
|
+
|
|
18
|
+
void "end of assert.js";
|
|
19
|
+
|
|
20
|
+
function Test262Error(message) {
|
|
21
|
+
this.message = message || "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Test262Error.prototype.toString = function () {
|
|
25
|
+
return "Test262Error: " + this.message;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var $ERROR;
|
|
29
|
+
$ERROR = function $ERROR(message) {
|
|
30
|
+
throw new Test262Error(message);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
function $DONE(){
|
|
34
|
+
if(!arguments[0])
|
|
35
|
+
print('Test262:AsyncTestComplete');
|
|
36
|
+
else
|
|
37
|
+
print('Error: ' + arguments[0]);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/*---
|
|
41
|
+
description: Async negative test
|
|
42
|
+
negative:
|
|
43
|
+
phase: runtime
|
|
44
|
+
type: RangeError
|
|
45
|
+
flags: [async]
|
|
46
|
+
---*/
|
|
47
|
+
|
|
48
|
+
setTimeout(function() {
|
|
49
|
+
$DONE(new RangeError());
|
|
50
|
+
}, 1000);
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// This is assert.js
|
|
2
|
+
|
|
3
|
+
'It has some contents';
|
|
4
|
+
|
|
5
|
+
/* that
|
|
6
|
+
*
|
|
7
|
+
* should
|
|
8
|
+
|
|
9
|
+
* not
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
`be ${ "modified" }`;
|
|
13
|
+
|
|
14
|
+
var including, trailing;
|
|
15
|
+
whitespace: ;
|
|
16
|
+
|
|
17
|
+
void "end of assert.js";
|
|
18
|
+
|
|
19
|
+
function Test262Error(message) {
|
|
20
|
+
this.message = message || "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Test262Error.prototype.toString = function () {
|
|
24
|
+
return "Test262Error: " + this.message;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var $ERROR;
|
|
28
|
+
$ERROR = function $ERROR(message) {
|
|
29
|
+
throw new Test262Error(message);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
function $DONE(){
|
|
33
|
+
if(!arguments[0])
|
|
34
|
+
print('Test262:AsyncTestComplete');
|
|
35
|
+
else
|
|
36
|
+
print('Error: ' + arguments[0]);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/*---
|
|
40
|
+
description: Async test
|
|
41
|
+
flags: [async]
|
|
42
|
+
---*/
|
|
43
|
+
|
|
44
|
+
var p = new Promise(function(resolve) {
|
|
45
|
+
resolve();
|
|
46
|
+
});
|
|
47
|
+
|
|
48
|
+
p.then($DONE, $DONE);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This is assert.js
|
|
3
|
+
|
|
4
|
+
'It has some contents';
|
|
5
|
+
|
|
6
|
+
/* that
|
|
7
|
+
*
|
|
8
|
+
* should
|
|
9
|
+
|
|
10
|
+
* not
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
`be ${ "modified" }`;
|
|
14
|
+
|
|
15
|
+
var including, trailing;
|
|
16
|
+
whitespace: ;
|
|
17
|
+
|
|
18
|
+
void "end of assert.js";
|
|
19
|
+
|
|
20
|
+
function Test262Error(message) {
|
|
21
|
+
this.message = message || "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Test262Error.prototype.toString = function () {
|
|
25
|
+
return "Test262Error: " + this.message;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var $ERROR;
|
|
29
|
+
$ERROR = function $ERROR(message) {
|
|
30
|
+
throw new Test262Error(message);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
function $DONE(){
|
|
34
|
+
if(!arguments[0])
|
|
35
|
+
print('Test262:AsyncTestComplete');
|
|
36
|
+
else
|
|
37
|
+
print('Error: ' + arguments[0]);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/*---
|
|
41
|
+
description: Async test
|
|
42
|
+
flags: [async]
|
|
43
|
+
---*/
|
|
44
|
+
|
|
45
|
+
var p = new Promise(function(resolve) {
|
|
46
|
+
resolve();
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
p.then($DONE, $DONE);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
// This is assert.js
|
|
2
|
+
|
|
3
|
+
'It has some contents';
|
|
4
|
+
|
|
5
|
+
/* that
|
|
6
|
+
*
|
|
7
|
+
* should
|
|
8
|
+
|
|
9
|
+
* not
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
`be ${ "modified" }`;
|
|
13
|
+
|
|
14
|
+
var including, trailing;
|
|
15
|
+
whitespace: ;
|
|
16
|
+
|
|
17
|
+
void "end of assert.js";
|
|
18
|
+
|
|
19
|
+
function Test262Error(message) {
|
|
20
|
+
this.message = message || "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Test262Error.prototype.toString = function () {
|
|
24
|
+
return "Test262Error: " + this.message;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var $ERROR;
|
|
28
|
+
$ERROR = function $ERROR(message) {
|
|
29
|
+
throw new Test262Error(message);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/*---
|
|
33
|
+
description: Should test in both modes
|
|
34
|
+
features: [var, try, if]
|
|
35
|
+
negative:
|
|
36
|
+
phase: runtime
|
|
37
|
+
type: ReferenceError
|
|
38
|
+
---*/
|
|
39
|
+
var strict;
|
|
40
|
+
try { x = 1; strict = false;} catch(e) { strict = true }
|
|
41
|
+
|
|
42
|
+
if(strict) {
|
|
43
|
+
y = 1;
|
|
44
|
+
} else {
|
|
45
|
+
throw new ReferenceError();
|
|
46
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This is assert.js
|
|
3
|
+
|
|
4
|
+
'It has some contents';
|
|
5
|
+
|
|
6
|
+
/* that
|
|
7
|
+
*
|
|
8
|
+
* should
|
|
9
|
+
|
|
10
|
+
* not
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
`be ${ "modified" }`;
|
|
14
|
+
|
|
15
|
+
var including, trailing;
|
|
16
|
+
whitespace: ;
|
|
17
|
+
|
|
18
|
+
void "end of assert.js";
|
|
19
|
+
|
|
20
|
+
function Test262Error(message) {
|
|
21
|
+
this.message = message || "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Test262Error.prototype.toString = function () {
|
|
25
|
+
return "Test262Error: " + this.message;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var $ERROR;
|
|
29
|
+
$ERROR = function $ERROR(message) {
|
|
30
|
+
throw new Test262Error(message);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/*---
|
|
34
|
+
description: Should test in both modes
|
|
35
|
+
features: [var, try, if]
|
|
36
|
+
negative:
|
|
37
|
+
phase: runtime
|
|
38
|
+
type: ReferenceError
|
|
39
|
+
---*/
|
|
40
|
+
var strict;
|
|
41
|
+
try { x = 1; strict = false;} catch(e) { strict = true }
|
|
42
|
+
|
|
43
|
+
if(strict) {
|
|
44
|
+
y = 1;
|
|
45
|
+
} else {
|
|
46
|
+
throw new ReferenceError();
|
|
47
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
// This is assert.js
|
|
2
|
+
|
|
3
|
+
'It has some contents';
|
|
4
|
+
|
|
5
|
+
/* that
|
|
6
|
+
*
|
|
7
|
+
* should
|
|
8
|
+
|
|
9
|
+
* not
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
`be ${ "modified" }`;
|
|
13
|
+
|
|
14
|
+
var including, trailing;
|
|
15
|
+
whitespace: ;
|
|
16
|
+
|
|
17
|
+
void "end of assert.js";
|
|
18
|
+
|
|
19
|
+
function Test262Error(message) {
|
|
20
|
+
this.message = message || "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Test262Error.prototype.toString = function () {
|
|
24
|
+
return "Test262Error: " + this.message;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var $ERROR;
|
|
28
|
+
$ERROR = function $ERROR(message) {
|
|
29
|
+
throw new Test262Error(message);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/*---
|
|
33
|
+
description: Fails by calling $ERROR
|
|
34
|
+
negative:
|
|
35
|
+
phase: runtime
|
|
36
|
+
type: Test262Error
|
|
37
|
+
---*/
|
|
38
|
+
|
|
39
|
+
$ERROR('failure message');
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This is assert.js
|
|
3
|
+
|
|
4
|
+
'It has some contents';
|
|
5
|
+
|
|
6
|
+
/* that
|
|
7
|
+
*
|
|
8
|
+
* should
|
|
9
|
+
|
|
10
|
+
* not
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
`be ${ "modified" }`;
|
|
14
|
+
|
|
15
|
+
var including, trailing;
|
|
16
|
+
whitespace: ;
|
|
17
|
+
|
|
18
|
+
void "end of assert.js";
|
|
19
|
+
|
|
20
|
+
function Test262Error(message) {
|
|
21
|
+
this.message = message || "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Test262Error.prototype.toString = function () {
|
|
25
|
+
return "Test262Error: " + this.message;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var $ERROR;
|
|
29
|
+
$ERROR = function $ERROR(message) {
|
|
30
|
+
throw new Test262Error(message);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/*---
|
|
34
|
+
description: Fails by calling $ERROR
|
|
35
|
+
negative:
|
|
36
|
+
phase: runtime
|
|
37
|
+
type: Test262Error
|
|
38
|
+
---*/
|
|
39
|
+
|
|
40
|
+
$ERROR('failure message');
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// This is assert.js
|
|
2
|
+
|
|
3
|
+
'It has some contents';
|
|
4
|
+
|
|
5
|
+
/* that
|
|
6
|
+
*
|
|
7
|
+
* should
|
|
8
|
+
|
|
9
|
+
* not
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
`be ${ "modified" }`;
|
|
13
|
+
|
|
14
|
+
var including, trailing;
|
|
15
|
+
whitespace: ;
|
|
16
|
+
|
|
17
|
+
void "end of assert.js";
|
|
18
|
+
|
|
19
|
+
function Test262Error(message) {
|
|
20
|
+
this.message = message || "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Test262Error.prototype.toString = function () {
|
|
24
|
+
return "Test262Error: " + this.message;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var $ERROR;
|
|
28
|
+
$ERROR = function $ERROR(message) {
|
|
29
|
+
throw new Test262Error(message);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/*---
|
|
33
|
+
description: A test for module code
|
|
34
|
+
flags: [module]
|
|
35
|
+
---*/
|
|
36
|
+
|
|
37
|
+
import fixture from './module_FIXTURE.js';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This is assert.js
|
|
3
|
+
|
|
4
|
+
'It has some contents';
|
|
5
|
+
|
|
6
|
+
/* that
|
|
7
|
+
*
|
|
8
|
+
* should
|
|
9
|
+
|
|
10
|
+
* not
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
`be ${ "modified" }`;
|
|
14
|
+
|
|
15
|
+
var including, trailing;
|
|
16
|
+
whitespace: ;
|
|
17
|
+
|
|
18
|
+
void "end of assert.js";
|
|
19
|
+
|
|
20
|
+
function Test262Error(message) {
|
|
21
|
+
this.message = message || "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Test262Error.prototype.toString = function () {
|
|
25
|
+
return "Test262Error: " + this.message;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var $ERROR;
|
|
29
|
+
$ERROR = function $ERROR(message) {
|
|
30
|
+
throw new Test262Error(message);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/*---
|
|
34
|
+
description: A test for module code
|
|
35
|
+
flags: [module]
|
|
36
|
+
---*/
|
|
37
|
+
|
|
38
|
+
import fixture from './module_FIXTURE.js';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// This is assert.js
|
|
2
|
+
|
|
3
|
+
'It has some contents';
|
|
4
|
+
|
|
5
|
+
/* that
|
|
6
|
+
*
|
|
7
|
+
* should
|
|
8
|
+
|
|
9
|
+
* not
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
`be ${ "modified" }`;
|
|
13
|
+
|
|
14
|
+
var including, trailing;
|
|
15
|
+
whitespace: ;
|
|
16
|
+
|
|
17
|
+
void "end of assert.js";
|
|
18
|
+
|
|
19
|
+
function Test262Error(message) {
|
|
20
|
+
this.message = message || "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Test262Error.prototype.toString = function () {
|
|
24
|
+
return "Test262Error: " + this.message;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var $ERROR;
|
|
28
|
+
$ERROR = function $ERROR(message) {
|
|
29
|
+
throw new Test262Error(message);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/*---
|
|
33
|
+
description: Should report the expected error indicated by the "negative" frontmatter
|
|
34
|
+
negative:
|
|
35
|
+
phase: runtime
|
|
36
|
+
type: Test262Error
|
|
37
|
+
---*/
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This is assert.js
|
|
3
|
+
|
|
4
|
+
'It has some contents';
|
|
5
|
+
|
|
6
|
+
/* that
|
|
7
|
+
*
|
|
8
|
+
* should
|
|
9
|
+
|
|
10
|
+
* not
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
`be ${ "modified" }`;
|
|
14
|
+
|
|
15
|
+
var including, trailing;
|
|
16
|
+
whitespace: ;
|
|
17
|
+
|
|
18
|
+
void "end of assert.js";
|
|
19
|
+
|
|
20
|
+
function Test262Error(message) {
|
|
21
|
+
this.message = message || "";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
Test262Error.prototype.toString = function () {
|
|
25
|
+
return "Test262Error: " + this.message;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
var $ERROR;
|
|
29
|
+
$ERROR = function $ERROR(message) {
|
|
30
|
+
throw new Test262Error(message);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
/*---
|
|
34
|
+
description: Should report the expected error indicated by the "negative" frontmatter
|
|
35
|
+
negative:
|
|
36
|
+
phase: runtime
|
|
37
|
+
type: Test262Error
|
|
38
|
+
---*/
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// This is assert.js
|
|
2
|
+
|
|
3
|
+
'It has some contents';
|
|
4
|
+
|
|
5
|
+
/* that
|
|
6
|
+
*
|
|
7
|
+
* should
|
|
8
|
+
|
|
9
|
+
* not
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
`be ${ "modified" }`;
|
|
13
|
+
|
|
14
|
+
var including, trailing;
|
|
15
|
+
whitespace: ;
|
|
16
|
+
|
|
17
|
+
void "end of assert.js";
|
|
18
|
+
|
|
19
|
+
function Test262Error(message) {
|
|
20
|
+
this.message = message || "";
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
Test262Error.prototype.toString = function () {
|
|
24
|
+
return "Test262Error: " + this.message;
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
var $ERROR;
|
|
28
|
+
$ERROR = function $ERROR(message) {
|
|
29
|
+
throw new Test262Error(message);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/*---
|
|
33
|
+
description: Should not test in strict mode
|
|
34
|
+
flags: [noStrict]
|
|
35
|
+
---*/
|
|
36
|
+
x = 5;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*---
|
|
2
|
+
description: Should not test in strict mode
|
|
3
|
+
flags: [raw]
|
|
4
|
+
---*/
|
|
5
|
+
var seemsStrict;
|
|
6
|
+
try {
|
|
7
|
+
x = 1;
|
|
8
|
+
} catch (err) {
|
|
9
|
+
seemsStrict = err.constructor === ReferenceError;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (seemsStrict) {
|
|
13
|
+
throw new Error('Script erroneously interpreted in strict mode.');
|
|
14
|
+
}
|