]> git.lizzy.rs Git - rust.git/blob - src/test/debuginfo/include_string.rs
Rollup merge of #28554 - christopherdumas:E0422, r=arielb1
[rust.git] / src / test / debuginfo / include_string.rs
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.
4 //
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.
10
11 // min-lldb-version: 310
12
13 // compile-flags:-g
14 // gdb-command:run
15 // gdb-command:print string1.length
16 // gdb-check:$1 = 48
17 // gdb-command:print string2.length
18 // gdb-check:$2 = 49
19 // gdb-command:print string3.length
20 // gdb-check:$3 = 50
21 // gdb-command:continue
22
23
24 // === LLDB TESTS ==================================================================================
25
26 // lldb-command:run
27
28 // lldb-command:print string1.length
29 // lldb-check:[...]$0 = 48
30 // lldb-command:print string2.length
31 // lldb-check:[...]$1 = 49
32 // lldb-command:print string3.length
33 // lldb-check:[...]$2 = 50
34
35 // lldb-command:continue
36
37 #![allow(unused_variables)]
38 #![feature(omit_gdb_pretty_printer_section)]
39 #![omit_gdb_pretty_printer_section]
40
41 // This test case makes sure that debug info does not ICE when include_str is
42 // used multiple times (see issue #11322).
43
44 fn main() {
45     let string1 = include_str!("text-to-include-1.txt");
46     let string2 = include_str!("text-to-include-2.txt");
47     let string3 = include_str!("text-to-include-3.txt");
48
49     zzz(); // #break
50 }
51
52 fn zzz() {()}