Mercurial > octave
view test/error.tst @ 22613:edd04ce99891
Remove functions deprecated in version 4.0.
* NEWS: Announce functions that were removed.
* ov-range.cc (allow_noninteger_range_as_index): Remove DEFUN.
Remove static variable Vallow_noninteger_range_as_index.
* ov-range.cc (octave_range::index_vector): Remove reference to
Vallow_noninteger_range_as_index.
* pt-binop.cc (do_braindead_shortcircuit_evaluation): Remove DEFUN.
Remove static variable Vdo_braindead_shortcircuit_evaluation.
* pt-binop.cc (tree_binary_expression::rvalue1): Remove reference to
Vdo_braindead_shortcircuit_evaluation.
* scripts/deprecated/bicubic.m: Delete file.
* scripts/deprecated/delaunay3.m: Delete file.
* scripts/deprecated/dump_prefs.m: Delete file.
* scripts/deprecated/find_dir_in_path.m: Delete file.
* scripts/deprecated/finite.m: Delete file.
* scripts/deprecated/fmod.m: Delete file.
* scripts/deprecated/fnmatch.m: Delete file.
* scripts/deprecated/gmap40.m: Delete file.
* scripts/deprecated/loadaudio.m: Delete file.
* scripts/deprecated/luinc.m: Delete file.
* scripts/deprecated/mouse_wheel_zoom.m: Delete file.
* scripts/deprecated/nfields.m: Delete file.
* scripts/deprecated/octave_tmp_file_name.m: Delete file.
* scripts/deprecated/playaudio.m: Delete file.
* scripts/deprecated/saveaudio.m: Delete file.
* scripts/deprecated/setaudio.m: Delete file.
* scripts/deprecated/syl.m: Delete file.
* scripts/deprecated/usage.m: Delete file.
* scripts/deprecated/module.mk: Remove deleted scripts from build system.
* error.tst: Remove tests for usage.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 11 Oct 2016 09:49:21 -0700 |
parents | bac0d6f07a3e |
children | 3a2b891d0b33 |
line wrap: on
line source
## Copyright (C) 2006-2016 John W. Eaton ## ## This file is part of Octave. ## ## Octave is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or (at ## your option) any later version. ## ## Octave is distributed in the hope that it will be useful, but ## WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with Octave; see the file COPYING. If not, see ## <http://www.gnu.org/licenses/>. ## Test %!error usage %!function g () %! error ("foo"); %!endfunction %!function f () %! g (); %!endfunction %!error <foo> f () %!function g () %! error ("foo\n"); %!endfunction %!function f () %! g %!endfunction %!error <foo> f () %!error error () %!error <foo> error ("foo\n") ## Test %!warning usage %!function g () %! warning ("foo"); %!endfunction %!function f () %! g; %!endfunction %!warning <foo> f () %!test %! st.identifier = "backtrace"; %! ws = warning ("query", "backtrace"); %! warning ("on", "backtrace"); %! st.state = "on"; %! assert (warning ("query", "backtrace"), st); %! warning ("off", "backtrace"); %! st.state = "off"; %! assert (warning ("query", "backtrace"), st); %! warning (ws.state, "backtrace"); %!shared t1_opts, t2_opts, t1_id, t1_state, saved_opts, saved_id, saved_state %! saved_opts = warning (); %! saved_id = {saved_opts.identifier}; %! saved_state = {saved_opts.state}; %! warning ("off", "all"); %! assert (warning (), struct ("identifier", {"all"}, "state", {"off"})); %! warning ("off", "all"); %! warning (saved_opts); %! t1_opts = struct ("identifier", {"foo:bar"}, "state", {"off"}); %! t1_id = {t1_opts.identifier}; %! t1_state = {t1_opts.state}; %! warning (t1_opts); %! t2_opts = struct ("identifier", [saved_id, t1_id], "state", [saved_state, t1_state]); %! assert (warning (), t2_opts); %! warning ("off", "all"); %! warning (saved_opts); ## Bug 36393 %!test %! w0 = warning; %! warnoffId = "MATLAB:singularMatrix"; %! warnstat = warning ("query", warnoffId); %! warnoff = warnstat; %! warnoff.state = "off"; %! warning (warnoff); # update warning status %! warning (warnstat); # reset warning status %! w = warning; %! assert (w, w0);