From 9c229a3a69d7f6f2a27d6fdd65a7d69213e8c299 Mon Sep 17 00:00:00 2001
From: Lukas Cejka <lukas.ostatek@gmail.com>
Date: Fri, 2 Nov 2018 13:41:16 +0100
Subject: [PATCH] In SparseMatrixCopyTest.h: 	Set appropriate row lengths in
 the setup of the Uneven Row Size matrix.

---
 src/UnitTests/Matrices/SparseMatrixCopyTest.h | 57 ++++++++++---------
 1 file changed, 31 insertions(+), 26 deletions(-)

diff --git a/src/UnitTests/Matrices/SparseMatrixCopyTest.h b/src/UnitTests/Matrices/SparseMatrixCopyTest.h
index a6944f39c5..993c973fce 100644
--- a/src/UnitTests/Matrices/SparseMatrixCopyTest.h
+++ b/src/UnitTests/Matrices/SparseMatrixCopyTest.h
@@ -46,8 +46,13 @@ void setupUnevenRowSizeMatrix( Matrix& m )
     typename Matrix::CompressedRowLengthsVector rowLengths;
     rowLengths.setSize( rows );
     rowLengths.setValue( 5 );
-//    rowLengths.setElement( 0, 4);
-//    rowLengths.setElement( 1,  4 );
+    rowLengths.setElement( 0, 2 );
+    rowLengths.setElement( 1,  3 );
+    rowLengths.setElement( 2,  3 );
+    rowLengths.setElement( 5,  2 );
+    rowLengths.setElement( 6,  1 );
+    rowLengths.setElement( 7,  1 );
+    rowLengths.setElement( 9,  1 );
     m.setCompressedRowLengths( rowLengths );
     
     int value = 1;
@@ -335,57 +340,57 @@ void checkTriDiagMatrix( Matrix& m )
 template< typename Matrix1, typename Matrix2 >
 void testCopyAssignment()
 {
-   Matrix1 m1;
-   setupTriDiagMatrix( m1 );
-   checkTriDiagMatrix( m1 );
+//   Matrix1 m1;
+//   setupTriDiagMatrix( m1 );
+//   checkTriDiagMatrix( m1 );
    
 //   Matrix1 m11;
 //   setupAntiTriDiagMatrix( m11 );
 //   checkAntiTriDiagMatrix( m11 );
    
-//   Matrix1 m111;
-//   setupUnevenRowSizeMatrix( m111 );
-//   checkUnevenRowSizeMatrix( m111 );
+   Matrix1 m111;
+   setupUnevenRowSizeMatrix( m111 );
+   checkUnevenRowSizeMatrix( m111 );
 
-   Matrix2 m2;
-   m2 = m1;
-   checkTriDiagMatrix( m2 );
+//   Matrix2 m2;
+//   m2 = m1;
+//   checkTriDiagMatrix( m2 );
    
 //   Matrix2 m22;
 //   m22 = m11;
 //   checkAntiTriDiagMatrix( m22 );
    
-//   Matrix2 m222;
-//   m222 = m111;
-//   checkUnevenRowSizeMatrix( m222 );
+   Matrix2 m222;
+   m222 = m111;
+   checkUnevenRowSizeMatrix( m222 );
 }
 
 template< typename Matrix1, typename Matrix2 >
 void testConversion()
 {
-   Matrix1 m1;
-   setupTriDiagMatrix( m1 );
-   checkTriDiagMatrix( m1 );
+//   Matrix1 m1;
+//   setupTriDiagMatrix( m1 );
+//   checkTriDiagMatrix( m1 );
    
 //   Matrix1 m11;
 //   setupAntiTriDiagMatrix( m11 );
 //   checkAntiTriDiagMatrix( m11 );
    
-//   Matrix1 m111;
-//   setupUnevenRowSizeMatrix( m111 );
-//   checkUnevenRowSizeMatrix( m111 );
+   Matrix1 m111;
+   setupUnevenRowSizeMatrix( m111 );
+   checkUnevenRowSizeMatrix( m111 );
 
-   Matrix2 m2;
-   TNL::Matrices::copySparseMatrix( m2, m1 );
-   checkTriDiagMatrix( m2 );
+//   Matrix2 m2;
+//   TNL::Matrices::copySparseMatrix( m2, m1 );
+//   checkTriDiagMatrix( m2 );
    
 //   Matrix2 m22;
 //   TNL::Matrices::copySparseMatrix( m22, m11 );
 //   checkAntiTriDiagMatrix( m22 );
    
-//   Matrix2 m222;
-//   TNL::Matrices::copySparseMatrix( m222, m111 );
-//   checkUnevenRowSizeMatrix( m222 );
+   Matrix2 m222;
+   TNL::Matrices::copySparseMatrix( m222, m111 );
+   checkUnevenRowSizeMatrix( m222 );
 }
 
 
-- 
GitLab