Mercurial > octave
annotate test/mk_bc_overloads_expected.m @ 30920:47cbc69e66cd
eliminate direct access to call stack from evaluator
The call stack is an internal implementation detail of the evaluator.
Direct access to it outside of the evlauator should not be needed.
* pt-eval.h (tree_evaluator::get_call_stack): Delete.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 08 Apr 2022 15:19:22 -0400 |
parents | fc4bb4bd1d5e |
children |
rev | line source |
---|---|
28942
fc4bb4bd1d5e
maint: Use '##' as lead-in for full-line comments.
Rik <rik@octave.org>
parents:
23710
diff
changeset
|
1 %% this script is intended to be Matlab compatible |
fc4bb4bd1d5e
maint: Use '##' as lead-in for full-line comments.
Rik <rik@octave.org>
parents:
23710
diff
changeset
|
2 %% first, run the script |
10090
655ab6f6c369
add tests for built-in class overloads
Jaroslav Hajek <highegg@gmail.com>
parents:
diff
changeset
|
3 % |
28942
fc4bb4bd1d5e
maint: Use '##' as lead-in for full-line comments.
Rik <rik@octave.org>
parents:
23710
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 % |
28942
fc4bb4bd1d5e
maint: Use '##' as lead-in for full-line comments.
Rik <rik@octave.org>
parents:
23710
diff
changeset
|
6 %% to generate the overloaded functions. |
10090
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) |