[Mlir-commits] [mlir] 09ca1c0 - [mlir] Use EXPECT_DEBUG_DEATH in unit test
Stephan Herhut
llvmlistbot at llvm.org
Tue Aug 2 02:16:52 PDT 2022
Author: Stephan Herhut
Date: 2022-08-02T11:16:26+02:00
New Revision: 09ca1c065621dc2d15496f66e8378439e127183f
URL: https://github.com/llvm/llvm-project/commit/09ca1c065621dc2d15496f66e8378439e127183f
DIFF: https://github.com/llvm/llvm-project/commit/09ca1c065621dc2d15496f66e8378439e127183f.diff
LOG: [mlir] Use EXPECT_DEBUG_DEATH in unit test
This allows the tests to also pass when compiled in opt mode.
Added:
Modified:
mlir/unittests/IR/AttributeTest.cpp
Removed:
################################################################################
diff --git a/mlir/unittests/IR/AttributeTest.cpp b/mlir/unittests/IR/AttributeTest.cpp
index 5611eacd96022..8250afd3cb971 100644
--- a/mlir/unittests/IR/AttributeTest.cpp
+++ b/mlir/unittests/IR/AttributeTest.cpp
@@ -293,7 +293,7 @@ TEST(DenseResourceElementsAttrTest, CheckInvalidData) {
// Create a bool attribute with data of the incorrect type.
ArrayRef<uint32_t> data;
auto type = RankedTensorType::get(data.size(), builder.getI32Type());
- ASSERT_DEATH(
+ EXPECT_DEBUG_DEATH(
{
DenseBoolResourceElementsAttr::get(
type, "resource", UnmanagedAsmResourceBlob::allocate(data));
@@ -308,7 +308,7 @@ TEST(DenseResourceElementsAttrTest, CheckInvalidType) {
// Create a bool attribute with incorrect type.
ArrayRef<bool> data;
auto type = RankedTensorType::get(data.size(), builder.getI32Type());
- ASSERT_DEATH(
+ EXPECT_DEBUG_DEATH(
{
DenseBoolResourceElementsAttr::get(
type, "resource", UnmanagedAsmResourceBlob::allocate(data));
More information about the Mlir-commits
mailing list