Skip to content

Commit 42d6fa9

Browse files
author
Ralph Küpper
committed
test(runtime): use centralized string payload helper
1 parent a28b418 commit 42d6fa9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

crates/perry-runtime/src/gc/tests/runtime_roots/string_normalize_form.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ fn normalize_form_coercion_must_not_strand_the_subject_payload() {
109109
EXPECTED.len(),
110110
"normalized length must come from the live subject"
111111
);
112-
let data = (result as *const u8).add(std::mem::size_of::<crate::StringHeader>());
112+
let data = crate::string::string_data(result);
113113
let bytes = std::slice::from_raw_parts(data, EXPECTED.len());
114114
assert_eq!(
115115
bytes, EXPECTED,

0 commit comments

Comments
 (0)