Lines Matching refs:safe_add
184 a=SCHAR_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b));
185 a=SCHAR_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b));
186 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
187 a=-10; b=-11; EXPECT_TRUE(safe_add(NULL, a, b));
188 a=SCHAR_MIN; b=SCHAR_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
189 a=SCHAR_MIN+1; b=-1; EXPECT_TRUE(safe_add(NULL, a, b));
190 a=SCHAR_MAX/2; b=SCHAR_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b));
197 a=SHRT_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b));
198 a=SHRT_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b));
199 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
200 a=SHRT_MIN; b=SHRT_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
201 a=SHRT_MAX/2; b=SHRT_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b));
208 a=INT_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b));
209 a=INT_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b));
210 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
211 a=INT_MIN; b=INT_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
212 a=INT_MAX/2; b=INT_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b));
219 a=SAFE_INT64_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b));
220 a=SAFE_INT64_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b));
221 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
222 a=SAFE_INT64_MIN; b=SAFE_INT64_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
223 a=SAFE_INT64_MAX/2; b=SAFE_INT64_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b));
230 a=LONG_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b));
231 a=LONG_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b));
232 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
233 a=LONG_MIN; b=LONG_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
234 a=LONG_MAX/2; b=LONG_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b));
240 a=LLONG_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b));
241 a=LLONG_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b));
242 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
243 a=LLONG_MIN; b=LLONG_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
244 a=LLONG_MAX/2; b=LLONG_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b));
250 a=SSIZE_MIN; b=-1; EXPECT_FALSE(safe_add(NULL, a, b));
251 a=SSIZE_MAX; b=1; EXPECT_FALSE(safe_add(NULL, a, b));
252 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
253 a=SSIZE_MIN; b=SSIZE_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
254 a=SSIZE_MAX/2; b=SSIZE_MAX/2; EXPECT_TRUE(safe_add(NULL, a, b));
261 a=1; b=UCHAR_MAX; EXPECT_FALSE(safe_add(NULL, a, b));
262 a=UCHAR_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b));
263 a=UCHAR_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b));
264 a=UCHAR_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b));
265 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
266 a=0; b=UCHAR_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
273 a=1; b=USHRT_MAX; EXPECT_FALSE(safe_add(NULL, a, b));
274 a=USHRT_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b));
275 a=USHRT_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b));
276 a=USHRT_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b));
277 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
278 a=0; b=USHRT_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
285 a=1; b=UINT_MAX; EXPECT_FALSE(safe_add(NULL, a, b));
286 a=UINT_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b));
287 a=UINT_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b));
288 a=UINT_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b));
289 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
290 a=0; b=UINT_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
297 a=1; b=SAFE_UINT64_MAX; EXPECT_FALSE(safe_add(NULL, a, b));
298 a=SAFE_UINT64_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b));
299 a=SAFE_UINT64_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b));
300 a=SAFE_UINT64_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b));
301 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
302 a=0; b=SAFE_UINT64_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
309 a=1; b=ULONG_MAX; EXPECT_FALSE(safe_add(NULL, a, b));
310 a=ULONG_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b));
311 a=ULONG_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b));
312 a=ULONG_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b));
313 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
314 a=0; b=ULONG_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
321 a=1; b=ULLONG_MAX; EXPECT_FALSE(safe_add(NULL, a, b));
322 a=ULLONG_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b));
323 a=ULLONG_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b));
324 a=ULLONG_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b));
325 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
326 a=0; b=ULLONG_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
333 a=1; b=SIZE_MAX; EXPECT_FALSE(safe_add(NULL, a, b));
334 a=SIZE_MAX/2; b=a+2; EXPECT_FALSE(safe_add(NULL, a, b));
335 a=SIZE_MAX/2; b=a; EXPECT_TRUE(safe_add(NULL, a, b));
336 a=SIZE_MAX/2; b=a+1; EXPECT_TRUE(safe_add(NULL, a, b));
337 a=10; b=11; EXPECT_TRUE(safe_add(NULL, a, b));
338 a=0; b=SIZE_MAX; EXPECT_TRUE(safe_add(NULL, a, b));
347 EXPECT_FALSE(safe_add(NULL, a, b));
348 EXPECT_FALSE(safe_add(NULL, b, c));
349 EXPECT_FALSE(safe_add(NULL, a, c));
358 EXPECT_TRUE(safe_add(cur++, a++, b));