diff options
Diffstat (limited to 'cpp/test/Freeze/cursor/Client.cpp')
-rw-r--r-- | cpp/test/Freeze/cursor/Client.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/cpp/test/Freeze/cursor/Client.cpp b/cpp/test/Freeze/cursor/Client.cpp index 79ecd512782..1bd50da5e54 100644 --- a/cpp/test/Freeze/cursor/Client.cpp +++ b/cpp/test/Freeze/cursor/Client.cpp @@ -142,6 +142,23 @@ run(int argc, char* argv[], const DBEnvironmentPtr& dbEnv) cursor->close(); cout << "ok" << endl; + cout << "testing contains... "; + try + { + for (j = alphabet.begin(); j != alphabet.end(); ++j) + { + k = KeyCodec::write(*j, instance); + test(db->contains(k)); + } + } + catch(const DBException&) + { + test(false); + } + k = KeyCodec::write('0', instance); + test(!db->contains(k)); + cout << "ok" << endl; + cout << "testing DB::getCursorAtKey... "; k = KeyCodec::write('n', instance); j = find(alphabet.begin(), alphabet.end(), 'n'); |