extremeKeys[i] = extremeKeyBytes[i];
}
// with empty range
cursor = new DataCursor(view, false);
expectRange(keyBytes, 0, end);
cursor.close();
// begin key only, inclusive
for (int i = 0; i <= end; i++) {
cursor = new DataCursor(view, false, keys[i], true, null, false);
expectRange(keyBytes, i, end);
cursor.close();
}
// begin key only, exclusive
for (int i = 0; i <= end; i++) {
cursor = new DataCursor(view, false, keys[i], false, null, false);
expectRange(keyBytes, i + 1, end);
cursor.close();
}
// end key only, inclusive
for (int i = 0; i <= end; i++) {
cursor = new DataCursor(view, false, null, false, keys[i], true);
expectRange(keyBytes, 0, i);
cursor.close();
}
// end key only, exclusive
for (int i = 0; i <= end; i++) {
cursor = new DataCursor(view, false, null, false, keys[i], false);
expectRange(keyBytes, 0, i - 1);
cursor.close();
}
// begin and end keys, inclusive and exclusive
for (int i = 0; i <= end; i++) {
for (int j = i; j <= end; j++) {
// begin inclusive, end inclusive
cursor = new DataCursor(view, false, keys[i], true, keys[j],
true);
expectRange(keyBytes, i, j);
cursor.close();
// begin inclusive, end exclusive
cursor = new DataCursor(view, false, keys[i], true, keys[j],
false);
expectRange(keyBytes, i, j - 1);
cursor.close();
// begin exclusive, end inclusive
cursor = new DataCursor(view, false, keys[i], false, keys[j],
true);
expectRange(keyBytes, i + 1, j);
cursor.close();
// begin exclusive, end exclusive
cursor = new DataCursor(view, false, keys[i], false, keys[j],
false);
expectRange(keyBytes, i + 1, j - 1);
cursor.close();
}
}
// single key range
for (int i = 0; i <= end; i++) {
cursor = new DataCursor(view, false, keys[i]);
expectRange(keyBytes, i, i);
cursor.close();
}
// start with lower extreme (before any existing key)
cursor = new DataCursor(view, false, extremeKeys[0], true, null, false);
expectRange(keyBytes, 0, end);
cursor.close();
// start with higher extreme (after any existing key)
cursor = new DataCursor(view, false, null, false, extremeKeys[1], true);
expectRange(keyBytes, 0, end);
cursor.close();
}