Skip to content
Snippets Groups Projects
Unverified Commit 58f9e6ac authored by Tobias Winchen's avatar Tobias Winchen Committed by GitHub
Browse files

Merge pull request #8 from TobiasWinchen/devel

Fix tests
parents 2383cb26 e769d50f
Branches
Tags
No related merge requests found
......@@ -74,7 +74,7 @@ uint32_t bitMask(uint32_t firstBit, uint32_t lastBit) {
void setBitsWithValue(uint32_t &target, uint32_t firstBit, uint32_t lastBit,
uint32_t value) {
// check if value is larger than bit range
if (value > (1u << (lastBit + 1u - firstBit))) {
if (value > (1u << (lastBit + firstBit))) {
BOOST_LOG_TRIVIAL(error)
<< "value: " << value << ", 1 << (last-bit - firstbit) "
<< (1 << (lastBit - firstBit)) << ", bitrange: " << lastBit - firstBit
......
......@@ -224,6 +224,7 @@ TEST_F(UnpackerTester, 12_bit_unpack_test)
}
Unpacker::InputType gpu_input = host_input;
Unpacker::OutputType gpu_output;
gpu_output.resize(host_input.size() * sizeof(host_input[0]) * 8 / 12);
OutputType host_output;
Unpacker unpacker(_stream);
unpacker.unpack<12>(gpu_input, gpu_output);
......@@ -243,6 +244,7 @@ TEST_F(UnpackerTester, 8_bit_unpack_test)
}
Unpacker::InputType gpu_input = host_input;
Unpacker::OutputType gpu_output;
gpu_output.resize(host_input.size() * sizeof(host_input[0]) * 8 / 8);
OutputType host_output;
Unpacker unpacker(_stream);
unpacker.unpack<8>(gpu_input, gpu_output);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment