There's a very good chance you are currently undervaluing "Negative Tests." Tests designed to fail, and designed to exercise your error handling routines. These tests are VERY important as they execute code paths that are rarely executed. What if your error handler can crash!?
Is there a testing framework for compiling, where failure to compile is a success?
-
-
It can be built with CMake. CMake has a "try compile" feature. And you could then set a flag and require that to be false. Alternatively, you could write a simple script that succeeds on failure to compile and call that from ctest or similar
-
In CMake projects where I want to test for code that should succeed or fail to compile, I add a test case that uses the ctest --build-and-test mode on a mini project that tries to compile the code in question. Test properties are used to determine how to decide pass/fail.
Keskustelun loppu
Uusi keskustelu -
Lataaminen näyttää kestävän hetken.
Twitter saattaa olla ruuhkautunut tai ongelma on muuten hetkellinen. Yritä uudelleen tai käy Twitterin tilasivulla saadaksesi lisätietoja.