Mercurial > hg > octave-nkf
annotate test/build_bc_overloads_expected.m @ 15536:2e8eb9ac43a5 stable rc-3-6-4-0
3.6.4-rc0 release candidate
* configure.ac (AC_INIT): Version is now 3.6.2-rc0.
(OCTAVE_RELEASE_DATE): Now 2012-05-11.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 17 Oct 2012 10:05:44 -0400 |
parents | c3309e1ec50d |
children | b1283d4c06c2 |
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) |