From 760a99098aabcd7bf4aad09fe3bee52d064c2d23 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Mon, 4 Mar 2024 17:04:06 -0800 Subject: [PATCH] Improve coverage slightly By moving test-only code to a test-only region. Also the skip_list shared lib can depend on libstdc++ etc. --- CMakeLists.txt | 1 - ConflictSet.cpp | 10 +++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f35416..d4725f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -102,7 +102,6 @@ if(BUILD_TESTING) target_compile_options(skip_list PRIVATE -fPIC -fno-exceptions -fvisibility=hidden) target_include_directories(skip_list PUBLIC ${CMAKE_SOURCE_DIR}/include) - set_target_properties(skip_list PROPERTIES LINKER_LANGUAGE C) set_target_properties(skip_list PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/skip_list") set_target_properties(skip_list PROPERTIES OUTPUT_NAME ${PROJECT_NAME}) diff --git a/ConflictSet.cpp b/ConflictSet.cpp index 49783fc..0e984e9 100644 --- a/ConflictSet.cpp +++ b/ConflictSet.cpp @@ -1825,11 +1825,6 @@ Iterator firstGeq(Node *n, const std::span key) { return {stepwise.n, stepwise.cmp}; } -Iterator firstGeq(Node *n, std::string_view key) { - return firstGeq( - n, std::span((const uint8_t *)key.data(), key.size())); -} - struct __attribute__((visibility("hidden"))) ConflictSet::Impl { void check(const ReadRange *reads, Result *result, int count) { @@ -2150,6 +2145,11 @@ void checkParentPointers(Node *node, bool &success) { } } +Iterator firstGeq(Node *n, std::string_view key) { + return firstGeq( + n, std::span((const uint8_t *)key.data(), key.size())); +} + [[maybe_unused]] int64_t checkMaxVersion(Node *root, Node *node, int64_t oldestVersion, bool &success, ConflictSet::Impl *impl) {