Lines Matching full:safe
20 SkSafeMath safe; in DEF_TEST() local
21 REPORTER_ASSERT(r, safe.add(halfMax, halfMax) == 2 * halfMax); in DEF_TEST()
22 REPORTER_ASSERT(r, safe); in DEF_TEST()
23 REPORTER_ASSERT(r, safe.add(halfMax, halfMaxPlus1) == max); in DEF_TEST()
24 REPORTER_ASSERT(r, safe); in DEF_TEST()
25 REPORTER_ASSERT(r, safe.add(max, 1) == 0); in DEF_TEST()
26 REPORTER_ASSERT(r, !safe); in DEF_TEST()
30 SkSafeMath safe; in DEF_TEST() local
31 (void) safe.add(max, max); in DEF_TEST()
32 REPORTER_ASSERT(r, !safe); in DEF_TEST()
40 SkSafeMath safe; in DEF_TEST() local
41 REPORTER_ASSERT(r, safe.mul(sqrtMax, sqrtMax) == sqrtMax * sqrtMax); in DEF_TEST()
42 REPORTER_ASSERT(r, safe); in DEF_TEST()
43 REPORTER_ASSERT(r, safe.mul(sqrtMax, sqrtMaxPlus1) == sqrtMax << halfBits); in DEF_TEST()
44 REPORTER_ASSERT(r, safe); in DEF_TEST()
45 REPORTER_ASSERT(r, safe.mul(sqrtMaxPlus1, sqrtMaxPlus1) == 0); in DEF_TEST()
46 REPORTER_ASSERT(r, !safe); in DEF_TEST()
50 SkSafeMath safe; in DEF_TEST() local
51 (void) safe.mul(max, max); in DEF_TEST()
52 REPORTER_ASSERT(r, !safe); in DEF_TEST()