Lines Matching refs:nstb

28 	nstime_t nsta, nstb;  in TEST_BEGIN()  local
31 nstime_init(&nstb, 0); in TEST_BEGIN()
32 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
33 assert_u64_eq(nstime_sec(&nstb), 42, "sec incorrectly copied"); in TEST_BEGIN()
34 assert_u64_eq(nstime_nsec(&nstb), 43, "nsec incorrectly copied"); in TEST_BEGIN()
40 nstime_t nsta, nstb; in TEST_BEGIN() local
43 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
44 assert_d_eq(nstime_compare(&nsta, &nstb), 0, "Times should be equal"); in TEST_BEGIN()
45 assert_d_eq(nstime_compare(&nstb, &nsta), 0, "Times should be equal"); in TEST_BEGIN()
47 nstime_init2(&nstb, 42, 42); in TEST_BEGIN()
48 assert_d_eq(nstime_compare(&nsta, &nstb), 1, in TEST_BEGIN()
50 assert_d_eq(nstime_compare(&nstb, &nsta), -1, in TEST_BEGIN()
53 nstime_init2(&nstb, 42, 44); in TEST_BEGIN()
54 assert_d_eq(nstime_compare(&nsta, &nstb), -1, in TEST_BEGIN()
56 assert_d_eq(nstime_compare(&nstb, &nsta), 1, in TEST_BEGIN()
59 nstime_init2(&nstb, 41, BILLION - 1); in TEST_BEGIN()
60 assert_d_eq(nstime_compare(&nsta, &nstb), 1, in TEST_BEGIN()
62 assert_d_eq(nstime_compare(&nstb, &nsta), -1, in TEST_BEGIN()
65 nstime_init2(&nstb, 43, 0); in TEST_BEGIN()
66 assert_d_eq(nstime_compare(&nsta, &nstb), -1, in TEST_BEGIN()
68 assert_d_eq(nstime_compare(&nstb, &nsta), 1, in TEST_BEGIN()
75 nstime_t nsta, nstb; in TEST_BEGIN() local
78 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
79 nstime_add(&nsta, &nstb); in TEST_BEGIN()
80 nstime_init2(&nstb, 84, 86); in TEST_BEGIN()
81 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
85 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
86 nstime_add(&nsta, &nstb); in TEST_BEGIN()
87 nstime_init2(&nstb, 85, BILLION - 2); in TEST_BEGIN()
88 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
95 nstime_t nsta, nstb; in TEST_BEGIN() local
98 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
99 nstime_subtract(&nsta, &nstb); in TEST_BEGIN()
100 nstime_init(&nstb, 0); in TEST_BEGIN()
101 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
105 nstime_init2(&nstb, 41, 44); in TEST_BEGIN()
106 nstime_subtract(&nsta, &nstb); in TEST_BEGIN()
107 nstime_init2(&nstb, 0, BILLION - 1); in TEST_BEGIN()
108 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
115 nstime_t nsta, nstb; in TEST_BEGIN() local
119 nstime_init2(&nstb, 420, 430); in TEST_BEGIN()
120 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
125 nstime_init2(&nstb, 127, 999999998); in TEST_BEGIN()
126 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
133 nstime_t nsta, nstb; in TEST_BEGIN() local
136 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
139 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
143 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
146 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
153 nstime_t nsta, nstb, nstc; in TEST_BEGIN() local
156 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
158 assert_u64_eq(nstime_divide(&nsta, &nstb), 10, in TEST_BEGIN()
162 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
166 assert_u64_eq(nstime_divide(&nsta, &nstb), 10, in TEST_BEGIN()
170 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
174 assert_u64_eq(nstime_divide(&nsta, &nstb), 9, in TEST_BEGIN()