Index: libcxx/test/std/containers/associative/multiset/multiset.nonmember/op_compare.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/containers/associative/multiset/multiset.nonmember/op_compare.pass.cpp @@ -0,0 +1,74 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// template +// bool operator==(const std::multiset& lhs, +// const std::multiset& rhs); +// +// template +// bool operator!=(const std::multiset& lhs, +// const std::multiset& rhs); +// +// template +// bool operator<(const std::multiset& lhs, +// const std::multiset& rhs); +// +// template +// bool operator>(const std::multiset& lhs, +// const std::multiset& rhs); +// +// template +// bool operator<=(const std::multiset& lhs, +// const std::multiset& rhs); +// +// template +// bool operator>=(const std::multiset& lhs, +// const std::multiset& rhs); + +#include +#include +#include + +#include "test_comparisons.h" + +int main(int, char**) { + { + std::multiset s1, s2; + s1.insert(1); + s2.insert(2); + const std::multiset& cs1 = s1, cs2 = s2; + assert(testComparisons6(cs1, cs2, false, true)); + } + { + std::multiset s1, s2; + s1.insert(1); + s2.insert(1); + const std::multiset& cs1 = s1, cs2 = s2; + assert(testComparisons6(cs1, cs2, true, false)); + } + { + std::multiset s1, s2; + s1.insert(1); + s2.insert(1); + s2.insert(2); + const std::multiset& cs1 = s1, cs2 = s2; + assert(testComparisons6(cs1, cs2, false, true)); + } + { + std::multiset s1, s2; + s1.insert(1); + s2.insert(1); + s2.insert(1); + s2.insert(1); + const std::multiset& cs1 = s1, cs2 = s2; + assert(testComparisons6(cs1, cs2, false, true)); + } + return 0; +} Index: libcxx/test/std/containers/associative/set/set.nonmember/op_compare.pass.cpp =================================================================== --- /dev/null +++ libcxx/test/std/containers/associative/set/set.nonmember/op_compare.pass.cpp @@ -0,0 +1,65 @@ +//===----------------------------------------------------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +// + +// template +// bool operator==(const std::set& lhs, +// const std::set& rhs); +// +// template +// bool operator!=(const std::set& lhs, +// const std::set& rhs); +// +// template +// bool operator<(const std::set& lhs, +// const std::set& rhs); +// +// template +// bool operator>(const std::set& lhs, +// const std::set& rhs); +// +// template +// bool operator<=(const std::set& lhs, +// const std::set& rhs); +// +// template +// bool operator>=(const std::set& lhs, +// const std::set& rhs); + +#include +#include +#include + +#include "test_comparisons.h" + +int main(int, char**) { + { + std::set s1, s2; + s1.insert(1); + s2.insert(2); + const std::set& cs1 = s1, cs2 = s2; + assert(testComparisons6(cs1, cs2, false, true)); + } + { + std::set s1, s2; + s1.insert(1); + s2.insert(1); + const std::set& cs1 = s1, cs2 = s2; + assert(testComparisons6(cs1, cs2, true, false)); + } + { + std::set s1, s2; + s1.insert(1); + s2.insert(1); + s2.insert(2); + const std::set& cs1 = s1, cs2 = s2; + assert(testComparisons6(cs1, cs2, false, true)); + } + return 0; +}