Skip to content
This repository has been archived by the owner on Oct 14, 2023. It is now read-only.

Commit

Permalink
修改单元测试的namespace.
Browse files Browse the repository at this point in the history
Changes to be committed:
	modified:   tests/test_allocate.cpp
	modified:   tests/test_bloomfilter.cpp
	modified:   tests/test_data_block_builder.cpp
	modified:   tests/test_file_reader.cpp
	modified:   tests/test_file_writer.cpp
	modified:   tests/test_filter_block_builder.cpp
	modified:   tests/test_footer_builder.cpp
	modified:   tests/test_index_block_builder.cpp
	modified:   tests/test_lru_cache.cpp
	modified:   tests/test_memtable.cpp
	modified:   tests/test_murmur_hash.cpp
	modified:   tests/test_skiplist.cpp
	modified:   tests/test_sstable_builder.cpp
  • Loading branch information
yangyang233333 committed Jan 27, 2023
1 parent 80747e5 commit 24b51d1
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion tests/test_allocate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "../src/memory/allocate.h"
#include "../src/log/log.h"

namespace smallkv {
namespace smallkv::unittest {

TEST(FreeListAllocate_Allocate, basic) {
std::unique_ptr<FreeListAllocate> allocator = std::make_unique<FreeListAllocate>();
Expand Down
2 changes: 1 addition & 1 deletion tests/test_bloomfilter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "../src/filter/bloom_filter.h"
#include "../src/filter/filter_policy.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(BloomFilter, basic) {
std::vector<std::string> data;
for (int i = 0; i < 10 * 10000; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_data_block_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "../src/utils/codec.h"
#include "../src/db/offset_info.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(data_block_builder, add) {
auto logger = log::get_logger();
auto builder = std::make_unique<DataBlockBuilder>();
Expand Down
2 changes: 1 addition & 1 deletion tests/test_file_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "../src/file/file_writer.h"
#include "../src/log/log.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(file_reader, basic) {
auto logger = log::get_logger();
// 新建文件
Expand Down
2 changes: 1 addition & 1 deletion tests/test_file_writer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "../src/file/file_writer.h"
#include "../src/log/log.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(file_writer, basic) {
auto logger = log::get_logger();
std::string path = "./build/tests.sst";
Expand Down
2 changes: 1 addition & 1 deletion tests/test_filter_block_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <gtest/gtest.h>
#include "../src/table/filter_block_builder.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(filter_block_builder, basic) {
std::vector<std::string> data;
for (int i = 0; i < 10 * 10000; ++i) {
Expand Down
2 changes: 1 addition & 1 deletion tests/test_footer_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include <gtest/gtest.h>
#include "../src/table/footer_builder.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(FooterBuilder, basic) {
/*
* Footer模块_data数据schema如下所示:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_index_block_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "../src/utils/codec.h"
#include "../src/db/offset_info.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(index_block_builder, add) {
auto logger = log::get_logger();
auto builder = std::make_unique<IndexBlockBuilder>();
Expand Down
2 changes: 1 addition & 1 deletion tests/test_lru_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "../src/cache/cache.h"
#include "../src/cache/cache_policy.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(lru_cache, insert) {
auto cache_holder = std::make_unique<Cache<std::string, std::string>>(5000);

Expand Down
2 changes: 1 addition & 1 deletion tests/test_memtable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "memtable/memtable.h"
#include "memory/allocate.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(MemTable, Insert__Add) {
auto alloc = std::make_shared<FreeListAllocate>();
auto mem_table = std::make_shared<MemTable>(alloc);
Expand Down
2 changes: 1 addition & 1 deletion tests/test_murmur_hash.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <gtest/gtest.h>
#include "../src/utils/murmur_hash2.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(MurmurHash, basic) {
EXPECT_EQ(utils::murmur_hash2("123", 3), 1023762986);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/test_skiplist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "memtable/skiplist.h"
#include "memory/allocate.h"

namespace smallkv {
namespace smallkv::unittest {
TEST(skiplist, Insert) {
auto alloc = std::make_shared<FreeListAllocate>();
std::shared_ptr<SkipList<std::string, std::string>> skiplist =
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sstable_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "../src/file/file_reader.h"
#include "../src/utils/codec.h"

namespace smallkv {
namespace smallkv::unittest {
/*
* SST结构
* SSTable的数据排布schema:
Expand Down

0 comments on commit 24b51d1

Please sign in to comment.