changeset 28916:ec591c500fa4

maint: Use Octave convention of space after function name in test/. * args.tst, testclass54995.m, myclass2.m, command.tst, complex.tst, diag-perm.tst, eval-catch.tst, if.tst, index.tst, inline-fcn.tst, parser.tst, test_script.m, try.tst: Use Octave convention of space after function name.
author Rik <rik@octave.org>
date Tue, 13 Oct 2020 19:56:23 -0700
parents c40a367a84c0
children 72d57dbcc305
files test/args.tst test/bug-54995/@testclass54995/testclass54995.m test/bug-58593/myclass2.m test/command.tst test/complex.tst test/diag-perm.tst test/eval-catch.tst test/if.tst test/index.tst test/inline-fcn.tst test/parser.tst test/publish/test_script.m test/try.tst
diffstat 13 files changed, 39 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/test/args.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/args.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -219,7 +219,7 @@
 %! f()
 
 ## struct
-%!function f (x = struct("a", 3))
+%!function f (x = struct ("a", 3))
 %!  assert (x, struct ("a", 3));
 %!endfunction
 %!test
--- a/test/bug-54995/@testclass54995/testclass54995.m	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/bug-54995/@testclass54995/testclass54995.m	Tue Oct 13 19:56:23 2020 -0700
@@ -1,4 +1,4 @@
 function obj = testclass54995 ()
   obj = struct ("x", eye (4));
-  obj = class(obj, "testclass54995");
+  obj = class (obj, "testclass54995");
 endfunction
--- a/test/bug-58593/myclass2.m	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/bug-58593/myclass2.m	Tue Oct 13 19:56:23 2020 -0700
@@ -45,13 +45,13 @@
         switch (S(1).subs)
         case 'data'
           % Transform: obj.data --> obj.data_
-          if length(S)>1
+          if length (S)>1
             B = subsasgn (obj.data_, S(2:end), B);
           end
           obj.data_ = B;
         case 'alldata'
           % Transform: obj.data --> obj.data_(1:end)
-          if length(S)>1
+          if length (S)>1
             B = subsasgn (obj.data_(1:end), S(2:end), B);
           end
           % This statement should trigger *builtin* subsref to evaluate 'end',
@@ -59,7 +59,7 @@
           % 'end' here is also builtin 'end'
           obj.data_(1:end) = B;
         otherwise
-          error('Incorrect usage');
+          error ('Incorrect usage');
         end
       case '()'
         % Transform: obj(index) --> obj.data_(index)
--- a/test/command.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/command.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -174,5 +174,5 @@
 %! command_test w(m,1)   % edge weights
 %! assert (cmd_out, '|w(m,1)|');
 %!test
-%! command_test x2( size( x ) )
-%! assert (cmd_out, '|x2( size( x ) )|');
+%! command_test x2( size ( x ) )
+%! assert (cmd_out, '|x2( size ( x ) )|');
--- a/test/complex.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/complex.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -43,9 +43,9 @@
 
 ## bug #43313, -1 is both '>' and '==' to (-1 - 0i)
 %!test
-%! assert (complex(-1,0) == complex(-1,-0), true);
-%! assert (complex(-1,0) > complex(-1,-0), false);
-%! assert (complex(-1,0) < complex(-1,-0), false);
+%! assert (complex (-1,0) == complex (-1,-0), true);
+%! assert (complex (-1,0) > complex (-1,-0), false);
+%! assert (complex (-1,0) < complex (-1,-0), false);
 
 ## Test that sort and issorted both agree on boundary case
 %!test
--- a/test/diag-perm.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/diag-perm.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -232,7 +232,7 @@
 %! A = sprand (n, n, .5);
 %! scalefact = rand (n-2, 1);
 %! Dr = diag (scalefact, n, n-2);
-%! assert (full (Dr \ A), Dr \ full(A));
+%! assert (full (Dr \ A), Dr \ full (A));
 
 ## sparse inverse column scaling with a zero factor
 %!test
@@ -242,15 +242,15 @@
 %! Dc = diag (scalefact);
 %! scalefact(n-1) = Inf;
 %! Dc(n-1, n-1) = 0;
-%! assert (full (A / Dc), full(A) / Dc);
+%! assert (full (A / Dc), full (A) / Dc);
 
 ## short sparse inverse column scaling
 %!test
 %! n = 7;
 %! A = sprand (n, n, .5);
