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.
13 // min-lldb-version: 310
15 // === GDB TESTS ===================================================================================
19 // gdb-command:print *the_a_ref
20 // gdbg-check:$1 = TheA
21 // gdbr-check:$1 = borrowed_c_style_enum::ABC::TheA
23 // gdb-command:print *the_b_ref
24 // gdbg-check:$2 = TheB
25 // gdbr-check:$2 = borrowed_c_style_enum::ABC::TheB
27 // gdb-command:print *the_c_ref
28 // gdbg-check:$3 = TheC
29 // gdbr-check:$3 = borrowed_c_style_enum::ABC::TheC
32 // === LLDB TESTS ==================================================================================
36 // lldb-command:print *the_a_ref
37 // lldbg-check:[...]$0 = TheA
38 // lldbr-check:(borrowed_c_style_enum::ABC) *the_a_ref = borrowed_c_style_enum::ABC::TheA
40 // lldb-command:print *the_b_ref
41 // lldbg-check:[...]$1 = TheB
42 // lldbr-check:(borrowed_c_style_enum::ABC) *the_b_ref = borrowed_c_style_enum::ABC::TheB
44 // lldb-command:print *the_c_ref
45 // lldbg-check:[...]$2 = TheC
46 // lldbr-check:(borrowed_c_style_enum::ABC) *the_c_ref = borrowed_c_style_enum::ABC::TheC
48 #![allow(unused_variables)]
49 #![feature(omit_gdb_pretty_printer_section)]
50 #![omit_gdb_pretty_printer_section]
52 enum ABC { TheA, TheB, TheC }
55 let the_a = ABC::TheA;
56 let the_a_ref: &ABC = &the_a;
58 let the_b = ABC::TheB;
59 let the_b_ref: &ABC = &the_b;
61 let the_c = ABC::TheC;
62 let the_c_ref: &ABC = &the_c;