Skip to content
Snippets Groups Projects
  1. Jun 26, 2015
    • Mike Pennisi's avatar
      Move website scripts to a dedicated directory · b974c137
      Mike Pennisi authored
      Some JavaScript source files are only relevant in the context of the
      Test262 website. They should not be explicitly included by individual
      tests, so their presence in the `harness/` directory alongside "include"
      files is misleading.
      
      Move the scripts to a location within the `website/` directory to
      better-reflect their intended use. Update the relevant HTML templates
      with the new locations.
      b974c137
    • Mike Pennisi's avatar
      Remove support for legacy `$INCLUDE` syntax · 86c7e272
      Mike Pennisi authored
      Although test files once expressed dependencies on external files using
      a global `$INCLUDE` function, that pattern was removed in favor of
      declarative meta-data [1].
      
      Remove the associated logic from the Python runner and the browser.
      
      [1] See commit d4354d14.
      86c7e272
    • Mike Pennisi's avatar
      Remove unnecessary "include" file · f8e18ccd
      Mike Pennisi authored
      The `fnExists` function defines a generic way to determine if any number
      of values are function instances. Because it is only used by a single
      test, the additional complexity required by the generalized code (and
      the organizational drawbacks to maintaining another "include" file) are
      not justified. Remove the file and update the test to assert the
      function's existence directly.
      f8e18ccd
    • Mike Pennisi's avatar
      Remove empty "include" file · e57da7a8
      Mike Pennisi authored
      The `environment.js` file has been empty since its initial introduction
      to this project [1]. It has no effect on any of the contexts in which it
      is currently referenced, so it may be safely removed.
      
      [1] be82787a
      e57da7a8
  2. Jun 25, 2015
  3. Jun 18, 2015
    • Mike Pennisi's avatar
      Update browser runner to honor `onlyStrict` flag · cb617493
      Mike Pennisi authored
      Unlike the console runner, the browser runner does not modify the
      strictness of tests prior to running them. Regardless of a given test's
      metadata, it runs every test exactly once, and it never enables strict
      mode. This means that tests intended to function in strict mode must
      declare the "use strict"; directive prologue in addition to the
      `onlyStrict` flag.
      
      For any test that specifies the `onlyStrict` metadata flag, transform
      the source code by injecting a "use strict" directive prologue prior to
      running the test.
      cb617493
    • Mike Pennisi's avatar
      Update browser runner to inject `assert.js` · 73aa0627
      Mike Pennisi authored
      Since the Python runner was updated to include `assert.js` in all tests
      unconditionally, a number of tests have been written that implicitly
      rely on its presence. The browser runner does not currently provide this
      file's contents to these tests, so they fail unconditionally.
      
      Update the browser runner to inject that file's contents into every test
      context.
      
      Note: the existing approach to file retrieval (namely loading via
      synchronous XHR requests) is inefficient and deprecated in some
      browsers. It is honored here for the sake of consistency and to minimize
      the changeset necessary to fix the browser runner.
      73aa0627
  4. Jun 16, 2015
    • Mike Pennisi's avatar
      Remove $PRINT helper function · fe11a1ea
      Mike Pennisi authored
      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.
      fe11a1ea
  5. Jun 09, 2015
    • Mike Pennisi's avatar
      Remove `$FAIL` function · 92890e67
      Mike Pennisi authored
      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.
      92890e67
  6. May 18, 2015
    • André Bargull's avatar
      Enable strict mode for more built-in tests · 56036e40
      André Bargull authored
      - 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.)
      56036e40
  7. Apr 21, 2015
    • Mike Pennisi's avatar
      Correct error messages · 67e9e070
      Mike Pennisi authored
      The `testBuiltInObject` function verifies the presence of the specified
      properties for *all* object types (not just function objects). Update
      the error messages to reflect this.
      67e9e070
    • Mike Pennisi's avatar
      Fix bug in `isWritable` utility function · c27938a1
      Mike Pennisi authored
      Only attempt to re-set the property value in cases where it was
      successfully modified as part of the function's execution. This avoids
      errors when the underlying value is not writable. Rename the internal
      result-tracking variable to make this more clear.
      c27938a1
    • Mike Pennisi's avatar
      Extend assertion error messages · c9126723
      Mike Pennisi authored
      When invoked without a custom assertion message, `assert.sameValue` and
      `assert.notSameValue` automatically create a message that describes the
      actual and expected values.
      
      Extend both assertion methods to also include this information in cases
      where a custom message has been specified.
      c9126723
  8. Apr 07, 2015
  9. Mar 11, 2015
  10. Mar 04, 2015
  11. Feb 20, 2015
  12. Feb 14, 2015
  13. Dec 11, 2014
    • smikes's avatar
      rework: remove *PropertyAttributes fns · 49abae4f
      smikes authored
      - 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
      49abae4f
  14. Dec 09, 2014
  15. Dec 07, 2014
Loading