-%! scalefact = rand (1, n-2) + I () * rand(1, n-2);
+%! scalefact = rand (1, n-2) + I () * rand (1, n-2);
 %! Dc = diag (scalefact, n-2, n);
-%! assert (full (A / Dc), full(A) / Dc);
+%! assert (full (A / Dc), full (A) / Dc);
 
 ## adding sparse and diagonal stays sparse
 %!test
--- a/test/eval-catch.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/eval-catch.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -35,12 +35,12 @@
 
 %!test
 %! eval ("clear a; a; str = '';", "str=lasterr;");
-%! assert (lasterr()(1:13), "'a' undefined");
+%! assert (lasterr ()(1:13), "'a' undefined");
 %! assert (str(1:13), "'a' undefined");
 
 %!test
 %! eval ("error ('user-defined error'); str = '';", "str = lasterr;");
-%! assert (lasterr()(1:18), "user-defined error");
+%! assert (lasterr ()(1:18), "user-defined error");
 %! assert (str(1:18), "user-defined error");
 
 %!function ms = mangle (s)
--- a/test/if.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/if.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -133,5 +133,5 @@
 %! c1 = [2i 4i] || 0;
 %! c2 = [22 4i] || 0;
 %! c3 = i || 0;
-%! c4 = complex(0) || 0;
+%! c4 = complex (0) || 0;
 %! assert ([c1 c2 c3 c4], [true true true false]);
--- a/test/index.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/index.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -513,8 +513,8 @@
 %!error <index \(2\): out of bound 1>                1(2)
 %!error <index \(1\): out of bound 0>                [](1)
 %!error <index \(-1\): subscripts>                   1(1)(-1)(1)
-%!error <index \(_,1\): out of bound 0 \(dimensions are 5x0\)> zeros(5,0)(3,1)
-%!error <index \(3,_\): out of bound 0 \(dimensions are 0x5\)> zeros(0,5)(3,1)
+%!error <index \(_,1\): out of bound 0 \(dimensions are 5x0\)> zeros (5,0)(3,1)
+%!error <index \(3,_\): out of bound 0 \(dimensions are 0x5\)> zeros (0,5)(3,1)
 %!
 %!shared abc
 %! abc = [1, 2];
@@ -539,8 +539,8 @@
 %!error <=: nonconformant arguments \(op1 is 1x1, op2 is 1x5\)> abc(3,5) = 1:5
 
 ##  Test diagonal matrices, and access of function results
-%!error <index \(_,_,5\): out of bound 1 \(dimensions are 3x3\)> eye(3)(2,3,5)
-%!error <index \(-2,_\): subscripts>               eye(4)(-2,3)
+%!error <index \(_,_,5\): out of bound 1 \(dimensions are 3x3\)> eye (3)(2,3,5)
+%!error <index \(-2,_\): subscripts>               eye (4)(-2,3)
 
 ##  Test cells
 %!shared abc
@@ -558,7 +558,7 @@
 
 ##  Test sparse matrices
 %!shared abc
-%! abc = sparse(3,3);
+%! abc = sparse (3,3);
 %!error <abc\(-1\): subscripts>                abc(-1)
 %!error <abc\(-1\): subscripts>                abc(-1) = 1
 %!error <abc\(-1,_\): subscripts>              abc(-1,1)
@@ -578,7 +578,7 @@
 %! abc = [1 2];
 %!error <abc\(0\+1i\): subscripts must be real>     abc(i)
 %! abc = [1 2; 3 4];
-%!error <abc\(1\+0i\): subscripts must be real>     abc(complex(1))
+%!error <abc\(1\+0i\): subscripts must be real>     abc(complex (1))
 %!error <abc\(1\+0.5i,_\): subscripts must be real> abc(1+0.5*i,3)
 %!error <abc\(_,0-2i\): subscripts must be real>    abc(2,0-2*i)
 
@@ -587,6 +587,6 @@
 %! a(1,1,1).b(1) = 3;
 
 %!test <*39789>
-%! c = cell(1,1,1);
+%! c = cell (1,1,1);
 %! c{1,1,1} = zeros(5, 2);
 %! c{1,1,1}(:, 1) = 1;
--- a/test/inline-fcn.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/inline-fcn.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -6,7 +6,7 @@
 %!assert (fn (6), 37)
 %!assert (feval (inline ("sum (x(:))"), [1 2; 3 4]), 10)
 %!assert (feval (inline ("sqrt (x^2 + y^2)", "x", "y"), 3, 4), 5)
