1
0
Fork 0

Test fixes

This commit is contained in:
Simon Grätzer 2017-05-24 19:21:56 +02:00
parent 555a7fcecd
commit b0e5f4adc8
1 changed files with 5 additions and 5 deletions

View File

@ -237,18 +237,18 @@ TEST_CASE("RocksDBKeyBoundsTest", "[rocksdbkeybounds]") {
/// @brief test geo index key and bounds consistency
SECTION("test_geo_index") {
RocksDBComparator cmp;
rocksdb::Comparator const* cmp = rocksdb::BytewiseComparator();
RocksDBKey k1 = RocksDBKey::GeoIndexValue(256, 128, false);
RocksDBKeyBounds bb1 = RocksDBKeyBounds::GeoIndex(256, false);
CHECK(cmp.Compare(k1.string(), bb1.start()) > 0);
CHECK(cmp.Compare(k1.string(), bb1.end()) < 0);
CHECK(cmp->Compare(k1.string(), bb1.start()) > 0);
CHECK(cmp->Compare(k1.string(), bb1.end()) < 0);
RocksDBKey k2 = RocksDBKey::GeoIndexValue(256, 128, true);
RocksDBKeyBounds bb2 = RocksDBKeyBounds::GeoIndex(256, true);
CHECK(cmp.Compare(k2.string(), bb2.start()) > 0);
CHECK(cmp.Compare(k2.string(), bb2.end()) < 0);
CHECK(cmp->Compare(k2.string(), bb2.start()) > 0);
CHECK(cmp->Compare(k2.string(), bb2.end()) < 0);
}
}