]> git.proxmox.com Git - rustc.git/blame - src/test/debuginfo/pretty-std.rs
New upstream version 1.13.0+dfsg1
[rustc.git] / src / test / debuginfo / pretty-std.rs
CommitLineData
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-android: FIXME(#10381)
14// compile-flags:-g
15// min-gdb-version 7.7
62682a34
SL
16// min-lldb-version: 310
17
18// === GDB TESTS ===================================================================================
c34b1796
AL
19
20// gdb-command: run
21
22// gdb-command: print slice
23// gdb-check:$1 = &[i32](len: 4) = {0, 1, 2, 3}
24
25// gdb-command: print vec
26// gdb-check:$2 = Vec<u64>(len: 4, cap: [...]) = {4, 5, 6, 7}
27
28// gdb-command: print str_slice
29// gdb-check:$3 = "IAMA string slice!"
30
31// gdb-command: print string
32// gdb-check:$4 = "IAMA string!"
33
34// gdb-command: print some
35// gdb-check:$5 = Some = {8}
36
37// gdb-command: print none
38// gdb-check:$6 = None
39
62682a34
SL
40
41// === LLDB TESTS ==================================================================================
42
43// lldb-command: run
44
45// lldb-command: print slice
46// lldb-check:[...]$0 = &[0, 1, 2, 3]
47
48// lldb-command: print vec
49// lldb-check:[...]$1 = vec![4, 5, 6, 7]
50
51// lldb-command: print str_slice
52// lldb-check:[...]$2 = "IAMA string slice!"
53
54// lldb-command: print string
55// lldb-check:[...]$3 = "IAMA string!"
56
57// lldb-command: print some
58// lldb-check:[...]$4 = Some(8)
59
60// lldb-command: print none
61// lldb-check:[...]$5 = None
62
63
d9579d0f
AL
64#![allow(unused_variables)]
65
c34b1796
AL
66fn main() {
67
68 // &[]
69 let slice: &[i32] = &[0, 1, 2, 3];
70
71 // Vec
72 let vec = vec![4u64, 5, 6, 7];
73
74 // &str
75 let str_slice = "IAMA string slice!";
76
77 // String
78 let string = "IAMA string!".to_string();
79
80 // Option
81 let some = Some(8i16);
82 let none: Option<i64> = None;
83
84 zzz(); // #break
85}
86
87fn zzz() { () }