octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

patch - tests in bitfcns


From: John W. Eaton
Subject: patch - tests in bitfcns
Date: Wed, 15 Jul 2009 14:26:59 -0400

On 14-Jul-2009, Robert T. Short wrote:

| Attached is a patch that adds tests to src/bitfcns.cc.
| 
| Some notes.
| 
| MATLAB does not support the bit operations on signed types (int8, int16, 
| int32, int64) so the tests for those do not run in MATLAB.
| 
| The tests for the uint types all work in MATLAB.  There are some 
| "xtests" for tests that pass in MATLAB but fail in octave.  I assume 
| these are bugs.

You have

  xtest assert(bitshift(uint8(0:15),1),uint8(3),uint8([0 2 4 6 0 2 4 6 0 2 4 6 
0 2 4 6]))

Adding some whitespace so I can see what is going on, this is

  assert (bitshift (uint8 (0:15), 1),
          uint8 (3),
          uint8 ([0 2 4 6 0 2 4 6 0 2 4 6 0 2 4 6]))

Did you really mean

  assert (bitshift (uint8 (0:15), 1, uint8 (3)),
          uint8 ([0 2 4 6 0 2 4 6 0 2 4 6 0 2 4 6]))

?  If so, then I think Octave also passes this test.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]