Commit Graph

8 Commits

Author SHA1 Message Date
André Bargull 4ec97779fd Replace runTestCase with assert helpers, rest [test/built-ins] 2015-08-13 17:57:23 +02:00
Brian Terlson 39b5b7272c Merge pull request #392 from anba/remove-runTestCase-throws
Replace runTestCase with assert.throws
2015-08-11 10:42:07 -07:00
André Bargull 4facaaab5f Replace runTestCase with assert helpers [test/built-ins/Object/create] 2015-08-11 17:50:53 +02:00
André Bargull f3e919209c Replace runTestCase with assert.throws [test/built-ins/Object] 2015-08-11 17:43:48 +02:00
André Bargull a85f5039e0 Remove links to hg.ecmascript.org 2015-07-17 17:43:09 +02:00
smikes 9824be6825 rewrite tests to work in strict mode, use helpers 2015-05-02 05:12:53 -06:00
smikes 49abae4f5e rework: remove *PropertyAttributes fns
- 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
2014-12-10 17:39:16 -08:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00