File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -87,8 +87,17 @@ TEST(ProgramDesc, copy_ctor) {
87
87
ASSERT_EQ (op_origin->Inputs (), op_copy->Inputs ());
88
88
ASSERT_EQ (op_origin->Outputs (), op_copy->Outputs ());
89
89
90
- ASSERT_EQ (op_copy->Proto ()->SerializeAsString (),
91
- op_origin->Proto ()->SerializeAsString ());
90
+ ASSERT_EQ (op_origin->Proto ()->attrs ().size (),
91
+ op_copy->Proto ()->attrs ().size ());
92
+ for (auto it = op_origin->Proto ()->attrs ().begin ();
93
+ it != op_origin->Proto ()->attrs ().end (); ++it) {
94
+ for (auto it_2 = op_copy->Proto ()->attrs ().begin ();
95
+ it_2 != op_copy->Proto ()->attrs ().end (); ++it_2) {
96
+ if (it->name () == it_2->name ()) {
97
+ ASSERT_TRUE (it_2->SerializeAsString () == it->SerializeAsString ());
98
+ }
99
+ }
100
+ }
92
101
93
102
if (op->Type () == " op_with_subblock" ) {
94
103
ASSERT_EQ (1 , op->GetBlockAttrId (" sub_block" ));
You can’t perform that action at this time.
0 commit comments