Commit 2445cae9 authored by Bradley C. Kuszmaul's avatar Bradley C. Kuszmaul

Made sure that get and work do something useful through the c++ interface. Fixes #220.

git-svn-id: file:///svn/tokudb@1336 c7de825b-a66e-492c-adef-691d508d4ae1
parent 47c8db42
......@@ -97,10 +97,20 @@ void test_db_exceptions (void) {
TC(curs->get(&key, &val, -1), EINVAL); // bad flags
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.put(0, &key, &val, -1), EINVAL);
{
Dbt key,val;
TC(db.del(0, &key, -1), EINVAL);
TC(db.get(0, &key, &val, -1), EINVAL);
TC(db.put(0, &key, &val, -1), EINVAL);
}
{
Dbt key((char*)"hello", 6);
Dbt val((char*)"there", 6);
Dbt valget;
TC(db.put(0, &key, &val, 0), 0);
TC(db.get(0, &key, &valget, 0), 0);
assert(strcmp((const char*)(valget.get_data()), "there")==0);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment