FAILURE MAP
← Case archive

FA-97025 / Recipe scaling and nutrition / Member archive

Percent daily value formatter: zero amount · case 05

A product with no sodium prints "<1%".

Member previewVariant 5 · 3 implementations · 8 checks per implementation

Case contract

DVs: sodium 2300 mg, fat 78 g, fiber 28 g, calcium 1300 mg, vitamin d 20 mcg, added sugars 50 g, protein 50 g. Names are trimmed, case-insensitive; unknown -> "error: no daily value". Units g, mg, mcg convert exactly; "iu" is allowed only for vitamin d (40 IU = 1 mcg), else "error: unit". pct = amount/DV*100. Zero -> "0%". Calcium and vitamin d: <2 -> "<2%", <=10 -> nearest 2, <=50 -> nearest 5, else nearest 10. Others: <1 -> "<1%", else nearest 1. Half-up.

Why this case matters

Label software prints %DV with different increments for micronutrients and macronutrients.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
zero calcium"\u003c2%""0%"Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