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 // min-lldb-version: 310
15 // === GDB TESTS ===================================================================================
17 // gdb-command:print/d 'simple_tuple::NO_PADDING_8'
18 // gdb-check:$1 = {__0 = -50, __1 = 50}
19 // gdb-command:print 'simple_tuple::NO_PADDING_16'
20 // gdb-check:$2 = {__0 = -1, __1 = 2, __2 = 3}
21 // gdb-command:print 'simple_tuple::NO_PADDING_32'
22 // gdb-check:$3 = {__0 = 4, __1 = 5, __2 = 6}
23 // gdb-command:print 'simple_tuple::NO_PADDING_64'
24 // gdb-check:$4 = {__0 = 7, __1 = 8, __2 = 9}
26 // gdb-command:print 'simple_tuple::INTERNAL_PADDING_1'
27 // gdb-check:$5 = {__0 = 10, __1 = 11}
28 // gdb-command:print 'simple_tuple::INTERNAL_PADDING_2'
29 // gdb-check:$6 = {__0 = 12, __1 = 13, __2 = 14, __3 = 15}
31 // gdb-command:print 'simple_tuple::PADDING_AT_END'
32 // gdb-check:$7 = {__0 = 16, __1 = 17}
36 // gdb-command:print/d noPadding8
37 // gdb-check:$8 = {__0 = -100, __1 = 100}
38 // gdb-command:print noPadding16
39 // gdb-check:$9 = {__0 = 0, __1 = 1, __2 = 2}
40 // gdb-command:print noPadding32
41 // gdb-check:$10 = {__0 = 3, __1 = 4.5, __2 = 5}
42 // gdb-command:print noPadding64
43 // gdb-check:$11 = {__0 = 6, __1 = 7.5, __2 = 8}
45 // gdb-command:print internalPadding1
46 // gdb-check:$12 = {__0 = 9, __1 = 10}
47 // gdb-command:print internalPadding2
48 // gdb-check:$13 = {__0 = 11, __1 = 12, __2 = 13, __3 = 14}
50 // gdb-command:print paddingAtEnd
51 // gdb-check:$14 = {__0 = 15, __1 = 16}
53 // gdb-command:print/d 'simple_tuple::NO_PADDING_8'
54 // gdb-check:$15 = {__0 = -127, __1 = 127}
55 // gdb-command:print 'simple_tuple::NO_PADDING_16'
56 // gdb-check:$16 = {__0 = -10, __1 = 10, __2 = 9}
57 // gdb-command:print 'simple_tuple::NO_PADDING_32'
58 // gdb-check:$17 = {__0 = 14, __1 = 15, __2 = 16}
59 // gdb-command:print 'simple_tuple::NO_PADDING_64'
60 // gdb-check:$18 = {__0 = 17, __1 = 18, __2 = 19}
62 // gdb-command:print 'simple_tuple::INTERNAL_PADDING_1'
63 // gdb-check:$19 = {__0 = 110, __1 = 111}
64 // gdb-command:print 'simple_tuple::INTERNAL_PADDING_2'
65 // gdb-check:$20 = {__0 = 112, __1 = 113, __2 = 114, __3 = 115}
67 // gdb-command:print 'simple_tuple::PADDING_AT_END'
68 // gdb-check:$21 = {__0 = 116, __1 = 117}
71 // === LLDB TESTS ==================================================================================
75 // lldb-command:print/d noPadding8
76 // lldb-check:[...]$0 = (-100, 100)
77 // lldb-command:print noPadding16
78 // lldb-check:[...]$1 = (0, 1, 2)
79 // lldb-command:print noPadding32
80 // lldb-check:[...]$2 = (3, 4.5, 5)
81 // lldb-command:print noPadding64
82 // lldb-check:[...]$3 = (6, 7.5, 8)
84 // lldb-command:print internalPadding1
85 // lldb-check:[...]$4 = (9, 10)
86 // lldb-command:print internalPadding2
87 // lldb-check:[...]$5 = (11, 12, 13, 14)
89 // lldb-command:print paddingAtEnd
90 // lldb-check:[...]$6 = (15, 16)
92 #![allow(unused_variables)]
94 #![feature(omit_gdb_pretty_printer_section)]
95 #![omit_gdb_pretty_printer_section]
97 static mut NO_PADDING_8: (i8, u8) = (-50, 50);
98 static mut NO_PADDING_16: (i16, i16, u16) = (-1, 2, 3);
100 static mut NO_PADDING_32: (i32, f32, u32) = (4, 5.0, 6);
101 static mut NO_PADDING_64: (i64, f64, u64) = (7, 8.0, 9);
103 static mut INTERNAL_PADDING_1: (i16, i32) = (10, 11);
104 static mut INTERNAL_PADDING_2: (i16, i32, u32, u64) = (12, 13, 14, 15);
106 static mut PADDING_AT_END: (i32, i16) = (16, 17);
109 let noPadding8: (i8, u8) = (-100, 100);
110 let noPadding16: (i16, i16, u16) = (0, 1, 2);
111 let noPadding32: (i32, f32, u32) = (3, 4.5, 5);
112 let noPadding64: (i64, f64, u64) = (6, 7.5, 8);
114 let internalPadding1: (i16, i32) = (9, 10);
115 let internalPadding2: (i16, i32, u32, u64) = (11, 12, 13, 14);
117 let paddingAtEnd: (i32, i16) = (15, 16);
120 NO_PADDING_8 = (-127, 127);
121 NO_PADDING_16 = (-10, 10, 9);
123 NO_PADDING_32 = (14, 15.0, 16);
124 NO_PADDING_64 = (17, 18.0, 19);
126 INTERNAL_PADDING_1 = (110, 111);
127 INTERNAL_PADDING_2 = (112, 113, 114, 115);
129 PADDING_AT_END = (116, 117);