Returns true if op has any description or summary.
| 70 | |
| 71 | // Returns true if op has any description or summary. |
| 72 | bool OpHasDocs(const OpDef& op) { |
| 73 | if (!op.summary().empty() || !op.description().empty()) { |
| 74 | return true; |
| 75 | } |
| 76 | for (const auto& arg : op.input_arg()) { |
| 77 | if (!arg.description().empty()) { |
| 78 | return true; |
| 79 | } |
| 80 | } |
| 81 | for (const auto& arg : op.output_arg()) { |
| 82 | if (!arg.description().empty()) { |
| 83 | return true; |
| 84 | } |
| 85 | } |
| 86 | for (const auto& attr : op.attr()) { |
| 87 | if (!attr.description().empty()) { |
| 88 | return true; |
| 89 | } |
| 90 | } |
| 91 | return false; |
| 92 | } |
| 93 | |
| 94 | // Returns true if summary and all descriptions are the same in op1 |
| 95 | // and op2. |
no test coverage detected