tree: 6e107abf5d92ba2d945ec21d23f2e4cd5cc3887b [path history] [tgz]
  1. README.md
  2. asm-assignment-undeclared.js
  3. asm-assignment-undeclared.out
  4. asm-function-mismatch-def.js
  5. asm-function-mismatch-def.out
  6. asm-function-mismatch-use.js
  7. asm-function-mismatch-use.out
  8. asm-function-redefined.js
  9. asm-function-redefined.out
  10. asm-function-undefined.js
  11. asm-function-undefined.out
  12. asm-function-variable-collision.js
  13. asm-function-variable-collision.out
  14. asm-import-wrong-annotation.js
  15. asm-import-wrong-annotation.out
  16. asm-import-wrong-object.js
  17. asm-import-wrong-object.out
  18. asm-linking-bogus-heap.js
  19. asm-linking-bogus-heap.out
  20. asm-linking-bogus-stdlib.js
  21. asm-linking-bogus-stdlib.out
  22. asm-linking-missing-heap.js
  23. asm-linking-missing-heap.out
  24. asm-missing-parameter-annotation.js
  25. asm-missing-parameter-annotation.out
  26. asm-missing-return-annotation.js
  27. asm-missing-return-annotation.out
  28. asm-table-mismatch-def.js
  29. asm-table-mismatch-def.out
  30. asm-table-mismatch-use.js
  31. asm-table-mismatch-use.out
  32. asm-table-redefined.js
  33. asm-table-redefined.out
  34. asm-table-undefined.js
  35. asm-table-undefined.out
  36. asm-table-variable-collision.js
  37. asm-table-variable-collision.out
  38. fail/
  39. message.isolate
  40. message.status
  41. mjsunit/
  42. non-use-strict-hex-escape.js
  43. non-use-strict-hex-escape.out
  44. non-use-strict-octal-escape.js
  45. non-use-strict-octal-escape.out
  46. non-use-strict-uhex-escape.js
  47. non-use-strict-uhex-escape.out
  48. nonstrict-arguments.js
  49. nonstrict-arguments.out
  50. nonstrict-eval.js
  51. nonstrict-eval.out
  52. nonstrict-with.js
  53. nonstrict-with.out
  54. object-binding-pattern-await-computed-name.js
  55. object-binding-pattern-await-computed-name.out
  56. regress/
  57. strict-octal-indirect-regexp.js
  58. strict-octal-indirect-regexp.out
  59. strict-octal-regexp.js
  60. strict-octal-regexp.out
  61. testcfg.py
  62. try-catch-finally-no-message.js
  63. try-catch-finally-no-message.out
  64. try-catch-finally-return-in-finally.js
  65. try-catch-finally-return-in-finally.out
  66. try-finally-return-in-finally.js
  67. try-finally-return-in-finally.out
  68. wasm-trace-memory-interpreted.js
  69. wasm-trace-memory-interpreted.out
  70. wasm-trace-memory-liftoff.js
  71. wasm-trace-memory-liftoff.out
  72. wasm-trace-memory.js
  73. wasm-trace-memory.out
test/message/README.md

JavaScript tests with expected output

Tests in test/message pass if the output matches the expected output. Message tests are particularly useful when checking for exact error messages.

Tests and their expected output must have the same filename, with the .js and .out extension.

foo.js
foo.out

All tests must end with an exception. The test runner does not handle output from multiple runs, e.g., --stress-opt. Without an exception, the output will be generated several times and the comparison will fail.

You can use a regex in the expected output. Instead of the exact path. use

*%(basename)s:7: SyntaxError: Detected cycle while resolving name 'a'

Empty lines are ignored in the comparison, but whitespaces are not.

Exact details of the test runner are in testcfg.py.