Skip to content

Commit 9058bab

Browse files
committed
Move <CStr as Debug> test to coretests
1 parent f727b36 commit 9058bab

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library/alloctests/tests/c_str2.rs

-6
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,6 @@ fn build_with_zero2() {
3333
assert!(CString::new(vec![0]).is_err());
3434
}
3535

36-
#[test]
37-
fn formatted() {
38-
let s = CString::new(&b"abc\x01\x02\n\xE2\x80\xA6\xFF"[..]).unwrap();
39-
assert_eq!(format!("{s:?}"), r#""abc\x01\x02\n\xe2\x80\xa6\xff""#);
40-
}
41-
4236
#[test]
4337
fn borrowed() {
4438
unsafe {

library/coretests/tests/ffi/cstr.rs

+6
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@ fn compares_as_u8s() {
1313
assert_eq!(Ord::cmp(a, b), Ord::cmp(a_bytes, b_bytes));
1414
assert_eq!(PartialOrd::partial_cmp(a, b), PartialOrd::partial_cmp(a_bytes, b_bytes));
1515
}
16+
17+
#[test]
18+
fn debug() {
19+
let s = c"abc\x01\x02\n\xE2\x80\xA6\xFF";
20+
assert_eq!(format!("{s:?}"), r#""abc\x01\x02\n\xe2\x80\xa6\xff""#);
21+
}

0 commit comments

Comments
 (0)