3 ms·
I agree that tests should be part of the language. For example it would be great to have convenient and natural language support for creating simulated error c
by gregfjohnson 17y ago
I agree that tests should be part of the language. For example it would be great to have convenient and natural language support for creating simulated error conditions to force test execution of rarely used error handling code. An essential aspect of production code is to design in the handling of errors and unexpected conditions. This is true across the abstraction hierarchy; who throws exceptions and who catches them? In C code, how do you encode error returns? Who has the responsibility of printing error messages or notifying the user of a detected error? It would be great if these aspects of a system could be exercised as part of automated software testing, and I believe this would be facilitated by language features that could interact with test case datasets to simulate exceptions.