提交 eb9d3f21 编写于 作者: H Hongze Cheng

more TDB

上级 c9fe5301
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
extern "C" { extern "C" {
#endif #endif
typedef struct STDb STDb; typedef struct STDb STDb;
typedef struct STDbC STDbC;
int tdbDbOpen(const char *fname, int keyLen, int valLen, FKeyComparator keyCmprFn, STEnv *pEnv, STDb **ppDb); int tdbDbOpen(const char *fname, int keyLen, int valLen, FKeyComparator keyCmprFn, STEnv *pEnv, STDb **ppDb);
int tdbDbClose(STDb *pDb); int tdbDbClose(STDb *pDb);
......
...@@ -6,10 +6,10 @@ TEST(tdb_test, simple_test) { ...@@ -6,10 +6,10 @@ TEST(tdb_test, simple_test) {
int ret; int ret;
STEnv *pEnv; STEnv *pEnv;
STDb *pDb; STDb *pDb;
int nData = 50000; int nData = 200000;
// Open Env // Open Env
ret = tdbEnvOpen("tdb", 1024, 2560, &pEnv); ret = tdbEnvOpen("tdb", 1024, 25600, &pEnv);
GTEST_ASSERT_EQ(ret, 0); GTEST_ASSERT_EQ(ret, 0);
// Create a database // Create a database
...@@ -44,6 +44,9 @@ TEST(tdb_test, simple_test) { ...@@ -44,6 +44,9 @@ TEST(tdb_test, simple_test) {
GTEST_ASSERT_EQ(memcmp(val, pVal, vLen), 0); GTEST_ASSERT_EQ(memcmp(val, pVal, vLen), 0);
} }
} }
{ // Loop to query the data
}
} }
ret = tdbDbDrop(pDb); ret = tdbDbDrop(pDb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册