Commit 721aafae authored by Luca Giambonini's avatar Luca Giambonini

convert simple bitwise operation to short circuit or (required by Qt5.6)

parent e78c53c2
......@@ -62,13 +62,13 @@ void AkabeiVersionTest::test()
Akabei::Package::Version v1(version1.toUtf8(), epoch1);
Akabei::Package::Version v2(version2.toUtf8(), epoch2);
bool isDifferent = isMinor | isMajor;
bool isDifferent = isMinor || isMajor;
bool isEqual = !isDifferent;
QCOMPARE(v1 < v2, isMinor);
QCOMPARE(v1 <= v2, isMinor | isEqual);
QCOMPARE(v1 <= v2, isMinor || isEqual);
QCOMPARE(v1 > v2, isMajor);
QCOMPARE(v1 >= v2, isMajor | isEqual);
QCOMPARE(v1 >= v2, isMajor || isEqual);
QCOMPARE(v1 == v2, isEqual);
QCOMPARE(v1 != v2, isDifferent);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment