Returns the requested number of labels: [{" _1": " _1"}, ..., {" _ ":" _ "}]
| 7673 | // Returns the requested number of labels: |
| 7674 | // [{"<key>_1": "<value>_1"}, ..., {"<key>_<count>":"<value>_<count>"}] |
| 7675 | static Labels createLabels( |
| 7676 | const string& key, |
| 7677 | const string& value, |
| 7678 | size_t count) |
| 7679 | { |
| 7680 | Labels labels; |
| 7681 | |
| 7682 | for (size_t i = 0; i < count; i++) { |
| 7683 | const string index = stringify(i); |
| 7684 | labels.add_labels()->CopyFrom(createLabel(key + index, value + index)); |
| 7685 | } |
| 7686 | |
| 7687 | return labels; |
| 7688 | } |
| 7689 | |
| 7690 | |
| 7691 | // TODO(neilc): Refactor to reduce code duplication with `DeclineOffers` test. |
no test coverage detected