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
2 changes: 1 addition & 1 deletion exercises/acronym/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/acronym/acronym_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "acronym.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

using namespace std;
Expand Down
2 changes: 2 additions & 0 deletions exercises/acronym/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/all-your-base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/all-your-base/all_your_base_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "all_your_base.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

using namespace std;
Expand Down
2 changes: 2 additions & 0 deletions exercises/all-your-base/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/allergies/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/allergies/allergies_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "allergies.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

#include <string>
Expand Down
2 changes: 2 additions & 0 deletions exercises/allergies/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/anagram/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/anagram/anagram_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "anagram.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

using namespace std;
Expand Down
2 changes: 2 additions & 0 deletions exercises/anagram/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/atbash-cipher/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/atbash-cipher/atbash_cipher_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "atbash_cipher.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("encode_yes")
Expand Down
2 changes: 2 additions & 0 deletions exercises/atbash-cipher/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/beer-song/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/beer-song/beer_song_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "beer_song.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

using namespace std;
Expand Down
2 changes: 2 additions & 0 deletions exercises/beer-song/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/binary-search-tree/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/binary-search-tree/binary_search_tree_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "binary_search_tree.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions exercises/binary-search-tree/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/binary-search/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/binary-search/binary_search_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "binary_search.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"
#include <stdexcept>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions exercises/binary-search/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/binary/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/binary/binary_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "binary.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("b1_is_decimal_1")
Expand Down
2 changes: 2 additions & 0 deletions exercises/binary/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/bob/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/bob/bob_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "bob.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("stating_something")
Expand Down
2 changes: 2 additions & 0 deletions exercises/bob/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/bracket-push/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/bracket-push/bracket_push_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "bracket_push.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("paired_square_brackets")
Expand Down
2 changes: 2 additions & 0 deletions exercises/bracket-push/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/clock/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
2 changes: 1 addition & 1 deletion exercises/clock/clock_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "clock.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"
#include <sstream>

using namespace std;

Expand Down
2 changes: 2 additions & 0 deletions exercises/clock/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/crypto-square/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/crypto-square/crypto_square_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "crypto_square.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("normalize_capitals")
Expand Down
2 changes: 2 additions & 0 deletions exercises/crypto-square/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/difference-of-squares/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "difference_of_squares.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("up_to_5")
Expand Down
2 changes: 2 additions & 0 deletions exercises/difference-of-squares/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/etl/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/etl/etl_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "etl.h"
#define CATCH_CONFIG_MAIN
#include <map>
#include "test/catch.hpp"

Expand Down
2 changes: 2 additions & 0 deletions exercises/etl/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/food-chain/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/food-chain/food_chain_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "food_chain.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

using namespace std;
Expand Down
2 changes: 2 additions & 0 deletions exercises/food-chain/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/gigasecond/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/gigasecond/gigasecond_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "gigasecond.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"
#include "boost/date_time/posix_time/posix_time.hpp"

Expand Down
2 changes: 2 additions & 0 deletions exercises/gigasecond/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/grade-school/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/grade-school/grade_school_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "grade_school.h"
#define CATCH_CONFIG_MAIN
#include <map>
#include "test/catch.hpp"

Expand Down
2 changes: 2 additions & 0 deletions exercises/grade-school/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/grains/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/grains/grains_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "grains.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("square_1")
Expand Down
2 changes: 2 additions & 0 deletions exercises/grains/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/hamming/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/hamming/hamming_test.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#include "hamming.h"
#include <stdexcept>
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("no_difference_between_identical_strands")
Expand Down
2 changes: 2 additions & 0 deletions exercises/hamming/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/hello-world/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/hello-world/hello_world_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "hello_world.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("test_hello")
Expand Down
2 changes: 2 additions & 0 deletions exercises/hello-world/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
2 changes: 1 addition & 1 deletion exercises/hexadecimal/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ else()
endif()

# Build executable from sources and headers
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h)
add_executable(${exercise} ${file}_test.cpp ${exercise_cpp} ${file}.h test/tests-main.cpp)

set_target_properties(${exercise} PROPERTIES
CXX_STANDARD 11
Expand Down
1 change: 0 additions & 1 deletion exercises/hexadecimal/hexadecimal_test.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include "hexadecimal.h"
#define CATCH_CONFIG_MAIN
#include "test/catch.hpp"

TEST_CASE("hex_1_is_decimal_1")
Expand Down
2 changes: 2 additions & 0 deletions exercises/hexadecimal/test/tests-main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define CATCH_CONFIG_MAIN
#include "catch.hpp"
Loading