Home
last modified time | relevance | path

Searched refs:checkedAdd (Results 1 – 15 of 15) sorted by relevance

/external/swiftshader/third_party/llvm-7.0/llvm/unittests/Support/
DCheckedArithmeticTest.cpp11 EXPECT_EQ(checkedAdd<int64_t>(Max, Max), None); in TEST()
12 EXPECT_EQ(checkedAdd<int64_t>(Min, -1), None); in TEST()
13 EXPECT_EQ(checkedAdd<int64_t>(Max, 1), None); in TEST()
14 EXPECT_EQ(checkedAdd<int64_t>(10, 1), Optional<int64_t>(11)); in TEST()
20 EXPECT_EQ(checkedAdd<int16_t>(Max, Max), None); in TEST()
21 EXPECT_EQ(checkedAdd<int16_t>(Min, -1), None); in TEST()
22 EXPECT_EQ(checkedAdd<int16_t>(Max, 1), None); in TEST()
23 EXPECT_EQ(checkedAdd<int16_t>(10, 1), Optional<int64_t>(11)); in TEST()
/external/opencensus-java/api/src/test/java/io/opencensus/common/
DTimeUtilsTest.java44 TimeUtils.checkedAdd(Long.MIN_VALUE + 1, -2); in checkedAdd_TooLow()
51 TimeUtils.checkedAdd(Long.MAX_VALUE - 1, 2); in checkedAdd_TooHigh()
56 assertThat(TimeUtils.checkedAdd(1, 2)).isEqualTo(3); in checkedAdd_Valid()
57 assertThat(TimeUtils.checkedAdd(Integer.MAX_VALUE, Integer.MAX_VALUE)) in checkedAdd_Valid()
/external/opencensus-java/api/src/main/java/io/opencensus/common/
DTimestamp.java176 long epochSec = TimeUtils.checkedAdd(getSeconds(), secondsToAdd); in plus()
177 epochSec = TimeUtils.checkedAdd(epochSec, nanosToAdd / NANOS_PER_SECOND); in plus()
186 long secs = TimeUtils.checkedAdd(epochSecond, floorDiv(nanoAdjustment, NANOS_PER_SECOND)); in ofEpochSecond()
DTimeUtils.java52 static long checkedAdd(long x, long y) { in checkedAdd() method in TimeUtils
/external/swiftshader/third_party/llvm-7.0/llvm/include/llvm/Support/
DCheckedArithmetic.h49 checkedAdd(T LHS, T RHS) { in checkedAdd() function
69 return checkedAdd(*Product, C); in checkedMulAdd()
/external/guava/guava-tests/benchmark/com/google/common/math/
DApacheBenchmark.java65 IntMath.checkedAdd(a, b); in noAddOverflow()
75 LongMath.checkedAdd(a, b); in noAddOverflow()
/external/opencensus-java/testing/src/main/java/io/opencensus/testing/common/
DTestClock.java101 return LongMath.checkedAdd( in getNanos()
/external/grpc-grpc-java/core/src/main/java/io/grpc/internal/
DServiceConfigUtil.java21 import static com.google.common.math.LongMath.checkedAdd;
464 seconds = checkedAdd(seconds, nanos / NANOS_PER_SECOND);
/external/guava/guava-gwt/src-super/com/google/common/math/super/com/google/common/math/
DIntMath.java293 public static int checkedAdd(int a, int b) { in checkedAdd() method
/external/guava/guava/src/com/google/common/math/
DIntMath.java414 public static int checkedAdd(int a, int b) { in checkedAdd() method
DLongMath.java508 public static long checkedAdd(long a, long b) { in checkedAdd() method
/external/guava/guava-gwt/test-super/com/google/common/math/super/com/google/common/math/
DIntMathTest.java241 assertEquals(a + b, IntMath.checkedAdd(a, b)); in testCheckedAdd()
/external/guava/guava/src/com/google/common/collect/
DConcurrentHashMultiset.java232 int newValue = IntMath.checkedAdd(oldValue, occurrences); in add()
/external/guava/guava-tests/test/com/google/common/math/
DIntMathTest.java408 assertEquals(a + b, IntMath.checkedAdd(a, b)); in testCheckedAdd()
DLongMathTest.java482 assertEquals(a + b, LongMath.checkedAdd(a, b)); in testCheckedAdd()