Lines Matching full:max

225   const T Max = std::numeric_limits<T>::max();  in SaturatingAddTestHelper()  local
232 EXPECT_EQ(Max, SaturatingAdd(Max, T(1))); in SaturatingAddTestHelper()
233 EXPECT_EQ(Max, SaturatingAdd(Max, T(1), &ResultOverflowed)); in SaturatingAddTestHelper()
236 EXPECT_EQ(Max, SaturatingAdd(T(1), T(Max - 1))); in SaturatingAddTestHelper()
237 EXPECT_EQ(Max, SaturatingAdd(T(1), T(Max - 1), &ResultOverflowed)); in SaturatingAddTestHelper()
240 EXPECT_EQ(Max, SaturatingAdd(T(1), Max)); in SaturatingAddTestHelper()
241 EXPECT_EQ(Max, SaturatingAdd(T(1), Max, &ResultOverflowed)); in SaturatingAddTestHelper()
244 EXPECT_EQ(Max, SaturatingAdd(Max, Max)); in SaturatingAddTestHelper()
245 EXPECT_EQ(Max, SaturatingAdd(Max, Max, &ResultOverflowed)); in SaturatingAddTestHelper()
259 const T Max = std::numeric_limits<T>::max(); in SaturatingMultiplyTestHelper() local
284 EXPECT_EQ(T(0), SaturatingMultiply(Max, T(0))); in SaturatingMultiplyTestHelper()
285 EXPECT_EQ(T(0), SaturatingMultiply(Max, T(0), &ResultOverflowed)); in SaturatingMultiplyTestHelper()
288 EXPECT_EQ(T(0), SaturatingMultiply(T(0), Max)); in SaturatingMultiplyTestHelper()
289 EXPECT_EQ(T(0), SaturatingMultiply(T(0), Max, &ResultOverflowed)); in SaturatingMultiplyTestHelper()
293 EXPECT_EQ(Max, SaturatingMultiply(Max, T(2))); in SaturatingMultiplyTestHelper()
294 EXPECT_EQ(Max, SaturatingMultiply(Max, T(2), &ResultOverflowed)); in SaturatingMultiplyTestHelper()
297 EXPECT_EQ(Max, SaturatingMultiply(T(2), Max)); in SaturatingMultiplyTestHelper()
298 EXPECT_EQ(Max, SaturatingMultiply(T(2), Max, &ResultOverflowed)); in SaturatingMultiplyTestHelper()
301 EXPECT_EQ(Max, SaturatingMultiply(Max, Max)); in SaturatingMultiplyTestHelper()
302 EXPECT_EQ(Max, SaturatingMultiply(Max, Max, &ResultOverflowed)); in SaturatingMultiplyTestHelper()
317 EXPECT_EQ(Max, SaturatingMultiply(X, Y)); in SaturatingMultiplyTestHelper()
318 EXPECT_EQ(Max, SaturatingMultiply(X, Y, &ResultOverflowed)); in SaturatingMultiplyTestHelper()
339 const T Max = std::numeric_limits<T>::max(); in SaturatingMultiplyAddTestHelper() local
348 EXPECT_EQ(Max, SaturatingMultiplyAdd(Max, Max, T(0), &ResultOverflowed)); in SaturatingMultiplyAddTestHelper()
352 EXPECT_EQ(Max, SaturatingMultiplyAdd(T(1), T(1), Max, &ResultOverflowed)); in SaturatingMultiplyAddTestHelper()
355 // Test multiply-add with Max as operand in SaturatingMultiplyAddTestHelper()
356 EXPECT_EQ(Max, SaturatingMultiplyAdd(T(1), T(1), Max, &ResultOverflowed)); in SaturatingMultiplyAddTestHelper()
359 EXPECT_EQ(Max, SaturatingMultiplyAdd(T(1), Max, T(1), &ResultOverflowed)); in SaturatingMultiplyAddTestHelper()
362 EXPECT_EQ(Max, SaturatingMultiplyAdd(Max, Max, T(1), &ResultOverflowed)); in SaturatingMultiplyAddTestHelper()
365 EXPECT_EQ(Max, SaturatingMultiplyAdd(Max, Max, Max, &ResultOverflowed)); in SaturatingMultiplyAddTestHelper()