]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/pretty-huge-vec.rs
Auto merge of #54720 - davidtwco:issue-51191, r=nikomatsakis
[rust.git] / src / test / debuginfo / pretty-huge-vec.rs
1 // Copyright 2013-2016 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 vec
23 // gdb-check:$1 = Vec<u8>(len: 1000000000, cap: 1000000000) = {[...]...}
24
25 // gdb-command: print slice
26 // gdb-check:$2 = &[u8](len: 1000000000) = {[...]...}
27
28
29 #![allow(unused_variables)]
30
31 fn main() {
32
33     // Vec
34     let mut vec: Vec<u8> = Vec::with_capacity(1_000_000_000);
35     unsafe{ vec.set_len(1_000_000_000) }
36     let slice = &vec[..];
37
38     zzz(); // #break
39 }
40
41 fn zzz() { () }