-%!assert (feval (inline ("exp (P1*x) + P2", 3), 3, 4, 5), exp(3*4) + 5)
+%!assert (feval (inline ("exp (P1*x) + P2", 3), 3, 4, 5), exp (3*4) + 5)
 
 ## Test input validation
 %!error inline ()
--- a/test/parser.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/parser.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -104,7 +104,7 @@
 %! assert (2 ^++a, 8);
 %! assert (a, 3);
 %! assert (a' ^2, 9);
-%! assert (2 ^sin(0), 1);
+%! assert (2 ^sin (0), 1);
 %! assert (-2 ^2, -4);;
 %! assert (2 ^+1 ^3, 8);
 %! assert (2 ^-1 ^3, 0.125);
@@ -214,7 +214,7 @@
 ## Level 13 (parentheses and indexing)
 %!test
 %! a.b1 = 2;
-%! assert (a.(strcat('b','1'))++, 2);
+%! assert (a.(strcat ('b','1'))++, 2);
 %! assert (a.b1, 3);
 %! b = {1 2 3 4 5};
 %! assert (b{(a. b1 + 1)}, 4);
@@ -335,7 +335,7 @@
 #!error <vertical dimensions mismatch \(1x2 vs 1x1\)> z = [1, 2; 3]
 
 %!test
-%! f = @(s,t=toeplitz(s),u=t(x=2:end-1,x)=32)t;
+%! f = @(s,t=toeplitz (s),u=t(x=2:end-1,x)=32)t;
 %! assert (f (1), 1);
 %! assert (f (1, 2), 2);
 
--- a/test/publish/test_script.m	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/publish/test_script.m	Tue Oct 13 19:56:23 2020 -0700
@@ -32,7 +32,7 @@
 i = 0:2*pi
 
 # some real comment
-y = sin(i)
+y = sin (i)
 
 %%
 %
@@ -43,16 +43,16 @@
 x = 0:2*pi
 
 # some real comment and split code block
-y = sin(x)
+y = sin (x)
 
 %%
 %
 
 % reusing old values
-y = cos(i)
+y = cos (i)
 
 # some real comment and split code block
-y = cos(x)
+y = cos (x)
 
 %% Text formatting
 % PLAIN TEXT _ITALIC TEXT_ *BOLD TEXT* |MONOSPACED TEXT|
--- a/test/try.tst	Tue Oct 13 19:49:11 2020 -0700
+++ b/test/try.tst	Tue Oct 13 19:56:23 2020 -0700
@@ -65,9 +65,9 @@
 %!   a;
 %!   error ("Shouldn't get here");
 %! catch
-%!   assert (lasterr()(1:13), "'a' undefined");
+%!   assert (lasterr ()(1:13), "'a' undefined");
 %! end_try_catch
-%! assert (lasterr()(1:13), "'a' undefined");
+%! assert (lasterr ()(1:13), "'a' undefined");
 
 %!test
 %! try
@@ -96,13 +96,13 @@
 %!     a;
 %!     error ("Shouldn't get here");
 %!   catch
-%!     assert (lasterr()(1:13), "'a' undefined");
+%!     assert (lasterr ()(1:13), "'a' undefined");
 %!   end_try_catch
 %!   clear b;
 %!   b;
 %!   error ("Shouldn't get here");
 %! catch
-%!   assert (lasterr()(1:13), "'b' undefined");
+%!   assert (lasterr ()(1:13), "'b' undefined");
 %! end_try_catch
 
 %!test
@@ -112,12 +112,12 @@
 %!   error ("Shouldn't get here");
 %! catch
 %!   try
-%!     assert (lasterr()(1:13), "'a' undefined");
+%!     assert (lasterr ()(1:13), "'a' undefined");
 %!     clear b;
 %!     b;
 %!     error ("Shouldn't get here");
 %!   catch
-%!     assert (lasterr()(1:13), "'b' undefined");
+%!     assert (lasterr ()(1:13), "'b' undefined");
 %!   end_try_catch
 %! end_try_catch
 
@@ -131,7 +131,7 @@
 %!     error (["rethrow: " lasterr]);
 %!   end_try_catch
 %! catch
-%!   assert (lasterr()(1:22), "rethrow: 'a' undefined");
+%!   assert (lasterr ()(1:22), "rethrow: 'a' undefined");
 %! end_try_catch
 
 %!test