File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
branches/stable/src/libstd Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
30
30
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
31
31
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32
- refs/heads/stable: 304f5452749b139f518baf6fa6160b66af654223
32
+ refs/heads/stable: 90d61d828f82a830b9edc202dd28bb5b4defc7e9
33
33
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
34
34
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
35
35
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e
Original file line number Diff line number Diff line change @@ -469,16 +469,19 @@ mod tests {
469
469
use char:: from_u32;
470
470
471
471
#[ test]
472
- fn test_ascii ( ) {
473
- assert ! ( "banana" . chars( ) . all( |c| c. is_ascii( ) ) ) ;
474
- assert ! ( !"ประเทศไทย中华Việt Nam" . chars( ) . all( |c| c. is_ascii( ) ) ) ;
475
- }
472
+ fn test_is_ascii ( ) {
473
+ assert ! ( b"" . is_ascii( ) ) ;
474
+ assert ! ( b"banana\0 \x7F " . is_ascii( ) ) ;
475
+ assert ! ( b"banana\0 \x7F " . iter( ) . all( |b| b. is_ascii( ) ) ) ;
476
+ assert ! ( !b"Vi\xe1 \xbb \x87 t Nam" . is_ascii( ) ) ;
477
+ assert ! ( !b"Vi\xe1 \xbb \x87 t Nam" . iter( ) . all( |b| b. is_ascii( ) ) ) ;
478
+ assert ! ( !b"\xe1 \xbb \x87 " . iter( ) . any( |b| b. is_ascii( ) ) ) ;
476
479
477
- #[ test]
478
- fn test_ascii_vec ( ) {
479
480
assert ! ( "" . is_ascii( ) ) ;
480
- assert ! ( "a" . is_ascii( ) ) ;
481
- assert ! ( !"\u{2009} " . is_ascii( ) ) ;
481
+ assert ! ( "banana\0 \u{7F} " . is_ascii( ) ) ;
482
+ assert ! ( "banana\0 \u{7F} " . chars( ) . all( |c| c. is_ascii( ) ) ) ;
483
+ assert ! ( !"ประเทศไทย中华Việt Nam" . chars( ) . all( |c| c. is_ascii( ) ) ) ;
484
+ assert ! ( !"ประเทศไทย中华ệ " . chars( ) . any( |c| c. is_ascii( ) ) ) ;
482
485
}
483
486
484
487
#[ test]
You can’t perform that action at this time.
0 commit comments