From c8573045f63eff0aa3fb77c2ff8656e67bde2694 Mon Sep 17 00:00:00 2001 From: yihaoDeng Date: Fri, 8 Jul 2022 20:59:37 +0800 Subject: [PATCH] add test case --- source/libs/index/test/fstUtilUT.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/source/libs/index/test/fstUtilUT.cc b/source/libs/index/test/fstUtilUT.cc index 3a20661484..2c29758756 100644 --- a/source/libs/index/test/fstUtilUT.cc +++ b/source/libs/index/test/fstUtilUT.cc @@ -38,8 +38,15 @@ class FstRegexEnv : public ::testing::Test { class FstSparseSetEnv : public ::testing::Test { protected: - virtual void SetUp() { set = sparSetCreate(256); } - virtual void TearDown() { sparSetDestroy(set); } + virtual void SetUp() { set = sparSetCreate(256); } + virtual void TearDown() { + // tear down + sparSetDestroy(set); + } + void ReBuild(int32_t sz) { + sparSetDestroy(set); + set = sparSetCreate(sz); + } FstSparseSet *set; };