octave-maintainers
[Top][All Lists]
Advanced

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

Re: patch - tests in bitfcns


From: Robert T. Short
Subject: Re: patch - tests in bitfcns
Date: Wed, 15 Jul 2009 11:46:49 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.22) Gecko/20090606 SeaMonkey/1.1.17

John W. Eaton wrote:
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


Thanks. My bugs are better than octave bugs. Must have done something dumb in the translation back from MATLAB to octave. I am still working on automating the whole process, so I suppose glitches are inevitable.


Bob


reply via email to

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