changeset 17285:f519560bfcb4

maint: Use Octave spacing conventions in cset 79d4b6089968. * liboctave/array/Sparse.cc: Use spacing conventions in %!tests, wrap long lines. * scripts/general/private/__isequal__.m: Use true/false rather than logical(1)/logical(0) for clarity.
author Rik <rik@octave.org>
date Tue, 20 Aug 2013 06:56:51 -0700
parents c8f94d9d34d0
children d5efffe5a789
files liboctave/array/Sparse.cc scripts/general/private/__isequal__.m
diffstat 2 files changed, 17 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/liboctave/array/Sparse.cc	Tue Aug 20 07:43:10 2013 -0400
+++ b/liboctave/array/Sparse.cc	Tue Aug 20 06:56:51 2013 -0700
@@ -2794,17 +2794,21 @@
 %! assert (s, sparse ([], [], [], 0, 1));
 
 ## Test (bug #37321)
-
-%!test a=sparse (0,0); assert (all (a)==sparse ([1]))
-%!test a=sparse (0,1); assert (all (a)==sparse ([1]))
-%!test a=sparse (1,0); assert (all (a)==sparse ([1]))
-%!test a=sparse (1,0); assert (all (a,2)==sparse ([1]))
-%!test a=sparse (1,0); assert (isequal (size (all (a,1)),[1 0]))
-%!test a=sparse (1,1); assert (all (a)==sparse ([0])), assert (isequal (size (all (a)),[1 1]))
-%!test a=sparse (2,1); assert (all (a)==sparse ([0])), assert (isequal (size (all (a)),[1 1]))
-%!test a=sparse (1,2); assert (all (a)==sparse ([0])), assert (isequal (size (all (a)),[1 1]))
-%!test a=sparse (2,2); assert (isequal(all (a),sparse ([0 0])))
-
+%!test a=sparse (0,0); assert (all (a) == sparse ([1]));
+%!test a=sparse (0,1); assert (all (a) == sparse ([1]));
+%!test a=sparse (1,0); assert (all (a) == sparse ([1]));
+%!test a=sparse (1,0); assert (all (a,2) == sparse ([1]));
+%!test a=sparse (1,0); assert (size (all (a,1)), [1 0]);
+%!test a=sparse (1,1);
+%! assert (all (a) == sparse ([0]));
+%! assert (size (all (a)), [1 1]);
+%!test a=sparse (2,1);
+%! assert (all (a) == sparse ([0]));
+%! assert (size (all (a)), [1 1]);
+%!test a=sparse (1,2);
+%! assert (all (a) == sparse ([0]));
+%! assert (size (all (a)), [1 1]);
+%!test a=sparse (2,2); assert (isequal (all (a), sparse ([0 0])));
 
 */
 
--- a/scripts/general/private/__isequal__.m	Tue Aug 20 07:43:10 2013 -0400
+++ b/scripts/general/private/__isequal__.m	Tue Aug 20 06:56:51 2013 -0700
@@ -176,9 +176,9 @@
   endif
 
   if (!t)
-    t=logical(0);
+    t = false;
   else
-    t=logical(1);
+    t = true;
   endif
 
 endfunction