[libcxx] r276584 - Mark bucket() assertions as non-portable. Patch from STL at microsoft.com
Eric Fiselier via cfe-commits
cfe-commits at lists.llvm.org
Sun Jul 24 16:34:18 PDT 2016
Author: ericwf
Date: Sun Jul 24 18:34:18 2016
New Revision: 276584
URL: http://llvm.org/viewvc/llvm-project?rev=276584&view=rev
Log:
Mark bucket() assertions as non-portable. Patch from STL at microsoft.com
Modified:
libcxx/trunk/test/std/containers/unord/unord.map/bucket.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multimap/bucket.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.multiset/bucket.pass.cpp
libcxx/trunk/test/std/containers/unord/unord.set/bucket.pass.cpp
Modified: libcxx/trunk/test/std/containers/unord/unord.map/bucket.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.map/bucket.pass.cpp?rev=276584&r1=276583&r2=276584&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.map/bucket.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.map/bucket.pass.cpp Sun Jul 24 18:34:18 2016
@@ -23,6 +23,7 @@
#include <string>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -43,7 +44,7 @@ int main()
size_t bc = c.bucket_count();
assert(bc >= 5);
for (size_t i = 0; i < 13; ++i)
- assert(c.bucket(i) == i % bc);
+ LIBCPP_ASSERT(c.bucket(i) == i % bc);
}
#if TEST_STD_VER >= 11
{
@@ -63,7 +64,7 @@ int main()
size_t bc = c.bucket_count();
assert(bc >= 5);
for (size_t i = 0; i < 13; ++i)
- assert(c.bucket(i) == i % bc);
+ LIBCPP_ASSERT(c.bucket(i) == i % bc);
}
#endif
#if _LIBCPP_DEBUG_LEVEL >= 1
Modified: libcxx/trunk/test/std/containers/unord/unord.multimap/bucket.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multimap/bucket.pass.cpp?rev=276584&r1=276583&r2=276584&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multimap/bucket.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multimap/bucket.pass.cpp Sun Jul 24 18:34:18 2016
@@ -23,6 +23,7 @@
#include <string>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -43,7 +44,7 @@ int main()
size_t bc = c.bucket_count();
assert(bc >= 7);
for (size_t i = 0; i < 13; ++i)
- assert(c.bucket(i) == i % bc);
+ LIBCPP_ASSERT(c.bucket(i) == i % bc);
}
#if TEST_STD_VER >= 11
{
@@ -63,7 +64,7 @@ int main()
size_t bc = c.bucket_count();
assert(bc >= 7);
for (size_t i = 0; i < 13; ++i)
- assert(c.bucket(i) == i % bc);
+ LIBCPP_ASSERT(c.bucket(i) == i % bc);
}
#endif
#if _LIBCPP_DEBUG_LEVEL >= 1
Modified: libcxx/trunk/test/std/containers/unord/unord.multiset/bucket.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.multiset/bucket.pass.cpp?rev=276584&r1=276583&r2=276584&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.multiset/bucket.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.multiset/bucket.pass.cpp Sun Jul 24 18:34:18 2016
@@ -22,6 +22,7 @@
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -42,7 +43,7 @@ int main()
size_t bc = c.bucket_count();
assert(bc >= 7);
for (size_t i = 0; i < 13; ++i)
- assert(c.bucket(i) == i % bc);
+ LIBCPP_ASSERT(c.bucket(i) == i % bc);
}
#if TEST_STD_VER >= 11
{
@@ -62,7 +63,7 @@ int main()
size_t bc = c.bucket_count();
assert(bc >= 7);
for (size_t i = 0; i < 13; ++i)
- assert(c.bucket(i) == i % bc);
+ LIBCPP_ASSERT(c.bucket(i) == i % bc);
}
#endif
#if _LIBCPP_DEBUG_LEVEL >= 1
Modified: libcxx/trunk/test/std/containers/unord/unord.set/bucket.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/std/containers/unord/unord.set/bucket.pass.cpp?rev=276584&r1=276583&r2=276584&view=diff
==============================================================================
--- libcxx/trunk/test/std/containers/unord/unord.set/bucket.pass.cpp (original)
+++ libcxx/trunk/test/std/containers/unord/unord.set/bucket.pass.cpp Sun Jul 24 18:34:18 2016
@@ -22,6 +22,7 @@
#include <unordered_set>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
int main()
@@ -42,7 +43,7 @@ int main()
size_t bc = c.bucket_count();
assert(bc >= 5);
for (size_t i = 0; i < 13; ++i)
- assert(c.bucket(i) == i % bc);
+ LIBCPP_ASSERT(c.bucket(i) == i % bc);
}
#if TEST_STD_VER >= 11
{
@@ -61,7 +62,7 @@ int main()
size_t bc = c.bucket_count();
assert(bc >= 5);
for (size_t i = 0; i < 13; ++i)
- assert(c.bucket(i) == i % bc);
+ LIBCPP_ASSERT(c.bucket(i) == i % bc);
}
#endif
#if _LIBCPP_DEBUG_LEVEL >= 1
More information about the cfe-commits
mailing list