[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
- patch - tests in bitfcns, Robert T. Short, 2009/07/14
- patch - tests in bitfcns,
John W. Eaton <=
- Re: patch - tests in bitfcns, Robert T. Short, 2009/07/15
- Re: patch - tests in bitfcns, John W. Eaton, 2009/07/15
- Re: patch - tests in bitfcns, John W. Eaton, 2009/07/15
- Re: patch - tests in bitfcns, Robert T. Short, 2009/07/15
- More on bitfcns, Robert T. Short, 2009/07/19
- Re: More on bitfcns, Jaroslav Hajek, 2009/07/20
- Re: patch - tests in bitfcns, John W. Eaton, 2009/07/15