Add a simple unit test for widget_add_from_file()

This commit is contained in:
Pim van Pelt
2017-11-26 11:28:09 +01:00
parent b005dd8a26
commit 6985b30dc2
8 changed files with 854 additions and 8 deletions

View File

@ -4,9 +4,9 @@
/* Some functions mocked from MGOS, so we can run unit tests standalone.
*/
#include <stdio.h>
#include <string.h>
#include "mgos.h"
// mgos_log
enum cs_log_level {
LL_NONE = -1,
LL_ERROR = 0,
@ -27,4 +27,13 @@ int log_print_prefix(enum cs_log_level l, const char *func, const char *file);
printf("\r\n"); \
} while (0)
// mgos_timer
#define MGOS_TIMER_REPEAT 1
typedef uintptr_t mgos_timer_id;
typedef void (*timer_callback)(void *param);
mgos_timer_id mgos_set_timer(int msecs, int flags, timer_callback cb, void *cb_arg);
void mgos_clear_timer(mgos_timer_id id);
#endif // __MGOS_MOCK_H