annotate test/bug-38576.tst @ 19507:25f535b90e52

Change boolMatrix to subclass boolNDArray rather than be another Array<bool>. * boolMatrix.h: both boolMatrix and boolNDArray are Array<bool>, the first being simply 2 dimensional. We change this so that boolMatrix inherits from boolNDArray instead. * boolNDArray.cc, boolNDArray.h (boolNDArray::matrix_value): remove method since boolMatrix can be constructed from its parent. (boolNDArray::boolNDArray): remove constructor from boolMatrix * pr-output.cc, octave-value/ov-bool-mat.cc, octave-value/ov-bool-mat.h: replace calls to boolNDArray::matrix_value () with the boolMatrix constructor.
author Carnë Draug <carandraug@octave.org>
date Mon, 20 Oct 2014 01:34:52 +0100
parents 730bc06134f9
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16360
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 %!function r = f1 ()
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 %! ls = svd (1);
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3 %! r = eval ("ls -1;");
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 %!endfunction
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 %!function r = f2 ()
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 %! [u,ls,v] = svd (1);
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 %! r = eval ("ls -1;");
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 %!endfunction
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 %!function r = f3 (ls)
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 %! r = eval ("ls -1;");
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 %!endfunction
11115c237231 recognize variables when parsing (bug #38576)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12
17913
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
13 %!test
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
14 %! ## Windows systems can't run "ls -1"
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
15 %! if (! ispc ())
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
16 %! assert (f1 (), 0);
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
17 %! assert (f2 (), 0);
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
18 %! assert (ischar (f3 ()), true);
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
19 %! assert (f3 (1), 0);
730bc06134f9 test: Don't run bug-38576.tst on Windows systems where ls does not exist.
Rik <rik@octave.org>
parents: 16360
diff changeset
20 %! endif