Lines Matching refs:safe
17 SkSafeMath safe; in DEF_TEST() local
18 REPORTER_ASSERT(r, safe.add(halfMax, halfMax) == 2 * halfMax); in DEF_TEST()
19 REPORTER_ASSERT(r, safe); in DEF_TEST()
20 REPORTER_ASSERT(r, safe.add(halfMax, halfMaxPlus1) == max); in DEF_TEST()
21 REPORTER_ASSERT(r, safe); in DEF_TEST()
22 REPORTER_ASSERT(r, safe.add(max, 1) == 0); in DEF_TEST()
23 REPORTER_ASSERT(r, !safe); in DEF_TEST()
27 SkSafeMath safe; in DEF_TEST() local
28 (void) safe.add(max, max); in DEF_TEST()
29 REPORTER_ASSERT(r, !safe); in DEF_TEST()
37 SkSafeMath safe; in DEF_TEST() local
38 REPORTER_ASSERT(r, safe.mul(sqrtMax, sqrtMax) == sqrtMax * sqrtMax); in DEF_TEST()
39 REPORTER_ASSERT(r, safe); in DEF_TEST()
40 REPORTER_ASSERT(r, safe.mul(sqrtMax, sqrtMaxPlus1) == sqrtMax << halfBits); in DEF_TEST()
41 REPORTER_ASSERT(r, safe); in DEF_TEST()
42 REPORTER_ASSERT(r, safe.mul(sqrtMaxPlus1, sqrtMaxPlus1) == 0); in DEF_TEST()
43 REPORTER_ASSERT(r, !safe); in DEF_TEST()
47 SkSafeMath safe; in DEF_TEST() local
48 (void) safe.mul(max, max); in DEF_TEST()
49 REPORTER_ASSERT(r, !safe); in DEF_TEST()