]> git.saurik.com Git - apple/libc.git/blob - tests/os_boot_mode.c
Libc-1439.100.3.tar.gz
[apple/libc.git] / tests / os_boot_mode.c
1 #include <os/boot_mode_private.h>
2 #include <TargetConditionals.h>
3
4 #include <darwintest.h>
5
6 #if TARGET_OS_OSX
7 T_DECL(os_boot_mode_basic, "Can't know our exact boot mode, but it should be fetchable")
8 {
9 const char *boot_mode = "??????";
10 bool result = os_boot_mode_query(&boot_mode);
11 if (result && !boot_mode) {
12 boot_mode = "no-particular-mode";
13 }
14 T_ASSERT_TRUE(result, "os_boot_mode_query() success (%s)", boot_mode);
15 T_ASSERT_NE_STR(boot_mode, "??????", "we actually set the result");
16 }
17 #endif