Payment APIs want integers in minor units — 1099 for €10.99 — and half of all currency bugs come from converting between that and a display string. This generates both, side by side, so you can check the round trip.
What you can control
- Three ending styles: charm pricing, round numbers, or exact two-decimal values.
- Minor units are computed correctly per currency, including yen, which has no minor unit at all.
- Discount percentages come with the resulting sale price, for testing strike-through pricing.
- Ten currencies with correct symbols and placement.
Testing ideas
- Minor units. Turn on integer minor units — cents, the way payment APIs such as Stripe expect them — and check that 1999 becomes $19.99, not $1,999.
- Zero-decimal currencies. JPY has no minor unit. A formatter that always shows two decimals prints ¥1,500.00.
- Discounts. Sale prices are rounded to two decimals; check your own rounding agrees, especially at 33% and 15%.
- Charm pricing.
.99and.95endings test that sorting and filters use numbers, not strings.
What this is not
Conversion between currencies uses fixed indicative rates rather than live ones. Use them for shaping data, never for anything a customer will pay.