]> gitweb.michael.orlitzky.com - octave.git/blobdiff - tests/forward_euler1_tests.m
Move all of the tests into a subdirectory.
[octave.git] / tests / forward_euler1_tests.m
diff --git a/tests/forward_euler1_tests.m b/tests/forward_euler1_tests.m
new file mode 100644 (file)
index 0000000..8bc337e
--- /dev/null
@@ -0,0 +1,10 @@
+f = @(x,y) y;
+x0 = 0;
+y0 = 1;
+h = 1;
+actual_y = forward_euler1(x0, y0, f, h);
+expected_y = 2;
+
+unit_test_equals("Forward Euler works for one step", ...
+                expected_y, ...
+                actual_y);