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.
12 // ignore-windows failing on win32 bot
13 // ignore-freebsd: gdb package too new
14 // ignore-tidy-linelength
16 // ignore-android: FIXME(#10381)
21 // gdb-command: print regular_struct
22 // gdb-check:$1 = RegularStruct = {the_first_field = 101, the_second_field = 102.5, the_third_field = false}
24 // gdb-command: print empty_struct
25 // gdb-check:$2 = EmptyStruct
27 // gdb-command: print c_style_enum1
28 // gdb-check:$3 = CStyleEnumVar1
30 // gdb-command: print c_style_enum2
31 // gdb-check:$4 = CStyleEnumVar2
33 // gdb-command: print c_style_enum3
34 // gdb-check:$5 = CStyleEnumVar3
36 #![allow(dead_code, unused_variables)]
38 struct RegularStruct {
39 the_first_field: isize,
40 the_second_field: f64,
41 the_third_field: bool,
54 let regular_struct = RegularStruct {
56 the_second_field: 102.5,
57 the_third_field: false
60 let empty_struct = EmptyStruct;
62 let c_style_enum1 = CStyleEnum::CStyleEnumVar1;
63 let c_style_enum2 = CStyleEnum::CStyleEnumVar2;
64 let c_style_enum3 = CStyleEnum::CStyleEnumVar3;