annotate test/bug-38691/bug-38691.tst @ 16605:2f8fb02a6c31

erase subfunctions when primary function scope is deleted (bug #38691) * symtab.h (symbol_table::fcn_info::fcn_info_rep::clear_map): Rename from clear_unlocked. New arg, force. (symbol_table::fcn_info::fcn_info_rep::clear_autoload_function, (symbol_table::fcn_info::fcn_info::clear_autoload_function, symbol_table::fcn_info::fcn_info_rep::clear_user_function, symbol_table::fcn_info::fcn_info::clear_user_function, symbol_table::fcn_info::fcn_info_rep::clear, symbol_table::fcn_info::clear, symbol_table::clear_all, symbol_table::clear_functions.): New arg, force. (symbol_table::erase_scope): Call erase_subfunctions_in_scope. (symbol_table::do_pop_context, symbol_table::do_clear_global_pattern): Style fixes. * symtab.cc (symbol_table::cleanup): Simplify. * test/bug-38691/module.mk, test/bug-38691/bug-38691.tst, test/bug-38691/dir1/func1.m, test/bug-38691/dir2/func1.m, test/bug-38691/dir2/func2.m, test/bug-38691/dir2/func3.m: New files. * test/Makefile.am: Include bug-38691/module.mk.
author John W. Eaton <jwe@octave.org>
date Fri, 03 May 2013 01:16:41 -0400
parents
children 26992c04d5dc
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
16605
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 %!test
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
2 %! addpath dir1
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
3 %! [d1_r, d1_f1, d1_f2, d1_f3] = func1 (0);
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
4 %! addpath dir2
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
5 %! [d2_r, d2_f1, d2_f2, d2_f3] = func1 (0);
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
6 %! assert (d1_r, 0);
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
7 %! assert (d2_r, 1);
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
8 %! assert (d1_f1, "dir1/func1");
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
9 %! assert (d1_f2, "dir1/func2");
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
10 %! assert (d1_f3, "dir1/func3");
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
11 %! assert (d2_f1, "dir2/func1");
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
12 %! assert (d2_f2, "dir2/func2");
2f8fb02a6c31 erase subfunctions when primary function scope is deleted (bug #38691)
John W. Eaton <jwe@octave.org>
parents:
diff changeset
13 %! assert (d2_f3, "dir2/func3");