]>
git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/pretty-std.rs
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.
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 slice
23 // gdb-check:$1 = &[i32](len: 4) = {0, 1, 2, 3}
25 // gdb-command: print vec
26 // gdb-check:$2 = Vec<u64>(len: 4, cap: [...]) = {4, 5, 6, 7}
28 // gdb-command: print str_slice
29 // gdb-check:$3 = "IAMA string slice!"
31 // gdb-command: print string
32 // gdb-check:$4 = "IAMA string!"
34 // gdb-command: print some
35 // gdb-check:$5 = Some = {8}
37 // gdb-command: print none
38 // gdb-check:$6 = None
41 // === LLDB TESTS ==================================================================================
45 // lldb-command: print slice
46 // lldb-check:[...]$0 = &[0, 1, 2, 3]
48 // lldb-command: print vec
49 // lldb-check:[...]$1 = vec![4, 5, 6, 7]
51 // lldb-command: print str_slice
52 // lldb-check:[...]$2 = "IAMA string slice!"
54 // lldb-command: print string
55 // lldb-check:[...]$3 = "IAMA string!"
57 // lldb-command: print some
58 // lldb-check:[...]$4 = Some(8)
60 // lldb-command: print none
61 // lldb-check:[...]$5 = None
64 #![allow(unused_variables)]
69 let slice
: &[i32] = &[0, 1, 2, 3];
72 let vec
= vec
![4u64, 5, 6, 7];
75 let str_slice
= "IAMA string slice!";
78 let string
= "IAMA string!".to_string();
81 let some
= Some(8i16);
82 let none
: Option
<i64> = None
;