]>
Commit | Line | Data |
---|---|---|
b7449926 XL |
1 | // Copyright 2018 The Rust Project Developers. See the COPYRIGHT |
2 | // file at the top-level directory of this distribution and at | |
3 | // http://rust-lang.org/COPYRIGHT. | |
4 | // | |
5 | // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or | |
6 | // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
7 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your | |
8 | // option. This file may not be copied, modified, or distributed | |
9 | // except according to those terms. | |
10 | ||
11 | // ignore-windows failing on win32 bot | |
12 | // ignore-freebsd: gdb package too new | |
13 | // ignore-android: FIXME(#10381) | |
14 | // compile-flags:-g | |
15 | // min-gdb-version 7.7 | |
16 | // min-lldb-version: 310 | |
17 | ||
18 | // === GDB TESTS =================================================================================== | |
19 | ||
20 | // gdb-command: run | |
21 | ||
22 | // gdb-command: print btree_set | |
23 | // gdb-check:$1 = BTreeSet<i32>(len: 3) = {3, 5, 7} | |
24 | ||
25 | // gdb-command: print btree_map | |
26 | // gdb-check:$2 = BTreeMap<i32, i32>(len: 3) = {[3] = 3, [5] = 7, [7] = 4} | |
27 | ||
28 | // gdb-command: print vec_deque | |
29 | // gdb-check:$3 = VecDeque<i32>(len: 3, cap: 8) = {5, 3, 7} | |
30 | ||
31 | #![allow(unused_variables)] | |
32 | use std::collections::BTreeSet; | |
33 | use std::collections::BTreeMap; | |
34 | use std::collections::VecDeque; | |
35 | ||
36 | ||
37 | fn main() { | |
38 | ||
39 | // BTreeSet | |
40 | let mut btree_set = BTreeSet::new(); | |
41 | btree_set.insert(5); | |
42 | btree_set.insert(3); | |
43 | btree_set.insert(7); | |
44 | ||
45 | // BTreeMap | |
46 | let mut btree_map = BTreeMap::new(); | |
47 | btree_map.insert(5, 7); | |
48 | btree_map.insert(3, 3); | |
49 | btree_map.insert(7, 4); | |
50 | ||
51 | // VecDeque | |
52 | let mut vec_deque = VecDeque::new(); | |
53 | vec_deque.push_back(5); | |
54 | vec_deque.push_back(3); | |
55 | vec_deque.push_back(7); | |
56 | ||
57 | zzz(); // #break | |
58 | } | |
59 | ||
60 | fn zzz() { () } |