Lines Matching refs:val
75 int32_t val = atomic_inc_prefix_s32(&data); in TEST() local
77 EXPECT_EQ(1, val); in TEST()
79 val = atomic_inc_prefix_s32(&data); in TEST()
81 EXPECT_EQ(2, val); in TEST()
83 val = atomic_inc_prefix_s32(&data); in TEST()
85 EXPECT_EQ(3, val); in TEST()
87 val = atomic_dec_prefix_s32(&data); in TEST()
88 EXPECT_EQ(2, val); in TEST()
90 val = atomic_dec_prefix_s32(&data); in TEST()
91 EXPECT_EQ(1, val); in TEST()
92 val = atomic_dec_prefix_s32(&data); in TEST()
93 EXPECT_EQ(0, val); in TEST()
94 val = atomic_dec_prefix_s32(&data); in TEST()
95 EXPECT_EQ(-1, val); in TEST()
104 uint32_t val = atomic_inc_prefix_u32(&data); in TEST() local
106 EXPECT_EQ((unsigned)1, val); in TEST()
108 val = atomic_inc_prefix_u32(&data); in TEST()
110 EXPECT_EQ((unsigned)2, val); in TEST()
112 val = atomic_inc_prefix_u32(&data); in TEST()
114 EXPECT_EQ((unsigned)3, val); in TEST()
116 val = atomic_dec_prefix_u32(&data); in TEST()
117 EXPECT_EQ((unsigned)2, val); in TEST()
119 val = atomic_dec_prefix_u32(&data); in TEST()
120 EXPECT_EQ((unsigned)1, val); in TEST()
121 val = atomic_dec_prefix_u32(&data); in TEST()
122 EXPECT_EQ((unsigned)0, val); in TEST()
123 val = atomic_dec_prefix_u32(&data); in TEST()
124 EXPECT_EQ((unsigned)-1, val); in TEST()
200 int64_t val = atomic_inc_prefix_s64(&data); in TEST() local
202 EXPECT_EQ(1, val); in TEST()
204 val = atomic_inc_prefix_s64(&data); in TEST()
206 EXPECT_EQ(2, val); in TEST()
208 val = atomic_inc_prefix_s64(&data); in TEST()
210 EXPECT_EQ(3, val); in TEST()
212 val = atomic_dec_prefix_s64(&data); in TEST()
213 EXPECT_EQ(2, val); in TEST()
215 val = atomic_dec_prefix_s64(&data); in TEST()
216 EXPECT_EQ(1, val); in TEST()
217 val = atomic_dec_prefix_s64(&data); in TEST()
218 EXPECT_EQ(0, val); in TEST()
219 val = atomic_dec_prefix_s64(&data); in TEST()
220 EXPECT_EQ(-1, val); in TEST()
223 val = atomic_inc_postfix_s64(&data); in TEST()
225 EXPECT_EQ(-1, val); in TEST()
227 val = atomic_inc_postfix_s64(&data); in TEST()
229 EXPECT_EQ(0, val); in TEST()
231 val = atomic_inc_postfix_s64(&data); in TEST()
233 EXPECT_EQ(1, val); in TEST()
235 val = atomic_dec_postfix_s64(&data); in TEST()
236 EXPECT_EQ(2, val); in TEST()
238 val = atomic_dec_postfix_s64(&data); in TEST()
239 EXPECT_EQ(1, val); in TEST()
240 val = atomic_dec_postfix_s64(&data); in TEST()
241 EXPECT_EQ(0, val); in TEST()
242 val = atomic_dec_postfix_s64(&data); in TEST()
243 EXPECT_EQ(-1, val); in TEST()
253 uint64_t val = atomic_add_u64(&data, 0xffff); in TEST() local
255 EXPECT_EQ((unsigned)0xffff, val); in TEST()
257 val = atomic_add_u64(&data, 0xffff); in TEST()
259 EXPECT_EQ((unsigned)(2 * 0xffff), val); in TEST()
261 val = atomic_add_u64(&data, 0xffff); in TEST()
263 EXPECT_EQ((unsigned)(3 * 0xffff), val); in TEST()
264 EXPECT_NE((unsigned)(3 * 0xfff0), val); in TEST()
266 val = atomic_sub_u64(&data, 0xffff); in TEST()
267 EXPECT_EQ((unsigned)(2 * 0xffff), val); in TEST()
269 val = atomic_sub_u64(&data, 0); in TEST()
270 EXPECT_EQ((unsigned)(2 * 0xffff), val); in TEST()
271 val = atomic_sub_u64(&data, 0xffff); in TEST()
272 EXPECT_EQ((unsigned)(1 * 0xffff), val); in TEST()
274 val = atomic_sub_u64(&data, 0xffff); in TEST()
275 EXPECT_EQ((unsigned)0, val); in TEST()