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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user