Skip to content

Commit 4328b6a

Browse files
committed
Unit test to cover previously-broken read()
This bug managed to survive for 18 years before anyone caught it, so we should probably try to cover any regressions. I've verified that this test now fails if run without the suffix-finding fixes.
1 parent 8b6d474 commit 4328b6a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

tests/numerics/sparse_matrix_test.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,12 @@ class SparseMatrixTest : public CppUnit::TestCase
196196

197197
// If we're working with serial matrices then just print one of
198198
// them so they don't step on the others' toes.
199+
//
200+
// Use a very short filename, because we had a bug with that and
201+
// we want to test it.
199202
if (matrix->n_processors() > 1 ||
200203
TestCommWorld->rank() == 0)
201-
matrix->print_matlab(libmesh_suite_name+"_matrix.m");
204+
matrix->print_matlab("M.m");
202205

203206
matrix->clear();
204207

@@ -213,7 +216,7 @@ class SparseMatrixTest : public CppUnit::TestCase
213216
return;
214217
#endif
215218

216-
matrix->read(libmesh_suite_name+"_matrix.m");
219+
matrix->read("M.m");
217220

218221
TestCommWorld->barrier();
219222

0 commit comments

Comments
 (0)