1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 13:35:07 +00:00
serenity/Userland/Libraries/LibJS/Tests
Linus Groh e93ce1ff69 LibJS: Fix nanoseconds formatting in format_time_zone_offset_string()
Two issues:

- The format string said "{:9}", which left-pads with spaces and not
  zeros as required
- Even when correcting that, we were not accounting for step 11 b:
  "Set fraction to the longest possible substring of fraction starting
  at position 0 and not ending with the code unit 0x0030 (DIGIT ZERO)."
  We can safely use trim() for that as the formatted string is known to
  not contain only zeros (which would leave the left-most in place).

Also adds tests for "UTC" and various numeric offsets.
2021-11-07 20:06:28 +00:00
..
builtins LibJS: Fix nanoseconds formatting in format_time_zone_offset_string() 2021-11-07 20:06:28 +00:00
classes LibJS: Add parsing and evaluation of private fields and methods 2021-10-20 23:19:17 +01:00
functions LibJS: Implement [[Call]] and [[Construct]] internal slots properly 2021-10-09 14:29:20 +01:00
iterators LibJS: Disallow duplicated variable declarations 2021-07-20 23:45:28 +02:00
loops LibJS: Make scoping follow the spec 2021-09-30 08:16:32 +01:00
operators LibJS: Make scoping follow the spec 2021-09-30 08:16:32 +01:00
syntax LibJS: Make scoping follow the spec 2021-09-30 08:16:32 +01:00
add-values-to-primitive.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
arguments-callee.js LibJS: Add a basic test for arguments.callee 2021-03-17 21:54:52 +01:00
arguments-object.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
automatic-semicolon-insertion.js LibJS/Tests: Use eval() for toEvalTo(), not Function() 2021-06-18 20:35:23 +01:00
break-continue-syntax-errors.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
comments-basic.js LibJS: Implement the 'Hashbang Grammar for JS' proposal 2021-06-18 20:35:23 +01:00
computed-property-throws.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
const-declaration-missing-initializer.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
const-reassignment.js LibJS: Re-enable "reassignment to const" test 2021-02-26 16:59:37 +01:00
custom-@@hasInstance.js LibJS: Rewrite most of Object for spec compliance :^) 2021-07-04 22:07:36 +01:00
custom-@@toPrimitive.js LibJS: Support @@toPrimitive in ToPrimitive abstract operation 2021-03-03 11:04:06 +01:00
custom-@@toStringTag.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
debugger-statement.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
duplicated-variable-declarations.js LibJS: Enable now working tests for duplicated variable declarations 2021-10-15 10:27:16 +01:00
empty-statements.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
eval-aliasing.js LibJS: Correct behaviour of direct vs. indirect eval 2021-06-23 09:38:33 +01:00
eval-basic.js LibJS: Correct behaviour of direct vs. indirect eval 2021-06-23 09:38:33 +01:00
exception-in-catch-block.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
exception-ReferenceError.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
exponentiation-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
global-var-let-const.js LibJS: Only "var" declarations go in the global object at program level 2021-06-09 23:25:16 +02:00
if-statement-function-declaration.js LibJS: Ensure function declarations don't leak outside function scopes 2021-05-13 23:59:00 +01:00
indexed-access-prototype-indirection.js LibJS: Fix array hole and string object indexing prototype indirection 2021-04-11 18:15:47 +02:00
indexed-access-string-object.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
invalid-lhs-in-assignment.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
labels.js LibJS: Handle escaped keywords in more cases and handle 'await' labels 2021-09-30 08:16:32 +01:00
let-scoping.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
new-expression.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
non-writable-assignment.js LibJS: Throw TypeError on write to non-writable property in strict mode 2021-06-05 23:54:08 +01:00
numeric-literals-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
object-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
object-expression-computed-property.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
object-expression-numeric-property.js LibJS: Don't treat 2^32 - 1 as numeric PropertyName 2021-07-06 17:29:12 +01:00
object-getter-setter-shorthand.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
object-method-shorthand.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
object-spread.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
ordinary-to-primitive.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
parseInt.js LibJS: Uncomment and add parseInt tests 2021-06-06 01:34:22 +01:00
parser-declaration-in-single-statement-context.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
parser-line-terminators.js LibJS: Fix that windows style line endings were not ignored or converted 2021-09-06 08:43:38 +01:00
parser-unary-associativity.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
permanently-screwed-by-eval.js LibJS: Fast non-local variable access :^) 2021-10-07 11:53:18 +02:00
program-non-strict.js LibJS: Add tests for strict mode and strict mode propagation 2021-07-20 23:45:28 +02:00
program-strict-mode.js LibJS: Add tests for strict mode and strict mode propagation 2021-07-20 23:45:28 +02:00
return.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
runtime-error-call-stack-size.js LibJS: Make Errors fully spec compliant 2021-04-12 09:38:57 +02:00
statement-with-many-labels.js LibJS: Allow statements to have multiple labels 2021-09-26 18:24:19 +02:00
strict-mode-blocks.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
strict-mode-errors.js LibJS: Make scoping follow the spec 2021-09-30 08:16:32 +01:00
string-escapes.js LibJS: Make scoping follow the spec 2021-09-30 08:16:32 +01:00
string-spread.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
switch-basic.js LibJS: Fix switch skipping case evaluation when hitting the default case 2021-09-30 08:16:32 +01:00
switch-break.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
switch-default-before-case.js LibJS: Defer execution of switch default clause until after case clauses 2021-09-26 18:04:25 +02:00
tagged-template-literals.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
template-literals.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
test-common-tests.js LibJS/Tests: Use eval() for toEvalTo(), not Function() 2021-06-18 20:35:23 +01:00
test-common.js LibJS: Fix runaway let scope when parsing for-in/of statements 2021-07-06 00:15:37 +01:00
this-value-strict.js LibJS: Fix this values in arrow functions 2021-08-09 17:33:14 +01:00
this-value.js LibJS: Fix this values in arrow functions 2021-08-09 17:33:14 +01:00
throw-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
to-number-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
to-number-exception.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
try-catch-finally-nested.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
try-catch-finally-return.js LibJS: Fix return value of TryStatement with finalizer 2021-04-13 15:40:52 +02:00
try-catch-finally.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
unicode-identifier-escape.js LibJS: Fix some small remaining issues with parsing unicode escapes 2021-08-24 07:42:37 +01:00
update-expression-on-member-expression.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
update-expressions-basic.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
use-strict-directive.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
var-multiple-declarator.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
var-scoping.js LibJS: Enable now working tests for duplicated variable declarations 2021-10-15 10:27:16 +01:00
variable-undefined.js Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
with-basic.js LibJS: Restore the environment if an exception is thrown in 'with' block 2021-09-08 20:37:39 +01:00