Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / libcxx / test / std / containers / container.adaptors / stack / compare.three_way.pass.cpp
blobc2da41a5f728aab6f4bc3481ebbd24d46897cfc7
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 // UNSUPPORTED: c++03, c++11, c++14, c++17
10 // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME
12 // <stack>
14 // template<class T, three_way_comparable Container>
15 // compare_three_way_result_t<Container>
16 // operator<=>(const stack<T, Container>& x, const stack<T, Container>& y);
18 #include <cassert>
19 #include <deque>
20 #include <list>
21 #include <stack>
22 #include <vector>
24 #include "nasty_containers.h"
25 #include "test_container_comparisons.h"
27 int main(int, char**) {
28 assert((test_sequence_container_adaptor_spaceship<std::stack, std::deque>()));
29 assert((test_sequence_container_adaptor_spaceship<std::stack, std::list>()));
30 assert((test_sequence_container_adaptor_spaceship<std::stack, std::vector>()));
31 assert((test_sequence_container_adaptor_spaceship<std::stack, nasty_list>()));
32 assert((test_sequence_container_adaptor_spaceship<std::stack, nasty_vector>()));
33 // `std::stack` is not constexpr, so no `static_assert` test here.
34 return 0;