]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/pretty-std-collections.rs
tests: prefer edition: directives to compile-flags:--edition.
[rust.git] / 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.
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 vec_deque
26 // gdb-check:$2 = VecDeque<i32>(len: 3, cap: 8) = {5, 3, 7}
27
28 #![allow(unused_variables)]
29 use std::collections::BTreeSet;
30 use std::collections::VecDeque;
31
32
33 fn main() {
34
35     // BTreeSet
36     let mut btree_set = BTreeSet::new();
37     btree_set.insert(5);
38     btree_set.insert(3);
39     btree_set.insert(7);
40
41     // VecDeque
42     let mut vec_deque = VecDeque::new();
43     vec_deque.push_back(5);
44     vec_deque.push_back(3);
45     vec_deque.push_back(7);
46
47     zzz(); // #break
48 }
49
50 fn zzz() { () }