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 // gdb-check:$1 = {key = 0, value = 1}
22 // gdb-command:print int_float
23 // gdb-check:$2 = {key = 2, value = 3.5}
24 // gdb-command:print float_int
25 // gdb-check:$3 = {key = 4.5, value = 5}
26 // gdb-command:print float_int_float
27 // gdb-check:$4 = {key = 6.5, value = {key = 7, value = 8.5}}
29 // === LLDB TESTS ==================================================================================
33 // lldb-command:print int_int
34 // lldb-check:[...]$0 = AGenericStruct<i32, i32> { key: 0, value: 1 }
35 // lldb-command:print int_float
36 // lldb-check:[...]$1 = AGenericStruct<i32, f64> { key: 2, value: 3.5 }
37 // lldb-command:print float_int
38 // lldb-check:[...]$2 = AGenericStruct<f64, i32> { key: 4.5, value: 5 }
40 // lldb-command:print float_int_float
41 // lldb-check:[...]$3 = AGenericStruct<f64, generic_struct::AGenericStruct<i32, f64>> { key: 6.5, value: AGenericStruct<i32, f64> { key: 7, value: 8.5 } }
44 #![feature(omit_gdb_pretty_printer_section)]
45 #![omit_gdb_pretty_printer_section]
47 struct AGenericStruct<TKey, TValue> {
54 let int_int = AGenericStruct { key: 0, value: 1 };
55 let int_float = AGenericStruct { key: 2, value: 3.5f64 };
56 let float_int = AGenericStruct { key: 4.5f64, value: 5 };
57 let float_int_float = AGenericStruct {
59 value: AGenericStruct { key: 7, value: 8.5f64 },