#47 broken behaviour with CU_register_suites in SVN latest

open
Core Issue (23)
5
2012-10-25
2011-01-05
John Pye
No

In SVN trunk r133, CUnit's CU_register_suites function fails, because recent SVN changes have modified the CU_SuiteInfo data structure to contain additional pointers for per-test SetUp and TearDown functions. This is bad because some users define data structures of these types as the way to register their tests. There needs to be a way to warn users about this problem, because otherwise they will see segfaults when they attempt to run their previously-operational test suites.

Example of code broken by these changes (see the end of the file)
http://ascendcode.cheme.cmu.edu/viewvc/code/trunk/ascend/general/test/test_dstring.c?revision=3096&view=markup

Suggest that existing data structures are marked deprecated, and new function calls are added with differently-named data structures. Backward compatibility is important here, unless we want to make a big Version 3 release.

Discussion

  • John Pye
    John Pye
    2011-01-05

    Maybe the best option is to remove CU_SuiteInfo from the user-accessible header files... that way they are forced to use the CU_add_test and CU_add_suite functions instead?

     


Anonymous


Cancel   Add attachments