Lines Matching refs:int64_t
30 EXPECT_EQ(SafeAdd(std::numeric_limits<int64_t>::max(), 1), in TEST()
31 std::numeric_limits<int64_t>::min()); in TEST()
36 EXPECT_EQ(SafeAdd(std::numeric_limits<int64_t>::max() - 1, 1), in TEST()
37 std::numeric_limits<int64_t>::max()); in TEST()
41 EXPECT_EQ(SafeAdd(std::numeric_limits<int64_t>::min() + 1, -1), in TEST()
42 std::numeric_limits<int64_t>::min()); in TEST()
45 EXPECT_EQ(SafeAdd(int64_t(-1), -1), -2); in TEST()
48 EXPECT_EQ(SafeAdd(int64_t(1), 1), 2); in TEST()
51 EXPECT_EQ(SafeAdd(int64_t(-1), 1), 0); in TEST()
54 EXPECT_EQ(SafeAdd(int64_t(1), -1), 0); in TEST()
58 EXPECT_EQ(SafeAdd(int64_t(1), int8_t(-1)), 0); in TEST()
65 EXPECT_EQ(SafeSub(std::numeric_limits<int64_t>::min(), 1), in TEST()
66 std::numeric_limits<int64_t>::max()); in TEST()
71 EXPECT_EQ(SafeSub(std::numeric_limits<int64_t>::max() - 1, -1), in TEST()
72 std::numeric_limits<int64_t>::max()); in TEST()
76 EXPECT_EQ(SafeSub(std::numeric_limits<int64_t>::min() + 1, 1), in TEST()
77 std::numeric_limits<int64_t>::min()); in TEST()
80 EXPECT_EQ(SafeSub(int64_t(-1), -1), 0); in TEST()
83 EXPECT_EQ(SafeSub(int64_t(1), 1), 0); in TEST()
86 EXPECT_EQ(SafeSub(int64_t(-1), 1), -2); in TEST()
89 EXPECT_EQ(SafeSub(int64_t(1), -1), 2); in TEST()
93 EXPECT_EQ(SafeAdd(int64_t(1), int8_t(-1)), 0); in TEST()
100 EXPECT_EQ(SafeMul(std::numeric_limits<int64_t>::max(), 2), in TEST()
106 EXPECT_EQ(SafeMul(std::numeric_limits<int64_t>::max() / 2, 2), in TEST()
107 std::numeric_limits<int64_t>::max() - 1); // -1 as LSB is lost by division. in TEST()
111 EXPECT_EQ(SafeMul(std::numeric_limits<int64_t>::min() / 2, 2), in TEST()
112 std::numeric_limits<int64_t>::min()); in TEST()
115 EXPECT_EQ(SafeMul(int64_t(-1), -1), 1); in TEST()
118 EXPECT_EQ(SafeMul(int64_t(1), 1), 1); in TEST()
121 EXPECT_EQ(SafeMul(int64_t(-1), 1), -1); in TEST()
124 EXPECT_EQ(SafeMul(int64_t(1), -1), -1); in TEST()
128 EXPECT_EQ(SafeMul(int64_t(1), int8_t(-1)), -1); in TEST()