reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced

References

unittests/Support/MathExtrasTest.cpp
  326   EXPECT_EQ(T(6), SaturatingMultiply(T(2), T(3), &ResultOverflowed));
  327   EXPECT_FALSE(ResultOverflowed);
  330   EXPECT_EQ(T(6), SaturatingMultiply(T(3), T(2), &ResultOverflowed));
  331   EXPECT_FALSE(ResultOverflowed);
  335   EXPECT_EQ(T(0), SaturatingMultiply(T(0), T(0), &ResultOverflowed));
  336   EXPECT_FALSE(ResultOverflowed);
  339   EXPECT_EQ(T(0), SaturatingMultiply(T(1), T(0), &ResultOverflowed));
  340   EXPECT_FALSE(ResultOverflowed);
  343   EXPECT_EQ(T(0), SaturatingMultiply(T(0), T(1), &ResultOverflowed));
  344   EXPECT_FALSE(ResultOverflowed);
  347   EXPECT_EQ(T(0), SaturatingMultiply(Max, T(0), &ResultOverflowed));
  348   EXPECT_FALSE(ResultOverflowed);
  351   EXPECT_EQ(T(0), SaturatingMultiply(T(0), Max, &ResultOverflowed));
  352   EXPECT_FALSE(ResultOverflowed);
  356   EXPECT_EQ(Max, SaturatingMultiply(Max, T(2), &ResultOverflowed));
  357   EXPECT_TRUE(ResultOverflowed);
  360   EXPECT_EQ(Max, SaturatingMultiply(T(2), Max, &ResultOverflowed));
  361   EXPECT_TRUE(ResultOverflowed);
  364   EXPECT_EQ(Max, SaturatingMultiply(Max, Max, &ResultOverflowed));
  365   EXPECT_TRUE(ResultOverflowed);
  380         EXPECT_EQ(Max, SaturatingMultiply(X, Y, &ResultOverflowed));
  381         EXPECT_TRUE(ResultOverflowed);
  384         EXPECT_EQ(X * Y, SaturatingMultiply(X, Y, &ResultOverflowed));
  385         EXPECT_FALSE(ResultOverflowed);