Skip to content

Commit

Permalink
Migrated to doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanMabille committed Apr 3, 2023
1 parent e5451c9 commit 02abcac
Show file tree
Hide file tree
Showing 35 changed files with 6,985 additions and 6,499 deletions.
3 changes: 1 addition & 2 deletions libmamba/environment-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ dependencies:
- libarchive
- libsodium
- libcurl >=7.86
- gtest
- gmock
- doctest
- cpp-expected
- reproc-cpp
- yaml-cpp
Expand Down
5 changes: 3 additions & 2 deletions libmamba/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ mamba_target_add_compile_warnings(testing_libmamba_lock WARNING_AS_ERROR ${MAMBA


set(LIBMAMBA_TEST_SRCS
src/test_main.cpp
# C++ wrapping of libsolv
src/solv-cpp/test_queue.cpp
# Utility library
Expand Down Expand Up @@ -60,13 +61,13 @@ target_include_directories(
PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src" "${CMAKE_SOURCE_DIR}/libmamba/src"
)

find_package(GTest REQUIRED)
find_package(doctest REQUIRED)
find_package(Threads REQUIRED)

target_link_libraries(
test_libmamba
PUBLIC libmamba
PRIVATE GTest::GTest GTest::Main Threads::Threads
PRIVATE doctest::doctest Threads::Threads
)

# Copy data directory into binary dir to avoid modifications
Expand Down
17 changes: 10 additions & 7 deletions libmamba/tests/src/core/test_activation.cpp
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#include <gtest/gtest.h>

#include "mamba/core/activation.hpp"

#include "doctest/doctest.h"

namespace mamba
{
TEST(activation, activation)
TEST_SUITE("activation")
{
PosixActivator a;
// std::cout << a.add_prefix_to_path("/home/wolfv/miniconda3", 0) <<
// std::endl; std::cout << a.activate("/home/wolfv/miniconda3/", false) <<
// std::endl;
TEST_CASE("activation")
{
PosixActivator a;
// std::cout << a.add_prefix_to_path("/home/wolfv/miniconda3", 0) <<
// std::endl; std::cout << a.activate("/home/wolfv/miniconda3/", false) <<
// std::endl;
}
}
} // namespace mamba
Loading

0 comments on commit 02abcac

Please sign in to comment.