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