Lines Matching refs:SafeAdd
28 EXPECT_EQ(SafeAdd(std::numeric_limits<int32_t>::max(), 1), in TEST()
30 EXPECT_EQ(SafeAdd(std::numeric_limits<int64_t>::max(), 1), in TEST()
34 EXPECT_EQ(SafeAdd(std::numeric_limits<int32_t>::max() - 1, 1), in TEST()
36 EXPECT_EQ(SafeAdd(std::numeric_limits<int64_t>::max() - 1, 1), in TEST()
39 EXPECT_EQ(SafeAdd(std::numeric_limits<int32_t>::min() + 1, -1), in TEST()
41 EXPECT_EQ(SafeAdd(std::numeric_limits<int64_t>::min() + 1, -1), in TEST()
44 EXPECT_EQ(SafeAdd(int32_t(-1), -1), -2); in TEST()
45 EXPECT_EQ(SafeAdd(int64_t(-1), -1), -2); in TEST()
47 EXPECT_EQ(SafeAdd(int32_t(1), 1), 2); in TEST()
48 EXPECT_EQ(SafeAdd(int64_t(1), 1), 2); in TEST()
50 EXPECT_EQ(SafeAdd(int32_t(-1), 1), 0); in TEST()
51 EXPECT_EQ(SafeAdd(int64_t(-1), 1), 0); in TEST()
53 EXPECT_EQ(SafeAdd(int32_t(1), -1), 0); in TEST()
54 EXPECT_EQ(SafeAdd(int64_t(1), -1), 0); in TEST()
57 EXPECT_EQ(SafeAdd(int32_t(1), int8_t(-1)), 0); in TEST()
58 EXPECT_EQ(SafeAdd(int64_t(1), int8_t(-1)), 0); in TEST()
92 EXPECT_EQ(SafeAdd(int32_t(1), int8_t(-1)), 0); in TEST()
93 EXPECT_EQ(SafeAdd(int64_t(1), int8_t(-1)), 0); in TEST()