Lines Matching refs:s

23   MemcpyState s;  in StatefulInitTest()  local
26 memset(&s, 0, sizeof(s)); in StatefulInitTest()
27 s.overrun = 1; in StatefulInitTest()
28 StatefulInit(&s, buf, 128); in StatefulInitTest()
29 TEST_EQ(0, s.overrun, "StatefulInit() overrun"); in StatefulInitTest()
30 TEST_EQ(128, s.remaining_len, "StatefulInit() len"); in StatefulInitTest()
31 TEST_PTR_EQ(buf, s.remaining_buf, "StatefulInit() buf"); in StatefulInitTest()
37 MemcpyState s; in StatefulSkipTest() local
41 StatefulInit(&s, buf, 128); in StatefulSkipTest()
42 TEST_PTR_EQ(&s, StatefulSkip(&s, 5), "StatefulSkip(5) retval"); in StatefulSkipTest()
43 TEST_EQ(128 - 5, s.remaining_len, "StatefulSkip(5) len"); in StatefulSkipTest()
44 TEST_PTR_EQ(buf + 5, s.remaining_buf, "StatefulSkip(5) buf"); in StatefulSkipTest()
45 TEST_EQ(0, s.overrun, "StatefulSkip(5) overrun"); in StatefulSkipTest()
48 StatefulInit(&s, buf, 128); in StatefulSkipTest()
49 TEST_PTR_EQ(&s, StatefulSkip(&s, 128), "StatefulSkip(all) retval"); in StatefulSkipTest()
50 TEST_EQ(0, s.remaining_len, "StatefulSkip(all) len"); in StatefulSkipTest()
51 TEST_PTR_EQ(buf + 128, s.remaining_buf, "StatefulSkip(all) buf"); in StatefulSkipTest()
52 TEST_EQ(0, s.overrun, "StatefulSkip(all) overrun"); in StatefulSkipTest()
55 TEST_PTR_EQ(&s, StatefulSkip(&s, 0), "StatefulSkip(0) retval"); in StatefulSkipTest()
56 TEST_EQ(0, s.remaining_len, "StatefulSkip(0) len"); in StatefulSkipTest()
57 TEST_PTR_EQ(buf + 128, s.remaining_buf, "StatefulSkip(0) buf"); in StatefulSkipTest()
58 TEST_EQ(0, s.overrun, "StatefulSkip(0) overrun"); in StatefulSkipTest()
61 TEST_PTR_EQ(NULL, StatefulSkip(&s, 1), "StatefulSkip(+1) retval"); in StatefulSkipTest()
62 TEST_EQ(0, s.remaining_len, "StatefulSkip(+1) len"); in StatefulSkipTest()
63 TEST_EQ(1, s.overrun, "StatefulSkip(+1) overrun"); in StatefulSkipTest()
66 StatefulInit(&s, buf, 128); in StatefulSkipTest()
67 TEST_PTR_EQ(NULL, StatefulSkip(&s, 256), "StatefulSkip(256) retval"); in StatefulSkipTest()
68 TEST_EQ(1, s.overrun, "StatefulSkip(256) overrun"); in StatefulSkipTest()
70 TEST_PTR_EQ(NULL, StatefulSkip(&s, 1), "StatefulSkip(256+1) retval"); in StatefulSkipTest()
71 TEST_EQ(1, s.overrun, "StatefulSkip(256+1) overrun"); in StatefulSkipTest()
74 StatefulInit(&s, buf, 128); in StatefulSkipTest()
75 TEST_PTR_EQ(NULL, StatefulSkip(&s, -1), "StatefulSkip(-1) retval"); in StatefulSkipTest()
76 TEST_EQ(1, s.overrun, "StatefulSkip(-1) overrun"); in StatefulSkipTest()
82 MemcpyState s; in StatefulMemset_rTest() local
90 StatefulInit(&s, buf, 128); in StatefulMemset_rTest()
91 TEST_PTR_EQ(&s, StatefulMemset_r(&s, 'A', 5), "StatefulMemset_r(5) retval"); in StatefulMemset_rTest()
92 TEST_EQ(128 - 5, s.remaining_len, "StatefulMemset_r(5) len"); in StatefulMemset_rTest()
93 TEST_PTR_EQ(buf + 5, s.remaining_buf, "StatefulMemset_r(5) buf"); in StatefulMemset_rTest()
97 TEST_EQ(0, s.overrun, "StatefulMemset_r(5) overrun"); in StatefulMemset_rTest()
98 TEST_PTR_EQ(&s, StatefulMemset_r(&s, 'B', 3), "StatefulMemset_r(3) retval"); in StatefulMemset_rTest()
102 StatefulInit(&s, buf, 128); in StatefulMemset_rTest()
103 TEST_PTR_EQ(&s, StatefulMemset_r(&s, 'C', 128), in StatefulMemset_rTest()
105 TEST_EQ(0, s.remaining_len, "StatefulMemset_r(all) len"); in StatefulMemset_rTest()
106 TEST_PTR_EQ(buf + 128, s.remaining_buf, "StatefulMemset_r(all) buf"); in StatefulMemset_rTest()
107 TEST_EQ(0, s.overrun, "StatefulMemset_r(all) overrun"); in StatefulMemset_rTest()
112 TEST_PTR_EQ(&s, StatefulMemset_r(&s, 'D', 0), "StatefulMemset_r(0) retval"); in StatefulMemset_rTest()
113 TEST_EQ(0, s.remaining_len, "StatefulMemset_r(0) len"); in StatefulMemset_rTest()
114 TEST_PTR_EQ(buf + 128, s.remaining_buf, "StatefulMemset_r(0) buf"); in StatefulMemset_rTest()
115 TEST_EQ(0, s.overrun, "StatefulMemset_r(0) overrun"); in StatefulMemset_rTest()
119 TEST_PTR_EQ(NULL, StatefulMemset_r(&s, 'E', 1), in StatefulMemset_rTest()
121 TEST_EQ(0, s.remaining_len, "StatefulMemset_r(+1) len"); in StatefulMemset_rTest()
122 TEST_EQ(1, s.overrun, "StatefulMemset_r(+1) overrun"); in StatefulMemset_rTest()
126 StatefulInit(&s, buf, 128); in StatefulMemset_rTest()
127 TEST_PTR_EQ(NULL, StatefulMemset_r(&s, 'F', 256), in StatefulMemset_rTest()
129 TEST_EQ(1, s.overrun, "StatefulMemset_r(256) overrun"); in StatefulMemset_rTest()
131 TEST_PTR_EQ(NULL, StatefulMemset_r(&s, 'G', 1), in StatefulMemset_rTest()
133 TEST_EQ(1, s.overrun, "StatefulMemset_r(256+1) overrun"); in StatefulMemset_rTest()
137 StatefulInit(&s, buf, 128); in StatefulMemset_rTest()
138 TEST_PTR_EQ(NULL, StatefulMemset_r(&s, 'H', -1), in StatefulMemset_rTest()
140 TEST_EQ(1, s.overrun, "StatefulMemset_r(-1) overrun"); in StatefulMemset_rTest()
147 MemcpyState s; in StatefulMemcpy_rTest() local
158 StatefulInit(&s, buf, 128); in StatefulMemcpy_rTest()
159 TEST_PTR_EQ(src1, StatefulMemcpy_r(&s, src1, 6), in StatefulMemcpy_rTest()
161 TEST_EQ(128 - 6, s.remaining_len, "StatefulMemcpy_r(6) len"); in StatefulMemcpy_rTest()
162 TEST_PTR_EQ(buf + 6, s.remaining_buf, "StatefulMemcpy_r(6) buf"); in StatefulMemcpy_rTest()
166 TEST_EQ(0, s.overrun, "StatefulMemcpy_r(6) overrun"); in StatefulMemcpy_rTest()
167 TEST_PTR_EQ(src2, StatefulMemcpy_r(&s, src2, 8), in StatefulMemcpy_rTest()
173 StatefulInit(&s, buf, 10); in StatefulMemcpy_rTest()
174 TEST_PTR_EQ(src3, StatefulMemcpy_r(&s, src3, 10), in StatefulMemcpy_rTest()
176 TEST_EQ(0, s.remaining_len, "StatefulMemcpy_r(all) len"); in StatefulMemcpy_rTest()
177 TEST_PTR_EQ(buf + 10, s.remaining_buf, "StatefulMemcpy_r(all) buf"); in StatefulMemcpy_rTest()
178 TEST_EQ(0, s.overrun, "StatefulMemcpy_r(all) overrun"); in StatefulMemcpy_rTest()
183 TEST_PTR_EQ(src1, StatefulMemcpy_r(&s, src1, 0), in StatefulMemcpy_rTest()
185 TEST_EQ(0, s.remaining_len, "StatefulMemcpy_r(0) len"); in StatefulMemcpy_rTest()
186 TEST_PTR_EQ(buf + 10, s.remaining_buf, "StatefulMemcpy_r(0) buf"); in StatefulMemcpy_rTest()
187 TEST_EQ(0, s.overrun, "StatefulMemcpy_r(0) overrun"); in StatefulMemcpy_rTest()
191 TEST_PTR_EQ(NULL, StatefulMemcpy_r(&s, src1, 1), in StatefulMemcpy_rTest()
193 TEST_EQ(0, s.remaining_len, "StatefulMemcpy_r(+1) len"); in StatefulMemcpy_rTest()
194 TEST_EQ(1, s.overrun, "StatefulMemcpy_r(+1) overrun"); in StatefulMemcpy_rTest()
199 StatefulInit(&s, buf, 8); in StatefulMemcpy_rTest()
200 TEST_PTR_EQ(NULL, StatefulMemcpy_r(&s, "MoreThan8", 9), in StatefulMemcpy_rTest()
202 TEST_EQ(1, s.overrun, "StatefulMemcpy_r(9) overrun"); in StatefulMemcpy_rTest()
204 TEST_PTR_EQ(NULL, StatefulMemcpy_r(&s, "Less", 4), in StatefulMemcpy_rTest()
206 TEST_EQ(1, s.overrun, "StatefulMemcpy_r(9+1) overrun"); in StatefulMemcpy_rTest()
210 StatefulInit(&s, buf, 128); in StatefulMemcpy_rTest()
211 TEST_PTR_EQ(NULL, StatefulMemcpy_r(&s, "FOO", -1), in StatefulMemcpy_rTest()
213 TEST_EQ(1, s.overrun, "StatefulMemcpy_r(-1) overrun"); in StatefulMemcpy_rTest()
220 MemcpyState s; in StatefulMemcpyTest() local
230 StatefulInit(&s, src1, 12); in StatefulMemcpyTest()
231 TEST_PTR_EQ(buf, StatefulMemcpy(&s, buf, 6), "StatefulMemcpy(6) retval"); in StatefulMemcpyTest()
232 TEST_EQ(6, s.remaining_len, "StatefulMemcpy(6) len"); in StatefulMemcpyTest()
233 TEST_PTR_EQ(src1 + 6, s.remaining_buf, "StatefulMemcpy(6) buf"); in StatefulMemcpyTest()
237 TEST_EQ(0, s.overrun, "StatefulMemcpy(6) overrun"); in StatefulMemcpyTest()
238 TEST_PTR_EQ(buf, StatefulMemcpy(&s, buf, 5), "StatefulMemcpy(5) retval"); in StatefulMemcpyTest()
246 StatefulInit(&s, src2, 16); in StatefulMemcpyTest()
247 TEST_PTR_EQ(buf, StatefulMemcpy(&s, buf, 16), "StatefulMemcpy(all) retval"); in StatefulMemcpyTest()
248 TEST_EQ(0, s.remaining_len, "StatefulMemcpy(all) len"); in StatefulMemcpyTest()
249 TEST_PTR_EQ(src2 + 16, s.remaining_buf, "StatefulMemcpy(all) buf"); in StatefulMemcpyTest()
250 TEST_EQ(0, s.overrun, "StatefulMemcpy(all) overrun"); in StatefulMemcpyTest()
254 TEST_PTR_EQ(buf, StatefulMemcpy(&s, buf, 0), in StatefulMemcpyTest()
256 TEST_EQ(0, s.remaining_len, "StatefulMemcpy(0) len"); in StatefulMemcpyTest()
257 TEST_PTR_EQ(src2 + 16, s.remaining_buf, "StatefulMemcpy(0) buf"); in StatefulMemcpyTest()
258 TEST_EQ(0, s.overrun, "StatefulMemcpy(0) overrun"); in StatefulMemcpyTest()
262 TEST_PTR_EQ(NULL, StatefulMemcpy(&s, buf, 1), in StatefulMemcpyTest()
264 TEST_EQ(0, s.remaining_len, "StatefulMemcpy(+1) len"); in StatefulMemcpyTest()
265 TEST_EQ(1, s.overrun, "StatefulMemcpy(+1) overrun"); in StatefulMemcpyTest()
270 StatefulInit(&s, "Small", 5); in StatefulMemcpyTest()
271 TEST_PTR_EQ(NULL, StatefulMemcpy(&s, buf, 9), "StatefulMemcpy(9) retval"); in StatefulMemcpyTest()
272 TEST_EQ(1, s.overrun, "StatefulMemcpy(9) overrun"); in StatefulMemcpyTest()
274 TEST_PTR_EQ(NULL, StatefulMemcpy(&s, buf, 4), in StatefulMemcpyTest()
276 TEST_EQ(1, s.overrun, "StatefulMemcpy(9+1) overrun"); in StatefulMemcpyTest()
280 StatefulInit(&s, "Larger", 6); in StatefulMemcpyTest()
281 TEST_PTR_EQ(NULL, StatefulMemcpy(&s, buf, -1), "StatefulMemcpy(-1) retval"); in StatefulMemcpyTest()
282 TEST_EQ(1, s.overrun, "StatefulMemcpy(-1) overrun"); in StatefulMemcpyTest()