FAILURE MAP
← Case archive

FA-96929 / Recipe scaling and nutrition / Member archive

Volume-to-mass ingredient converter: millilitres per cup · case 04

250 ml of water converts to 236 g instead of 249 g.

Member previewVariant 4 · 3 implementations · 8 checks per implementation

Case contract

Convert amount (fraction string) of cup/tbsp/tsp/ml to grams. 1 cup = 16 tbsp = 48 tsp = 236.5 ml. Grams per cup: flour 120, sugar 200, brown sugar 145 (213 when prefixed "packed "), butter 227, honey 340, water 236. Names are trimmed and case-insensitive; a ", sifted" suffix multiplies density by 9/10. Results below 10 g print one decimal ("%.1f g"), otherwise whole grams, both half-up. Unknown ingredient or unit returns an error string.

Why this case matters

Recipe apps convert American volume measures to weights for scaling and nutrition lookup.

One recorded failure

Sample boundary fixture

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

Boundary fixtureActualExpectedOutcome
metric cup of water"236 g""249 g"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 ↗