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.
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-android: FIXME(#10381)
12 // min-lldb-version: 310
16 // === GDB TESTS ===================================================================================
20 // gdb-command:print variable
22 // gdb-command:print constant
24 // gdb-command:print a_struct
25 // gdb-check:$3 = {a = -3, b = 4.5, c = 5}
26 // gdb-command:print *struct_ref
27 // gdb-check:$4 = {a = -3, b = 4.5, c = 5}
28 // gdb-command:print *owned
31 // gdb-command:continue
33 // gdb-command:print variable
35 // gdb-command:print constant
37 // gdb-command:print a_struct
38 // gdb-check:$8 = {a = -3, b = 4.5, c = 5}
39 // gdb-command:print *struct_ref
40 // gdb-check:$9 = {a = -3, b = 4.5, c = 5}
41 // gdb-command:print *owned
45 // === LLDB TESTS ==================================================================================
49 // lldb-command:print variable
50 // lldb-check:[...]$0 = 1
51 // lldb-command:print constant
52 // lldb-check:[...]$1 = 2
53 // lldb-command:print a_struct
54 // lldb-check:[...]$2 = Struct { a: -3, b: 4.5, c: 5 }
55 // lldb-command:print *struct_ref
56 // lldb-check:[...]$3 = Struct { a: -3, b: 4.5, c: 5 }
57 // lldb-command:print *owned
58 // lldb-check:[...]$4 = 6
60 // lldb-command:continue
62 // lldb-command:print variable
63 // lldb-check:[...]$5 = 2
64 // lldb-command:print constant
65 // lldb-check:[...]$6 = 2
66 // lldb-command:print a_struct
67 // lldb-check:[...]$7 = Struct { a: -3, b: 4.5, c: 5 }
68 // lldb-command:print *struct_ref
69 // lldb-check:[...]$8 = Struct { a: -3, b: 4.5, c: 5 }
70 // lldb-command:print *owned
71 // lldb-check:[...]$9 = 6
73 #![feature(unboxed_closures)]
74 #![allow(unused_variables)]
86 let a_struct = Struct {
92 let struct_ref = &a_struct;
98 variable = constant + a_struct.a + struct_ref.a + *owned;
105 let mut unboxed_closure = |&mut:| {
107 variable = constant + a_struct.a + struct_ref.a + *owned;