This commit is contained in:
Hongze Cheng 2021-11-08 13:55:51 +08:00
parent 244b346f1c
commit e7c9b83a9e
2 changed files with 10 additions and 4 deletions

View File

@ -74,7 +74,7 @@ static SVnode *vnodeNew(const char *path, const SVnodeOptions *pVnodeOptions) {
pVnode->path = strdup(path); pVnode->path = strdup(path);
vnodeOptionsCopy(&(pVnode->options), pVnodeOptions); vnodeOptionsCopy(&(pVnode->options), pVnodeOptions);
return NULL; return pVnode;
} }
static void vnodeFree(SVnode *pVnode) { static void vnodeFree(SVnode *pVnode) {

View File

@ -1,7 +1,13 @@
#include <gtest/gtest.h> #include <gtest/gtest.h>
#include <iostream> #include <iostream>
TEST(vnodeApiTest, vnodeOpen_test) { #include "vnode.h"
// TODO
std::cout << "This is in vnodeApiTest" << std::endl; TEST(vnodeApiTest, vnodeOpen_vnodeClose_test) {
// Create and open a vnode
SVnode *pVnode = vnodeOpen("vnode1", NULL);
ASSERT_NE(pVnode, nullptr);
// Close the vnode
vnodeClose(pVnode);
} }