Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 0 additions & 55 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,60 +69,5 @@ set(gcc_like $<OR:${gcc},${clang})
if (MVPOLYNOMIAL_BUILD_TESTS)
enable_testing()

set(boost_test_dependencies
algorithm
array
assert
bind
config
concept_check
container_hash
conversion
core
detail
describe
exception
function
functional
function_types
fusion
io
iterator
mp11
mpl
numeric_conversion
optional
predef
preprocessor
regex
range
smart_ptr
static_assert
throw_exception
tuple
typeof
type_traits
unordered
utility
)

foreach(deplib ${boost_test_dependencies})
FetchContent_Declare(
${deplib}
GIT_REPOSITORY https://github.com/boostorg/${deplib}.git
GIT_TAG boost-1.89.0
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(${deplib})
endforeach()

FetchContent_Declare(
boost_unit_test
GIT_REPOSITORY https://github.com/boostorg/test.git
GIT_TAG boost-1.89.0
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(boost_unit_test)

add_subdirectory(test)
endif()
2 changes: 2 additions & 0 deletions include/mvPolynomial/mvPolynomial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ class MVPolynomial final {
auto comparer = l.key_comp();

auto mul = MVPolynomial(l.get_allocator());
// Clear
mul.erase(mul.begin());
// Calculate all product of each l's term and r's term.
for (const auto& l_p : l) {
const auto& [l_idx, l_v] = l_p;
Expand Down
10 changes: 9 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
FetchContent_Declare(
Catch2
GIT_REPOSITORY https://github.com/catchorg/Catch2.git
GIT_TAG b3fb4b9feafcd8d91c5cb510a4775143fdbef02f # v3.11.0
OVERRIDE_FIND_PACKAGE
)
FetchContent_MakeAvailable(Catch2)

add_executable(mvPolynomial_test mvPolynomial_test.cpp)
target_compile_options(
mvPolynomial_test
Expand All @@ -10,7 +18,7 @@ target_link_libraries(
mvPolynomial_test
PRIVATE
${PROJECT_NAME}
Boost::unit_test_framework
Catch2::Catch2WithMain
)

add_test(NAME mvPolynomial_test COMMAND mvPolynomial_test)
Loading