Test Generation
Domain: Code Generation
π― Motivation
The model writes unit tests for existing code, ensuring it works correctly and catching future regressions.
π Concrete Example
Model reads βdef add(a, b): return a + bβ and generates: βdef test_add(): assert add(2, 3) 5; assert add(-1, 1) 0; assert add(0, 0) == 0β with edge cases.
π Analogy
A quality inspector creating test plans - they look at a product and design tests to check it works. Test generation is the model designing tests for code.