Menu

#72 CUnit 2.1.3 User Guide wrong description in Shortcut Methods

v1.0_(example)
open
nobody
None
1
2017-11-29
2017-11-29
Peut Kotze
No

In the User Guide for CUnit 2.1.3 section 4.4 "Shortcut Methods for Managing Tests"

The CU_SuiteInfo suites[] construct requires another two parameters not stated in the Guide. The Guide state the usage of this construct as:
CU_SuiteInfo suites[] = {
{ "suitename", suite1_init_func, suite1_cleanup_func, test_array1 }

BUT it should be:

CU_SuiteInfo suites[] = {
{"suitename", suite1_init_func, suite1_cleanup_func, test_array1, Setup-func, TearDown_func, test_array}
OR
{"suitename", suite1_init_func, suite1_cleanup_func, test_array1, NULL, NULL, test_array}

Using this construct without these two extra parameters results in an Segmentation Fault error when executing CUnit.

After I changed my code, CUnit tests run without any problems using this construct.

Discussion

Anonymous
Anonymous

Add attachments
Cancel





MongoDB Logo MongoDB