Commit Graph

5599 Commits

Author SHA1 Message Date
Mike Pennisi 09485d387f Update tests for DataView & resizable Arraybuffer
This change concerns normative text of the Resizable ArrayBuffer
proposal which is believed to be invalid in its current form; a patch
updating the text is under review [1].

[1] https://github.com/tc39/proposal-resizablearraybuffer/pull/78
2021-10-25 09:17:19 -04:00
legendecas fcaa7594a4 Add WrappedFunction coverage on non-callable proxy 2021-10-22 09:00:50 -04:00
Daniel Nalborczyk 100af9014e generate tests 2021-10-22 09:00:00 -04:00
dnalborczyk 0659f8d952 Update eval-script-code-host-resolves-module-code.case 2021-10-22 09:00:00 -04:00
legendecas ec998749ec Add tests on ShadowRealm WrappedFunction value wrapping 2021-10-21 21:19:31 -04:00
legendecas 541715762c WrappedFunction should accepts callable proxy 2021-10-21 21:15:54 -04:00
Mike Pennisi 1ad9bb7626 Improve errors in NumberFormat#formatToParts tests
Specify a descriptive value for the previously-unused third parameter of
the `verifyFormatParts` function in order to disambiguate error
messages.

This patch was generated with the following command:

    sed -i 's/\(verifyFormatParts([^,]\+, \)\([^,]\+\))/\1\2, "\2")/g' \
      test/intl402/NumberFormat/prototype/formatToParts/signDisplay-currency-*
