1 // Copyright 2013-2015 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 // This test makes sure that the LLDB pretty printer does not throw an exception
13 // when trying to handle a Vec<> or anything else that contains zero-sized
16 // min-lldb-version: 310
18 // ignore-tidy-linelength
22 // === LLDB TESTS ==================================================================================
25 // lldb-command:print v
26 // lldbg-check:[...]$0 = vec![1, 2, 3]
27 // lldbr-check:(alloc::vec::Vec<i32>) v = vec![1, 2, 3]
28 // lldb-command:print zs
29 // lldbg-check:[...]$1 = StructWithZeroSizedField { x: ZeroSizedStruct, y: 123, z: ZeroSizedStruct, w: 456 }
30 // lldbr-check:(issue_22656::StructWithZeroSizedField) zs = StructWithZeroSizedField { x: ZeroSizedStruct { }, y: 123, z: ZeroSizedStruct { }, w: 456 }
31 // lldbr-command:continue
33 #![allow(unused_variables)]
35 #![feature(omit_gdb_pretty_printer_section)]
36 #![omit_gdb_pretty_printer_section]
38 struct ZeroSizedStruct;
40 struct StructWithZeroSizedField {
50 let zs = StructWithZeroSizedField {