]>
git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/pretty-std-collections.rs
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.
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.
11 // ignore-windows failing on win32 bot
12 // ignore-freebsd: gdb package too new
13 // ignore-android: FIXME(#10381)
15 // min-gdb-version 7.7
16 // min-lldb-version: 310
18 // === GDB TESTS ===================================================================================
22 // gdb-command: print btree_set
23 // gdb-check:$1 = BTreeSet<i32>(len: 3) = {3, 5, 7}
25 // gdb-command: print btree_map
26 // gdb-check:$2 = BTreeMap<i32, i32>(len: 3) = {[3] = 3, [5] = 7, [7] = 4}
28 // gdb-command: print vec_deque
29 // gdb-check:$3 = VecDeque<i32>(len: 3, cap: 8) = {5, 3, 7}
31 #![allow(unused_variables)]
32 use std
::collections
::BTreeSet
;
33 use std
::collections
::BTreeMap
;
34 use std
::collections
::VecDeque
;
40 let mut btree_set
= BTreeSet
::new();
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);
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);