Debian Codegraph @

tests/debugger_visualizer.rs

raw symbols ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 #![allow(unsupported_calling_conventions)]
2 #![cfg(not(windows))]
3
4 use debugger_test::debugger_test;
5 use widestring::*;
6
7 #[inline(never)]
8 fn __break() {}
9
10 #[debugger_test(
11 debugger = "cdb",
12 commands = r#"
13 .nvlist
14 dx u16_string
15
16 dx u32_string
17
18 dx u16_cstring
19
20 dx u32_cstring
21
22 dx utf16_string
23
24 dx utf32_string
25
26 dx u16_cstr
27
28 dx u32_cstr
29 "#,
30 expected_statements = r#"
31 u16_string : "my u16 string" [Type: widestring::ustring::U16String]
32 [<Raw View>] [Type: widestring::ustring::U16String]
33 [len] : 0xd [Type: unsigned __int64]
34 [chars]
35
36 u32_string : "my u32 string" [Type: widestring::ustring::U32String]
37 [<Raw View>] [Type: widestring::ustring::U32String]
38 [len] : 0xd [Type: unsigned __int64]
39 [chars]
40
41 u16_cstring : "my u16 cstring" [Type: widestring::ucstring::U16CString]
42 [<Raw View>] [Type: widestring::ucstring::U16CString]
43 [len] : 0xf [Type: unsigned __int64]
44 [chars]
45
46 u32_cstring : "my u32 cstring" [Type: widestring::ucstring::U32CString]
47 [<Raw View>] [Type: widestring::ucstring::U32CString]
48 [len] : 0xf [Type: unsigned __int64]
49 [chars]
50
51 utf16_string : "my utf16 string" [Type: widestring::utfstring::Utf16String]
52 [<Raw View>] [Type: widestring::utfstring::Utf16String]
53 [len] : 0xf [Type: unsigned __int64]
54 [chars]
55
56 utf32_string : "my utf32 string" [Type: widestring::utfstring::Utf32String]
57 [<Raw View>] [Type: widestring::utfstring::Utf32String]
58 [len] : 0xf [Type: unsigned __int64]
59 [chars]
60
61 u16_cstr [Type: ref$<widestring::ucstr::U16CStr>]
62 pattern:\[\+0x000\] data_ptr : 0x[0-9a-f]+ : "my u16 cstr" \[Type: widestring::ucstr::U16CStr \*\]
63 [+0x008] length : 0xc [Type: unsigned __int64]
64
65 u32_cstr [Type: ref$<widestring::ucstr::U32CStr>]
66 pattern:\[\+0x000\] data_ptr : 0x[0-9a-f]+ : "my u32 cstr" \[Type: widestring::ucstr::U32CStr \*\]
67 [+0x008] length : 0xc [Type: unsigned __int64]
68 "#
69 )]
70 fn test_debugger_visualizer() {
71 let u16_string = U16String::from_str("my u16 string");
72 assert!(!u16_string.is_empty());
73
74 let u32_string = U32String::from_str("my u32 string");
75 assert!(!u32_string.is_empty());
76
77 let u16_cstring = U16CString::from_str("my u16 cstring").unwrap();
78 assert!(!u16_cstring.is_empty());
79
80 let u32_cstring = U32CString::from_str("my u32 cstring").unwrap();
81 assert!(!u32_cstring.is_empty());
82
83 let utf16_string = Utf16String::from_str("my utf16 string");
84 assert!(!utf16_string.is_empty());
85
86 let utf32_string = Utf32String::from_str("my utf32 string");
87 assert!(!utf32_string.is_empty());
88
89 let u16_cstr = u16cstr!("my u16 cstr");
90 assert!(!u16_cstr.is_empty());
91
92 let u32_cstr = u32cstr!("my u32 cstr");
93 assert!(!u32_cstr.is_empty());
94 __break(); // #break
95 }