Comment by jng

21 hours ago

I've found Claude Code with Opus 4.5+ to be excellent at generating test cases that exercise the different features, and even push into the edge cases. You sometimes need to nudge it into generating more convoluted cases when necessary, but then it is just nudging. I now routinely generate more LOCs of test cases than actual core code, while I used to only write very limited test cases just for the most complex areas amenable to automated testing.

I've been successful at using Claude Code this way:

1. get it to generate code for complex data structures in a separate library project

2. use the code inside a complex existing project (no LLM here)

3. then find a bug in the project, with some fuzzy clues as to causes

4. tell CC about the bug and ask it to generate intensive test cases in the direction of the fuzzy clues

5. get the test cases to reproduce the bug and then CC to fix it by itself

6. take the new code back to the full project and see the issue fixed

All this using C++. I've been a pretty intensive developer for ~35 years. I've done this kind of thing by hand a million times, not any more. We really live in the future now.