Mercurial > hg > octave-lojdl
changeset 2736:b02d27f0ed57
[project @ 1997-02-25 04:38:22 by jwe]
line wrap: on
line diff
--- a/test/octave.test/arith/abs-2.m +++ b/test/octave.test/arith/abs-2.m @@ -1,1 +1,1 @@ -all (all (abs ([1.1, 3i; 3+4i; -3-4i]) == [1.1, 3; 5, 5])) +all (all (abs ([1.1, 3i; 3+4i, -3-4i]) == [1.1, 3; 5, 5]))
--- a/test/octave.test/arith/arith.exp +++ b/test/octave.test/arith/arith.exp @@ -77,11 +77,11 @@ do_test max-2.m set test max-3 -set prog_output "error:.*" +set prog_output "\n... max:.*" do_test max-3.m set test max-4 -set prog_output "error:.*" +set prog_output "\n... max:.*" do_test max-4.m set test min-1 @@ -93,17 +93,39 @@ do_test min-2.m set test min-3 -set prog_output "error:.*" +set prog_output "\n... min:.*" do_test min-3.m set test min-4 -set prog_output "error:.*" +set prog_output "\n... min:.*" do_test min-4.m # nexpow2 # pow2 -# rem +set test rem-1 +set prog_output "ans = 1" +do_test rem-1.m + +set test rem-2 +set prog_output "ans = 1" +do_test rem-2.m + +set test rem-3 +set prog_output "usage:.*" +do_test rem-3.m + +set test rem-4 +set prog_output "usage:.*" +do_test rem-4.m + +set test rem-5 +set prog_output "error:.*" +do_test rem-5.m + +set test rem-6 +set prog_output "error:.*" +do_test rem-6.m set test round-1 set prog_output "ans = 1" @@ -274,11 +296,85 @@ # acoth # atan2 -# sum -# prod -# cumsum -# cumprod -# sumsq +set test sum-1 +set prog_output "ans = 1" +do_test sum-1.m + +set test sum-2 +set prog_output "ans = 1" +do_test sum-2.m + +set test sum-3 +set prog_output "\n... sum:.*" +do_test sum-3.m + +set test sum-4 +set prog_output "\n... sum:.*" +do_test sum-4.m + +set test prod-1 +set prog_output "ans = 1" +do_test prod-1.m + +set test prod-2 +set prog_output "ans = 1" +do_test prod-2.m + +set test prod-3 +set prog_output "\n... prod:.*" +do_test prod-3.m + +set test prod-4 +set prog_output "\n... prod:.*" +do_test prod-4.m + +set test cumsum-1 +set prog_output "ans = 1" +do_test cumsum-1.m + +set test cumsum-2 +set prog_output "ans = 1" +do_test cumsum-2.m + +set test cumsum-3 +set prog_output "\n... cumsum:.*" +do_test cumsum-3.m + +set test cumsum-4 +set prog_output "\n... cumsum:.*" +do_test cumsum-4.m + +set test cumprod-1 +set prog_output "ans = 1" +do_test cumprod-1.m + +set test cumprod-2 +set prog_output "ans = 1" +do_test cumprod-2.m + +set test cumprod-3 +set prog_output "\n... cumprod:.*" +do_test cumprod-3.m + +set test cumprod-4 +set prog_output "\n... cumprod:.*" +do_test cumprod-4.m + +set test sumsq-1 +set prog_output "ans = 1" +do_test sumsq-1.m + +set test sumsq-2 +set prog_output "ans = 1" +do_test sumsq-2.m + +set test sumsq-3 +set prog_output "\n... sumsq:.*" +do_test sumsq-3.m + +set test sumsq-4 +set prog_output "\n... sumsq:.*" +do_test sumsq-4.m # beta # betai
--- a/test/octave.test/arith/conj-1.m +++ b/test/octave.test/arith/conj-1.m @@ -1,1 +1,1 @@ -conj (1) == 1 && conj (i) == -1 && conj (1+i) == 1-i && conj (1-i) == 1+i +conj (1) == 1 && conj (i) == -i && conj (1+i) == 1-i && conj (1-i) == 1+i
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/cumprod-1.m @@ -0,0 +1,2 @@ +(cumprod ([1, 2, 3]) == [1, 2, 6] && cumprod ([-1; -2; -3]) == [-1; 2; -6] + && cumprod ([i, 2+i, -3+2i, 4]) == [i, -1+2i, -1-8i, -4-32i])
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/cumprod-2.m @@ -0,0 +1,2 @@ +all (all (cumprod ([1, 2, 3; i, 2i, 3i; 1+i, 2+2i, 3+3i]) + == [1, 2, 3; i, 4i, 9i; -1+i, -8+8i, -27+27i]))
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/cumprod-3.m @@ -0,0 +1,1 @@ +cumprod ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/cumprod-4.m @@ -0,0 +1,1 @@ +cumprod (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/cumsum-1.m @@ -0,0 +1,2 @@ +(cumsum ([1, 2, 3]) == [1, 3, 6] && cumsum ([-1; -2; -3]) == [-1; -3; -6] + && cumsum ([i, 2+i, -3+2i, 4]) == [i, 2+2i, -1+4i, 3+4i])
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/cumsum-2.m @@ -0,0 +1,2 @@ +all (all (cumsum ([1, 2, 3; i, 2i, 3i; 1+i, 2+2i, 3+3i]) + == [1, 2, 3; 1+i, 2+2i, 3+3i; 2+2i, 4+4i, 6+6i]))
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/cumsum-3.m @@ -0,0 +1,1 @@ +cumsum ()
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/cumsum-4.m @@ -0,0 +1,1 @@ +cumsum (1, 2)
--- a/test/octave.test/arith/max-4.m +++ b/test/octave.test/arith/max-4.m @@ -1,1 +1,1 @@ -max (1, 2) +max (1, 2, 3)
--- a/test/octave.test/arith/min-4.m +++ b/test/octave.test/arith/min-4.m @@ -1,1 +1,1 @@ -min (1, 2) +min (1, 2, 3)
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/prod-1.m @@ -0,0 +1,2 @@ +(prod ([1, 2, 3]) == 6 && prod ([-1; -2; -3]) == -6 + && prod ([i, 2+i, -3+2i, 4]) == -4-32i)
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/prod-2.m @@ -0,0 +1,2 @@ +all (all (prod ([1, 2, 3; i, 2i, 3i; 1+i, 2+2i, 3+3i]) + == [-1+i, -8+8i, -27+27i]))
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/prod-4.m @@ -0,0 +1,1 @@ +prod (1, 2)
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/rem-1.m @@ -0,0 +1,1 @@ +all (all (rem ([1, 2, 3; -1, -2, -3], 2) == [1, 0, 1; -1, 0, -1]))
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/rem-2.m @@ -0,0 +1,2 @@ +all (all (rem ([1, 2, 3; -1, -2, -3], 2 * ones (2, 3)) + == [1, 0, 1; -1, 0, -1]))
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/rem-4.m @@ -0,0 +1,1 @@ +rem (1, 2, 3)
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/rem-5.m @@ -0,0 +1,1 @@ +rem ([1, 2], [3, 4, 5])
--- a/test/octave.test/arith/sqrt-2.m +++ b/test/octave.test/arith/sqrt-2.m @@ -1,2 +1,3 @@ -all (all (sqrt ([4, -4; i, 1-i]) - == [2, -2i; exp (0.5 * log (i)), exp (0.5 * log (1-i))])) +all (all (abs (sqrt ([4, -4; i, 1-i]) + - [2, -2i; exp (0.5 * log (i)), exp (0.5 * log (1-i))])) + < sqrt (eps))
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/sum-1.m @@ -0,0 +1,2 @@ +(sum ([1, 2, 3]) == 6 && sum ([-1; -2; -3]) == -6 + && sum ([i, 2+i, -3+2i, 4]) == 3+4i)
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/sum-2.m @@ -0,0 +1,1 @@ +all (all (sum ([1, 2, 3; i, 2i, 3i; 1+i, 2+2i, 3+3i]) == [2+2i, 4+4i, 6+6i]))
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/sumsq-1.m @@ -0,0 +1,1 @@ +sumsq ([1, 2, 3]) == 14 && sumsq ([-1; -2; 4i]) == -11
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/sumsq-2.m @@ -0,0 +1,1 @@ +all (all (sumsq ([1, 2, 3; 2, 3, 4; 4i, 6i, 2]) == [-11, -23, 29]))
new file mode 100644 --- /dev/null +++ b/test/octave.test/arith/sumsq-4.m @@ -0,0 +1,1 @@ +sumsq (1, 2)
--- a/test/octave.test/arith/xor-1.m +++ b/test/octave.test/arith/xor-1.m @@ -1,2 +1,2 @@ (xor ([1, 1, 0, 0], [0, 1, 0, 1]) == [1, 0, 0, 1] - && xor ([i, i, 0, 0], [1, 0, 1, 0]) == [1, 0, 0, 1]) + && xor ([i, i, 0, 0], [1, 0, 1, 0]) == [0, 1, 1, 0])
--- a/test/octave.test/index/dfi-f/index.exp +++ b/test/octave.test/index/dfi-f/index.exp @@ -1,6 +1,6 @@ -# Tests with do_fortran_indexing == "false" +## Tests with do_fortran_indexing == "false" -# scalar tests +## scalar tests set test index-s-1 set prog_output "ans = 1" @@ -82,7 +82,7 @@ set prog_output "error:.*" do_test s-20.m -# vector tests +## vector tests set test index-v-1 set prog_output "ans = 4" @@ -144,7 +144,7 @@ set prog_output "ans = 1" do_test v-15.m -# matrix tests +## matrix tests set test index-m-1 set prog_output "ans = 1"
--- a/test/octave.test/index/dfi-t/index.exp +++ b/test/octave.test/index/dfi-t/index.exp @@ -1,6 +1,6 @@ -# Tests with do_fortran_indexing == "true" +## Tests with do_fortran_indexing == "true" -# scalar tests +## scalar tests set test index-s-1 set prog_output "ans = 1" @@ -82,7 +82,7 @@ set prog_output "error:.*" do_test s-20.m -# vector tests +## vector tests set test index-v-1 set prog_output "ans = 4" @@ -144,7 +144,7 @@ set prog_output "ans = 1" do_test v-15.m -# matrix tests +## matrix tests set test index-m-1 set prog_output "ans = 1"
--- a/test/octave.test/prefer/prefer.exp +++ b/test/octave.test/prefer/prefer.exp @@ -1,4 +1,4 @@ -# whitespace_in_literal_matrix +## whitespace_in_literal_matrix set test whitespace-in-literal-matrix-1 set prog_output "parse error.*" @@ -44,7 +44,7 @@ set prog_output "ans = 1" do_test prefer-11.m -# implicit_str_to_num_ok +## implicit_str_to_num_ok set test implicit-str-to-num-ok-1 set prog_output "ans = 100" @@ -54,7 +54,7 @@ set prog_output "error:.*" do_test prefer-13.m -# ok_to_lose_imaginary_part +## ok_to_lose_imaginary_part set test ok-to-lose-imaginary-part-1 set prog_output "ans = 1" @@ -68,7 +68,7 @@ set prog_output "warning:.*" do_test prefer-16.m -# prefer_column_vectors +## prefer_column_vectors set test prefer-column-vectors-1 set prog_output "ans = 1" @@ -78,7 +78,7 @@ set prog_output "ans = 1" do_test prefer-18.m -# print_answer_id_name +## print_answer_id_name set test print-answer-id-name-1 set prog_output "1" @@ -88,7 +88,7 @@ set prog_output "a = 1" do_test prefer-20.m -# print_empty_dimensions +## print_empty_dimensions set test print-empty-dimensions-1 set prog_output "[]" @@ -98,9 +98,9 @@ set prog_output "[](3x0)" do_test prefer-22.m -# propagate_empty_matrices +## propagate_empty_matrices -# This should maybe test more functions... +## This should maybe test more functions... set test propagate-empty-matrices-1 set prog_output "error:.*" @@ -110,7 +110,7 @@ set prog_output "ans = 1" do_test prefer-24.m -# return_last_computed_value +## return_last_computed_value set test return-last-computed-value-1 set prog_output "ans = 1" @@ -120,7 +120,7 @@ set prog_output "" do_test prefer-26.m -# save_precision +## save_precision set test save-precision-1 set prog_output "3" @@ -130,7 +130,7 @@ set prog_output "3.1416" do_test prefer-28.m -# silent_functions +## silent_functions set test silent-functions-1 set prog_output "ans = 1" @@ -140,7 +140,7 @@ set prog_output "" do_test prefer-30.m -# treat_neg_dim_as_zero +## treat_neg_dim_as_zero set test treat-neg-dim-as-zero-1 set prog_output "error:.*" @@ -154,7 +154,7 @@ set prog_output "ans = 1" do_test prefer-33.m -# warn_assign_as_truth_value +## warn_assign_as_truth_value set test warn-assign-as-truth-value-1 set prog_output "" @@ -164,7 +164,7 @@ set prog_output "warning:.*" do_test prefer-35.m -# warn_comma_in_global_decl +## warn_comma_in_global_decl set test warn-comma-in-global-decl-1 set prog_output "" @@ -174,7 +174,7 @@ set prog_output "warning:.*" do_test prefer-37.m -# warn_divide_by_zero +## warn_divide_by_zero set test warn-divide-by-zero-1 set prog_output "ans = 1"
--- a/test/octave.test/zero-one/fff/zero-one.exp +++ b/test/octave.test/zero-one/fff/zero-one.exp @@ -1,10 +1,10 @@ -# Tests with: -# -# prefer_zero_one_indexing == "false" -# prefer_column_vectors == "false" -# do_fortran_indexing == "false" +## Tests with: +## +## prefer_zero_one_indexing == "false" +## prefer_column_vectors == "false" +## do_fortran_indexing == "false" -# scalar tests +## scalar tests set test zero-one-fff-s-1 set prog_output "error:.*" @@ -22,7 +22,7 @@ set prog_output "ans = *1" do_test s-4.m -# vector tests +## vector tests set test zero-one-fff-v-1 set prog_output "ans = *1" @@ -40,7 +40,7 @@ set prog_output "ans = *1" do_test v-4.m -# matrix tests +## matrix tests set test zero-one-fff-m-1 set prog_output "error:.*"
--- a/test/octave.test/zero-one/fft/zero-one.exp +++ b/test/octave.test/zero-one/fft/zero-one.exp @@ -1,10 +1,10 @@ -# Tests with: -# -# prefer_zero_one_indexing == "false" -# prefer_column_vectors == "false" -# do_fortran_indexing == "true" +## Tests with: +## +## prefer_zero_one_indexing == "false" +## prefer_column_vectors == "false" +## do_fortran_indexing == "true" -# scalar tests +## scalar tests set test zero-one-fft-s-1 set prog_output "error:.*" @@ -22,7 +22,7 @@ set prog_output "ans = *1" do_test s-4.m -# vector tests +## vector tests set test zero-one-fft-v-1 set prog_output "ans = *1" @@ -40,7 +40,7 @@ set prog_output "ans = *1" do_test v-4.m -# matrix tests +## matrix tests set test zero-one-fft-m-1 set prog_output "ans = *1"
--- a/test/octave.test/zero-one/ftf/zero-one.exp +++ b/test/octave.test/zero-one/ftf/zero-one.exp @@ -1,10 +1,10 @@ -# Tests with: -# -# prefer_zero_one_indexing == "false" -# prefer_column_vectors == "true" -# do_fortran_indexing == "false" +## Tests with: +## +## prefer_zero_one_indexing == "false" +## prefer_column_vectors == "true" +## do_fortran_indexing == "false" -# scalar tests +## scalar tests set test zero-one-ftf-s-1 set prog_output "error:.*" @@ -22,7 +22,7 @@ set prog_output "ans = *1" do_test s-4.m -# vector tests +## vector tests set test zero-one-ftf-v-1 set prog_output "ans = *1" @@ -40,7 +40,7 @@ set prog_output "ans = *1" do_test v-4.m -# matrix tests +## matrix tests set test zero-one-ftf-m-1 set prog_output "error:.*"
--- a/test/octave.test/zero-one/ftt/zero-one.exp +++ b/test/octave.test/zero-one/ftt/zero-one.exp @@ -1,10 +1,10 @@ -# Tests with: -# -# prefer_zero_one_indexing == "false" -# prefer_column_vectors == "true" -# do_fortran_indexing == "true" +## Tests with: +## +## prefer_zero_one_indexing == "false" +## prefer_column_vectors == "true" +## do_fortran_indexing == "true" -# scalar tests +## scalar tests set test zero-one-ftt-s-1 set prog_output "error:.*" @@ -22,7 +22,7 @@ set prog_output "ans = *1" do_test s-4.m -# vector tests +## vector tests set test zero-one-ftt-v-1 set prog_output "ans = *1" @@ -40,7 +40,7 @@ set prog_output "ans = *1" do_test v-4.m -# matrix tests +## matrix tests set test zero-one-ftt-m-1 set prog_output "ans = *1"
--- a/test/octave.test/zero-one/tff/zero-one.exp +++ b/test/octave.test/zero-one/tff/zero-one.exp @@ -1,10 +1,10 @@ -# Tests with: -# -# prefer_zero_one_indexing == "true" -# prefer_column_vectors == "false" -# do_fortran_indexing == "false" +## Tests with: +## +## prefer_zero_one_indexing == "true" +## prefer_column_vectors == "false" +## do_fortran_indexing == "false" -# scalar tests +## scalar tests set test zero-one-tff-s-1 set prog_output "error:.*" @@ -22,7 +22,7 @@ set prog_output "ans = *1" do_test s-4.m -# vector tests +## vector tests set test zero-one-tff-v-1 set prog_output "ans = *1" @@ -40,7 +40,7 @@ set prog_output "ans = *1" do_test v-4.m -# matrix tests +## matrix tests set test zero-one-tff-m-1 set prog_output "error:.*"
--- a/test/octave.test/zero-one/tft/zero-one.exp +++ b/test/octave.test/zero-one/tft/zero-one.exp @@ -1,10 +1,10 @@ -# Tests with: -# -# prefer_zero_one_indexing == "true" -# prefer_column_vectors == "false" -# do_fortran_indexing == "true" +## Tests with: +## +## prefer_zero_one_indexing == "true" +## prefer_column_vectors == "false" +## do_fortran_indexing == "true" -# scalar tests +## scalar tests set test zero-one-tft-s-1 set prog_output "error:.*" @@ -22,7 +22,7 @@ set prog_output "ans = *1" do_test s-4.m -# vector tests +## vector tests set test zero-one-tft-v-1 set prog_output "ans = *1" @@ -40,7 +40,7 @@ set prog_output "ans = *1" do_test v-4.m -# matrix tests +## matrix tests set test zero-one-tft-m-1 set prog_output "ans = *1"
--- a/test/octave.test/zero-one/ttf/zero-one.exp +++ b/test/octave.test/zero-one/ttf/zero-one.exp @@ -1,10 +1,10 @@ -# Tests with: -# -# prefer_zero_one_indexing == "true" -# prefer_column_vectors == "true" -# do_fortran_indexing == "false" +## Tests with: +## +## prefer_zero_one_indexing == "true" +## prefer_column_vectors == "true" +## do_fortran_indexing == "false" -# scalar tests +## scalar tests set test zero-one-ttf-s-1 set prog_output "error:.*" @@ -22,7 +22,7 @@ set prog_output "ans = *1" do_test s-4.m -# vector tests +## vector tests set test zero-one-ttf-v-1 set prog_output "ans = *1" @@ -40,7 +40,7 @@ set prog_output "ans = *1" do_test v-4.m -# matrix tests +## matrix tests set test zero-one-ttf-m-1 set prog_output "error:.*"
--- a/test/octave.test/zero-one/ttt/zero-one.exp +++ b/test/octave.test/zero-one/ttt/zero-one.exp @@ -1,10 +1,10 @@ -# Tests with: -# -# prefer_zero_one_indexing == "true" -# prefer_column_vectors == "true" -# do_fortran_indexing == "true" +## Tests with: +## +## prefer_zero_one_indexing == "true" +## prefer_column_vectors == "true" +## do_fortran_indexing == "true" -# scalar tests +## scalar tests set test zero-one-ttt-s-1 set prog_output "error:.*" @@ -22,7 +22,7 @@ set prog_output "ans = *1" do_test s-4.m -# vector tests +## vector tests set test zero-one-ttt-v-1 set prog_output "ans = *1" @@ -40,7 +40,7 @@ set prog_output "ans = *1" do_test v-4.m -# matrix tests +## matrix tests set test zero-one-ttt-m-1 set prog_output "ans = *1"