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