summaryrefslogtreecommitdiff
path: root/test/built-ins/Object
Commit message (Collapse)AuthorAgeFilesLines
* Remove links to hg.ecmascript.orgAndré Bargull2015-07-172783-11132/+2783
|
* Prefer explicit error checking where possibleMike Pennisi2015-07-1012-24/+37
| | | | | | | | | | | | The `negative` frontmatter tag expresses an expectation for the behavior of the test file as a whole. The `assert.throws` helper function offers more fine-grained control over expectations because it may be applied to specific statements and expressions. This makes it preferable in cases where it may be used (i.e. when the test body does not describe a syntax error or early error). Re-implement assertions for errors to use the `assert.throws` helper function wherever possible.
* Fixed invalid configuration block delimiters.Pieter van Ginkel2015-06-282-4/+4
| | | | Two tests started the configuration block with a /*-- instead of a /*---.
* Merge pull request #328 from bocoup/object-set-prototype-ofBrian Terlson2015-06-2510-0/+246
|\ | | | | Add tests for Object.setPrototypeOf
| * Add tests for Object.setPrototypeOfMike Pennisi2015-06-1910-0/+246
| |
* | Merge pull request #305 from jugglinmike/browser-only-strictBrian Terlson2015-06-252-4/+0
|\ \ | | | | | | Update browser runner to honor `onlyStrict` flag
| * | Update handling of directive prologuesMike Pennisi2015-06-182-4/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some tests specifically concern the application of the `use strict` directive as it appears in JavaScript source code. These tests should *not* be run with the `onlyStrict` flag because relying on the test runner to enable strict mode makes the semantics of the source code irrelevant. Update these tests to use the `noStrict` flag. Other tests concern language semantics that are only valid in strict mode, but the mechanism for enabling strictness is inconseqential. Update these tests to use the `onlyStrict` flag and remove any redundant `use strict` directive prologues contained within. Still other tests are valid both within and outside of strict mode. In keeping with the majority of other tests, do not specify any restrictions on the environments in which these tests may be run.
* | Extend coverage for Object.assignMike Pennisi2015-06-1911-1/+251
|/
* add tests for Object.assignYanli Xu2015-06-1816-0/+215
|
* Remove $PRINT helper functionMike Pennisi2015-06-163-15/+12
| | | | | | | | | | | | | | | The `$PRINT` helper function has no effect on test behavior. The following tests use it to report assertion outcomes (and as a result will fail silently): - test/language/function-code/S10.2.1_A4_T2.js - test/language/function-code/S10.2.1_A5.1_T1.js - test/language/function-code/S10.2.1_A5.1_T2.js - test/language/function-code/S10.2.1_A5.2_T1.js Remove the function definition and all references within tests. Update tests that use it as an error reporting mechanism to instead use an appropriate `assert` helper function.
* Fix tautological pattern in testsMike Pennisi2015-06-168-66/+23
| | | | | | | In neglecting to assert the type of error thrown (or that any error was thrown at all), these tests cannot fail. Refactor the tests to use the `assert.throws` helper method, which takes these details into consideration.
* Remove `$FAIL` functionMike Pennisi2015-06-0936-76/+46
| | | | | | | This function is equivalent to `$ERROR` (which is automatically included in test environments). Remove the harness file that defines the function, remove references to the file from test `includes` lists, and update scripts to instead invoke the `$ERROR` function.
* Enable strict mode for more built-in testsAndré Bargull2015-05-1812-107/+27
| | | | | | | | | | | | - Remove no longer needed noStrict flags. - Change tests to use propertyHelper.js for strict mode compatibility. - Add tests for return value of `delete` operator, e.g. `delete Array.prototype === false`. - Add non-writable tests for global NaN property. - Split some tests to run in strict mode. - Change tests with global `var length` declaration to use a different variable name for browser environments. - Merge duplicated tests symbol-data-property-configurable-non-strict and symbol-data-property-configurable-strict. - Merge duplicated tests symbol-data-property-writable-non-strict and symbol-data-property-writable-strict. - (And a small change in propertyHelper to reduce code duplication in function call.)
* Merge pull request #261 from smikes/object-strictBrian Terlson2015-05-0755-686/+567
|\ | | | | strict mode: use new property helpers
| * changes from line notessmikes2015-05-078-10/+15
| |
| * strict mode: use new property helperssmikes2015-05-0655-687/+563
| | | | | | | | | | | | | | | | | | Object.freeze fixes global object tests: noStrict preventExtensions tests Object.seal tests one more freeze test
* | Merge pull request #262 from smikes/object-strict-pr2Brian Terlson2015-05-071-3/+10
|\ \ | | | | | | Candidate fix of empty catch{}
| * | candidate fix for line note on 259smikes2015-05-071-3/+10
| |/
* | add line note fixes from #255smikes2015-05-074-2/+4
|/
* fix tests in strict mode - Object/definePropertysmikes2015-05-0617-441/+373
|
* update, fix merge conflictsmikes2015-05-0280-1264/+1061
|
* rewrite tests to work in strict mode, use helperssmikes2015-05-02171-1819/+1162
|
* Fix some strict mode errors in built-ins/ObjectAndré Bargull2015-04-2921-17/+18
| | | | | | | | - Add missing "var" declarations and noStrict flags - Remove invalid noStrict flags - ietestcenter tests need fixed, require updates to use propertyHelper.js Part of issue #35.
* Invalid language testsAndré Bargull2015-04-275-7/+5
| | | | | | | | | | | | | | | | - in-statement-position-label-statement.js is an Annex-B test (B.3.2 Labelled Function Declarations), moved to annexB directory - identifier-let-allowed-as-lefthandside-expression-strict.js needs to check for a SyntaxError (ES6, 12.1.1) - Remove sort() calls in test/built-ins/Object/getOwnPropertyNames/*.js - Remove sort() calls in test/language/block-scope/syntax/for-in/acquire-properties-from-*.js - verifyConfigurable() needs to called last in test/built-ins/Object/is/length.js - All productions within ClassBody are implicitly strict, update test/language/class/method-definition/yield-as-*.js accordingly - Remove unnecessary noStrict flag in test/language/class/method-definition/yield-as-generator-method-binding-identifier.js - Check own symbols are returned in property creation order from Object.getOwnPropertySymbols(): - test/language/computed-property-names/basics/symbol.js - test/language/computed-property-names/class/method/symbol.js - test/language/computed-property-names/class/static/method-symbol.js - test/language/computed-property-names/object/method/symbol.js - Fix copy-paste error in test/language/expressions/object/method-definition/yield-as-function-expression-binding-identifier.js
* 19.1.2.10 Object.isRick Waldron2015-04-2119-0/+455
| | | | 7.2.9 SameValue(x, y)
* Merge pull request #197 from bocoup/harmony-symbolsBrian Terlson2015-04-1816-0/+452
|\ | | | | Import tests from Google V8 (Symbol)
| * Import tests from Google V8 (Symbol)Rick Waldron2015-04-0716-0/+452
| | | | | | | | | | | | These tests are derived from the following files within the Google V8 project: test/mjsunit/harmony/private.js
* | Merge pull request #209 from anba/issue-185,186/annexb-extensionsBrian Terlson2015-04-081-2/+2
|\ \ | | | | | | Don't use Annex B extensions in main test suite
| * | Don't use Annex B extensions in main test suiteAndré Bargull2015-03-231-2/+2
| |/ | | | | | | | | Fixes #185 Fixes #186
* | Import tests from Google V8 (Array.prototype.{fill, find, findIndex}, ↵Rick Waldron2015-04-073-42/+39
|/ | | | | | | | | | | | Array.{from, of}) These tests are derived from the following files within the Google V8 project: test/mjsunit/harmony/array-fill.js test/mjsunit/harmony/array-find.js test/mjsunit/harmony/array-findindex.js test/mjsunit/harmony/array-from.js test/mjsunit/harmony/array-of.js
* Update comments in Object.defineProperties tests (Fixes #138)André Bargull2014-12-112-2/+2
| | | | | The expected values were already changed in a previous commit (@49abae4f5e6b38931d86dc9b9d34ae30d9ced2ca), only the test descriptions still needed to be updated. (Fixes #138)
* rework: remove *PropertyAttributes fnssmikes2014-12-10499-10446/+12046
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - this change hits all files that use dataPropertyAttributesAreCorrect or acccessorPropertyAttributesAreCorrect Major changes: - remove include of runTestCase.js, dataPropertyAttributesAreCorrect.js and acccessorPropertyAttributesAreCorrect.js - add include of propertyHelper.js - remove function testCase() and call to function runTestCase() - instead of collecting test state into booleans, which are eventually returned from runTestCase, test conditions and throw errors immediately - use negative: to check error types instead of using `instanceof` in a catch() block Selected commit logs follow: manual conversion of accessorPropertyAttributesAreCorrect() test - remove runTestCase - remove wrapping testCase function - unindent - remove includes of runTestCase & accessor... - add include of propertyHelper.js - unpack final two args 'true, false' to explicit inline tests of isEnumerable and isConfigurable - unpack setter test into inline logic - unpack getter test into inline logic used script to replace includes: frontmatter with propertyHelper.js ; manually added back references to fnGlobalObject() where needed additional helper functions add helper functions for get and writable duplicate runTestCase so can remove runTestCase.js from includes of all tests in batch use keyboard macros to simplify repetitive conversions remove auto-save file accidentaly committed minor changes, manually remove runTestCase from remaining files lint etc. fixes remove now-obsolete harness files make strict/nonstrict variants tests where behavior is different in strict/nonstrict need two variants - strict mode throws on assign to read-only element (no setter fn) - strict mode separates named arguments from arguments[] fix indentation cleanup minor issues reviewing 15.2.3.7-9 tests, found some minor issues - indentation/spacing - duplicate test (eg, direct test of value and dataProp...) - remove needless try/finally - use assert.. helpers in place of if(is.. - rename some assertions to 'e' rename assertX to verifyX new helper fn sameValue test "set" as well as get reverse order of checks restore test of desc2 restore test of length restore test of ownProperty incorporate suggestions re order of ops, Object.prototype add test of sameValue helper restore return value in getter restore second defineProperty call restore check of explicit "false" restore explicit test of TypeError set noStrict flag on arguments changes rename catch var to "e" b4ad0e6 remove dataPropertyAttributesAreCorrect from tests 0d83ff2 remove accessorPropertyAttributesAreCorrect from tests bb926f3 remove {data,accessor}Property... fns from harness fix writable check on array.length call $ERROR if expected exception not thrown fix Epected => Expected typo use assert._isSamevalue
* Reorganize ./testBrian Terlson2014-12-072916-0/+93832