MOD_DEFINE(kfile_test);
+// Size of the "virtual" disk that
+// we want to test.
#define BUF_TEST_LEN 3209
+// Buffer for test
typedef uint8_t fake_t;
fake_t test_buf[BUF_TEST_LEN];
fake_t test_buf_save[BUF_TEST_LEN];
KFile fd;
+/*
+ * Beckend to use kfile structure on pc.
+ */
static int fake_close(KFile *fd)
{
(void)fd;
}
+/*
+ * Help function to init disk and the buffers.
+ */
static void init_testBuf(void)
{
#include <stdlib.h>
MOD_INIT(kfile_test);
LOG_INFO("Mod init..ok\n");
+ // Init our backend and the buffers
fake_kfileInit();
init_testBuf();
}
TEST_MAIN(kfile);
+