]>
Commit | Line | Data |
---|---|---|
c34b1796 AL |
1 | // Copyright 2013-2015 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 | |
c34b1796 AL |
13 | // ignore-lldb |
14 | // ignore-android: FIXME(#10381) | |
15 | // compile-flags:-g | |
16 | // min-gdb-version 7.7 | |
17 | ||
18 | // gdb-command: run | |
19 | ||
20 | // gdb-command: print slice | |
21 | // gdb-check:$1 = &[i32](len: 4) = {0, 1, 2, 3} | |
22 | ||
23 | // gdb-command: print vec | |
24 | // gdb-check:$2 = Vec<u64>(len: 4, cap: [...]) = {4, 5, 6, 7} | |
25 | ||
26 | // gdb-command: print str_slice | |
27 | // gdb-check:$3 = "IAMA string slice!" | |
28 | ||
29 | // gdb-command: print string | |
30 | // gdb-check:$4 = "IAMA string!" | |
31 | ||
32 | // gdb-command: print some | |
33 | // gdb-check:$5 = Some = {8} | |
34 | ||
35 | // gdb-command: print none | |
36 | // gdb-check:$6 = None | |
37 | ||
d9579d0f AL |
38 | #![allow(unused_variables)] |
39 | ||
c34b1796 AL |
40 | fn main() { |
41 | ||
42 | // &[] | |
43 | let slice: &[i32] = &[0, 1, 2, 3]; | |
44 | ||
45 | // Vec | |
46 | let vec = vec![4u64, 5, 6, 7]; | |
47 | ||
48 | // &str | |
49 | let str_slice = "IAMA string slice!"; | |
50 | ||
51 | // String | |
52 | let string = "IAMA string!".to_string(); | |
53 | ||
54 | // Option | |
55 | let some = Some(8i16); | |
56 | let none: Option<i64> = None; | |
57 | ||
58 | zzz(); // #break | |
59 | } | |
60 | ||
61 | fn zzz() { () } |