mirror of
https://github.com/Cuprate/cuprate.git
synced 2024-12-22 19:49:28 +00:00
database: test heed get_range
This commit is contained in:
parent
f3c1a5c2aa
commit
9ebdd55f36
1 changed files with 4 additions and 1 deletions
|
@ -360,7 +360,7 @@ fn tables_are_sorted() {
|
|||
// Insert range, assert each new
|
||||
// number inserted is the minimum `last()` value.
|
||||
for key in RANGE {
|
||||
table.put(&key, &0).unwrap();
|
||||
table.put(&key, &(key as u64)).unwrap();
|
||||
table.contains(&key).unwrap();
|
||||
let (first, _) = table.first().unwrap();
|
||||
let (last, _) = table.last().unwrap();
|
||||
|
@ -384,6 +384,9 @@ fn tables_are_sorted() {
|
|||
assert_eq!(i, iter);
|
||||
assert_eq!(iter, key);
|
||||
}
|
||||
for (v, vv) in table.get_range(100..249).unwrap().zip(100..249) {
|
||||
assert_eq!(v.unwrap(), vv);
|
||||
}
|
||||
}
|
||||
|
||||
let mut table = env_inner.open_db_rw::<TestTable>(&tx_rw).unwrap();
|
||||
|
|
Loading…
Reference in a new issue