[llvm-commits] [llvm] r159207 - /llvm/trunk/unittests/Support/IntegersSubsetTest.cpp
Stepan Dyatkovskiy
stpworld at narod.ru
Tue Jun 26 09:08:21 PDT 2012
Author: dyatkovskiy
Date: Tue Jun 26 11:08:20 2012
New Revision: 159207
URL: http://llvm.org/viewvc/llvm-project?rev=159207&view=rev
Log:
IntegersSubsetTest: Due to compilation failure with -std=c11, replaced -1UL with NOT_A_NUMBER constant (0xffff).
Modified:
llvm/trunk/unittests/Support/IntegersSubsetTest.cpp
Modified: llvm/trunk/unittests/Support/IntegersSubsetTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/IntegersSubsetTest.cpp?rev=159207&r1=159206&r2=159207&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/IntegersSubsetTest.cpp (original)
+++ llvm/trunk/unittests/Support/IntegersSubsetTest.cpp Tue Jun 26 11:08:20 2012
@@ -193,6 +193,7 @@
const unsigned_ranges IntersectRes,
unsigned IntersectResSize
) {
+
Mapping::RangesCollection Ranges;
Mapping LHSMapping;
@@ -248,6 +249,9 @@
}
TEST(IntegersSubsetTest, DiffTest) {
+
+ static const unsigned NOT_A_NUMBER = 0xffff;
+
{
unsigned_ranges LHS = { { 0, 4 }, { 7, 10 }, { 13, 17 } };
unsigned_ranges RHS = { { 3, 14 } };
@@ -279,7 +283,7 @@
{
unsigned_ranges LHS = { { 2, 4 } };
unsigned_ranges RHS = { { 0, 5 } };
- unsigned_ranges ExcludeRes = { {-1UL, -1UL} };
+ unsigned_ranges ExcludeRes = { {NOT_A_NUMBER, NOT_A_NUMBER} };
unsigned_ranges IntersectRes = { { 2, 4 } };
TestDiff(LHS, 1, RHS, 1, ExcludeRes, 0, IntersectRes, 1);
@@ -289,7 +293,7 @@
unsigned_ranges LHS = { { 2, 4 } };
unsigned_ranges RHS = { { 7, 8 } };
unsigned_ranges ExcludeRes = { { 2, 4 } };
- unsigned_ranges IntersectRes = { {-1UL, -1UL} };
+ unsigned_ranges IntersectRes = { {NOT_A_NUMBER, NOT_A_NUMBER} };
TestDiff(LHS, 1, RHS, 1, ExcludeRes, 1, IntersectRes, 0);
}
@@ -306,7 +310,7 @@
{
unsigned_ranges LHS = { { 0, 7 } };
unsigned_ranges RHS = { { 0, 5 }, { 6, 9 } };
- unsigned_ranges ExcludeRes = { {-1UL, -1UL} };
+ unsigned_ranges ExcludeRes = { {NOT_A_NUMBER, NOT_A_NUMBER} };
unsigned_ranges IntersectRes = { { 0, 5 }, {6, 7} };
TestDiff(LHS, 1, RHS, 2, ExcludeRes, 0, IntersectRes, 2);
@@ -316,7 +320,7 @@
unsigned_ranges LHS = { { 17, 17 } };
unsigned_ranges RHS = { { 4, 4 } };
unsigned_ranges ExcludeRes = { {17, 17} };
- unsigned_ranges IntersectRes = { { -1UL, -1UL } };
+ unsigned_ranges IntersectRes = { { NOT_A_NUMBER, NOT_A_NUMBER } };
TestDiff(LHS, 1, RHS, 1, ExcludeRes, 1, IntersectRes, 0);
}
More information about the llvm-commits
mailing list