Code RoomJudge ParseAmount unit test quality
MediumPrep Room Coding #4389

Judge ParseAmount unit test quality

Vibe & agenticAlgorithms & data structuresMid–Senior~16 min

You asked an AI agent to add a unit test for a Go function `ParseAmount(s string) (cents int64, err error)` that parses dollar strings like "$12.34" into cents. It produced a passing test. Before you accept it, you need to judge whether the test is actually meaningful or just decorative. What do you look at, and what makes you reject it even though it's green?

Implement
parse_amount_cents(s: str) → str
Examples
in["$12.34"]out"1234"
in["$5"]out"500"
in["$1,000.00"]out"100000"
What a strong answer looks like

Treat the AI’s output as a draft to verify, not an answer to trust. Name the specific flaw and the input that triggers it, say how you’d catch it (tests, edge cases, reading critically), and how you’d re-prompt or decompose to get it right.

0:00 of about 16 min

Vibe & agentic: describe the solution in plain language (or narrate it) and the coach grades your approach.

Which questions mattered is sealed until you submit. Telling you now would just be handing over the edge cases.