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-tidy-linelength
12 // min-lldb-version: 310
16 // === GDB TESTS ===================================================================================
20 // gdb-command:print int_int
21 // gdbg-check:$1 = {key = 0, value = 1}
22 // gdbr-check:$1 = generic_struct::AGenericStruct<i32, i32> {key: 0, value: 1}
23 // gdb-command:print int_float
24 // gdbg-check:$2 = {key = 2, value = 3.5}
25 // gdbr-check:$2 = generic_struct::AGenericStruct<i32, f64> {key: 2, value: 3.5}
26 // gdb-command:print float_int
27 // gdbg-check:$3 = {key = 4.5, value = 5}
28 // gdbr-check:$3 = generic_struct::AGenericStruct<f64, i32> {key: 4.5, value: 5}
29 // gdb-command:print float_int_float
30 // gdbg-check:$4 = {key = 6.5, value = {key = 7, value = 8.5}}
31 // gdbr-check:$4 = generic_struct::AGenericStruct<f64, generic_struct::AGenericStruct<i32, f64>> {key: 6.5, value: generic_struct::AGenericStruct<i32, f64> {key: 7, value: 8.5}}
33 // === LLDB TESTS ==================================================================================
37 // lldb-command:print int_int
38 // lldb-check:[...]$0 = AGenericStruct<i32, i32> { key: 0, value: 1 }
39 // lldb-command:print int_float
40 // lldb-check:[...]$1 = AGenericStruct<i32, f64> { key: 2, value: 3.5 }
41 // lldb-command:print float_int
42 // lldb-check:[...]$2 = AGenericStruct<f64, i32> { key: 4.5, value: 5 }
44 // lldb-command:print float_int_float
45 // lldb-check:[...]$3 = AGenericStruct<f64, generic_struct::AGenericStruct<i32, f64>> { key: 6.5, value: AGenericStruct<i32, f64> { key: 7, value: 8.5 } }
48 #![feature(omit_gdb_pretty_printer_section)]
49 #![omit_gdb_pretty_printer_section]
51 struct AGenericStruct
<TKey
, TValue
> {
58 let int_int
= AGenericStruct { key: 0, value: 1 }
;
59 let int_float
= AGenericStruct { key: 2, value: 3.5f64 }
;
60 let float_int
= AGenericStruct { key: 4.5f64, value: 5 }
;
61 let float_int_float
= AGenericStruct
{
63 value
: AGenericStruct { key: 7, value: 8.5f64 }
,