Testing do_remove

Mocking the send_to_char function to check messages to the user. Still doesn't work for act() though.
Requires libmocka-dev and   libunwind-setjmp0-dev
This commit is contained in:
welcor 2024-05-19 01:45:42 +02:00
parent 217eac8cb3
commit 7d3acb0e3d
4 changed files with 83 additions and 5 deletions

View file

@ -18,6 +18,10 @@
#include "../quest.h"
#include "../mud_event.h"
#include "../munit/munit.h"
#include <stdarg.h>
#include <stddef.h>
#include <setjmp.h>
#include <cmocka.h>
/**
* Utility macro for defining tests.
@ -30,4 +34,10 @@
*/
#define STD_TEST(test_name, test_fun) { (char *)(test_name), (test_fun), NULL, NULL, MUNIT_TEST_OPTION_NONE, NULL }
/*
* test fixtures
*/
char_data* create_test_char_data();
char *get_last_messages();
#endif