Added a octave test for the concatenation operator.

Swig types can be used by the operators [a,b] or [a;b] if an octave
overload functions horzcat.m or vertcat.m are added in a @swig_ref
subdirectory.
This requires that is_object() (isobject() for octave >= 4.4) returns
true for swig types which is ensured by the swig octave runtime.
This commit is contained in:
Markus Friedrich 2019-11-24 15:01:55 +01:00
commit 7271ea805a
2 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,6 @@
% test octaves concatenation operator
function ret=horzcat(a, b)
% return the concatenation of two ComplexVal values as a cell array.
% (not really useful but it tests the concatenation of swig_ref objects)
ret={a, b};
end

View file

@ -42,3 +42,7 @@ if swig_octave_prereq(3,8,0)
printf("conj(a) = %s\n", disp(conj(a)));
printf("exp(a) = %s\n", disp(exp(a)));
endif
# concatenation operator
g = [a, b, c];
printf("g = %s\n",disp(g));