File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
test/Interop/SwiftToCxx/stdlib/string Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -76,5 +76,27 @@ int main() {
7676 assert (std::string (swiftStr) == " 👨💻👩💻åäö" );
7777 }
7878
79+ {
80+ NSString * arabic_ns = @" طاب يومك" ;
81+ auto swift_arabic = String::init (arabic_ns);
82+ auto std_arabic = (std::string)swift_arabic;
83+ assert (std_arabic == " طاب يومك" );
84+
85+ NSString * mixed_ns = @" Hello مرحبا World" ;
86+ auto swift_mixed = String::init (mixed_ns);
87+ auto std_mixed = (std::string)swift_mixed;
88+ assert (std_mixed == " Hello مرحبا World" );
89+
90+ NSString * hebrew_ns = @" שלום עולם" ;
91+ auto swift_hebrew = String::init (hebrew_ns);
92+ auto std_hebrew = (std::string)swift_hebrew;
93+ assert (std_hebrew == " שלום עולם" );
94+
95+ NSString * chinese_ns = @" 你好世界" ;
96+ auto swift_chinese = String::init (chinese_ns);
97+ auto std_chinese = (std::string)swift_chinese;
98+ assert (std_chinese == " 你好世界" );
99+ }
100+
79101 return 0 ;
80102}
You can’t perform that action at this time.
0 commit comments