summaryrefslogtreecommitdiff
path: root/test/std/containers/associative/set/count.pass.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/std/containers/associative/set/count.pass.cpp')
-rw-r--r--test/std/containers/associative/set/count.pass.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/test/std/containers/associative/set/count.pass.cpp b/test/std/containers/associative/set/count.pass.cpp
index ddc913910b5e..115b4fbc27fd 100644
--- a/test/std/containers/associative/set/count.pass.cpp
+++ b/test/std/containers/associative/set/count.pass.cpp
@@ -16,6 +16,7 @@
#include <set>
#include <cassert>
+#include "test_macros.h"
#include "min_allocator.h"
#include "private_constructor.hpp"
@@ -93,7 +94,7 @@ int main()
assert(r == 0);
}
#endif
-#if _LIBCPP_STD_VER > 11
+#if TEST_STD_VER > 11
{
typedef int V;
typedef std::set<int, std::less<>> M;
@@ -144,23 +145,25 @@ int main()
m.insert ( V::make ( 11 ));
m.insert ( V::make ( 12 ));
- R r = m.count(5);
+ const M& mc = m;
+
+ R r = mc.count(5);
assert(r == 1);
- r = m.count(6);
+ r = mc.count(6);
assert(r == 1);
- r = m.count(7);
+ r = mc.count(7);
assert(r == 1);
- r = m.count(8);
+ r = mc.count(8);
assert(r == 1);
- r = m.count(9);
+ r = mc.count(9);
assert(r == 1);
- r = m.count(10);
+ r = mc.count(10);
assert(r == 1);
- r = m.count(11);
+ r = mc.count(11);
assert(r == 1);
- r = m.count(12);
+ r = mc.count(12);
assert(r == 1);
- r = m.count(4);
+ r = mc.count(4);
assert(r == 0);
}
#endif