1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:07:34 +00:00
serenity/Libraries/LibJS/Tests
Linus Groh 75dac35d0e LibJS: Stop unwinding and reset exception for TryStatement finalizer
This fixes two issues with running a TryStatement finalizer:

- Temporarily store and clear the exception, if any, so we can run the
  finalizer block statement without it getting in our way, which could
  have unexpected side effects otherwise (and will likely return early
  somewhere).
- Stop unwinding so more than one child node of the finalizer
  BlockStatement is executed if an exception has been thrown previously
  (which would have called unwind(ScopeType::Try)). Re-throwing as
  described above ensures we still unwind after the finalizer, if
  necessary.

Also add some tests specifically for try/catch/finally blocks, we
didn't have any!
2020-09-12 09:31:16 +02:00
..
builtins LibJS: Add tests for issue #3382 2020-09-01 21:35:59 +02:00
classes LibJS: Add tests for symbol object integration 2020-07-09 23:33:00 +02:00
functions LibJS: Integrate iterator protocol into language features 2020-07-14 17:58:42 +02:00
iterators LibJS: Add String Iterator tests 2020-07-13 15:07:29 +02:00
loops LibJS: Demonstrate weird behaviour with 'break' 2020-08-28 20:19:56 +02:00
operators LibJS: Add tests for bitwise & and ^ 2020-07-23 13:06:49 +02:00
add-values-to-primitive.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
automatic-semicolon-insertion.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
comments-basic.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
const-reassignment.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
custom-@@hasInstance.js LibJS: Add Symbol.hasInstance tests 2020-07-14 20:15:19 +02:00
custom-@@toStringTag.js LibJS: Implement Symbol.toStringTag 2020-07-11 23:13:29 +02:00
debugger-statement.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
empty-statements.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
exception-in-catch-block.js LibJS: Extract most of Interpreter's run() into execute_statement() 2020-09-12 09:31:16 +02:00
exception-ReferenceError.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
exponentiation-basic.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
indexed-access-string-object.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
invalid-lhs-in-assignment.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
labels.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
let-scoping.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
new-expression.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
numeric-literals-basic.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
object-basic.js LibJS: Add tests for symbol object integration 2020-07-09 23:33:00 +02:00
object-getter-setter-shorthand.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
object-method-shorthand.js LibJS: Add tests for symbol object integration 2020-07-09 23:33:00 +02:00
object-spread.js LibJS: Integrate iterator protocol into language features 2020-07-14 17:58:42 +02:00
parser-unary-associativity.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
program-strict-mode.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
strict-mode-errors.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
string-escapes.js LibJS: Fix \x escapes of bytes with high bit set 2020-07-22 19:21:35 +02:00
string-spread.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
switch-basic.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
switch-break.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
tagged-template-literals.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
template-literals.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
test-common-tests.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
test-common.js test-js: Sometimes include more details for failures 2020-08-22 10:52:40 +02:00
throw-basic.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
to-number-basic.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
to-number-exception.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
try-catch-finally-nested.js LibJS: Stop unwinding and reset exception for TryStatement finalizer 2020-09-12 09:31:16 +02:00
try-catch-finally.js LibJS: Stop unwinding and reset exception for TryStatement finalizer 2020-09-12 09:31:16 +02:00
update-expression-on-member-expression.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
update-expressions-basic.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
var-multiple-declarator.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
var-scoping.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00
variable-undefined.js LibJS: Indent tests with 4 spaces instead of 2 2020-07-06 23:40:35 +02:00