Commit Graph

19 Commits

Author SHA1 Message Date
Rick Waldron 3e85c608da harness test: sta.js
Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
2017-06-28 11:53:59 -04:00
Brian Terlson 2a74f0ec1b Reorganize ./test 2014-12-07 15:33:09 -08:00
Sam Mikes 89d71f56b2 additional fixes suggested by @anba 2014-10-24 15:18:37 +01:00
Sam Mikes 4205a1da64 harness: remove unused code
sta.js:
slight change to Test262Error() semantics; message property now always set (default "")
make $ERROR a var
set $ERROR to function $ERROR so it can be overridden if needed
remove 2009 copyright in favor of 2012 copyright
REVERTED: remove never-used fn testFailed
testFailed actually used by $FAIL
remove obsolete fn $INCLUDE

ed.js:
remove commented-out obsolete code

test262.py:
remove always-included harness file that provides no functions used by any extant test
add comment line to nonstrict

cth.js: define `print` for node, cscript

use cth (console test harness) to define functions
for console runner.  V8, Spidermonkey (js) and JavaScriptCore (jsc)
provide a function `print`.  Provide a default `print` for node
and cscript

set print_handle to 'print' by default (can still override)
for cscript: wrap tests in try/catch so we get syntax errors
2014-08-03 00:33:08 +01:00
Sam Mikes c33bf0e043 tools, harness: support new YAML frontmatter
parseTestRecord: add support for YAML frontmatter
parseTestRecord: initial unit test for test record parser
parseTestRecord: refactor for testing

factor old parsing; add YAML parsing

runner: support "includes" from YAML frontmatter

support frontmatter "includes" in python runner
use test.includes if present instead of scanning test code with regex

harness: factor individual functions out into files

tools: handle YAML errors

tolerate missing keys in dictionary (flags, includes)
report filename when empty frontmatter block
new option --list-includes to test262.py

harness: factor helper functions into separate files

sth: remove extra close-paren (syntax error)

test_common: TDD; failing parse of YAML

common: use parseTestRecord (YAML-aware)
2014-07-30 15:39:04 -07:00
David Fugate d6634f8e10 Fixed https://bugs.ecmascript.org/show_bug.cgi?id=293. ConstructDate cannot be
salvaged (e.g., need locale info to properly predict whether we're subject to
DST).
2012-03-26 13:50:38 -07:00
David Fugate 0612ad7bb3 Added a LICENSE file to the root of the enlistment.
All Microsoft-contributed *.js and *.py sources now have Ecma's copyright header.
2012-02-29 14:23:47 -08:00
Mark Miller 13b63c5486 test262 console runner working! 2011-09-30 08:24:38 -04:00
David Fugate ffa85c2584 Moved all test helper functions into sta.js; removed sputnikLib.js.
Laid down the groundwork for a console-based test runner.
2011-09-26 16:12:46 -07:00
David Fugate 2b0122ef82 All tests are globally scoped tests - Part I. 2011-09-24 16:35:45 -07:00
David Fugate 5be3b44a3d Removed all traces of test pre-req requirements.
Generate the 'id' property from the 'path' property.
2011-09-24 11:46:26 -07:00
David Fugate cbc587c61b Merge. 2011-09-13 16:22:37 -07:00
Mark Miller bba34a262e Reformatted to 80 columns. Inserted missing semicolons. Removed one
bogus semicolon. Except for the bogud semicolon, nothing should have
changed the meaning of the programs.
2011-09-13 01:08:50 -07:00
David Fugate 807a3ba1b7 Merge. 2011-09-12 11:25:23 -07:00
Mark Miller a2ca5b512b Adapted the sputnik command line testRunner to a command line
testRunner, test262.py, that can run all the converted tests.
2011-09-11 21:12:01 -07:00
David Fugate 2871886420 test\harness\*:
- a lot of JS harness code written in strings have been moved out to actual physical files
  such as ed.js (syntax error detection for globally scoped tests) and gs.js (global scope test
  case validator).  This change makes it far easier to maintain the test harness code
- reorganized helper.js providing a clear indication which methods are used by external objects,
  which are implementation details, and which are unequivocally test262-specific.  I've also added,
  openErrorWindow, which will be used to open a descriptive error message window for each test case
  failure reported on the 'Run' tab
- improved the error message for syntax errors occurring when a test case fails to load
- sta.js no longer tries to pickle all helper functions it contains!  Instead, we load the file
  directly from sth.js.  The performance of fnGlobalObject has been improved.  Finally, the ES5Harness
  object has been moved from sth.js (in a string) to here
- sth.js now has a browser implementer hook, controller.implementerHook, which allows browser implementers
  to handle test case failures in their own way (e.g., log to the filesystem).  The 'run' function was
  basically re-written

Added 37 new test cases from the "IE Test Center" Build release.  There were 14 modifications to
existing test cases as well.  Refactored SputnikGlobalScope.js such that test case paths are now used
as indices into the GlobalScopeTests array.

TestCasePackager.py had the concept of templated test harnesses introduced - see templates\runner.test262.html.
Also added support for one HTML test harness per ES5 chapter.  Last but not least, TestCasePackagerConfig.py
now has a 'source control' abstraction class which abstracts away source control adds|edits when dynamically
generating *.json and *.html test chapters.
2011-08-25 11:18:44 -07:00
David Fugate 08a7f7433a Few minor changes to sta.js and sth.js to support Strict Mode.
Renamed move_test.py to FixTestCasePlacement.py. Still a work in progress.
2011-04-07 10:12:45 -07:00
David Fugate e4d4a7a870 test\harness\helper.js: extended the 'finished' method to accept as input the total elapsed execution time
of the tests.  Emit this to the activity bar


test\harness\sta.js:  too many years of Python had me thinking JavaScript arrays have an append method:)  Fixed.
                      Also, added a pickled representation of all test helper functions found in this file


test\harness\sth.js:  detached most test helper functions from the iframe's document object (as globals) and
                      inject these into the actual test cases. It's a bit slower and not as elegant, but it is
                      cleaner from an ES5 purist perspective.  Still need to move Sputnik helper functions into
                      sta.js

                      Extended Controller such that it now measures overall test execution time.  Such a change
                      is very useful for measuring performance-impact changes such as the aforementioned
                      improvement
2011-02-03 16:28:52 -08:00
David Fugate 2ec3b287d7 - split sth.js (simple test harness) into sth.js and sta.js (simple test APIs)
- updated version number for the overall site to 0.3
2011-02-03 12:27:00 -08:00