Test dbuf_take_fail aborting in DEBUG mode
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#include <check.h>
|
#include <check.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <signal.h>
|
||||||
#include <ucore/dbuf.h>
|
#include <ucore/dbuf.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -88,7 +89,11 @@ Suite *dbuf_suite(void)
|
|||||||
Suite *s = suite_create("dbuf");
|
Suite *s = suite_create("dbuf");
|
||||||
TCase *tc = tcase_create("dbuf tests");
|
TCase *tc = tcase_create("dbuf tests");
|
||||||
tcase_add_test(tc, test_dbuf);
|
tcase_add_test(tc, test_dbuf);
|
||||||
|
#ifdef DEBUG
|
||||||
|
tcase_add_test_raise_signal(tc, test_dbuf_take_fail, SIGABRT);
|
||||||
|
#else
|
||||||
tcase_add_test(tc, test_dbuf_take_fail);
|
tcase_add_test(tc, test_dbuf_take_fail);
|
||||||
|
#endif
|
||||||
|
|
||||||
suite_add_tcase(s, tc);
|
suite_add_tcase(s, tc);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user