Skip to content

Commit 25d0549

Browse files
committed
Check for octave in some version-specific tests
I have checked all these in Octave as I made the changes.
1 parent 4467fa0 commit 25d0549

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

@chebfun/nextpow2.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
% NEXTPOW2 is not vectorized in versions of MATLAB prior to R2010a. Vectorize
2727
% it manually if we're running on older platforms.
28-
if ( verLessThan('matlab', '7.10') )
28+
if ( ~is_octave() && verLessThan('matlab', '7.10') )
2929
mynextpow2 = @nextpow2Vectorized;
3030
else
3131
mynextpow2 = @nextpow2;

tests/chebfun/test_airy.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
for scale = 0
2929

3030
% AIRY does not support the "scale" input prior to R2013a.
31-
if ( compatible_verLessThan('matlab', '8.1') )
31+
if ( ~is_octave() && verLessThan('matlab', '8.1') )
3232
F = @(x) airy(K, (1+im*1i)*x);
3333
else
3434
F = @(x) airy(K, (1+im*1i)*x, scale);

tests/chebfun/test_nextpow2.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
% NEXTPOW2 is not vectorized in versions of MATLAB prior to R2010a. Vectorize
1414
% it manually if we're running on older platforms.
15-
if ( verLessThan('matlab', '7.10') )
15+
if ( ~is_octave() && verLessThan('matlab', '7.10') )
1616
mynextpow2 = @nextpow2Vectorized;
1717
else
1818
mynextpow2 = @nextpow2;

tests/classicfun/test_minus.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,13 @@
7070
g = bndfun(g_op, data, pref);
7171
try
7272
h = f - g; %#ok<NASGU>
73-
if ( verLessThan('matlab', '9.1') )
73+
if ( ~is_octave() && verLessThan('matlab', '9.1') )
7474
pass(18) = false;
7575
else
7676
pass(18) = true;
7777
end
7878
catch ME
79-
if ( verLessThan('matlab', '9.1') )
79+
if ( ~is_octave() && verLessThan('matlab', '9.1') )
8080
pass(18) = strcmp(ME.message, 'Matrix dimensions must agree.');
8181
else
8282
pass(18) = false;

tests/classicfun/test_plus.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,13 @@
7373
g = bndfun(g_op, data, pref);
7474
try
7575
h = f + g; %#ok<NASGU>
76-
if ( verLessThan('matlab', '9.1') )
76+
if ( ~is_octave() && verLessThan('matlab', '9.1') )
7777
pass(18) = false;
7878
else
7979
pass(18) = true;
8080
end
8181
catch ME
82-
if ( verLessThan('matlab', '9.1') )
82+
if ( ~is_octave() && verLessThan('matlab', '9.1') )
8383
pass(18) = strcmp(ME.message, 'Matrix dimensions must agree.');
8484
else
8585
pass(18) = false;

0 commit comments

Comments
 (0)