mirror of https://gitee.com/bigwinds/arangodb
Test fixes
This commit is contained in:
parent
555a7fcecd
commit
b0e5f4adc8
|
@ -237,18 +237,18 @@ TEST_CASE("RocksDBKeyBoundsTest", "[rocksdbkeybounds]") {
|
||||||
/// @brief test geo index key and bounds consistency
|
/// @brief test geo index key and bounds consistency
|
||||||
SECTION("test_geo_index") {
|
SECTION("test_geo_index") {
|
||||||
|
|
||||||
RocksDBComparator cmp;
|
rocksdb::Comparator const* cmp = rocksdb::BytewiseComparator();
|
||||||
|
|
||||||
RocksDBKey k1 = RocksDBKey::GeoIndexValue(256, 128, false);
|
RocksDBKey k1 = RocksDBKey::GeoIndexValue(256, 128, false);
|
||||||
RocksDBKeyBounds bb1 = RocksDBKeyBounds::GeoIndex(256, false);
|
RocksDBKeyBounds bb1 = RocksDBKeyBounds::GeoIndex(256, false);
|
||||||
|
|
||||||
CHECK(cmp.Compare(k1.string(), bb1.start()) > 0);
|
CHECK(cmp->Compare(k1.string(), bb1.start()) > 0);
|
||||||
CHECK(cmp.Compare(k1.string(), bb1.end()) < 0);
|
CHECK(cmp->Compare(k1.string(), bb1.end()) < 0);
|
||||||
|
|
||||||
RocksDBKey k2 = RocksDBKey::GeoIndexValue(256, 128, true);
|
RocksDBKey k2 = RocksDBKey::GeoIndexValue(256, 128, true);
|
||||||
RocksDBKeyBounds bb2 = RocksDBKeyBounds::GeoIndex(256, true);
|
RocksDBKeyBounds bb2 = RocksDBKeyBounds::GeoIndex(256, true);
|
||||||
CHECK(cmp.Compare(k2.string(), bb2.start()) > 0);
|
CHECK(cmp->Compare(k2.string(), bb2.start()) > 0);
|
||||||
CHECK(cmp.Compare(k2.string(), bb2.end()) < 0);
|
CHECK(cmp->Compare(k2.string(), bb2.end()) < 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue