annotate test/build_bc_overloads_expected.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 655ab6f6c369
children b1283d4c06c2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
1 % this script is intended to be Matlab compatible
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
2 % first, run the script
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
3 %
14131
c3309e1ec50d test: Use Octave coding and spacing conventions for fixed test scripts
Rik <octave@nomad.inbox5.com>
parents: 10090
diff changeset
4 % ./build_bc_overloads_tests.sh overloads_only
10090
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
5 %
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
6 % to generate the overloaded functions.
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
7 %
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
8 ex.double = 1;
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
9 ex.single = single(1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
10 ex.logical = true;
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
11 ex.char = 'char';
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
12 ex.int8 = int8 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
13 ex.int16 = int16 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
14 ex.int32 = int32 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
15 ex.int64 = int64 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
16 ex.uint8 = uint8 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
17 ex.uint16 = uint16 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
18 ex.uint32 = uint32 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
19 ex.uint64 = uint64 (1);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
20 ex.cell = {};
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
21 ex.struct = struct ();
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
22 ex.function_handle = @numel;
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
23
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
24 f = fieldnames (ex);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
25 n = numel (f);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
26
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
27 fid = fopen ('bc_overloads_expected','w');
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
28 fid
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
29 for i = 1:n
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
30 for j = 1:n
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
31 s = tbcover (ex.(f{i}), ex.(f{j}));
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
32 fprintf (fid, '%s %s %s\n', f{i}, f{j}, s);
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
33 end
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
34 end
655ab6f6c369 add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff changeset
35 fclose (fid)