1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-01 17:39:21 +03:00

add Db::del and Db::get and check that their exceptions are OK. Fixes #219.

git-svn-id: file:///svn/tokudb@1335 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Bradley C. Kuszmaul
2007-12-23 01:25:54 +00:00
parent d2667c2627
commit ad0a6695b5
5 changed files with 21 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
#include <db_cxx.h>
#include <errno.h>
#include <unistd.h>
#include <stdlib.h>
#define TC(expr, expect) ({ \
try { \
@@ -97,8 +98,8 @@ void test_db_exceptions (void) {
curs->close(); // no deleting cursors.
}
Dbt key,val;
//TC(db.del(0, &key, -1), EINVAL);
//TC(db.get(0, &key, &val, -1), EINVAL);
TC(db.del(0, &key, -1), EINVAL);
TC(db.get(0, &key, &val, -1), EINVAL);
TC(db.put(0, &key, &val, -1), EINVAL);
}
@@ -106,5 +107,6 @@ void test_db_exceptions (void) {
int main(int argc, char *argv[]) {
test_env_exceptions();
test_db_exceptions();
system("rm *.tokulog");
return 0;
}