]> git.saurik.com Git - apple/libc.git/blame - tests/assumes_legacy.c
Libc-1439.100.3.tar.gz
[apple/libc.git] / tests / assumes_legacy.c
CommitLineData
b061a43b
A
1#include <os/assumes.h>
2
3#include <darwintest.h>
4
5void os_crash_function(const char *message);
6
7static const char *expected_message = NULL;
8
9void os_crash_function(const char *message) {
10 if (expected_message) {
11 T_ASSERT_EQ_STR(message, expected_message, NULL);
12 T_END;
13 } else {
14 T_PASS("Got crash message: %s", message);
15 T_END;
16 }
17}
18
70ad1dc8 19T_DECL(os_crash_sanity_legacy, "sanity check for os_crash")
b061a43b
A
20{
21 expected_message = "My AWESOME assertion message.";
22 os_crash(expected_message);
23}