Skip to content

Commit

Permalink
Merge pull request #21481 from mrodozov/fix-clang-unittest-from94x
Browse files Browse the repository at this point in the history
Fix wrong bit shifting in TestPhiMemoryImage.cpp
  • Loading branch information
cmsbuild committed Nov 29, 2017
2 parents bd23f8c + 98e4676 commit 8eb7f2c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions L1Trigger/L1TMuonEndCap/test/unittests/TestPhiMemoryImage.cpp
Expand Up @@ -97,15 +97,15 @@ void TestPhiMemoryImage::test_rotation()
image.rotl(i);

if (i == 0)
CPPUNIT_ASSERT_EQUAL(image.get_word(0, 0), (word0 << i) | (word0 >> (64-i)));
CPPUNIT_ASSERT_EQUAL(image.get_word(0, 0), (word0 << i));
else if (i < 64)
CPPUNIT_ASSERT_EQUAL(image.get_word(0, 0), (word0 << i) | (word2 >> (64-i)));
else if (i == 64)
CPPUNIT_ASSERT_EQUAL(image.get_word(0, 0), (word2 << (i-64)) | (word2 >> (128-i)));
CPPUNIT_ASSERT_EQUAL(image.get_word(0, 0), (word2 << (i-64)));
else if (i < 128)
CPPUNIT_ASSERT_EQUAL(image.get_word(0, 0), (word2 << (i-64)) | (word1 >> (128-i)));
else if (i == 128)
CPPUNIT_ASSERT_EQUAL(image.get_word(0, 0), (word1 << (i-128)) | (word1 >> (192-i)));
CPPUNIT_ASSERT_EQUAL(image.get_word(0, 0), (word1 << (i-128)));
else if (i < 192)
CPPUNIT_ASSERT_EQUAL(image.get_word(0, 0), (word1 << (i-128)) | (word0 >> (192-i)));
else
Expand Down

0 comments on commit 8eb7f2c

Please sign in to comment.