Commit Graph

21 Commits

Author SHA1 Message Date
Philip Chimento d87a7da6e1 Replace Object.hasOwnProperty.call with Object.prototype.hasOwnProperty.call
While we're at it, use assert() instead of assert.sameValue() for brevity,
if we are not specifically testing that the return value of hasOwnProperty
is the value true or false; and add more informative assertion messages to
help with debugging.

In some cases, the Object.hasOwnProperty.call could be replaced with
verifyProperty(), if the property descriptor was also being verified at
the same time.

This fixes some tests that were faulty to begin with: a common mistake was
Object.hasOwnProperty(obj, prop) which is probably going to return false
when that's not what you want.

The only instances left of `Object.hasOwnProperty` are one regression test
in implementation-contributed which I can't tell if it was intentionally
needed to trigger the regression, and a few instances of
`Object.hasOwnProperty('prototype')` which would defeat the purpose to
convert into `Object.prototype.hasOwnProperty.call(Object, 'prototype')`
form.

Closes: #3524
2022-11-30 16:04:02 -08:00
rwaldron e6b47d7738 chore: update src/**/*.case to use assert.compareArray wherever applicable 2021-10-01 16:38:56 -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
rwaldron d7414a8d8e chore: update src/**/*.case to use assert.compareArray wherever applicable 2021-09-24 11:21:44 -04:00
Leo Balter 6d9bef23d3 Remove es6id from generation files 2019-08-05 10:54:37 -04:00
Leo Balter b3092c61b6 Add generators flags for tests depending on generators features (#1259)
* Add missing generators feature flags

* Generate files

* Add generators flags

* fixup! Add generators flags
2017-10-04 16:12:34 -04:00
Leo Balter 31f7b3e218 Update test generation files to use verifyProperty instead of legacy helpers 2017-09-08 10:13:36 -04:00
Leo Balter c41faf1aca Add missing Symbol features flags 2017-09-07 15:51:13 -04:00
Leo Balter ceaa012121 Remove remaining cases for ...{ 2017-08-18 18:16:55 -04:00
Daniel Ehrenberg 6330eccfc4
Add feature flags for various tests 2017-04-06 12:18:03 -04:00
Leo Balter 3f51de0c49
Add features flag for templates w/ Object spread and rest 2017-03-27 13:21:11 -04:00
Leonardo Balter e34a56774e
Improve some yield cases based on feedback 2017-03-27 13:07:09 -04:00
Leo Balter 1e35ec9fed
Fix case sensitive template name 2017-03-27 12:12:32 -04:00
Caio Lima 16e66ece0c Initial set for Object Spread feature (#890) 2017-03-13 10:21:26 -04:00
jugglinmike a3fffa754b Improve coverage for "super" keyword (#687)
* Improve test coverage for `super` keyword

Add tests for SuperCall and SuperProperty, organized together in the
`test/language/expressions/super/` directory. For SuperProperty, include
tests for usage from within Object initializers and class bodies because
a different set of semantics are observable from each context.
2016-06-29 16:45:19 -07:00
Mike Pennisi 8c8397573c Add test cases for spread operator
The operand of the spread operator may be an AssignmentExpression. Add
test cases which demonstrate this.
2016-06-11 17:42:50 -04:00
Mike Pennisi 2658524163 Add test templates for spread in array initializer
Formulate templates for the SpreadElement in an array initializer in
order to conform to existing pattern.
2016-06-11 17:27:19 -04:00
Mike Pennisi b7d496942a Use distinct variable name within test case
In order to increase the clarity of generated output, select a name for
the test case variable that is not also used by a test template.
2016-05-19 15:06:13 -04:00
Mike Pennisi 95b5b13c16 Add test cases for the spread operator 2016-05-19 15:06:12 -04:00
Mike Pennisi c98b6ed4e6 Specify `esid` tag in test templates 2016-05-19 15:06:11 -04:00
Mike Pennisi 74bff6b3d5 Add initial set of generated test sources 2016-03-16 15:29:30 -04:00