darling-openjdk/test/nashorn
Athijegannathan Sundararajan cea7897f08 8188098: NPE in SimpleTreeVisitorES6 visitor when parsing a tagged template literal
Reviewed-by: hannesw, jlaskey
2017-09-28 23:03:17 +05:30
..
examples 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
lib 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
opt 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
script 8188098: NPE in SimpleTreeVisitorES6 visitor when parsing a tagged template literal 2017-09-28 23:03:17 +05:30
src 8188098: NPE in SimpleTreeVisitorES6 visitor when parsing a tagged template literal 2017-09-28 23:03:17 +05:30
Makefile 8187445: Forest Consolidation: Make tests work 2017-09-12 19:03:59 +02:00
ProblemList.txt 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
README 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TEST.groups 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00
TEST.ROOT 8187443: Forest Consolidation: Move files to unified layout 2017-09-12 19:03:39 +02:00

Nashorn tests are TestNG based. Running tests requires downloading the TestNG
library and placing its jar file into the lib subdirectory:

   # download and install TestNG
   wget http://testng.org/testng-x.y.z.zip
   unzip testng-x.y.z.zip
   cp testng-x.y.z/testng-x.y.z.jar lib/testng.jar

   # run tests
   cd ..
   ant test

This will fail with a message like

    taskdef class org.testng.TestNGAntTask cannot be found

if the TestNG jar file is not installed properly or if the wrong
version is present. (Check build.xml to find the version of TestNG
that is required.)  Only the jar file is necessary. The unzipped
hierarchy can be removed.

We have tested using TestNG 6.7 as well ad TestNG 6.8. TestNG 6.7's jar file
is also available as part of jtreg 4.1 b05 which can be downloaded at
http://download.java.net/openjdk/jtreg/

ECMAScript script test framework:

* Test tags for test framework:

The test runner crawls these directories for .js files and looks for JTReg-style
@foo comments to identify tests.

    * @test - A test is tagged with @test.

    * @test/fail - Tests that are supposed to fail (compiling, see @run/fail
      for runtime) are tagged with @test/fail.

    * @test/compile-error - Test expects compilation to fail, compares
      output.

    * @test/warning - Test expects compiler warnings, compares output.

    * @test/nocompare - Test expects to compile [and/or run?]
      successfully(may be warnings), does not compare output.

    * @subtest - denotes necessary file for a main test file; itself is not
      a test.

    * @run - A test that should be run is also tagged with @run (otherwise
      the test runner only compiles the test).

    * @runif - A test that should be run only if a specific System property
      is defined (Example: @runif external.v8)

    * @run/fail - A test that should compile but fail with a runtime error.

    * @run/param - specify runtime arguments to script.

    * @run/ignore-std-error - script may produce output on stderr, ignore
      this output.

    * @compilearg \ - pass arg to compiler, sample.

/**
 * @compilearg --dump-ir-graph
 * @test/warning
 */

    * @compilefirst foo.js - foo.js being a necessary file for a test; it
      may or may not itself be a test. These are compiled separately before
      main test file.

    * @compile/fail foo.js - foo.js being a necessary file for a test; it
      may or may not itself be a test, compile should fail. These are compile
      with main file.

    * @compile bar.js - bar.js being a necessary file for a test; it may or
      may not itself be a test. These are compiled with main file.