| 67 | } |
| 68 | |
| 69 | void TestAllApiDefsHaveCorrespondingOp( |
| 70 | const OpList& ops, const std::unordered_map<string, ApiDef>& api_defs_map) { |
| 71 | std::unordered_set<string> op_names; |
| 72 | for (const auto& op : ops.op()) { |
| 73 | op_names.insert(op.name()); |
| 74 | } |
| 75 | for (const auto& name_and_api_def : api_defs_map) { |
| 76 | ASSERT_TRUE(op_names.find(name_and_api_def.first) != op_names.end()) |
| 77 | << name_and_api_def.first << " op has ApiDef but missing from ops. " |
| 78 | << "Does api_def_" << name_and_api_def.first << " need to be deleted?"; |
| 79 | } |
| 80 | } |
| 81 | |
| 82 | void TestAllApiDefInputArgsAreValid( |
| 83 | const OpList& ops, const std::unordered_map<string, ApiDef>& api_defs_map) { |