Skip to content
Snippets Groups Projects
Commit 653e7231 authored by Lukas Cejka's avatar Lukas Cejka
Browse files

In SparseMatrixTest.h:

	Create the testGetType and its corresponding gtest.
parent c48c8cd7
No related branches found
No related tags found
1 merge request!16Matrices
...@@ -18,6 +18,28 @@ using CSR_cuda = TNL::Matrices::CSR< int, TNL::Devices::Cuda, int >; ...@@ -18,6 +18,28 @@ using CSR_cuda = TNL::Matrices::CSR< int, TNL::Devices::Cuda, int >;
#ifdef HAVE_GTEST #ifdef HAVE_GTEST
#include <gtest/gtest.h> #include <gtest/gtest.h>
template< typename Matrix >
void testGetType()
{
Matrix<float, TNL::Devices::Cuda, int> floatCudaMatrix;
// using CSR_host_getType = TNL::Matrices::CSR< float, TNL::Devices::Host, int>
Matrix<float, TNL::Devices::Host, int> floatHostMatrix;
// using CSR_cuda_getType = TNL::Matrices::CSR< float, TNL::Devices::Cuda, int>
EXPECT_EQ( floatCudaMatrix.getType(), "Matrices::CSR< float, Cuda >");
}
TEST( SparseMatrixTest, GetTypeTest )
{
testGetType< CSR_host >();
}
#ifdef HAVE_CUDA
TEST( SparseMatrixTest, GetTypeTest )
{
testGetType< CSR_cuda >();
}
#endif
#endif #endif
#include "../GtestMissingError.h" #include "../GtestMissingError.h"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment