#ifndef __TEST_HELPER_H
#define __TEST_HELPER_H

#include <aos/aos.h>
#include <mm/mm.h>

#define CHECK_ERR(expr) do {                  \
    errval_t _err = expr;                     \
    if (err_is_fail(_err)) {                  \
        USER_PANIC_ERR(_err, "Test failed."); \
    }                                         \
} while (0)

extern struct mm *testmm;

void *alloc_frame(
    size_t bytes,
    size_t alignment,
    struct capref *ram_cap_ret,
    struct capref *frame_cap_ret
);

#endif /* __TEST_HELPER_H */