| 1544 | |
| 1545 | private: |
| 1546 | static int ToNumber(const Slice& x) { |
| 1547 | // Check that there are no extra characters. |
| 1548 | ASSERT_TRUE(x.size() >= 2 && x[0] == '[' && x[x.size() - 1] == ']') |
| 1549 | << EscapeString(x); |
| 1550 | int val; |
| 1551 | char ignored; |
| 1552 | ASSERT_TRUE(sscanf(x.ToString().c_str(), "[%i]%c", &val, &ignored) == 1) |
| 1553 | << EscapeString(x); |
| 1554 | return val; |
| 1555 | } |
| 1556 | }; |
| 1557 | NumberComparator cmp; |
| 1558 | Options new_options = CurrentOptions(); |
nothing calls this directly
no test coverage detected