]>
Commit | Line | Data |
---|---|---|
b061a43b A |
1 | #include <os/assumes.h> |
2 | ||
3 | #include <darwintest.h> | |
4 | ||
5 | void os_crash_function(const char *message); | |
6 | ||
7 | static const char *expected_message = NULL; | |
8 | ||
9 | void 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 | 19 | T_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 | } |