TestSH:
PROC [left, right:
LONG
CARDINAL] ~ {
FOR I:
CARDINAL
IN [0..32]
DO
TestSHOp[left, right, FALSE, 32, I]; --All values of shift for a mask of 32
TestSHOp[left, right, FALSE, I, 0]; --All values of mask for a shift of 0
ENDLOOP;
For these tests with mask = 0, the output should always be 0; this seemed uninteresting, so I commented out these tests.
--TestSHOp[left, right, FALSE, 0, 1];
--TestSHOp[left, right, FALSE, 0, 2];
--TestSHOp[left, right, FALSE, 0, 4];
--TestSHOp[left, right, FALSE, 0, 8];
--TestSHOp[left, right, FALSE, 0, 16];
--TestSHOp[left, right, FALSE, 0, 32];
TestSHOp[left, right, FALSE, 1, 1];
TestSHOp[left, right, FALSE, 1, 2];
TestSHOp[left, right, FALSE, 1, 4];
TestSHOp[left, right, FALSE, 1, 8];
TestSHOp[left, right, FALSE, 1, 16];
TestSHOp[left, right, FALSE, 1, 32];
TestSHOp[left, right, FALSE, 2, 1];
TestSHOp[left, right, FALSE, 2, 2];
TestSHOp[left, right, FALSE, 2, 4];
TestSHOp[left, right, FALSE, 2, 8];
TestSHOp[left, right, FALSE, 2, 16];
TestSHOp[left, right, FALSE, 2, 32];
TestSHOp[left, right, FALSE, 4, 0];
TestSHOp[left, right, FALSE, 4, 1];
TestSHOp[left, right, FALSE, 4, 2];
TestSHOp[left, right, FALSE, 4, 4];
TestSHOp[left, right, FALSE, 4, 8];
TestSHOp[left, right, FALSE, 4, 16];
TestSHOp[left, right, FALSE, 4, 32];
TestSHOp[left, right, FALSE, 8, 1];
TestSHOp[left, right, FALSE, 8, 2];
TestSHOp[left, right, FALSE, 8, 4];
TestSHOp[left, right, FALSE, 8, 8];
TestSHOp[left, right, FALSE, 8, 16];
TestSHOp[left, right, FALSE, 8, 32];
TestSHOp[left, right, FALSE, 16, 1];
TestSHOp[left, right, FALSE, 16, 2];
TestSHOp[left, right, FALSE, 16, 4];
TestSHOp[left, right, FALSE, 16, 8];
TestSHOp[left, right, FALSE, 16, 16];
TestSHOp[left, right, FALSE, 16, 32];
These are the inserts.
FOR I:
CARDINAL
IN [0..32]
DO
TestSHOp[left, right, TRUE, 32, I]; --All values of shift for a mask of 32
TestSHOp[left, right, TRUE, I, 0]; --All values of mask for a shift of 0
ENDLOOP;
For these tests with mask = 0, the output should always be the right input and when shift is >= mask, then no insert takes place; these seemed uninteresting, so I commented them out
--TestSHOp[left, right, TRUE, 0, 1];
--TestSHOp[left, right, TRUE, 0, 2];
--TestSHOp[left, right, TRUE, 0, 4];
--TestSHOp[left, right, TRUE, 0, 8];
--TestSHOp[left, right, TRUE, 0, 16];
--TestSHOp[left, right, TRUE, 0, 32];
--TestSHOp[left, right, TRUE, 1, 1];
--TestSHOp[left, right, TRUE, 1, 2];
--TestSHOp[left, right, TRUE, 1, 4];
--TestSHOp[left, right, TRUE, 1, 8];
--TestSHOp[left, right, TRUE, 1, 16];
--TestSHOp[left, right, TRUE, 1, 32];
TestSHOp[left, right, TRUE, 2, 1];
--TestSHOp[left, right, TRUE, 2, 2];
--TestSHOp[left, right, TRUE, 2, 4];
--TestSHOp[left, right, TRUE, 2, 8];
--TestSHOp[left, right, TRUE, 2, 16];
--TestSHOp[left, right, TRUE, 2, 32];
TestSHOp[left, right, TRUE, 4, 1];
TestSHOp[left, right, TRUE, 4, 2];
--TestSHOp[left, right, TRUE, 4, 4];
--TestSHOp[left, right, TRUE, 4, 8];
--TestSHOp[left, right, TRUE, 4, 16];
--TestSHOp[left, right, TRUE, 4, 32];
TestSHOp[left, right, TRUE, 8, 1];
TestSHOp[left, right, TRUE, 8, 2];
TestSHOp[left, right, TRUE, 8, 4];
--TestSHOp[left, right, TRUE, 8, 8];
--TestSHOp[left, right, TRUE, 8, 16];
--TestSHOp[left, right, TRUE, 8, 32];
TestSHOp[left, right, TRUE, 16, 1];
TestSHOp[left, right, TRUE, 16, 2];
TestSHOp[left, right, TRUE, 16, 4];
TestSHOp[left, right, TRUE, 16, 8];
TestSHOp[left, right, TRUE, 16, 16];
--TestSHOp[left, right, TRUE, 16, 32];
};