Mercurial > octave
changeset 33011:4c53ef3f3671
maint: Merge stable to default.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Mon, 12 Feb 2024 18:02:09 +0100 |
parents | 38112a5ee9c6 (current diff) 175eb207d9d9 (diff) |
children | c8fd3846064d |
files | libinterp/parse-tree/bp-table.cc |
diffstat | 3 files changed, 57 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/debug.cc Mon Feb 11 16:01:03 2019 +0000 +++ b/libinterp/corefcn/debug.cc Mon Feb 12 18:02:09 2024 +0100 @@ -541,7 +541,7 @@ %!test %! if (isguirunning ()) %! orig_show_dbg = __event_manager_gui_preference__ ("editor/show_dbg_file", -%! "0"); +%! "false"); %! endif %! unwind_protect %! dbclear all; # Clear out breakpoints before test
--- a/libinterp/parse-tree/bp-table.cc Mon Feb 11 16:01:03 2019 +0000 +++ b/libinterp/parse-tree/bp-table.cc Mon Feb 12 18:02:09 2024 +0100 @@ -543,18 +543,28 @@ /* %!test -%! dbclear all; # Clear out breakpoints before test -%! dbstop help; -%! dbstop in ls; -%! dbstop help at 105; # 105 is a comment; code line is at 106 -%! dbstop in ls 123; # 123 is a comment; code line is at 126 -%! dbstop help 204 if a==5; -%! dbstop if error Octave:undefined-function; -%! s = dbstatus; -%! dbclear all; -%! assert ({s.bkpt(:).name}, {"help", "help", "help>do_contents", "ls", "ls"}); -%! assert ([s.bkpt(:).line], [56, 106, 208, 63, 126]); -%! assert (s.errs, {"Octave:undefined-function"}); +%! if (isguirunning ()) +%! orig_show_dbg = __event_manager_gui_preference__ ("editor/show_dbg_file", +%! "false"); +%! endif +%! unwind_protect +%! dbclear all; # Clear out breakpoints before test +%! dbstop help; +%! dbstop in ls; +%! dbstop help at 105; # 105 is a comment; code line is at 106 +%! dbstop in ls 123; # 123 is a comment; code line is at 126 +%! dbstop help 204 if a==5; +%! dbstop if error Octave:undefined-function; +%! s = dbstatus; +%! dbclear all; +%! assert ({s.bkpt(:).name}, {"help", "help", "help>do_contents", "ls", "ls"}); +%! assert ([s.bkpt(:).line], [56, 106, 208, 63, 126]); +%! assert (s.errs, {"Octave:undefined-function"}); +%! unwind_protect_cleanup +%! if (isguirunning ()) +%! __event_manager_gui_preference__ ("editor/show_dbg_file", orig_show_dbg); +%! endif +%! end_unwind_protect */ void
--- a/test/classdef-debug/test_classdef_breakpoints.tst Mon Feb 11 16:01:03 2019 +0000 +++ b/test/classdef-debug/test_classdef_breakpoints.tst Mon Feb 12 18:02:09 2024 +0100 @@ -10,22 +10,40 @@ %! endif %!endfunction -## Add breakpoints in different member functions using line numbers. %!test <*46451> -%! dbstop classdef_breakpoints 13 7 10; -%! assert_dbstatus ([7, 10, 13]); - -## Remove one breakpoint and confirm the others remain. -%!test <*46451> -%! dbclear classdef_breakpoints 10; -%! assert_dbstatus ([7, 13]); +%! if (isguirunning ()) +%! orig_show_dbg = __event_manager_gui_preference__ ("editor/show_dbg_file", +%! "false"); +%! endif +%! unwind_protect +%! ## Add breakpoints in different member functions using line numbers. +%! dbstop classdef_breakpoints 13 7 10; +%! assert_dbstatus ([7, 10, 13]); +%! +%! ## Remove one breakpoint and confirm the others remain. +%! dbclear classdef_breakpoints 10; +%! assert_dbstatus ([7, 13]); +%! +%! ## Clear all breakpoints, none should be left. +%! dbclear classdef_breakpoints; +%! assert_dbstatus ([]); +%! unwind_protect_cleanup +%! if (isguirunning ()) +%! __event_manager_gui_preference__ ("editor/show_dbg_file", orig_show_dbg); +%! endif +%! end_unwind_protect -## Add breakpoint in local function. %!test <46451> -%! dbstop classdef_breakpoints 19; -%! assert_dbstatus ([7, 13, 20]); - -## Clear all breakpoints, none should be left. -%!test <*46451> -%! dbclear classdef_breakpoints; -%! assert_dbstatus ([]); +%! if (isguirunning ()) +%! orig_show_dbg = __event_manager_gui_preference__ ("editor/show_dbg_file", +%! "false"); +%! endif +%! unwind_protect +%! ## Add breakpoint in local function. +%! dbstop classdef_breakpoints 19; +%! assert_dbstatus ([7, 13, 20]); +%! unwind_protect_cleanup +%! if (isguirunning ()) +%! __event_manager_gui_preference__ ("editor/show_dbg_file", orig_show_dbg); +%! endif +%! end_unwind_protect