Mercurial > octave
annotate test/bug-59950.tst @ 31248:8b75954a4670
delaunayn: adjust node ordering for positive outward normal vectors (bug #53397)
* delaunayn.m: Check sign of simplex volume, flip node order for negative
volumes to ensure positive (outward-pointing) normal vectors. Add BISTs to
check for positive volumes.
* etc/News.8.md: Append function improvement note to delaunayn change
paragraph under General Improvements.
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Thu, 29 Sep 2022 23:09:05 -0400 |
parents | 796f54d4ddbf |
children | 597f3ee61a48 |
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 ()) |