From 6c43af853e9d6d89c852046097d0c2bfbff64d93 Mon Sep 17 00:00:00 2001
From: Lukas Cejka <lukas.ostatek@gmail.com>
Date: Sun, 4 Nov 2018 20:04:21 +0100
Subject: [PATCH] Tidied up formatting and declarations in tests to make code
 more readable and consistent.

---
 src/UnitTests/Matrices/SparseMatrixTest.h | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/UnitTests/Matrices/SparseMatrixTest.h b/src/UnitTests/Matrices/SparseMatrixTest.h
index 949cd8c063..3ff6b58446 100644
--- a/src/UnitTests/Matrices/SparseMatrixTest.h
+++ b/src/UnitTests/Matrices/SparseMatrixTest.h
@@ -51,8 +51,11 @@ void cuda_test_GetType()
 template< typename Matrix >
 void test_SetDimensions()
 {
+    const int rows = 9;
+    const int cols = 8;
+    
     Matrix m;
-    m.setDimensions( 9, 8 );
+    m.setDimensions( rows, cols );
     
     EXPECT_EQ( m.getRows(), 9);
     EXPECT_EQ( m.getColumns(), 8);
@@ -61,10 +64,10 @@ void test_SetDimensions()
 template< typename Matrix >
 void test_SetCompressedRowLengths()
 {
-    Matrix m;
     const int rows = 10;
     const int cols = 11;
     
+    Matrix m;
     m.reset();
     m.setDimensions( rows, cols );
     typename Matrix::CompressedRowLengthsVector rowLengths;
@@ -146,7 +149,6 @@ void test_SetElement()
     EXPECT_EQ( m.getElement( 2, 2 ), 3 );
     EXPECT_EQ( m.getElement( 3, 3 ), 4 );
     EXPECT_EQ( m.getElement( 4, 4 ), 5 );
-    
 }
 
 TEST( SparseMatrixTest, CSR_GetTypeTest_Host )
-- 
GitLab