Mercurial > octave-nkf
annotate test/test_error.m @ 14026:3781981be535 ss-3-5-90
snapshot 3.5.90
* configure.ac (AC_INIT): Version is now 3.5.90.
(OCTAVE_API_VERSION_NUMBER): Now 46.
(OCTAVE_RELEASE_DATE): Now 2011-12-11.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 11 Dec 2011 23:18:31 -0500 |
parents | fd0a3ac60b0e |
children | c3309e1ec50d |
rev | line source |
---|---|
11523 | 1 ## Copyright (C) 2006-2011 John W. Eaton |
7016 | 2 ## |
3 ## This file is part of Octave. | |
4 ## | |
5 ## Octave is free software; you can redistribute it and/or modify it | |
6 ## under the terms of the GNU General Public License as published by | |
7 ## the Free Software Foundation; either version 3 of the License, or (at | |
8 ## your option) any later version. | |
9 ## | |
10 ## Octave is distributed in the hope that it will be useful, but | |
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 ## General Public License for more details. | |
14 ## | |
15 ## You should have received a copy of the GNU General Public License | |
16 ## along with Octave; see the file COPYING. If not, see | |
17 ## <http://www.gnu.org/licenses/>. | |
18 | |
5590 | 19 %% test/octave.test/error/error-1.m |
20 %!function g () | |
21 %! error ("foo"); | |
22 %!function f () | |
23 %! g (); | |
24 %!error <foo> f (); | |
25 | |
26 %% test/octave.test/error/error-2.m | |
27 %!function g () | |
28 %! error ("foo\n"); | |
29 %!function f () | |
30 %! g | |
31 %!error <foo> f (); | |
32 | |
33 %% test/octave.test/error/error-3.m | |
34 %!error error (); | |
35 | |
36 %% test/octave.test/error/error-4.m | |
37 %!error <foo> error ("foo\n"); | |
38 | |
5775 | 39 %% FIXME Why can't I use %!warning <foo> f; |
5590 | 40 %% test/octave.test/error/warning-1.m |
41 %!function g () | |
42 %! warning ("foo"); | |
43 %!function f () | |
44 %! g; | |
45 %!test | |
46 %! fail("f","warning","foo"); | |
47 | |
48 %% test/octave.test/error/warning-2.m | |
49 %!test | |
50 %! st.identifier = "backtrace"; | |
51 %! ws = warning ("query","backtrace"); | |
52 %! warning ("on","backtrace"); | |
53 %! st.state = "on"; | |
54 %! assert(warning ("query","backtrace"),st); | |
55 %! warning ("off","backtrace"); | |
56 %! st.state = "off"; | |
57 %! assert(warning ("query","backtrace"),st); | |
58 %! warning (ws.state,"backtrace"); | |
59 | |
5775 | 60 %% FIXME This test no longer makes sense with new warning syntax |
5590 | 61 %% test/octave.test/error/warning-3.m |
62 %!#warning <foo> warning ("foo", 1); | |
63 | |
64 %% test/octave.test/error/usage-1.m | |
65 %!function g () | |
66 %! usage ("foo"); | |
67 %!function f () | |
68 %! g (); | |
7884
e88411265a75
fix tests for usage in test_error.m
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
69 %!error <foo> f (); |
5590 | 70 |
71 %% test/octave.test/error/usage-2.m | |
72 %!function g () | |
73 %! usage ("foo"); | |
74 %!function f () | |
75 %! g | |
7884
e88411265a75
fix tests for usage in test_error.m
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
76 %!error <foo> f (); |
5590 | 77 |
78 %% test/octave.test/error/usage-3.m | |
79 %!error usage (); | |
80 | |
81 %% test/octave.test/error/usage-4.m | |
82 %!error <foo> usage ("foo\n"); | |
83 |