[Pkg-octave-commit] [SCM] Debian packaging for octave-ocs branch, master, updated. ecae69f33be86759ae79c207268a5435c0eec506

Rafael Laboissiere rafael at laboissiere.net
Sat Mar 17 18:54:50 UTC 2012


The following commit has been merged in the master branch:
commit 1898461655c9db9da132fae24750c482c74573d1
Author: Rafael Laboissiere <rafael at laboissiere.net>
Date:   Sat Mar 17 15:30:10 2012 +0100

    debian/check.m: Add file containing one of the examples in doc/

diff --git a/debian/check.m b/debian/check.m
new file mode 100644
index 0000000..d42efa5
--- /dev/null
+++ b/debian/check.m
@@ -0,0 +1,32 @@
+### The following was taken from file doc/spice2ocs_demo.m_in
+
+disp ("[Diode bridge rectifier solved by DASPK]");
+
+cd doc
+
+outstruct = prs_spice ("rect");
+x         = [0; 0; 0; 0];
+t         = linspace (0, 3e-10, 60);
+dmp       = .1;
+pltvars   = {"Vin", "Voutlow", "Vouthigh"};
+tol       = 1e-15;
+maxit     = 100;
+
+out = tst_daspk (outstruct, x, t, tol, maxit, pltvars);
+
+tests = {"assert (size (out), [4, 60]);",
+         "assert (max (out (2, :)), 0.22739, 1e-5);",
+         "assert (min (out (2, :)), -4.78751, 1e-5);"};
+
+count = 0;
+
+for i = 1 : length (tests)
+    try
+        eval (tests {i});
+        count += 1;
+    catch
+        disp (lasterror ().message);
+    end_try_catch
+endfor
+
+disp (sprintf ("PASSES %d out of 3 tests", count));

-- 
Debian packaging for octave-ocs



More information about the Pkg-octave-commit mailing list