Skip to content

Commit

Permalink
update to catch version 3
Browse files Browse the repository at this point in the history
  • Loading branch information
jwaldrop107 committed Sep 10, 2024
1 parent 10551d5 commit 2bf2054
Show file tree
Hide file tree
Showing 20 changed files with 29 additions and 51 deletions.
12 changes: 3 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ nwx_cxx_api_docs("README.md" "${project_inc_dir}" "${project_src_dir}")
cmaize_find_or_build_dependency(
spdlog
URL github.com/gabime/spdlog
VERSION ${NWX_SPDLOG_VERSION}
VERSION ad0e89cbfb4d0c1ce4d097e134eb7be67baebb36
BUILD_TARGET spdlog
FIND_TARGET spdlog::spdlog
CMAKE_ARGS SPDLOG_INSTALL=ON
Expand All @@ -78,7 +78,7 @@ endif ()
cmaize_find_or_build_dependency(
cereal
URL github.com/USCiLab/cereal
VERSION ${NWX_CEREAL_VERSION}
VERSION v1.3.0
BUILD_TARGET cereal
FIND_TARGET cereal
CMAKE_ARGS JUST_INSTALL_CEREAL=ON
Expand Down Expand Up @@ -109,20 +109,14 @@ if("${BUILD_TESTING}")
URL github.com/catchorg/Catch2
BUILD_TARGET Catch2
FIND_TARGET Catch2::Catch2
VERSION ${NWX_CATCH2_VERSION}
VERSION v3.6.0
)
cmaize_add_tests(
test_unit_parallelzone
SOURCE_DIR "${CXX_TEST_DIR}/unit_tests"
INCLUDE_DIRS "${project_src_dir}"
DEPENDS Catch2::Catch2 ${PROJECT_NAME}
)
cmaize_add_tests(
test_integration_parallelzone
SOURCE_DIR "${CXX_TEST_DIR}/integration_tests"
INCLUDE_DIRS "${project_src_dir}"
DEPENDS Catch2::Catch2 ${PROJECT_NAME}
)
cmaize_add_tests(
test_parallelzone_docs
SOURCE_DIR "${CXX_TEST_DIR}/doc_snippets"
Expand Down
5 changes: 5 additions & 0 deletions tests/cxx/doc_snippets/catch.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once
#include <catch2/catch_approx.hpp>
#include <catch2/catch_session.hpp>
#include <catch2/catch_template_test_macros.hpp>
#include <catch2/catch_test_macros.hpp>
2 changes: 1 addition & 1 deletion tests/cxx/doc_snippets/test_parallelzone.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#pragma once
#include <catch2/catch.hpp>
#include "catch.hpp"
#include <parallelzone/runtime/runtime_view.hpp>

namespace testing {
Expand Down
27 changes: 0 additions & 27 deletions tests/cxx/integration_tests/blank_test.cpp

This file was deleted.

2 changes: 1 addition & 1 deletion tests/cxx/unit_tests/parallelzone/archive_wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include "catch.hpp"
#include "parallelzone/archive_wrapper.hpp"
#include <catch2/catch.hpp>

TEMPLATE_TEST_CASE("Serialization with ArchiveWrapper",
"[serialization][Serializer][Deserializer]",
Expand Down
5 changes: 5 additions & 0 deletions tests/cxx/unit_tests/parallelzone/catch.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#pragma once
#include <catch2/catch_approx.hpp>
#include <catch2/catch_session.hpp>
#include <catch2/catch_template_test_macros.hpp>
#include <catch2/catch_test_macros.hpp>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../../catch.hpp"
#include <filesystem>
#include <parallelzone/logging/detail_/spdlog/file.hpp>
#include <parallelzone/logging/detail_/spdlog/stdout.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../../catch.hpp"
#include <filesystem>
#include <iostream>
#include <parallelzone/logging/detail_/spdlog/spdlog.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../../catch.hpp"
#include <parallelzone/logging/detail_/spdlog/stdout.hpp>
#include <spdlog/sinks/ostream_sink.h>
#include <sstream>
Expand Down
2 changes: 1 addition & 1 deletion tests/cxx/unit_tests/parallelzone/logging/logger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../catch.hpp"
#include <parallelzone/logging/detail_/spdlog/spdlog.hpp>
#include <parallelzone/logging/detail_/spdlog/stdout.hpp>
#include <parallelzone/logging/logger.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../catch.hpp"
#include <parallelzone/mpi_helpers/binary_buffer/binary_buffer.hpp>

/* Testing Strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../catch.hpp"
#include <parallelzone/mpi_helpers/binary_buffer/binary_buffer.hpp>
#include <parallelzone/mpi_helpers/binary_buffer/binary_view.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../../catch.hpp"
#include <parallelzone/mpi_helpers/binary_buffer/detail_/binary_buffer_pimpl.hpp>

/* Testing Strategy:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

#include "../../test_parallelzone.hpp"
#include <numeric>
#include <parallelzone/mpi_helpers/commpp/commpp.hpp>

using namespace parallelzone::mpi_helpers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../catch.hpp"
#include <parallelzone/mpi_helpers/traits/mpi_data_type.hpp>

using namespace parallelzone::mpi_helpers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../catch.hpp"
#include <parallelzone/mpi_helpers/traits/mpi_op.hpp>

using namespace parallelzone::mpi_helpers;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../catch.hpp"
#include <map>
#include <parallelzone/mpi_helpers/binary_buffer/binary_buffer.hpp>
#include <vector>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

#include <catch2/catch.hpp>
#include "../../catch.hpp"
#include <parallelzone/logging/logger_factory.hpp>
#include <parallelzone/runtime/detail_/resource_set_pimpl.hpp>

Expand Down
2 changes: 1 addition & 1 deletion tests/cxx/unit_tests/parallelzone/serialization.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
* limitations under the License.
*/

#include "catch.hpp"
#include "parallelzone/serialization.hpp"
#include <catch2/catch.hpp>

TEMPLATE_TEST_CASE("Serialization with Cereal wrapper",
"[serialization][serializer][deserializer]",
Expand Down
2 changes: 1 addition & 1 deletion tests/cxx/unit_tests/parallelzone/test_parallelzone.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*/

#pragma once
#include <catch2/catch.hpp>
#include "catch.hpp"
#include <parallelzone/runtime/runtime_view.hpp>

namespace testing {
Expand Down

0 comments on commit 2bf2054

Please sign in to comment.