ladybird/Libraries/LibJS/Tests
Andreas Kling e6dadd9e5b LibJS: Implement parseInt()
Here's a reasonably faithful implementation of ECMAScript 2021 18.2.5.
Some corner cases are not covered, I've left them as FIXME's in the
included unit test.

Also I had to tweak JS::Value::to_i32() to always convert infinity to
zero, which is in accordance with ToInt32 AFAICT.
2020-12-05 13:55:55 +01:00
..
builtins LibJS: Use ArrayBuffer for typed array data 2020-12-02 23:49:00 +01:00
classes LibJS: Throw TypeError when calling class constructor without 'new' 2020-11-12 10:14:00 +01:00
functions LibJS: Constructor function's "prototype" property should be writable 2020-11-29 19:49:27 +01:00
iterators Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
loops LibJS: Always insert semicolon after do-while statement if missing 2020-10-28 21:11:32 +01:00
operators LibJS: Fix Object::delete_property() with numeric string property 2020-11-05 19:15:00 +01: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/Tests: Use canParseSource() for toEval() 2020-11-12 10:14:57 +01:00
break-continue-syntax-errors.js LibJS: break or continue with nonexistent label is a syntax error 2020-10-08 23:27:16 +02:00
comments-basic.js LibJS: "-->" preceded by token on same line isn't start of HTML-like comment 2020-10-29 22:28:15 +01:00
computed-property-throws.js LibJS: Don't create "valid" PropertyName from null string 2020-11-04 15:31:39 +01:00
const-declaration-missing-initializer.js LibJS: Require initializer for 'const' variable declaration 2020-10-30 23:43:38 +01: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: Check validity of computed_property_name() result before using it 2020-09-12 11:29:39 +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 Everywhere: Fix typos 2020-10-02 16:03:17 +02:00
if-statement-function-declaration.js LibJS: Function declarations in if statement clauses 2020-10-31 15:25:12 +01: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: Make assignment to CallExpression a syntax error in strict mode 2020-10-05 09:25:04 +02:00
labels.js LibJS: break or continue with nonexistent label is a syntax error 2020-10-08 23:27:16 +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: Don't parse numeric literal containing 8 or 9 as octal 2020-10-28 21:11:32 +01:00
object-basic.js LibJS: Rest parameter in setter functions is a syntax error 2020-10-20 20:27:58 +02:00
object-expression-computed-property.js LibJS: Fix PropertyName::from_value() for negative and non-int numbers 2020-10-08 10:02:47 +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: Use element index as key for array spread in object 2020-11-07 10:08:28 +01:00
ordinary-to-primitive.js LibJS: Implement spec-compliant OrdinaryToPrimitive 2020-11-04 19:33:49 +01:00
parseInt.js LibJS: Implement parseInt() 2020-12-05 13:55:55 +01:00
parser-declaration-in-single-statement-context.js LibJS: Distinguish between statement and declaration 2020-10-23 19:13:06 +02:00
parser-line-terminators.js LibJS: Tweak generated source in 'new Function()' to match ES 2015 spec 2020-10-29 22:27:55 +01: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
return.js LibJS: Fix return statements not working properly in loops 2020-10-08 23:23:55 +02:00
runtime-error-call-stack-size.js LibJS: Throw RuntimeError when reaching the end of the stack 2020-11-08 16:51:54 +01:00
strict-mode-blocks.js LibJS: Strict mode is now handled by Functions and Programs, not Blocks 2020-10-04 10:46:12 +02:00
strict-mode-errors.js LibJS: Handle symbol PropertyName in primitive assignment error 2020-11-12 11:40:29 +01:00
string-escapes.js LibJS: Use GenericLexer for Token::string_value() 2020-10-29 11:52:31 +01: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: Multiple 'default' clauses in switch statement are a syntax error 2020-10-19 11:30:14 +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: Parse line continuations in string literals properly 2020-10-25 15:16:47 +01:00
test-common-tests.js LibJS/Tests: Use canParseSource() for toEval() 2020-11-12 10:14:57 +01:00
test-common.js LibJS/Tests: Use canParseSource() for toEval() 2020-11-12 10:14:57 +01: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: Allow try statement with only finally clause 2020-10-24 16:34:01 +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
use-strict-directive.js LibJS: Fix "use strict" directive false positives 2020-11-02 13:13:54 +01: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
with-basic.js LibJS: Disallow 'with' statement in strict mode 2020-11-28 20:33:41 +01:00