Skip to content

Commit 252fb79

Browse files
committed
fix operator test error msg mismatch
1 parent fb224ab commit 252fb79

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

paddle/fluid/framework/operator_test.cc

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -439,9 +439,8 @@ TEST(IndicateVarDataTypeTest, lodtensor) {
439439
std::string ex_msg = err.what();
440440
EXPECT_TRUE(
441441
ex_msg.find(
442-
"The Tensor in the indicate_lod_tensor_data_type_test Op's "
443-
"Input Variable LoDTensor(lodtensor_1) is not initialized") !=
444-
std::string::npos);
442+
"The indicate_lod_tensor_data_type_test Op's Input Variable "
443+
"`LoDTensor` contains uninitialized Tensor.") != std::string::npos);
445444
}
446445
ASSERT_TRUE(caught);
447446
}
@@ -466,9 +465,9 @@ TEST(IndicateVarDataTypeTest, selectedrows) {
466465
caught = true;
467466
std::string ex_msg = err.what();
468467
EXPECT_TRUE(
469-
ex_msg.find("The Tensor in the indicate_selected_rows_data_type_test "
470-
"Op's Input Variable SelectedRows(selected_rows_1) is not "
471-
"initialized") != std::string::npos);
468+
ex_msg.find("The indicate_selected_rows_data_type_test Op's "
469+
"Input Variable `SelectedRows` contains uninitialized "
470+
"Tensor.") != std::string::npos);
472471
}
473472
ASSERT_TRUE(caught);
474473
}

0 commit comments

Comments
 (0)