annotate test/mk-bc-overloads-tst.sh @ 30932:3c3abe6dbe58 stable

Don't leak build directories in installed directories (bug #62295). * test/mk-bc-overloads-tst.sh: Remove absolute output directory from file paths. Use correct name when referencing itself.
author Markus Mützel <markus.muetzel@gmx.de>
date Wed, 13 Apr 2022 13:54:52 +0200
parents 796f54d4ddbf
children 597f3ee61a48
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
1 #! /bin/sh
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
2
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
3 ########################################################################
29357
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
4 ##
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 29358
diff changeset
5 ## Copyright (C) 2010-2022 The Octave Project Developers
29357
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
6 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
7 ## See the file COPYRIGHT.md in the top-level directory of this
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
8 ## distribution or <https://octave.org/copyright/>.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
9 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
10 ## This file is part of Octave.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
11 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
12 ## Octave is free software: you can redistribute it and/or modify it
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
13 ## under the terms of the GNU General Public License as published by
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
14 ## the Free Software Foundation, either version 3 of the License, or
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
15 ## (at your option) any later version.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
16 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
17 ## Octave is distributed in the hope that it will be useful, but
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
18 ## WITHOUT ANY WARRANTY; without even the implied warranty of
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
19 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
20 ## GNU General Public License for more details.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
21 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
22 ## You should have received a copy of the GNU General Public License
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
23 ## along with Octave; see the file COPYING. If not, see
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
24 ## <https://www.gnu.org/licenses/>.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
25 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
26 ########################################################################
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
27
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
28 CLASSES="
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
29 double
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
30 single
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
31 char
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
32 logical
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
33 int8
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
34 int16
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
35 int32
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
36 int64
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
37 uint8
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
38 uint16
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
39 uint32
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
40 uint64
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
41 struct
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
42 cell
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
43 function_handle
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
44 "
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
45
20308
bacaec9b5535 eliminate recursive make invocation in test directory tree
John W. Eaton <jwe@octave.org>
parents: 20305
diff changeset
46 if [ $# -eq 2 ]; then
bacaec9b5535 eliminate recursive make invocation in test directory tree
John W. Eaton <jwe@octave.org>
parents: 20305
diff changeset
47 output_dir="$1"
bacaec9b5535 eliminate recursive make invocation in test directory tree
John W. Eaton <jwe@octave.org>
parents: 20305
diff changeset
48 shift
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
49 case "$1" in
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
50 --list-files)
30932
3c3abe6dbe58 Don't leak build directories in installed directories (bug #62295).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30564
diff changeset
51 echo tbcover.m
3c3abe6dbe58 Don't leak build directories in installed directories (bug #62295).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30564
diff changeset
52 echo bc-overloads.tst
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
53 for class in $CLASSES; do
30932
3c3abe6dbe58 Don't leak build directories in installed directories (bug #62295).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30564
diff changeset
54 echo @$class/tbcover.m
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
55 done
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
56 exit
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
57 ;;
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
58 --list-dirs)
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
59 for class in $CLASSES; do
30932
3c3abe6dbe58 Don't leak build directories in installed directories (bug #62295).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30564
diff changeset
60 echo @$class
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
61 done
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
62 exit
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
63 ;;
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
64 --list-classes)
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
65 echo $CLASSES
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
66 exit
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
67 ;;
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
68 *)
20308
bacaec9b5535 eliminate recursive make invocation in test directory tree
John W. Eaton <jwe@octave.org>
parents: 20305
diff changeset
69 expected_results_file="$1"
16019
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
70 ;;
5b2126a8c84f install tests and functions to run them
John W. Eaton <jwe@octave.org>
parents: 14138
diff changeset
71 esac
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
72 else
30932
3c3abe6dbe58 Don't leak build directories in installed directories (bug #62295).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30564
diff changeset
73 echo "usage: mk-bc-overload-tst.sh output_dir option" 1>&2
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
74 exit 1
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
75 fi
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
76
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
77 for class in $CLASSES; do
30932
3c3abe6dbe58 Don't leak build directories in installed directories (bug #62295).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30564
diff changeset
78 DIR="@$class"
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
79 test -d $DIR || mkdir $DIR || { echo "error: could not create $DIR"; exit; }
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
80 cat > $DIR/tbcover.m << EOF
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
81 % !!! DO NOT EDIT !!!
30932
3c3abe6dbe58 Don't leak build directories in installed directories (bug #62295).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30564
diff changeset
82 % generated automatically by mk-bc-overload-tst.sh
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
83 function s = tbcover (x, y)
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
84 s = '$class';
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
85 EOF
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
86 done
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
87
20305
4f911b4e012b allow bc-overload tests to be written to an arbitrary directory
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
88 cat > $output_dir/tbcover.m << EOF
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
89 % !!! DO NOT EDIT !!!
30932
3c3abe6dbe58 Don't leak build directories in installed directories (bug #62295).
Markus Mützel <markus.muetzel@gmx.de>
parents: 30564
diff changeset
90 % generated automatically by mk-bc-overload-tst.sh
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
91 function s = tbcover (x, y)
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
92 s = 'none';
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
93 EOF
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
94
10097
462fa695a565 Correct sh test syntax in build_bc_overload_tests.sh
Rik <rdrider0-list@yahoo.com>
parents: 10096
diff changeset
95 if test "$1" = "overloads_only" ; then
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
96 exit
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
97 fi
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
98
20305
4f911b4e012b allow bc-overload tests to be written to an arbitrary directory
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
99 cat > $output_dir/bc-overloads.tst << EOF
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
100 ## !!! DO NOT EDIT !!!
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 11523
diff changeset
101 ## THIS IS AN AUTOMATICALLY GENERATED FILE
20305
4f911b4e012b allow bc-overload tests to be written to an arbitrary directory
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
102 ## modify build-bc-overload-tests.sh to generate the tests you need.
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
103
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
104 %!shared ex
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
105 %! ex.double = 1;
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 16030
diff changeset
106 %! ex.single = single (1);
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
107 %! ex.logical = true;
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
108 %! ex.char = 'char';
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
109 %! ex.int8 = int8 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
110 %! ex.int16 = int16 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
111 %! ex.int32 = int32 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
112 %! ex.int64 = int64 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
113 %! ex.uint8 = uint8 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
114 %! ex.uint16 = uint16 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
115 %! ex.uint32 = uint32 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
116 %! ex.uint64 = uint64 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
117 %! ex.cell = {};
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
118 %! ex.struct = struct ();
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
119 %! ex.function_handle = @numel;
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
120
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
121 EOF
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
122
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
123 cat $expected_results_file | \
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
124 while read cl1 cl2 clr ; do
20305
4f911b4e012b allow bc-overload tests to be written to an arbitrary directory
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
125 cat >> $output_dir/bc-overloads.tst << EOF
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
126 %% Name call
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
127 %!assert (tbcover (ex.$cl1, ex.$cl2), "$clr")
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
128 %% Handle call
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
129 %!assert ((@tbcover) (ex.$cl1, ex.$cl2), "$clr")
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
130
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
131 EOF
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
132 done
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
133
20305
4f911b4e012b allow bc-overload tests to be written to an arbitrary directory
John W. Eaton <jwe@octave.org>
parents: 19697
diff changeset
134 cat >> $output_dir/bc-overloads.tst << EOF
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
135 %%test handles through cellfun
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
136 %!test
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
137 %! f = fieldnames (ex);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
138 %! n = numel (f);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
139 %! s = c1 = c2 = cell (n);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
140 %! for i = 1:n
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
141 %! for j = 1:n
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
142 %! c1{i,j} = ex.(f{i});
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
143 %! c2{i,j} = ex.(f{j});
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
144 %! s{i,j} = tbcover (ex.(f{i}), ex.(f{j}));
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
145 %! endfor
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
146 %! endfor
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
147 %! assert (cellfun (@tbcover, c1, c2, "uniformoutput", false), s);
10096
ffc5426c85a4 build_bc_overload_tests.sh: accept expected results file as argument
John W. Eaton <jwe@octave.org>
parents: 10090
diff changeset
148 EOF