提交 9b8e0e2f 编写于 作者: S sneaxiy

fix enforce_test

test=develop
上级 70e5660d
......@@ -235,7 +235,13 @@ TEST(ENFORCE_USER_DEFINED_CLASS, EQ) {
TEST(ENFORCE_USER_DEFINED_CLASS, NE) {
Dims a{{1, 2, 3, 4}}, b{{5, 6, 7, 8}};
ASSERT_THROW(PADDLE_ENFORCE_EQ(a, b), paddle::platform::EnforceNotMet);
bool caught_exception = false;
try {
PADDLE_ENFORCE_EQ(a, b);
} catch (paddle::platform::EnforceNotMet&) {
caught_exception = true;
}
EXPECT_TRUE(caught_exception);
}
TEST(EOF_EXCEPTION, THROW_EOF) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册