]> gitweb.michael.orlitzky.com - octave.git/blobdiff - tests/construct_tests.m
Add construct() and its tests.
[octave.git] / tests / construct_tests.m
diff --git a/tests/construct_tests.m b/tests/construct_tests.m
new file mode 100644 (file)
index 0000000..cb27d1a
--- /dev/null
@@ -0,0 +1,9 @@
+A = construct(3,4, @(i,j) i+j);
+
+expected = [ 2, 3, 4, 5;
+            3, 4, 5, 6;
+            4, 5, 6, 7];
+
+unit_test_equals("construct a_ij == i+j", ...
+                expected, ...
+                A);