1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-14 15:32:07 +00:00
serenity/Userland/Libraries/LibJS/Tests/builtins
Timothy Flynn ca0d926036 LibJS: Use decimal compact patterns for currency style sub-patterns
When formatting a currency style pattern with compact notation, we were
(trying to) doubly insert the currency symbol into the formatted string.
We would first look up the currency pattern in GetNumberFormatPattern
(for the en locale, this is "¤#,##0.00", which our generator transforms
to "{currency}{number}").

When we hit the "{number}" field, NumberFormat will do a second lookup
for the compact pattern to use for the number being formatted. By using
the currency compact patterns, we receive a second pattern that also has
the currency symbol (for the en locale, if formatting the number 1000,
this is "¤0K", which our generator transforms to
"{currency}{number}{compactIdentifier:0}". This second lookup is not
supposed to have currency symbols (or any other symbols), thus we hit a
VERIFY_NOT_REACHED().

Instead, we are meant to use the decimal compact pattern, and allow the
currency symbol to be handled by only the outer currency pattern.
2023-09-04 18:22:28 +02:00
..
AggregateError LibJS: Implement the Error Cause proposal 2021-06-11 21:34:05 +01:00
Array LibJS: Allow assignment expression in spreading property definition 2023-08-29 18:46:01 -04:00
ArrayBuffer LibJS: Disallow creating ArrayBuffers larger than 2^53 - 1 2023-05-26 05:23:55 +02:00
AsyncGenerator LibJS: Implement await properly for async functions 2023-08-10 05:12:07 +02:00
Atomics LibJS: Implement Atomics.isLockFree 2021-07-14 22:13:15 +01:00
BigInt LibJS: Only coerce value once in BigInt constructor 2022-08-03 20:59:59 +01:00
Boolean LibJS: Change wording of ErrorType::NotA to be independent of context 2021-09-12 00:16:39 +02:00
DataView LibJS: Check for add overflow in DataViewConstructor 2022-06-27 20:51:00 +01:00
Date LibJS: Add "Month dd, yy hh:mm:ss" Date format 2023-05-22 06:07:05 +02:00
DisposableStack LibJS: Remove bytecode condition from tests expected to fail 2023-08-09 20:47:44 +01:00
Error LibJS: Add file & line number to bytecode VM stack traces :^) 2023-09-02 15:37:53 +02:00
FinalizationRegistry LibJS: Remove bytecode condition from tests expected to fail 2023-08-09 20:47:44 +01:00
Function LibJS: Don't assume a this argument for function.prototype.bind 2022-08-17 23:56:24 +01:00
functions LibJS: Make parseFloat use the new double parser 2022-10-23 15:48:45 +02:00
Infinity Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Intl LibJS: Use decimal compact patterns for currency style sub-patterns 2023-09-04 18:22:28 +02:00
Iterator LibJS: Implement %IteratorHelperPrototype%.return 2023-07-16 23:56:55 +01:00
JSON LibJS: Fix that non-double numbers from JSON were truncated to i32 2022-10-23 15:48:45 +02:00
Map LibJS: Re-implement the Array Grouping proposal as static methods 2023-07-12 00:03:54 +02:00
Math LibJS: Enable commented out tests in Math.asin 2022-11-28 13:10:21 +01:00
NaN Libraries: Move to Userland/Libraries/ 2021-01-12 12:17:46 +01:00
Number AK+LibJS: Make Number.MIN_VALUE a denormal 2023-07-02 21:19:09 +01:00
Object LibJS: Re-implement the Array Grouping proposal as static methods 2023-07-12 00:03:54 +02:00
Promise LibJS: Implement the Promise.withResolvers proposal 2023-07-13 00:02:19 +02:00
Proxy LibJS: Guard against stack overflow in ProxyObject set_property() 2023-05-06 06:46:02 -07:00
Reflect LibJS: Implement [[Call]] and [[Construct]] internal slots properly 2021-10-09 14:29:20 +01:00
RegExp LibJS: Manually loop over escaped regex pattern instead of ::replace() 2023-02-16 21:03:19 +01:00
Set LibJS: Disallow negative set record sizes 2023-07-18 12:31:10 +01:00
ShadowRealm LibJS: Remove bytecode condition from tests expected to fail 2023-08-09 20:47:44 +01:00
SharedArrayBuffer LibJS: Add initial implementation for SharedArrayBuffer 2023-07-01 16:55:17 +01:00
String LibJS: Behave like major engines when substituting missing capture group 2023-08-29 10:33:48 +02:00
SuppressedError LibJS: Add SuppressedError{, Prototype, Constructor} 2023-01-23 09:56:50 +00:00
Symbol LibJS: Uncomment passing tests 2023-08-08 15:09:53 +02:00
Temporal LibJS: Disable Temporal custom time zone test 2023-08-27 15:26:40 -04:00
TypedArray LibJS: Protect CanonicalIndex against double-to-integer overflow 2022-12-07 16:43:19 +00:00
WeakMap LibJS: Remove bytecode condition from tests expected to fail 2023-08-09 20:47:44 +01:00
WeakRef LibJS: Implement WeakRef changes from 'Symbol as WeakMap Keys Proposal' 2022-06-23 10:57:52 +03:00
WeakSet LibJS: Remove bytecode condition from tests expected to fail 2023-08-09 20:47:44 +01:00