We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 319ee79 commit 336b670Copy full SHA for 336b670
objc2-foundation/src/__string_macro.rs
@@ -117,7 +117,7 @@ impl Utf16Char {
117
}
118
119
#[cfg(test)]
120
- pub fn as_slice(&self) -> &[u16] {
+ fn as_slice(&self) -> &[u16] {
121
&self.repr[..self.len]
122
123
@@ -406,7 +406,13 @@ mod tests {
406
macro_rules! test {
407
($($s:expr,)+) => {$({
408
static STRING: &NSString = ns_string!($s);
409
+ let s = NSString::from_str($s);
410
+
411
+ assert_eq!(STRING, STRING);
412
+ assert_eq!(STRING, &*s);
413
414
assert_eq!(STRING.to_string(), $s);
415
+ assert_eq!(s.to_string(), $s);
416
})+};
417
418
@@ -424,6 +430,7 @@ mod tests {
424
430
"讓每個人都能打造出。",
425
431
"\0",
426
432
"\0\x01\x02\x03\x04\x05\x06\x07\x08\x09",
433
+ // "\u{feff}", // TODO
427
434
428
435
429
436
0 commit comments