Skip to content

Commit b23fb49

Browse files
committed
Add unit test template combination
1 parent a3a7726 commit b23fb49

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ ginkgo_find_package(Ginkgo "Ginkgo::ginkgo" FALSE 1.8.0)
139139
include(cmake/ginkgo.cmake)
140140

141141
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -O0 -ggdb")
142+
142143
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} \
143144
-Wall -Wpedantic -Wextra -march=native -fopenmp -Wno-undefined-var-template")
144145

@@ -164,6 +165,7 @@ elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU")
164165
set(CMAKE_CXX_FLAGS_DEBUG
165166
"${CMAKE_CXX_FLAGS_DEBUG} \
166167
--coverage\
168+
--fopenmp \
167169
-fprofile-arcs \
168170
-ggdb3 \
169171
")

unitTests/Combination.C

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// SPDX-FileCopyrightText: 2024 OGL authors
2+
//
3+
// SPDX-License-Identifier: GPL-3.0-or-later
4+
5+
6+
#include "fvCFD.H"
7+
#include "MatrixWrapper/Combination/Combination.H"
8+
#include <gtest/gtest.h>
9+
10+
11+
TEST(Combination, CanCreateCombination)
12+
{
13+
auto cmb = Combination<double, int, gko::matrix::Coo>::create(this->exec);
14+
15+
ASSERT_EQ(cmb->get_size(), gko::dim<2>(0, 0));
16+
ASSERT_EQ(cmb->get_coefficients().size(), 0);
17+
ASSERT_EQ(cmb->get_operators().size(), 0);
18+
}

0 commit comments

Comments
 (0)