diff --git a/src/UnitTests/Matrices/SparseMatrixTest.h b/src/UnitTests/Matrices/SparseMatrixTest.h
index 47e6f89b5cfbafa7b9cc0e0449c68f797885d20c..f44a4652257df7ee8b67dfbd628b10f52ff1f988 100644
--- a/src/UnitTests/Matrices/SparseMatrixTest.h
+++ b/src/UnitTests/Matrices/SparseMatrixTest.h
@@ -147,7 +147,7 @@ void test_SetCompressedRowLengths()
     rowLengths.setSize( rows );
     rowLengths.setValue( 3 );
     
-    RealType value = 1;
+    IndexType value = 1;
     for( IndexType i = 2; i < rows; i++ )
         rowLengths.setElement( i, value++ );