coreboot-kgpe-d16/payloads/libpayload/tests/mocks/die.c

17 lines
495 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#include <tests/test.h>
#include <stdbool.h>
void die_work(const char *file, const char *func, int line, const char *fmt, ...)
{
/* Failing asserts are jumping to the user code (test) if expect_assert_failed() was
previously called. Otherwise it jumps to the cmocka code and fails the test. */
mock_assert(false, "Mock assetion called", file, line);
/* Should never be reached */
print_error("%s() called...\n", __func__);
while (1)
;
}