add VMATest

This commit is contained in:
Hongze Cheng 2021-10-09 17:13:40 +08:00
parent 0eb6d29210
commit 34f7051eec
3 changed files with 23 additions and 1 deletions

View File

@ -16,3 +16,8 @@ target_link_libraries(
PUBLIC tq PUBLIC tq
PUBLIC tsdb PUBLIC tsdb
) )
# test
if(${BUILD_TEST})
add_subdirectory(test)
endif(${BUILD_TEST})

View File

@ -0,0 +1,9 @@
# vnodeMemAllocatorTest
add_executable(VMATest "")
target_sources(VMATest
PRIVATE
"../src/vnodeMemAllocator.c"
"vnodeMemAllocatorTest.cpp"
)
target_include_directories(VMATest PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../inc")
target_link_libraries(VMATest os gtest_main)

View File

@ -0,0 +1,8 @@
#include <gtest/gtest.h>
#include <iostream>
#include "vnodeMemAllocator.h"
TEST(VMATest, basic_create_and_destroy_test) {
std::cout << "Hello, this is VMA test" << std::endl;
}