annotate test/bug-59950.tst @ 31225:3eab70385569

sparse-xpow.cc: Use faster multiplication technique, this time for complex
author Arun Giridhar <arungiridhar@gmail.com>
date Sun, 11 Sep 2022 13:53:38 -0400
parents 796f54d4ddbf
children 597f3ee61a48
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
29356
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 ########################################################################
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 ##
30564
796f54d4ddbf update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 29493
diff changeset
3 ## Copyright (C) 2021-2022 The Octave Project Developers
29356
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 ##
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 ## See the file COPYRIGHT.md in the top-level directory of this
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 ## distribution or <https://octave.org/copyright/>.
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 ##
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 ## This file is part of Octave.
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 ##
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 ## Octave is free software: you can redistribute it and/or modify it
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 ## under the terms of the GNU General Public License as published by
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 ## the Free Software Foundation, either version 3 of the License, or
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 ## (at your option) any later version.
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
14 ##
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
15 ## Octave is distributed in the hope that it will be useful, but
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
16 ## WITHOUT ANY WARRANTY; without even the implied warranty of
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
17 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
18 ## GNU General Public License for more details.
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
19 ##
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
20 ## You should have received a copy of the GNU General Public License
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
21 ## along with Octave; see the file COPYING. If not, see
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
22 ## <https://www.gnu.org/licenses/>.
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
23 ##
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
24 ########################################################################
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
25
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
26 ## The following tests are for undocumented Matlab behavior.
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 %!shared x
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 %! x = 13;
29493
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
30 %!assert <*59950> (exist (''), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
31 %!assert <*59950> (exist ([]), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
32 %!assert <*59950> (exist ({}), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
33 %!assert <*59950> (exist (1:0), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
34 %!assert <*59950> (exist ('', 'var'), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
35 %!assert <*59950> (exist ([], 'builtin'), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
36 %!assert <*59950> (exist ({}, 'dir'), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
37 %!assert <*59950> (exist (1:0, 'file'), 0)
29376
107091f22e65 Return 0 if first argument to exist() is empty regardless of nargin value (bug #59950).
Rik <rik@octave.org>
parents: 29356
diff changeset
38 %!error exist (containers.Map ())
107091f22e65 Return 0 if first argument to exist() is empty regardless of nargin value (bug #59950).
Rik <rik@octave.org>
parents: 29356
diff changeset
39 %!error exist (containers.Map ())
29493
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
40 %!assert <*59950> (exist ('x', ''), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
41 %!assert <*59950> (exist ('x', []), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
42 %!assert <*59950> (exist ('x', {}), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
43 %!assert <*59950> (exist ('x', struct ([])), 0)
29356
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 %!error exist ('x', containers.Map ())
29493
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
45 %!assert <*59950> (exist (containers.Map (), ''), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
46 %!assert <*59950> (exist (containers.Map (), []), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
47 %!assert <*59950> (exist (containers.Map (), {}), 0)
de40b395b9c3 update bug status in test suite
John W. Eaton <jwe@octave.org>
parents: 29376
diff changeset
48 %!assert <*59950> (exist (containers.Map (), struct ([])), 0)
29356
65c57984a65e compatibility with undocumented Matlab behavior for exist function (bug #59950)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
49 %!error exist (containers.Map (), containers.Map ())