annotate test/build_bc_overloads_expected.m @ 20595:c1a6c31ac29a

eliminate more simple uses of error_state * ov-classdef.cc: Eliminate simple uses of error_state.
author John W. Eaton <jwe@octave.org>
date Tue, 06 Oct 2015 00:20:02 -0400
parents b1283d4c06c2
children
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;
16213
b1283d4c06c2 test: Use Octave coding standards for scripts in test/ directory.
Rik <rik@octave.org>
parents: 14131
diff changeset
9 ex.single = single (1);
10090
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)