Return reverse of "key". Used to test non-lexicographic comparators.
| 26 | // Return reverse of "key". |
| 27 | // Used to test non-lexicographic comparators. |
| 28 | static std::string Reverse(const Slice& key) { |
| 29 | std::string str(key.ToString()); |
| 30 | std::string rev(""); |
| 31 | for (std::string::reverse_iterator rit = str.rbegin(); rit != str.rend(); |
| 32 | ++rit) { |
| 33 | rev.push_back(*rit); |
| 34 | } |
| 35 | return rev; |
| 36 | } |
| 37 | |
| 38 | namespace { |
| 39 | class ReverseKeyComparator : public Comparator { |
no test coverage detected