Lines Matching refs:result

13 	uint32_t result = 42;
15 zassert_false(u32_add_overflow(2, 3, &result));
16 zassert_equal(result, 5);
18 zassert_false(u32_add_overflow(2, 0, &result));
19 zassert_equal(result, 2);
21 zassert_false(u32_add_overflow(0, 3, &result));
22 zassert_equal(result, 3);
24 zassert_false(u32_add_overflow(0, UINT32_MAX, &result));
25 zassert_equal(result, UINT32_MAX);
26 zassert_true(u32_add_overflow(1, UINT32_MAX, &result));
27 zassert_equal(result, 0);
29 zassert_false(u32_add_overflow(UINT32_MAX, 0, &result));
30 zassert_equal(result, UINT32_MAX);
31 zassert_true(u32_add_overflow(UINT32_MAX, 2, &result));
32 zassert_equal(result, 1);
37 uint32_t result = 42;
39 zassert_false(u32_mul_overflow(2, 3, &result));
40 zassert_equal(result, 6);
42 zassert_false(u32_mul_overflow(UINT32_MAX, 1, &result));
43 zassert_equal(result, UINT32_MAX);
44 zassert_true(u32_mul_overflow(UINT32_MAX, 2, &result));
45 zassert_equal(result, UINT32_MAX * 2);
47 zassert_false(u32_mul_overflow(1, UINT32_MAX, &result));
48 zassert_equal(result, UINT32_MAX);
49 zassert_true(u32_mul_overflow(2, UINT32_MAX, &result));
50 zassert_equal(result, UINT32_MAX * 2);
55 uint64_t result = 42;
57 zassert_false(u64_add_overflow(2, 3, &result));
58 zassert_equal(result, 5);
60 zassert_false(u64_add_overflow(2, 0, &result));
61 zassert_equal(result, 2);
63 zassert_false(u64_add_overflow(0, 3, &result));
64 zassert_equal(result, 3);
66 zassert_false(u64_add_overflow(0, UINT64_MAX, &result));
67 zassert_equal(result, UINT64_MAX);
68 zassert_true(u64_add_overflow(1, UINT64_MAX, &result));
69 zassert_equal(result, 0);
71 zassert_false(u64_add_overflow(UINT64_MAX, 0, &result));
72 zassert_equal(result, UINT64_MAX);
73 zassert_true(u64_add_overflow(UINT64_MAX, 2, &result));
74 zassert_equal(result, 1);
79 uint64_t result = 42;
81 zassert_false(u64_mul_overflow(2, 3, &result));
82 zassert_equal(result, 6);
84 zassert_false(u64_mul_overflow(UINT64_MAX, 1, &result));
85 zassert_equal(result, UINT64_MAX);
86 zassert_true(u64_mul_overflow(UINT64_MAX, 2, &result));
87 zassert_equal(result, UINT64_MAX * 2);
89 zassert_false(u64_mul_overflow(1, UINT64_MAX, &result));
90 zassert_equal(result, UINT64_MAX);
91 zassert_true(u64_mul_overflow(2, UINT64_MAX, &result));
92 zassert_equal(result, UINT64_MAX * 2);
97 size_t result = 42;
99 zassert_false(size_add_overflow(2, 3, &result));
100 zassert_equal(result, 5);
102 zassert_false(size_add_overflow(2, 0, &result));
103 zassert_equal(result, 2);
105 zassert_false(size_add_overflow(0, 3, &result));
106 zassert_equal(result, 3);
108 zassert_false(size_add_overflow(0, SIZE_MAX, &result));
109 zassert_equal(result, SIZE_MAX);
110 zassert_true(size_add_overflow(1, SIZE_MAX, &result));
111 zassert_equal(result, 0);
113 zassert_false(size_add_overflow(SIZE_MAX, 0, &result));
114 zassert_equal(result, SIZE_MAX);
115 zassert_true(size_add_overflow(SIZE_MAX, 2, &result));
116 zassert_equal(result, 1);
121 size_t result = 42;
123 zassert_false(size_mul_overflow(2, 3, &result));
124 zassert_equal(result, 6);
126 zassert_false(size_mul_overflow(SIZE_MAX, 1, &result));
127 zassert_equal(result, SIZE_MAX);
128 zassert_true(size_mul_overflow(SIZE_MAX, 2, &result));
129 zassert_equal(result, SIZE_MAX * 2);
131 zassert_false(size_mul_overflow(1, SIZE_MAX, &result));
132 zassert_equal(result, SIZE_MAX);
133 zassert_true(size_mul_overflow(2, SIZE_MAX, &result));
134 zassert_equal(result, SIZE_MAX * 2);