Skip to content

Commit f4a522d

Browse files
authored
Rollup merge of rust-lang#146474 - ferrocene:pvdrz/improve-ascii-coverage, r=Noratrieb
Improve `core::ascii` coverage This PR improves the `core::ascii` coverage by adding a new test to `coretests` r? `@workingjubilee`
2 parents a811bb6 + e652f97 commit f4a522d

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

library/coretests/tests/ascii.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,3 +505,10 @@ fn test_escape_ascii_iter() {
505505
let _ = it.advance_back_by(4);
506506
assert_eq!(it.to_string(), r#"fastpath\xffremainder"#);
507507
}
508+
509+
#[test]
510+
fn test_invalid_u8() {
511+
for c in 128..=255 {
512+
assert_eq!(core::ascii::Char::from_u8(c), None);
513+
}
514+
}

0 commit comments

Comments
 (0)