]>
Commit | Line | Data |
---|---|---|
1a4d82fc JJ |
1 | // Copyright 2013-2014 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 | ||
1a4d82fc JJ |
11 | // min-lldb-version: 310 |
12 | ||
13 | // compile-flags:-g | |
14 | ||
15 | // === GDB TESTS =================================================================================== | |
16 | ||
17 | // gdb-command:run | |
18 | ||
19 | // gdb-command:print *stack_val_ref | |
9346a6ac | 20 | // gdb-check:$1 = {__0 = -14, __1 = -19} |
1a4d82fc JJ |
21 | |
22 | // gdb-command:print *ref_to_unnamed | |
9346a6ac | 23 | // gdb-check:$2 = {__0 = -15, __1 = -20} |
1a4d82fc JJ |
24 | |
25 | // gdb-command:print *unique_val_ref | |
9346a6ac | 26 | // gdb-check:$3 = {__0 = -17, __1 = -22} |
1a4d82fc JJ |
27 | |
28 | ||
29 | // === LLDB TESTS ================================================================================== | |
30 | ||
31 | // lldb-command:run | |
32 | ||
33 | // lldb-command:print *stack_val_ref | |
34 | // lldb-check:[...]$0 = (-14, -19) | |
35 | ||
36 | // lldb-command:print *ref_to_unnamed | |
37 | // lldb-check:[...]$1 = (-15, -20) | |
38 | ||
39 | // lldb-command:print *unique_val_ref | |
40 | // lldb-check:[...]$2 = (-17, -22) | |
41 | ||
42 | ||
43 | #![allow(unused_variables)] | |
44 | #![feature(box_syntax)] | |
45 | #![omit_gdb_pretty_printer_section] | |
46 | ||
47 | fn main() { | |
48 | let stack_val: (i16, f32) = (-14, -19f32); | |
49 | let stack_val_ref: &(i16, f32) = &stack_val; | |
50 | let ref_to_unnamed: &(i16, f32) = &(-15, -20f32); | |
51 | ||
52 | let unique_val: Box<(i16, f32)> = box() (-17, -22f32); | |
53 | let unique_val_ref: &(i16, f32) = &*unique_val; | |
54 | ||
55 | zzz(); // #break | |
56 | } | |
57 | ||
58 | fn zzz() {()} |