test262/test/language
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
..
arguments-object chore: migrate $ERROR -> throw new Test262Error in test/language/a* (#3095) 2021-07-21 13:42:51 -07:00
asi chore: migrate $ERROR -> throw new Test262Error in test/language/a* (#3095) 2021-07-21 13:42:51 -07:00
block-scope Remove harness file, arrayContains.js 2021-11-01 12:55:10 -04:00
comments Throw distinctive errors for different failures 2021-09-02 10:36:00 -04:00
computed-property-names Transform compareArray -> assert.compareArray: test/language/**/*.js (#3239) 2021-10-15 20:35:01 -04:00
destructuring/binding Improved metadata 2020-11-18 16:44:55 -05:00
directive-prologue
eval-code chore: migrate $ERROR -> throw new Test262Error in test/language/e* (#3098) 2021-07-28 13:48:39 -07:00
export Update "info" field (#2941) 2021-01-28 16:03:01 -08:00
expressions Replace Object.hasOwnProperty.call with Object.prototype.hasOwnProperty.call 2022-11-30 16:04:02 -08:00
function-code chore: migrate $ERROR -> throw new Test262Error in test/language/f* (#3099) 2021-07-28 13:47:49 -07:00
future-reserved-words Strengthen sloppy-mode tests for future reserved words. 2021-04-20 09:54:23 -04:00
global-code chore: migrate $ERROR -> throw new Test262Error in test/language/g* (#3101) 2021-07-28 13:47:15 -07:00
identifier-resolution chore: migrate $ERROR -> throw new Test262Error in test/language/i* (#3102) 2021-07-28 13:46:58 -07:00
identifiers Add tests for Unicode v15 Identifier{Start,Part} (#3662) 2022-09-21 11:24:26 +02:00
import Add 'import-assertions' feature tag to json modules tests (#3016) 2021-06-24 14:13:45 -04:00
keywords
line-terminators chore: migrate $ERROR -> throw new Test262Error in test/language/line-terminators/* (#3103) 2021-07-28 13:46:23 -07:00
literals update descriptions for existing duplicate-capture-groups tests 2022-08-09 12:15:49 -07:00
module-code Correct spurious syntax errors 2022-06-17 10:29:52 +02:00
punctuators
reserved-words
rest-parameters Transform compareArray -> assert.compareArray: test/language/**/*.js (#3239) 2021-10-15 20:35:01 -04:00
source-text chore: migrate $ERROR -> throw new Test262Error in test/language/s* 2021-07-29 10:38:53 -04:00
statementList Remove superfluous EmptyStatement 2021-10-05 16:28:06 -04:00
statements Replace Object.hasOwnProperty.call with Object.prototype.hasOwnProperty.call 2022-11-30 16:04:02 -08:00
types Line Terminator test description corrections 2022-11-08 10:37:37 -08:00
white-space chore: migrate $ERROR -> throw new Test262Error in test/language/white-space/* (#3107) 2021-07-28 13:43:40 -07:00