comparison scripts/miscellaneous/xor.m @ 19227:8661727db27a

xor.m: Fix failing BIST test. * xor.m: Fix failing BIST test.
author Rik <rik@octave.org>
date Tue, 30 Sep 2014 11:45:48 -0700
parents c3611856cdd4
children db92e7e28e1f
comparison
equal deleted inserted replaced
19226:8a8a7bc2a09d 19227:8661727db27a
90 90
91 %!assert (xor (eye (2), fliplr (eye (2))), logical (ones (2))) 91 %!assert (xor (eye (2), fliplr (eye (2))), logical (ones (2)))
92 %!assert (xor (speye (2), fliplr (speye (2))), sparse (logical (ones (2)))) 92 %!assert (xor (speye (2), fliplr (speye (2))), sparse (logical (ones (2))))
93 93
94 ## Test XOR reduction 94 ## Test XOR reduction
95 %!assert (xor ([1 0], [1 1], [0 0]), [0 1]) 95 %!assert (xor ([1 0], [1 1], [0 0]), logical ([0 1]))
96 96
97 %% Test input validation 97 %% Test input validation
98 %!error xor () 98 %!error xor ()
99 %!error xor (1) 99 %!error xor (1)
100 %!error <X and Y must be of compatible size> xor (ones (3,2), ones (2,3)) 100 %!error <X and Y must be of compatible size> xor (ones (3,2), ones (2,3))