2021-10-18 09:45:11 -04:00
Mike Pennisi 7ce15a19f3 Correct test descriptions 2021-10-18 09:44:53 -04:00
Rick Waldron 8b4382d2f2
Transform compareArray -> assert.compareArray: test/language/**/*.js (#3239) 2021-10-15 20:35:01 -04:00
Mathias Bynens 5d3eed6433
Add tests for Unicode v14 Identifier{Start,Part} (#3198)
Issue: https://github.com/tc39/ecma262/issues/2514
2021-10-15 20:19:22 -04:00
Phillip Mates d351cfd445
Check the function proto of all wrap points for Shadow Realm (#3269) 2021-10-15 11:05:22 -07:00
Mike Pennisi 8d420cef41 Remove unused functions 2021-10-13 14:18:32 -04:00
Phillip Mates 73cdcfa61e
Fix ShadowRealm globalThis test on filtering logic (#3266)
Ref #3264
2021-10-13 11:04:23 -07:00
Ms2ger 2462d8acd9 Check that PlainMonthDay#toPlainDate() rejects out-of-range dates.
Fixes #3252.
2021-10-12 19:30:45 -04:00
Leo Balter 8ff255a5ec Add tests for ShadowRealm globalThis 2021-10-12 19:30:09 -04:00
legendecas e9cea2125c fixup! 2021-10-12 13:04:09 -04:00
legendecas fc3878f0a4 Add test for ShadowRealm.prototype.evaluate throwing realm check 2021-10-12 13:04:09 -04:00
Rick Waldron fc975b171d
Transform compareArray -> assert.compareArray: test/built-ins/Array/**/*.js (#3238) 2021-10-08 16:16:32 -04:00
Rick Waldron 4ce285da7a
Transform compareArray -> assert.compareArray: test/built-ins/Object/**/*.js (#3236) 2021-10-08 16:13:08 -04:00
legendecas 619afdeab7 Remove unnecessary eval to access realm globals 2021-10-08 14:40:58 -04:00
legendecas 3f6708fa04 Fix ShadowRealm/prototype/importValue/not-constructor.js 2021-10-08 14:40:23 -04:00
Frank Tang adce88e717 mv tests depend on Intl to intl402. 2021-10-08 14:30:06 -04:00
Ms2ger 64a1628d04 Fix bug in PlainDate#since() test.
Fixes #3249.
2021-10-07 09:08:43 -04:00
Rick Waldron 7be8fca485
fix: re-run clean and build on master to sync generated tests (#3247) 2021-10-06 15:47:46 -04:00
Frank Yung-Fong Tang 61339fd294
Sync test of Temporal.Calendar.p*.fields to 1750 (#3188)
* Sync test  of Temporal.Calendar.p*.fields to 1750

https://github.com/tc39/proposal-temporal/pull

* add more test

* add more tests for T*.Calendar.p*.fields

* Update test/built-ins/Temporal/Calendar/prototype/fields/long-input.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/long-input.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/repeated-throw.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/reverse.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update test/built-ins/Temporal/Calendar/prototype/fields/reverse.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Remove loop

* Update test/built-ins/Temporal/Calendar/prototype/fields/long-input.js

Co-authored-by: Ms2ger <Ms2ger@gmail.com>

* Update long-input.js

* Update repeated-throw.js

* Update reverse.js

* ensure the implementation check the content

make sure the validation does not happen after the looping the generator

* add test to check all valid field value

Co-authored-by: Ms2ger <Ms2ger@gmail.com>
2021-10-05 23:03:07 -04:00
Rick Waldron d5ac0c348a
Transform compareArray -> assert.compareArray: test/intl402/**/*.js (#3240) 2021-10-05 22:54:01 -04:00
Rick Waldron ed91c59b94
Transform compareArray -> assert.compareArray: test/built-ins/Map/**/*.js (#3237) 2021-10-05 22:46:16 -04:00
Rick Waldron aea4ae2059
Transform compareArray -> assert.compareArray: test/built-ins/Proxy/**/*.js (#3235) 2021-10-05 22:42:02 -04:00
Rick Waldron c44eeadcae
Transform compareArray -> assert.compareArray: test/built-ins/RegExp/**/*.js (#3234) 2021-10-05 22:40:39 -04:00
Rick Waldron 0f47fe4528
Transform compareArray -> assert.compareArray: test/built-ins/Reflect/**/*.js (#3232) 2021-10-05 22:33:22 -04:00
Mike Pennisi 891b7915bd Remove superfluous EmptyStatement 2021-10-05 16:28:06 -04:00
Mike Pennisi 8f1fb5c257 Remove unused functions 2021-10-05 16:24:16 -04:00
Mike Pennisi a6834093aa Improve coverage by invoking functions as intended
Some tests which include function declarations designed to verify
behavior do not reference those functions. Insert the references
necessary for those functions to serve their intended purpose.
2021-10-05 16:22:56 -04:00
rwaldron addfd8bf3d fix: ensure that symbol args as message don't break assert.compareArray 2021-10-05 15:16:53 -04:00
legendecas 12e9d67bb5 Add tests for cross realms in ShadowRealm.prototype.evaluate 2021-10-04 15:39:12 -04:00
Mike Pennisi c44cee291a Assert array equivalency
The `compareArray` utility function returns a boolean value describing
whether or not the input arrays are equivalent--it does not throw an
exception when invoked with non-equivalent arrays. Prior to this commit,
however, two tests invoked `compareArray` without inspecting its return
value, so it had no impact on the result of the test.

Update the tests to fail when the "expected" and "actual" arrays are not
equivalent.
2021-10-04 15:38:08 -04:00
rwaldron 43c68163c0 Generate tests 2021-10-01 16:38:56 -04:00
rwaldron e6b47d7738 chore: update src/**/*.case to use assert.compareArray wherever applicable 2021-10-01 16:38:56 -04:00
Philip Chimento 56e537b916 Consolidate duplicate tests
There were a few tests already in the tree that overlapped ones that I
added in the previous commit. I've consolidated these and taken
information from the deleted ones where applicable, and improved on the
autogenerated assertion messages.
2021-10-01 14:30:12 -04:00
Philip Chimento 77a34cf93f Add Temporal tests
This copies over the tests that previously existed in the
tc39/proposal-temporal repository.

For context, see thread starting at:
https://github.com/tc39/test262/issues/3002#issuecomment-926234480

In service of https://github.com/tc39/test262/issues/3002
2021-10-01 14:30:12 -04:00
Rick Waldron b3158bce51
fix: corrections to assert.compareArray and assert.compareArray.format (#3226) 2021-10-01 12:52:15 -04:00
Mike Pennisi d9ddf80479 Revert "Merge pull request #3219 from tc39/rwaldron/migrate-comparearray"
This reverts commit b690cb67be, reversing
changes made to 50dd431dff. This is
necessary because the reverted changeset reduced coverage by an unknown
extent.
2021-10-01 10:18:47 -04:00
Philip Chimento c7ca06acb2
Remove duplicate tests (#3222)
While working on adding the Temporal tests from tc39/proposal-temporal I
noticed that these tests tested the same thing as each of the branding.js
tests in the same directory. This removes the duplicate tests.
2021-09-30 20:17:12 -04:00
Mathias Bynens 04ad519be9
Update RegExp property tests per Unicode v14 (#3199)
Issue: https://github.com/tc39/ecma262/issues/2514
2021-09-30 11:48:47 -04:00
Leo Balter 10ad4c1593 Split tests and fix false positive 2021-09-27 14:59:12 -04:00
Phillip Mates c768b9b8f2 Ensure that proxying wrapped functions preserves checks 2021-09-27 10:28:38 -04:00
Leo Balter b690cb67be
Merge pull request #3219 from tc39/rwaldron/migrate-comparearray
chore: convert compareArray() to assert.compareArray()
2021-09-24 12:02:11 -07:00
rwaldron a81a2a2b1f fix: ensure that assert.compareArray doesn't iterate and evaluate actual and expected more than once, unless absolutely necessary. 2021-09-24 14:26:04 -04:00
rwaldron 1feafce8ce chore: change name of argument 2021-09-24 13:59:02 -04:00
rwaldron 92dad8d640 chore: use [].map.call instead of spread 2021-09-24 13:52:37 -04:00