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 //===----------------------------------------------------------------------===//
8
9 // Can't test the system lib because this test enables debug mode
10 // UNSUPPORTED: with_system_cxx_lib=macosx
11
12 // <list>
13
14 // void splice(const_iterator position, list& x, iterator first, iterator last);
15
16 #define _LIBCPP_DEBUG 1
17 #define _LIBCPP_ASSERT(x, m) ((x) ? (void)0 : std::exit(0))
18
19 #include <list>
20 #include <cstdlib>
21 #include <cassert>
22
23 #include "test_macros.h"
24
main(int,char **)25 int main(int, char**)
26 {
27 {
28 std::list<int> v1(3);
29 std::list<int> v2(3);
30 v1.splice(v1.begin(), v2, v2.begin(), v1.end());
31 assert(false);
32 }
33
34 return 0;
35 }
36