-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8422b2f
commit 64e9a6a
Showing
5 changed files
with
36 additions
and
88 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.25) | ||
|
||
project(test_io1-money LANGUAGES CXX) | ||
project(test_io1-money_install LANGUAGES CXX) | ||
|
||
include(CTest) | ||
find_package(io1_money REQUIRED) | ||
|
||
find_package(doctest REQUIRED) | ||
if (NOT TARGET io1::money) | ||
find_package(io1_money REQUIRED) | ||
endif() | ||
|
||
add_executable(${PROJECT_NAME} test/test_money.cpp test/tutorial.cpp) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE io1::money | ||
doctest::doctest) | ||
add_test( | ||
NAME ${PROJECT_NAME} | ||
COMMAND ${PROJECT_NAME} --reporters=junit | ||
--out=junit_${PROJECT_NAME}.xml | ||
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) | ||
add_library(${PROJECT_NAME} test_install.cpp) | ||
target_link_libraries(${PROJECT_NAME} PRIVATE io1::money) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#include "io1/money.hpp" | ||
|
||
io1::money add_twice(io1::money const & lhs, io1::money const & rhs) noexcept | ||
{ | ||
return lhs + 2 * rhs; | ||
} |