Lines Matching refs:int32_t

28   EXPECT_EQ(SafeAdd(std::numeric_limits<int32_t>::max(), 1),  in TEST()
29 std::numeric_limits<int32_t>::min()); in TEST()
34 EXPECT_EQ(SafeAdd(std::numeric_limits<int32_t>::max() - 1, 1), in TEST()
35 std::numeric_limits<int32_t>::max()); in TEST()
39 EXPECT_EQ(SafeAdd(std::numeric_limits<int32_t>::min() + 1, -1), in TEST()
40 std::numeric_limits<int32_t>::min()); in TEST()
44 EXPECT_EQ(SafeAdd(int32_t(-1), -1), -2); in TEST()
47 EXPECT_EQ(SafeAdd(int32_t(1), 1), 2); in TEST()
50 EXPECT_EQ(SafeAdd(int32_t(-1), 1), 0); in TEST()
53 EXPECT_EQ(SafeAdd(int32_t(1), -1), 0); in TEST()
57 EXPECT_EQ(SafeAdd(int32_t(1), int8_t(-1)), 0); in TEST()
63 EXPECT_EQ(SafeSub(std::numeric_limits<int32_t>::min(), 1), in TEST()
64 std::numeric_limits<int32_t>::max()); in TEST()
69 EXPECT_EQ(SafeSub(std::numeric_limits<int32_t>::max() - 1, -1), in TEST()
70 std::numeric_limits<int32_t>::max()); in TEST()
74 EXPECT_EQ(SafeSub(std::numeric_limits<int32_t>::min() + 1, 1), in TEST()
75 std::numeric_limits<int32_t>::min()); in TEST()
79 EXPECT_EQ(SafeSub(int32_t(-1), -1), 0); in TEST()
82 EXPECT_EQ(SafeSub(int32_t(1), 1), 0); in TEST()
85 EXPECT_EQ(SafeSub(int32_t(-1), 1), -2); in TEST()
88 EXPECT_EQ(SafeSub(int32_t(1), -1), 2); in TEST()
92 EXPECT_EQ(SafeAdd(int32_t(1), int8_t(-1)), 0); in TEST()
98 EXPECT_EQ(SafeMul(std::numeric_limits<int32_t>::max(), 2), in TEST()
104 EXPECT_EQ(SafeMul(std::numeric_limits<int32_t>::max() / 2, 2), in TEST()
105 std::numeric_limits<int32_t>::max() - 1); // -1 as LSB is lost by division. in TEST()
109 EXPECT_EQ(SafeMul(std::numeric_limits<int32_t>::min() / 2, 2), in TEST()
110 std::numeric_limits<int32_t>::min()); in TEST()
114 EXPECT_EQ(SafeMul(int32_t(-1), -1), 1); in TEST()
117 EXPECT_EQ(SafeMul(int32_t(1), 1), 1); in TEST()
120 EXPECT_EQ(SafeMul(int32_t(-1), 1), -1); in TEST()
123 EXPECT_EQ(SafeMul(int32_t(1), -1), -1); in TEST()
127 EXPECT_EQ(SafeMul(int32_t(1), int8_t(-1)), -1); in TEST()