summaryrefslogtreecommitdiff
path: root/test/std/containers/associative/multimap
diff options
context:
space:
mode:
authorBilly Robert O'Neal III <bion@microsoft.com>2017-11-15 07:40:37 +0000
committerBilly Robert O'Neal III <bion@microsoft.com>2017-11-15 07:40:37 +0000
commit9ae62c79cc771ff6cefcd2a98f69ecf7b40ebd71 (patch)
tree443001fcd7731d142d5f5f9a9bfb2b88a9fa0ffb /test/std/containers/associative/multimap
parent88626bf496e9a1276652790438b389e65950629f (diff)
Tolerate [[nodiscard]] annotations in the STL. Reviewed as https://reviews.llvm.org/D39033
git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@318276 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/std/containers/associative/multimap')
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp4
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp10
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp6
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp6
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp6
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp2
-rw-r--r--test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp2
20 files changed, 37 insertions, 25 deletions
diff --git a/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp
index 289d40573..db84dcf7b 100644
--- a/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/count0.pass.cpp
@@ -30,10 +30,10 @@ int main()
{
{
typedef std::multimap<int, double, transparent_less> M;
- M().count(C2Int{5});
+ assert(M().count(C2Int{5}) == 0);
}
{
typedef std::multimap<int, double, transparent_less_not_referenceable> M;
- M().count(C2Int{5});
+ assert(M().count(C2Int{5}) == 0);
}
}
diff --git a/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp
index 70464b12c..bb15f67f9 100644
--- a/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/count1.fail.cpp
@@ -33,6 +33,6 @@ int main()
{
typedef std::multimap<int, double, transparent_less_no_type> M;
- M().count(C2Int{5});
+ (void)M().count(C2Int{5});
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp
index ad15ff441..779af3818 100644
--- a/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/count2.fail.cpp
@@ -33,6 +33,6 @@ int main()
{
typedef std::multimap<int, double, transparent_less_private> M;
- M().count(C2Int{5});
+ (void)M().count(C2Int{5});
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp
index 5e6c9ab6f..6fb1f4dfb 100644
--- a/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/count3.fail.cpp
@@ -33,6 +33,6 @@ int main()
{
typedef std::multimap<int, double, transparent_less_not_a_type> M;
- M().count(C2Int{5});
+ (void)M().count(C2Int{5});
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp
index 8cdd3c033..0c093898d 100644
--- a/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/equal_range0.pass.cpp
@@ -30,10 +30,16 @@ int main()
{
{
typedef std::multimap<int, double, transparent_less> M;
- M().equal_range(C2Int{5});
+ typedef std::pair<typename M::iterator, typename M::iterator> P;
+ M example;
+ P result = example.equal_range(C2Int{5});
+ assert(result.first == result.second);
}
{
typedef std::multimap<int, double, transparent_less_not_referenceable> M;
- M().equal_range(C2Int{5});
+ typedef std::pair<typename M::iterator, typename M::iterator> P;
+ M example;
+ P result = example.equal_range(C2Int{5});
+ assert(result.first == result.second);
}
}
diff --git a/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp
index a339467f7..20c30fe40 100644
--- a/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/equal_range1.fail.cpp
@@ -33,6 +33,6 @@ int main()
{
typedef std::multimap<int, double, transparent_less_no_type> M;
- M().equal_range(C2Int{5});
+ (void)M().equal_range(C2Int{5});
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp
index 633e0615b..a36fc1f54 100644
--- a/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/equal_range2.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_private> M;
- M().equal_range(C2Int{5});
+ (void)M().equal_range(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp
index 34b1b4b77..a2497761f 100644
--- a/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/equal_range3.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_not_a_type> M;
- M().equal_range(C2Int{5});
+ (void)M().equal_range(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp
index a06ec4d70..0cff61131 100644
--- a/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/find0.pass.cpp
@@ -30,10 +30,12 @@ int main()
{
{
typedef std::multimap<int, double, transparent_less> M;
- M().find(C2Int{5});
+ M example;
+ assert(example.find(C2Int{5}) == example.end());
}
{
typedef std::multimap<int, double, transparent_less_not_referenceable> M;
- M().find(C2Int{5});
+ M example;
+ assert(example.find(C2Int{5}) == example.end());
}
}
diff --git a/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp
index bc3593292..3df826797 100644
--- a/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/find1.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_no_type> M;
- M().find(C2Int{5});
+ (void)M().find(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp
index 254f524af..32435f98c 100644
--- a/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/find2.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_private> M;
- M().find(C2Int{5});
+ (void)M().find(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp
index 2805f4759..011c61c54 100644
--- a/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/find3.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_not_a_type> M;
- M().find(C2Int{5});
+ (void)M().find(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp
index 1000aa772..4a882af4e 100644
--- a/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/lower_bound0.pass.cpp
@@ -30,10 +30,12 @@ int main()
{
{
typedef std::multimap<int, double, transparent_less> M;
- M().lower_bound(C2Int{5});
+ M example;
+ assert(example.lower_bound(C2Int{5}) == example.end());
}
{
typedef std::multimap<int, double, transparent_less_not_referenceable> M;
- M().lower_bound(C2Int{5});
+ M example;
+ assert(example.lower_bound(C2Int{5}) == example.end());
}
}
diff --git a/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp
index 4b0db4787..df8cb3844 100644
--- a/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/lower_bound1.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_no_type> M;
- M().lower_bound(C2Int{5});
+ (void)M().lower_bound(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp
index 300364cff..9c7fdcdcb 100644
--- a/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/lower_bound2.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_private> M;
- M().lower_bound(C2Int{5});
+ (void)M().lower_bound(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp
index 09963096f..34eeddc01 100644
--- a/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/lower_bound3.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_not_a_type> M;
- M().lower_bound(C2Int{5});
+ (void)M().lower_bound(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp b/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp
index 1a572e9c5..d7618141f 100644
--- a/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/upper_bound0.pass.cpp
@@ -30,10 +30,12 @@ int main()
{
{
typedef std::multimap<int, double, transparent_less> M;
- M().upper_bound(C2Int{5});
+ M example;
+ assert(example.upper_bound(C2Int{5}) == example.end());
}
{
typedef std::multimap<int, double, transparent_less_not_referenceable> M;
- M().upper_bound(C2Int{5});
+ M example;
+ assert(example.upper_bound(C2Int{5}) == example.end());
}
}
diff --git a/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp
index 10e59c5e5..67a26a213 100644
--- a/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/upper_bound1.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_no_type> M;
- M().upper_bound(C2Int{5});
+ (void)M().upper_bound(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp
index 81ebbb832..35e79da51 100644
--- a/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/upper_bound2.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_private> M;
- M().upper_bound(C2Int{5});
+ (void)M().upper_bound(C2Int{5});
}
}
#endif
diff --git a/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp b/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp
index fe4131524..eb3edb6a6 100644
--- a/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp
+++ b/test/std/containers/associative/multimap/multimap.ops/upper_bound3.fail.cpp
@@ -34,7 +34,7 @@ int main()
{
typedef std::multimap<int, double, transparent_less_not_a_type> M;
- M().upper_bound(C2Int{5});
+ (void)M().upper_bound(C2Int{5});
}
}
#endif