]> git.proxmox.com Git - rustc.git/blob - src/test/debuginfo/shadowed-variable.rs
Move away from hash to the same rust naming schema
[rustc.git] / src / test / debuginfo / shadowed-variable.rs
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
11 // min-lldb-version: 310
12
13 // compile-flags:-g
14
15 // === GDB TESTS ===================================================================================
16
17 // gdb-command:run
18
19 // gdb-command:print x
20 // gdb-check:$1 = false
21 // gdb-command:print y
22 // gdb-check:$2 = true
23 // gdb-command:continue
24
25 // gdb-command:print x
26 // gdb-check:$3 = 10
27 // gdb-command:print y
28 // gdb-check:$4 = true
29 // gdb-command:continue
30
31 // gdb-command:print x
32 // gdb-check:$5 = 10.5
33 // gdb-command:print y
34 // gdb-check:$6 = 20
35 // gdb-command:continue
36
37
38 // === LLDB TESTS ==================================================================================
39
40 // lldb-command:run
41
42 // lldb-command:print x
43 // lldb-check:[...]$0 = false
44 // lldb-command:print y
45 // lldb-check:[...]$1 = true
46 // lldb-command:continue
47
48 // lldb-command:print x
49 // lldb-check:[...]$2 = 10
50 // lldb-command:print y
51 // lldb-check:[...]$3 = true
52 // lldb-command:continue
53
54 // lldb-command:print x
55 // lldb-check:[...]$4 = 10.5
56 // lldb-command:print y
57 // lldb-check:[...]$5 = 20
58 // lldb-command:continue
59
60 #![omit_gdb_pretty_printer_section]
61
62 fn main() {
63 let x = false;
64 let y = true;
65
66 zzz(); // #break
67 sentinel();
68
69 let x = 10;
70
71 zzz(); // #break
72 sentinel();
73
74 let x = 10.5f64;
75 let y = 20;
76
77 zzz(); // #break
78 sentinel();
79 }
80
81 fn zzz() {()}
82 fn sentinel() {()}