@@ -6,7 +6,7 @@ use alloc::string::ToString;
6
6
use objc2:: rc:: { autoreleasepool, Retained } ;
7
7
use objc2:: runtime:: AnyObject ;
8
8
9
- use crate :: Foundation :: { self , ns_string, NSAttributedString , NSObject , NSString } ;
9
+ use crate :: { ns_string, NSAttributedString , NSMutableAttributedString , NSObject , NSString } ;
10
10
11
11
#[ test]
12
12
fn test_new ( ) {
@@ -32,7 +32,7 @@ fn test_from_nsstring() {
32
32
33
33
#[ test]
34
34
fn test_copy ( ) {
35
- use Foundation :: { NSCopying , NSMutableCopying , NSObjectProtocol } ;
35
+ use crate :: { NSCopying , NSMutableCopying , NSObjectProtocol } ;
36
36
37
37
let s1 = NSAttributedString :: from_nsstring ( ns_string ! ( "abc" ) ) ;
38
38
let s2 = s1. copy ( ) ;
@@ -43,7 +43,7 @@ fn test_copy() {
43
43
44
44
let s3 = s1. mutableCopy ( ) ;
45
45
assert_ne ! ( Retained :: as_ptr( & s1) , Retained :: as_ptr( & s3) . cast( ) ) ;
46
- assert ! ( s3. is_kind_of:: <Foundation :: NSMutableAttributedString >( ) ) ;
46
+ assert ! ( s3. is_kind_of:: <NSMutableAttributedString >( ) ) ;
47
47
}
48
48
49
49
#[ test]
@@ -62,7 +62,7 @@ fn test_debug() {
62
62
let s = unsafe {
63
63
NSAttributedString :: new_with_attributes (
64
64
ns_string ! ( "abc" ) ,
65
- & Foundation :: NSDictionary :: from_retained_objects ( & [ ns_string ! ( "test" ) ] , & [ obj] ) ,
65
+ & crate :: NSDictionary :: from_retained_objects ( & [ ns_string ! ( "test" ) ] , & [ obj] ) ,
66
66
)
67
67
} ;
68
68
let expected = if cfg ! ( feature = "gnustep-1-7" ) {
@@ -75,7 +75,7 @@ fn test_debug() {
75
75
76
76
#[ test]
77
77
fn test_new_mutable ( ) {
78
- let s = Foundation :: NSMutableAttributedString :: new ( ) ;
78
+ let s = NSMutableAttributedString :: new ( ) ;
79
79
assert_eq ! ( & s. string( ) . to_string( ) , "" ) ;
80
80
}
81
81
@@ -85,14 +85,14 @@ fn test_new_mutable() {
85
85
ignore = "thread safety issues regarding initialization"
86
86
) ]
87
87
fn test_copy_mutable ( ) {
88
- use Foundation :: { NSCopying , NSMutableCopying , NSObjectProtocol } ;
88
+ use crate :: { NSCopying , NSMutableCopying , NSObjectProtocol } ;
89
89
90
- let s1 = Foundation :: NSMutableAttributedString :: from_nsstring ( ns_string ! ( "abc" ) ) ;
90
+ let s1 = NSMutableAttributedString :: from_nsstring ( ns_string ! ( "abc" ) ) ;
91
91
let s2 = s1. copy ( ) ;
92
92
assert_ne ! ( Retained :: as_ptr( & s1) . cast( ) , Retained :: as_ptr( & s2) ) ;
93
93
assert ! ( s2. is_kind_of:: <NSAttributedString >( ) ) ;
94
94
95
95
let s3 = s1. mutableCopy ( ) ;
96
96
assert_ne ! ( Retained :: as_ptr( & s1) , Retained :: as_ptr( & s3) ) ;
97
- assert ! ( s3. is_kind_of:: <Foundation :: NSMutableAttributedString >( ) ) ;
97
+ assert ! ( s3. is_kind_of:: <NSMutableAttributedString >( ) ) ;
98
98
}
0 commit comments