X-Git-Url: http://gitweb.michael.orlitzky.com/?p=octave.git;a=blobdiff_plain;f=tests%2Fadvection_matrix_sparse_tests.m;fp=tests%2Fadvection_matrix_sparse_tests.m;h=1880deeea4f334b08e101fb5646c8e6e9908cd9e;hp=0000000000000000000000000000000000000000;hb=9b1a3c694305734969d771a6e67a67123006b5ca;hpb=b39006334c16dcd7256cb7c36e88996229863e6b diff --git a/tests/advection_matrix_sparse_tests.m b/tests/advection_matrix_sparse_tests.m new file mode 100644 index 0000000..1880dee --- /dev/null +++ b/tests/advection_matrix_sparse_tests.m @@ -0,0 +1,16 @@ +result = true; + +for n = [3:100] + ## Check the sparse matrix against the full one. + expected = advection_matrix(n,0,1); + actual = advection_matrix_sparse(n); + + if (expected != actual) + result = false; + end +end + + +unit_test_equals("Sparse advection matrices agree with full ones", ... + true, ... + result);