summary refs log tree commit diff
path: root/src/libcoretest
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2015-06-24 22:14:27 -0700
committerSimon Sapin <simon.sapin@exyr.org>2015-06-24 22:16:25 -0700
commit32b7b50bafd0d40fda1caa93cf7f7068cc5052e3 (patch)
treecf7fb8cc91a860349c97aa54538e604b44d8b152 /src/libcoretest
parent23958d803e18de20564c198e1d1ec8d030d617ce (diff)
downloadrust-32b7b50bafd0d40fda1caa93cf7f7068cc5052e3.tar.gz
rust-32b7b50bafd0d40fda1caa93cf7f7068cc5052e3.zip
Remove char::to_titlecase. Fix #26555
I added it because it was easy (same a `char::to_lowercase`,
just a different table), but it doesn’t make sense to have this
in std but not str::to_titlecase, which would require
https://github.com/unicode-rs/unicode-segmentation

At some point in the future this feature will be available
(both on char and str) in a crates.io crate.
Diffstat (limited to 'src/libcoretest')
-rw-r--r--src/libcoretest/char.rs23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/libcoretest/char.rs b/src/libcoretest/char.rs
index 1506982586a..35f8372a709 100644
--- a/src/libcoretest/char.rs
+++ b/src/libcoretest/char.rs
@@ -103,29 +103,6 @@ fn test_to_uppercase() {
 }
 
 #[test]
-fn test_to_titlecase() {
-    fn title(c: char) -> Vec<char> {
-        c.to_titlecase().collect()
-    }
-    assert_eq!(title('a'), ['A']);
-    assert_eq!(title('ö'), ['Ö']);
-    assert_eq!(title('ß'), ['S', 's']); // not ẞ: Latin capital letter sharp s
-    assert_eq!(title('ü'), ['Ü']);
-    assert_eq!(title('💩'), ['💩']);
-
-    assert_eq!(title('σ'), ['Σ']);
-    assert_eq!(title('τ'), ['Τ']);
-    assert_eq!(title('ι'), ['Ι']);
-    assert_eq!(title('γ'), ['Γ']);
-    assert_eq!(title('μ'), ['Μ']);
-    assert_eq!(title('α'), ['Α']);
-    assert_eq!(title('ς'), ['Σ']);
-    assert_eq!(title('DŽ'), ['Dž']);
-    assert_eq!(title('fi'), ['F', 'i']);
-    assert_eq!(title('ᾀ'), ['ᾈ']);
-}
-
-#[test]
 fn test_is_control() {
     assert!('\u{0}'.is_control());
     assert!('\u{3}'.is_control());