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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
strategy:
matrix:
build_config:
- { version: 22 }
- { version: 21 }
- { version: 20 }
- { version: 19 }
Expand Down
2 changes: 1 addition & 1 deletion conanfile.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[requires]
doctest/2.4.11
doctest/2.4.12

[generators]
CMakeToolchain
Expand Down
2 changes: 1 addition & 1 deletion script/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi
# Function to install doctest
_install_doctest() {
cd "$REPO_DIR"
git clone --depth=1 --branch=v2.4.12 https://github.com/doctest/doctest
git clone --depth=1 --branch=v2.5.0 https://github.com/doctest/doctest
cd doctest && mkdir -p build && cd build
cmake .. -DDOCTEST_WITH_TESTS=OFF -DDOCTEST_WITH_MAIN_IN_STATIC_LIB=OFF -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX
cmake --build . --config Release --target install
Expand Down
12 changes: 6 additions & 6 deletions test/udemy_course_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -291,18 +291,18 @@ TEST_CASE("udemy_course_test - Function_composition")
}

namespace Programming_challenge_an_SQL_analogy {
struct user {
struct User {
Comment thread
Dobiasd marked this conversation as resolved.
std::string name;
std::string country;
std::size_t visits;
};

std::string get_country(const user& u)
std::string get_country(const User& u)
{
return u.country;
}

std::size_t get_visits(const user& u)
std::size_t get_visits(const User& u)
{
return u.visits;
}
Expand All @@ -312,15 +312,15 @@ TEST_CASE("udemy_course_test - Programming_challenge_an_SQL_analogy")
{
using namespace Programming_challenge_an_SQL_analogy;

const std::vector<user> users = {
const std::vector<User> users = {
{ "Nicole", "GER", 2 },
{ "Justin", "USA", 1 },
{ "Rachel", "USA", 5 },
{ "Robert", "USA", 6 },
{ "Stefan", "GER", 4 }
};

const auto visit_sum = [](const std::vector<user>& xs) -> std::size_t {
const auto visit_sum = [](const std::vector<User>& xs) -> std::size_t {
return fplus::fwd::apply(xs, fplus::fwd::transform(get_visits), fplus::fwd::sum());
};

Expand Down Expand Up @@ -489,4 +489,4 @@ TEST_CASE("udemy_course_test - OOP_Design_patterns_vanishing")

REQUIRE_EQ(a, 16);
REQUIRE_EQ(b, 25);
}
}
Loading