From 03399375f8aaa7dfa51d2a01287dd11fb26fda17 Mon Sep 17 00:00:00 2001 From: PBerger Date: Thu, 5 Jun 2014 00:29:36 +0200 Subject: [PATCH] Fixed an unintended 32bit shift being expanded to 64 bit Former-commit-id: b2adc2a5baaa730aefd11a7a80ad93305a769f69 --- test/functional/storage/CuddDdTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/functional/storage/CuddDdTest.cpp b/test/functional/storage/CuddDdTest.cpp index e425bca51..391f8c96d 100644 --- a/test/functional/storage/CuddDdTest.cpp +++ b/test/functional/storage/CuddDdTest.cpp @@ -329,7 +329,7 @@ TEST(CuddDd, ToExpressionTest) { for (auto valuationValuePair : dd) { for (std::size_t i = 0; i < metaVariable.getNumberOfDdVariables(); ++i) { // Check if the i-th bit is set or not and modify the valuation accordingly. - if (((valuationValuePair.first.getIntegerValue("x") - metaVariable.getLow()) & (1 << (metaVariable.getNumberOfDdVariables() - i - 1))) != 0) { + if (((valuationValuePair.first.getIntegerValue("x") - metaVariable.getLow()) & (1ull << (metaVariable.getNumberOfDdVariables() - i - 1))) != 0) { valuation.setBooleanValue("x." + std::to_string(i), true); } else { valuation.setBooleanValue("x." + std::to_string(i), false); @@ -347,7 +347,7 @@ TEST(CuddDd, ToExpressionTest) { for (auto valuationValuePair : dd) { for (std::size_t i = 0; i < metaVariable.getNumberOfDdVariables(); ++i) { // Check if the i-th bit is set or not and modify the valuation accordingly. - if (((valuationValuePair.first.getIntegerValue("x") - metaVariable.getLow()) & (1 << (metaVariable.getNumberOfDdVariables() - i - 1))) != 0) { + if (((valuationValuePair.first.getIntegerValue("x") - metaVariable.getLow()) & (1ull << (metaVariable.getNumberOfDdVariables() - i - 1))) != 0) { valuation.setBooleanValue("x." + std::to_string(i), true); } else { valuation.setBooleanValue("x." + std::to_string(i), false); @@ -364,7 +364,7 @@ TEST(CuddDd, ToExpressionTest) { for (auto valuationValuePair : dd) { for (std::size_t i = 0; i < metaVariable.getNumberOfDdVariables(); ++i) { // Check if the i-th bit is set or not and modify the valuation accordingly. - if (((valuationValuePair.first.getIntegerValue("x") - metaVariable.getLow()) & (1 << (metaVariable.getNumberOfDdVariables() - i - 1))) != 0) { + if (((valuationValuePair.first.getIntegerValue("x") - metaVariable.getLow()) & (1ull << (metaVariable.getNumberOfDdVariables() - i - 1))) != 0) { valuation.setBooleanValue("x." + std::to_string(i), true); } else { valuation.setBooleanValue("x." + std::to_string(i), false);