Skip to content

Commit 430d9f9

Browse files
committed
Fix comparison tests
1 parent 504e938 commit 430d9f9

File tree

1 file changed

+0
-29
lines changed

1 file changed

+0
-29
lines changed

src/c_string.rs

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -507,21 +507,6 @@ mod tests {
507507
!= CString::<4>::from_bytes_with_nul(b"abc\0").unwrap()
508508
);
509509
}
510-
511-
#[test]
512-
fn c_str() {
513-
// Empty strings
514-
assert!(CString::<1>::new() == c"");
515-
assert!(c"" == CString::<1>::new());
516-
517-
// Single character
518-
assert!(CString::<2>::from_bytes_with_nul(b"a\0").unwrap() == c"a");
519-
assert!(c"a" == CString::<2>::from_bytes_with_nul(b"a\0").unwrap());
520-
521-
// Multiple characters
522-
assert!(CString::<4>::from_bytes_with_nul(b"abc\0").unwrap() == c"abc");
523-
assert!(c"abc" == CString::<4>::from_bytes_with_nul(b"abc\0").unwrap());
524-
}
525510
}
526511

527512
mod ordering {
@@ -549,20 +534,6 @@ mod tests {
549534

550535
#[test]
551536
fn c_str() {
552-
assert_eq!(CString::<1>::new().partial_cmp(&c""), Some(Ordering::Equal));
553-
assert_eq!(
554-
CString::<2>::from_bytes_with_nul(b"a\0")
555-
.unwrap()
556-
.partial_cmp(&c"b"),
557-
Some(Ordering::Less)
558-
);
559-
assert_eq!(
560-
CString::<2>::from_bytes_with_nul(b"b\0")
561-
.unwrap()
562-
.partial_cmp(&c"a"),
563-
Some(Ordering::Greater)
564-
);
565-
566537
assert_eq!(c"".partial_cmp(&CString::<1>::new()), Some(Ordering::Equal));
567538
assert_eq!(
568539
c"a".partial_cmp(&CString::<2>::from_bytes_with_nul(b"b\0").unwrap()),

0 commit comments

Comments
 (0)