Mercurial > octave-nkf
comparison test/test_global.m @ 14131:c3309e1ec50d stable
test: Use Octave coding and spacing conventions for fixed test scripts
* build_bc_overload_tests.sh, build_bc_overloads_expected.m,
build_sparse_tests.sh, test_args.m, test_contin.m, test_diag_perm.m,
test_error.m, test_eval-catch.m, test_for.m, test_func.m, test_global.m,
test_if.m, test_index.m, test_io.m, test_logical_index.m, test_null_assign.m,
test_parser.m, test_prefer.m, test_range.m, test_recursion.m, test_return.m,
test_slice.m, test_struct.m, test_switch.m, test_system.m, test_transpose.m,
test_try.m, test_unwind.m, test_while.m:
Use Octave coding and spacing conventions for fixed test scripts.
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Sun, 01 Jan 2012 20:04:52 -0800 |
parents | fd0a3ac60b0e |
children | 72c96de7a403 |
comparison
equal
deleted
inserted
replaced
14130:e13bfbc2c4c5 | 14131:c3309e1ec50d |
---|---|
17 ## <http://www.gnu.org/licenses/>. | 17 ## <http://www.gnu.org/licenses/>. |
18 | 18 |
19 %% test/octave.test/global/global-1.m | 19 %% test/octave.test/global/global-1.m |
20 %!test | 20 %!test |
21 %! global G = 1; | 21 %! global G = 1; |
22 %! assert(G,1) | 22 %! assert (G,1); |
23 | 23 |
24 %% test/octave.test/global/global-2.m | 24 %% test/octave.test/global/global-2.m |
25 %!function f () | 25 %!function f () |
26 %! global G; | 26 %! global G; |
27 %! assert(G,1); | 27 %! assert (G,1); |
28 %!endfunction | |
28 %!test | 29 %!test |
29 %! global G = 1; | 30 %! global G = 1; |
30 %! f; | 31 %! f; |
31 | 32 |
32 %% test/octave.test/global/global-3.m | 33 %% test/octave.test/global/global-3.m |
33 %!function f () | 34 %!function f () |
34 %! fail("G"); | 35 %! fail ("G"); |
36 %!endfunction | |
35 %!test | 37 %!test |
36 %! global G = 1; | 38 %! global G = 1; |
37 %! f(); | 39 %! f(); |
38 | 40 |
39 %% test/octave.test/global/global-4.m | 41 %% test/octave.test/global/global-4.m |
40 %!function f () | 42 %!function f () |
41 %! global H = 1; | 43 %! global H = 1; |
44 %!endfunction | |
42 %!test | 45 %!test |
43 %! f; | 46 %! f; |
44 %! fail("H"); | 47 %! fail ("H"); |
45 | 48 |
46 %% test/octave.test/global/global-5.m | 49 %% test/octave.test/global/global-5.m |
47 %!function f () | 50 %!function f () |
48 %! global H = 1; | 51 %! global H = 1; |
52 %!endfunction | |
49 %!test | 53 %!test |
50 %!function g () | 54 %!function g () |
51 %! fail("H"); | 55 %! fail ("H"); |
52 %!test | 56 %!test |
53 %! g(); | 57 %! g(); |
54 | 58 |
55 %% test/octave.test/global/global-6.m | 59 %% test/octave.test/global/global-6.m |
56 %!function f () | 60 %!function f () |
57 %! global H = 1; | 61 %! global H = 1; |
62 %!endfunction | |
58 %!function g () | 63 %!function g () |
59 %! global H; | 64 %! global H; |
60 %! assert(H,1); | 65 %! assert (H,1); |
66 %!endfunction | |
61 %!test | 67 %!test |
62 %! f(); | 68 %! f(); |
63 %! g(); | 69 %! g(); |
64 | 70 |
65 %% test/octave.test/global/global-7.m | 71 %% test/octave.test/global/global-7.m |
66 %!test | 72 %!test |
67 %!function f () | 73 %!function f () |
68 %! global H = 1; | 74 %! global H = 1; |
75 %!endfunction | |
69 %!test | 76 %!test |
70 %! fail("H"); | 77 %! fail ("H"); |
71 | 78 |
72 %% test/octave.test/global/global-8.m | 79 %% test/octave.test/global/global-8.m |
73 %!function f () | 80 %!function f () |
74 %! global H = 1; | 81 %! global H = 1; |
82 %!endfunction | |
75 %!function g () | 83 %!function g () |
76 %! global H; | 84 %! global H; |
77 %! assert(H,1) | 85 %! assert (H,1); |
86 %!endfunction | |
78 %!test | 87 %!test |
79 %! f; | 88 %! f; |
80 %! clear H | 89 %! clear H; |
81 %! g; | 90 %! g; |
82 | 91 |