Skip to content

Commit

Permalink
Add test for debug repr of blaze_symbolize_inlined_fn
Browse files Browse the repository at this point in the history
Add a test for the debug representation of the
blaze_symbolize_inlined_fn type of our C API bindings in order to
increase coverage numbers slightly.

Signed-off-by: Daniel Müller <[email protected]>
  • Loading branch information
d-e-s-o authored and danielocfb committed Nov 21, 2023
1 parent a1a93e7 commit b8bcb8f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions capi/src/symbolize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,6 +716,20 @@ mod tests {
"blaze_sym { name: 0x0, addr: 4919, offset: 24, code_info: blaze_symbolize_code_info { dir: 0x0, file: 0x0, line: 42, column: 1 }, inlined_cnt: 0, inlined: 0x0 }"
);

let inlined = blaze_symbolize_inlined_fn {
name: ptr::null(),
code_info: blaze_symbolize_code_info {
dir: ptr::null(),
file: ptr::null(),
line: 42,
column: 1,
},
};
assert_eq!(
format!("{inlined:?}"),
"blaze_symbolize_inlined_fn { name: 0x0, code_info: blaze_symbolize_code_info { dir: 0x0, file: 0x0, line: 42, column: 1 } }"
);

let result = blaze_result { cnt: 0, syms: [] };
assert_eq!(format!("{result:?}"), "blaze_result { cnt: 0, syms: [] }");

Expand Down

0 comments on commit b8bcb8f

Please sign in to comment.