summaryrefslogtreecommitdiff
path: root/mlir/unittests/Support/MathExtrasTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/unittests/Support/MathExtrasTest.cpp')
-rw-r--r--mlir/unittests/Support/MathExtrasTest.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/mlir/unittests/Support/MathExtrasTest.cpp b/mlir/unittests/Support/MathExtrasTest.cpp
deleted file mode 100644
index 6ece2dc56083..000000000000
--- a/mlir/unittests/Support/MathExtrasTest.cpp
+++ /dev/null
@@ -1,31 +0,0 @@
-//===- MathExtrasTest.cpp - MathExtras Tests ------------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "mlir/Support/MathExtras.h"
-#include "gmock/gmock.h"
-
-using namespace mlir;
-using ::testing::Eq;
-
-TEST(MathExtrasTest, CeilDivTest) {
- EXPECT_THAT(ceilDiv(14, 3), Eq(5));
- EXPECT_THAT(ceilDiv(14, -3), Eq(-4));
- EXPECT_THAT(ceilDiv(-14, -3), Eq(5));
- EXPECT_THAT(ceilDiv(-14, 3), Eq(-4));
- EXPECT_THAT(ceilDiv(0, 3), Eq(0));
- EXPECT_THAT(ceilDiv(0, -3), Eq(0));
-}
-
-TEST(MathExtrasTest, FloorDivTest) {
- EXPECT_THAT(floorDiv(14, 3), Eq(4));
- EXPECT_THAT(floorDiv(14, -3), Eq(-5));
- EXPECT_THAT(floorDiv(-14, -3), Eq(4));
- EXPECT_THAT(floorDiv(-14, 3), Eq(-5));
- EXPECT_THAT(floorDiv(0, 3), Eq(0));
- EXPECT_THAT(floorDiv(0, -3), Eq(0));
-}