Skip to content

Commit

Permalink
Merge branch 'release/v0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
gmarcais committed May 28, 2021
2 parents e9ef8cd + b3b402c commit 66d0526
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 10 deletions.
6 changes: 4 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ pkgconfig_DATA = compact_vector.pc
TESTS = all_tests
check_PROGRAMS = all_tests bit_vector_speed

all_tests_CXXFLAGS = $(AM_CXXFLAGS) $(GTEST_CFLAGS) # -I$(top_srcdir)/unittests
all_tests_LDFLAGS = -pthread
# GTEST_CFLAGS unfortunately contains -lpthread (from pkg-config) and clang
# complains about it. Remove this specific complaint.
all_tests_CXXFLAGS = $(AM_CXXFLAGS) $(GTEST_CFLAGS) -Wno-unused-command-line-argument # -I$(top_srcdir)/unittests
all_tests_LDFLAGS = -pthread -Wno-unused-command-line-argument
all_tests_LDADD = $(GTEST_LIBS)
all_tests_SOURCES = unittests/test_compact_vector.cc unittests/test_dyn.cc unittests/test_stat.cc
all_tests_SOURCES += unittests/test_compact_vector.hpp unittests/allocator_fill_random.hpp
Expand Down
5 changes: 3 additions & 2 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
AC_INIT([compact_vector], [0.0.3], [[email protected]])
AC_INIT([compact_vector],[0.1.0],[[email protected]])
AC_CONFIG_AUX_DIR([build-aux])
AM_SILENT_RULES([yes])
AC_CONFIG_SRCDIR([include/compact_vector.hpp])
Expand All @@ -13,4 +13,5 @@ AC_PROG_CXX

PKG_CHECK_MODULES([GTEST], [gtest_main], [], [AC_MSG_WARN([Gtest is not installed. Running unit tests with 'make check' will not work.])])

AC_OUTPUT([Makefile compact_vector.pc])
AC_CONFIG_FILES([Makefile compact_vector.pc])
AC_OUTPUT
1 change: 1 addition & 0 deletions include/compact_iterator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <type_traits>
#include <cstddef>
#include <climits>
#include <ostream>

#include "const_iterator_traits.hpp"
#include "parallel_iterator_traits.hpp"
Expand Down
1 change: 1 addition & 0 deletions include/compact_vector.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <new>
#include <stdexcept>
#include <cstring>
#include <algorithm>

#include "compact_iterator.hpp"

Expand Down
6 changes: 3 additions & 3 deletions unittests/test_dyn.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ template<typename T>
constexpr int CompactVectorDynTest<T>::bits[8];
// template<typename T>
// const size_t CompactVectorDynTest<T>::size;
TYPED_TEST_CASE_P(CompactVectorDynTest);
TYPED_TEST_SUITE_P(CompactVectorDynTest);

TYPED_TEST_P(CompactVectorDynTest, DynIterator) {
for(size_t i = 0; i < sizeof(this->bits) / sizeof(int); ++i) {
Expand Down Expand Up @@ -81,7 +81,7 @@ template<typename T, typename W> using vector_type = compact::vector<T, 0, W, al
template<typename T, typename W> using ts_vector_type = compact::ts_vector<T, 0, W, allocator_fill_random<W> >;
template<typename T, typename W> using cas_vector_type = compact::cas_vector<T, 0, W, allocator_fill_random<W> >;

REGISTER_TYPED_TEST_CASE_P(CompactVectorDynTest, DynIterator, DynSwap);
REGISTER_TYPED_TEST_SUITE_P(CompactVectorDynTest, DynIterator, DynSwap);
typedef ::testing::Types<TypeValueContainer<vector_type<int, uint64_t>>,
TypeValueContainer<vector_type<unsigned, uint64_t>>,

Expand All @@ -100,5 +100,5 @@ typedef ::testing::Types<TypeValueContainer<vector_type<int, uint64_t>>,
TypeValueContainer<cas_vector_type<int, uint32_t>>,
TypeValueContainer<cas_vector_type<unsigned, uint32_t>>
> compact_vector_types;
INSTANTIATE_TYPED_TEST_CASE_P(CompactVectorDyn, CompactVectorDynTest, compact_vector_types);
INSTANTIATE_TYPED_TEST_SUITE_P(CompactVectorDyn, CompactVectorDynTest, compact_vector_types);
} // namespace
6 changes: 3 additions & 3 deletions unittests/test_stat.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class CompactVectorStatTest : public ::testing::Test {
protected:
static constexpr size_t size = 1000;
};
TYPED_TEST_CASE_P(CompactVectorStatTest);
TYPED_TEST_SUITE_P(CompactVectorStatTest);
TYPED_TEST_P(CompactVectorStatTest, StatIterator) {
typedef typename TypeParam::compact_vector_type compact_vector_type;
SCOPED_TRACE(::testing::Message() << "Static bits:" << compact_vector_type::static_bits());
Expand All @@ -30,7 +30,7 @@ template<typename T, int B> using vector_type = compact::vector<T, B, uint64_t,
template<typename T, int B> using ts_vector_type = compact::ts_vector<T, B, uint64_t, allocator_fill_random<uint64_t>>;
template<typename T, int B> using cas_vector_type = compact::cas_vector<T, B, uint64_t, allocator_fill_random<uint64_t>>;

REGISTER_TYPED_TEST_CASE_P(CompactVectorStatTest, StatIterator);
REGISTER_TYPED_TEST_SUITE_P(CompactVectorStatTest, StatIterator);
typedef ::testing::Types<TypeValueContainer<vector_type<int, 1>>,
TypeValueContainer<vector_type<int, 2>>,
TypeValueContainer<vector_type<int, 3>>,
Expand Down Expand Up @@ -62,5 +62,5 @@ typedef ::testing::Types<TypeValueContainer<vector_type<int, 1>>,
TypeValueContainer<cas_vector_type<unsigned, 4>>,
TypeValueContainer<cas_vector_type<unsigned, 5>>
> compact_vector_stat_types;
INSTANTIATE_TYPED_TEST_CASE_P(CompactVectorStat, CompactVectorStatTest, compact_vector_stat_types);
INSTANTIATE_TYPED_TEST_SUITE_P(CompactVectorStat, CompactVectorStatTest, compact_vector_stat_types);
} // namespace

0 comments on commit 66d0526

Please sign in to comment.