Lines Matching refs:nstb
25 nstime_t nsta, nstb; in TEST_BEGIN() local
28 nstime_init(&nstb, 0); in TEST_BEGIN()
29 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
30 assert_u64_eq(nstime_sec(&nstb), 42, "sec incorrectly copied"); in TEST_BEGIN()
31 assert_u64_eq(nstime_nsec(&nstb), 43, "nsec incorrectly copied"); in TEST_BEGIN()
36 nstime_t nsta, nstb; in TEST_BEGIN() local
39 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
40 assert_d_eq(nstime_compare(&nsta, &nstb), 0, "Times should be equal"); in TEST_BEGIN()
41 assert_d_eq(nstime_compare(&nstb, &nsta), 0, "Times should be equal"); in TEST_BEGIN()
43 nstime_init2(&nstb, 42, 42); in TEST_BEGIN()
44 assert_d_eq(nstime_compare(&nsta, &nstb), 1, in TEST_BEGIN()
46 assert_d_eq(nstime_compare(&nstb, &nsta), -1, in TEST_BEGIN()
49 nstime_init2(&nstb, 42, 44); in TEST_BEGIN()
50 assert_d_eq(nstime_compare(&nsta, &nstb), -1, in TEST_BEGIN()
52 assert_d_eq(nstime_compare(&nstb, &nsta), 1, in TEST_BEGIN()
55 nstime_init2(&nstb, 41, BILLION - 1); in TEST_BEGIN()
56 assert_d_eq(nstime_compare(&nsta, &nstb), 1, in TEST_BEGIN()
58 assert_d_eq(nstime_compare(&nstb, &nsta), -1, in TEST_BEGIN()
61 nstime_init2(&nstb, 43, 0); in TEST_BEGIN()
62 assert_d_eq(nstime_compare(&nsta, &nstb), -1, in TEST_BEGIN()
64 assert_d_eq(nstime_compare(&nstb, &nsta), 1, in TEST_BEGIN()
70 nstime_t nsta, nstb; in TEST_BEGIN() local
73 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
74 nstime_add(&nsta, &nstb); in TEST_BEGIN()
75 nstime_init2(&nstb, 84, 86); in TEST_BEGIN()
76 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
80 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
81 nstime_add(&nsta, &nstb); in TEST_BEGIN()
82 nstime_init2(&nstb, 85, BILLION - 2); in TEST_BEGIN()
83 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
89 nstime_t nsta, nstb; in TEST_BEGIN() local
93 nstime_init2(&nstb, 43, 0); in TEST_BEGIN()
94 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
99 nstime_init2(&nstb, 43, 2); in TEST_BEGIN()
100 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
106 nstime_t nsta, nstb; in TEST_BEGIN() local
109 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
110 nstime_subtract(&nsta, &nstb); in TEST_BEGIN()
111 nstime_init(&nstb, 0); in TEST_BEGIN()
112 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
116 nstime_init2(&nstb, 41, 44); in TEST_BEGIN()
117 nstime_subtract(&nsta, &nstb); in TEST_BEGIN()
118 nstime_init2(&nstb, 0, BILLION - 1); in TEST_BEGIN()
119 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
125 nstime_t nsta, nstb; in TEST_BEGIN() local
129 nstime_init(&nstb, 0); in TEST_BEGIN()
130 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
135 nstime_init2(&nstb, 0, BILLION - 1); in TEST_BEGIN()
136 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
142 nstime_t nsta, nstb; in TEST_BEGIN() local
146 nstime_init2(&nstb, 420, 430); in TEST_BEGIN()
147 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
152 nstime_init2(&nstb, 127, 999999998); in TEST_BEGIN()
153 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
159 nstime_t nsta, nstb; in TEST_BEGIN() local
162 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
165 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
169 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
172 assert_d_eq(nstime_compare(&nsta, &nstb), 0, in TEST_BEGIN()
178 nstime_t nsta, nstb, nstc; in TEST_BEGIN() local
181 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
183 assert_u64_eq(nstime_divide(&nsta, &nstb), 10, in TEST_BEGIN()
187 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
191 assert_u64_eq(nstime_divide(&nsta, &nstb), 10, in TEST_BEGIN()
195 nstime_copy(&nstb, &nsta); in TEST_BEGIN()
199 assert_u64_eq(nstime_divide(&nsta, &nstb), 9, in TEST_BEGIN()