diff --git a/src/UnitTests/Matrices/SparseMatrixTest.h b/src/UnitTests/Matrices/SparseMatrixTest.h index 4eb836d93a329b78ac3aa58fcaee6bff705db91d..6f8fa524921caab72953c42fa42e3bf6638fc8cf 100644 --- a/src/UnitTests/Matrices/SparseMatrixTest.h +++ b/src/UnitTests/Matrices/SparseMatrixTest.h @@ -18,6 +18,28 @@ using CSR_cuda = TNL::Matrices::CSR< int, TNL::Devices::Cuda, int >; #ifdef HAVE_GTEST #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 #include "../GtestMissingError.h"