upvote
Having a LLM also generate your unit tests defeats the purpose of checking whether a LLM generated piece of code is sound.

There will always need a human on the end to check if the LLM didn't hallucinate anything on it, including manually writing the unit tests.

reply
Building useful tests are probably one of the things that LLMs are the worst at tbh. You end up with tests checking `2 * 2 == 4` and similar.
reply