1 #include <mach/mach_time.h>
3 #include <darwintest.h>
5 T_GLOBAL_META(T_META_RUN_CONCURRENTLY(true));
7 extern kern_return_t
mach_timebase_info_trap(mach_timebase_info_t info
);
9 T_DECL(mach_timebase_info
, "mach_timebase_info(_trap)",
10 T_META_ALL_VALID_ARCHS(true), T_META_LTEPHASE(LTE_POSTINIT
))
12 mach_timebase_info_data_t a
, b
, c
;
14 T_ASSERT_EQ(KERN_SUCCESS
, mach_timebase_info(&a
), NULL
);
15 T_ASSERT_EQ(KERN_SUCCESS
, mach_timebase_info(&b
), NULL
);
16 T_ASSERT_EQ(KERN_SUCCESS
, mach_timebase_info_trap(&c
), NULL
);
18 T_EXPECT_EQ(a
.numer
, b
.numer
, NULL
);
19 T_EXPECT_EQ(a
.denom
, b
.denom
, NULL
);
20 T_EXPECT_EQ(a
.numer
, c
.numer
, NULL
);
21 T_EXPECT_EQ(a
.denom
, c
.denom
, NULL
);