Mercurial > hg > octave-lojdl
changeset 2732:d1fb65837925
[project @ 1997-02-25 00:13:16 by jwe]
author | jwe |
---|---|
date | Tue, 25 Feb 1997 00:13:17 +0000 |
parents | c1b85bf44213 |
children | 68732909bfac |
files | test/octave.test/quad/quad-1.m test/octave.test/quad/quad-2.m test/octave.test/quad/quad-3.m test/octave.test/quad/quad-4.m test/octave.test/quad/quad.exp test/octave.test/quad/quad_options-1.m test/octave.test/quad/quad_options-2.m test/octave.test/quad/quad_options-3.m |
diffstat | 8 files changed, 42 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
new file mode 100644 --- /dev/null +++ b/test/octave.test/quad/quad-1.m @@ -0,0 +1,3 @@ +function y = f (x) y = x + 1; endfunction +[v, ier, nfun, err] = quad ("f", 0, 5); +ier == 0 && v - 17.5 < sqrt (eps) && nfun > 0 && err < sqrt (eps)
new file mode 100644 --- /dev/null +++ b/test/octave.test/quad/quad-2.m @@ -0,0 +1,5 @@ +function y = f (x) + y = x .* sin (1 ./ x) .* sqrt (abs (1 - x)); +endfunction +[v, ier, nfun, err] = quad ("f", 0, 5); +ier == 0 && v - 1.98194122455795 < sqrt (eps) && nfun > 0 && err < sqrt (eps)
new file mode 100644 --- /dev/null +++ b/test/octave.test/quad/quad-4.m @@ -0,0 +1,1 @@ +quad ("f", 1, 2, 3, 4, 5)
--- a/test/octave.test/quad/quad.exp +++ b/test/octave.test/quad/quad.exp @@ -1,3 +1,29 @@ -# quad -# quad_options +set test quad-1 +set prog_output "ans = 1" +do_test quad-1.m + +set test quad-2 +set prog_output "ans = 1" +do_test quad-2.m + +set test quad-3 +set prog_output "\n... quad:.*" +do_test quad-3.m + +set test quad-4 +set prog_output "\n... quad:.*" +do_test quad-4.m + +set test quad_options-1 +set prog_output "ans = 1" +do_test quad_options-1.m + +set test quad_options-2 +set prog_output "\n... quad_options:.*" +do_test quad_options-2.m + +set test quad_options-3 +set prog_output "\n... quad_options:.*" +do_test quad_options-3.m + # colloc
new file mode 100644 --- /dev/null +++ b/test/octave.test/quad/quad_options-1.m @@ -0,0 +1,2 @@ +quad_options ("absolute tolerance", eps); +quad_options ("absolute tolerance") == eps;