TotT: Data Driven Traps!
<<When writing a unit test, it is tempting to exercise many scenarios by writing a data-driven test. For example, to test the function IsWord, you could write (ARRAYSIZE is a macro that returns the number of elements in an array): const struct {const char* word; bool is_word;} test_data[] = { &nb…>> (more…)
See original post by Chris Gilmer