pokeemerald-expansion/include/test_result.h
Martin Griffin cc8c8bd668 assertf: Formatted asserts
assertf's behavior depends on the build:
- In release builds it executes recovery code.
- In debug builds it shows a crash screen. When start is pressed it
  resumes and executes the recovery code.
- In test builds it fails the test with an INVALID result.
2025-12-17 17:14:34 +00:00

21 lines
543 B
C

#ifndef GUARD_TEST_RESULT_H
#define GUARD_TEST_RESULT_H
enum TestResult
{
TEST_RESULT_FAIL,
TEST_RESULT_PASS,
TEST_RESULT_ASSUMPTION_FAIL,
TEST_RESULT_INVALID,
TEST_RESULT_ERROR,
TEST_RESULT_TIMEOUT,
TEST_RESULT_CRASH,
TEST_RESULT_TODO,
TEST_RESULT_KNOWN_FAIL,
};
void Test_ExitWithResult_(enum TestResult, u32 stopLine, const void *return0, const char *fmt, ...);
#define Test_ExitWithResult(result, stopLine, ...) Test_ExitWithResult_(result, stopLine, __builtin_return_address(0), __VA_ARGS__)
#endif