Skip to content
Snippets Groups Projects
Commit 49839cab authored by Lukas Cejka's avatar Lukas Cejka Committed by Tomáš Oberhuber
Browse files

Tidied up formatting and declarations in tests to make code more readable and consistent.

parent dea03a45
No related branches found
No related tags found
1 merge request!16Matrices
...@@ -51,8 +51,11 @@ void cuda_test_GetType() ...@@ -51,8 +51,11 @@ void cuda_test_GetType()
template< typename Matrix > template< typename Matrix >
void test_SetDimensions() void test_SetDimensions()
{ {
const int rows = 9;
const int cols = 8;
Matrix m; Matrix m;
m.setDimensions( 9, 8 ); m.setDimensions( rows, cols );
EXPECT_EQ( m.getRows(), 9); EXPECT_EQ( m.getRows(), 9);
EXPECT_EQ( m.getColumns(), 8); EXPECT_EQ( m.getColumns(), 8);
...@@ -61,10 +64,10 @@ void test_SetDimensions() ...@@ -61,10 +64,10 @@ void test_SetDimensions()
template< typename Matrix > template< typename Matrix >
void test_SetCompressedRowLengths() void test_SetCompressedRowLengths()
{ {
Matrix m;
const int rows = 10; const int rows = 10;
const int cols = 11; const int cols = 11;
Matrix m;
m.reset(); m.reset();
m.setDimensions( rows, cols ); m.setDimensions( rows, cols );
typename Matrix::CompressedRowLengthsVector rowLengths; typename Matrix::CompressedRowLengthsVector rowLengths;
...@@ -146,7 +149,6 @@ void test_SetElement() ...@@ -146,7 +149,6 @@ void test_SetElement()
EXPECT_EQ( m.getElement( 2, 2 ), 3 ); EXPECT_EQ( m.getElement( 2, 2 ), 3 );
EXPECT_EQ( m.getElement( 3, 3 ), 4 ); EXPECT_EQ( m.getElement( 3, 3 ), 4 );
EXPECT_EQ( m.getElement( 4, 4 ), 5 ); EXPECT_EQ( m.getElement( 4, 4 ), 5 );
} }
TEST( SparseMatrixTest, CSR_GetTypeTest_Host ) TEST( SparseMatrixTest, CSR_GetTypeTest_Host )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment