[RISCV] Fix mgather -> riscv.masked.strided.load combine not extending indices (...
[llvm-project.git] / libcxx / test / std / containers / associative / multimap / multimap.nonmember / op_compare.pass.cpp
blobbe2143c68be7d19f6abfa66df3f1ae766ad228ff
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // <map>
11 // template<class Key, class T, class Compare, class Alloc>
12 // bool operator==(const std::multimap<Key, T, Compare, Alloc>& lhs,
13 // const std::multimap<Key, T, Compare, Alloc>& rhs);
15 // template<class Key, class T, class Compare, class Alloc>
16 // bool operator!=(const std::multimap<Key, T, Compare, Alloc>& lhs,
17 // const std::multimap<Key, T, Compare, Alloc>& rhs);
19 // template<class Key, class T, class Compare, class Alloc>
20 // bool operator<(const std::multimap<Key, T, Compare, Alloc>& lhs,
21 // const std::multimap<Key, T, Compare, Alloc>& rhs);
23 // template<class Key, class T, class Compare, class Alloc>
24 // bool operator>(const std::multimap<Key, T, Compare, Alloc>& lhs,
25 // const std::multimap<Key, T, Compare, Alloc>& rhs);
27 // template<class Key, class T, class Compare, class Alloc>
28 // bool operator<=(const std::multimap<Key, T, Compare, Alloc>& lhs,
29 // const std::multimap<Key, T, Compare, Alloc>& rhs);
31 // template<class Key, class T, class Compare, class Alloc>
32 // bool operator>=(const std::multimap<Key, T, Compare, Alloc>& lhs,
33 // const std::multimap<Key, T, Compare, Alloc>& rhs);
35 #include <map>
36 #include <cassert>
37 #include <string>
39 #include "test_comparisons.h"
41 int main(int, char**) {
42 typedef std::multimap<int, std::string> map_type;
43 typedef map_type::value_type value_type;
45 map_type m1, m2;
46 m1.insert(value_type(1, "abc"));
47 m2.insert(value_type(2, "abc"));
48 const map_type& cm1 = m1, cm2 = m2;
49 assert(testComparisons(cm1, cm2, false, true));
52 map_type m1, m2;
53 m1.insert(value_type(1, "abc"));
54 m2.insert(value_type(1, "abc"));
55 const map_type& cm1 = m1, cm2 = m2;
56 assert(testComparisons(cm1, cm2, true, false));
59 map_type m1, m2;
60 m1.insert(value_type(1, "ab"));
61 m2.insert(value_type(1, "abc"));
62 const map_type& cm1 = m1, cm2 = m2;
63 assert(testComparisons(cm1, cm2, false, true));
66 map_type m1, m2;
67 m1.insert(value_type(1, "abc"));
68 m2.insert(value_type(1, "bcd"));
69 const map_type& cm1 = m1, cm2 = m2;
70 assert(testComparisons(cm1, cm2, false, true));
73 map_type m1, m2;
74 m1.insert(value_type(1, "abc"));
75 m2.insert(value_type(1, "abc"));
76 m2.insert(value_type(2, "abc"));
77 const map_type& cm1 = m1, cm2 = m2;
78 assert(testComparisons(cm1, cm2, false, true));
81 map_type m1, m2;
82 m1.insert(value_type(1, "abc"));
83 m2.insert(value_type(1, "abc"));
84 m2.insert(value_type(1, "abc"));
85 m2.insert(value_type(1, "bcd"));
86 const map_type& cm1 = m1, cm2 = m2;
87 assert(testComparisons(cm1, cm2, false, true));
89 return 0;