1 use cxx::{let_cxx_string, CxxString}; 2 3 #[test] test_async_cxx_string()4fn test_async_cxx_string() { 5 async fn f() { 6 let_cxx_string!(s = "..."); 7 8 async fn g(_: &CxxString) {} 9 g(&s).await; 10 } 11 12 // https://github.com/dtolnay/cxx/issues/693 13 fn assert_send(_: impl Send) {} 14 assert_send(f()); 15 } 16 17 #[test] test_debug()18fn test_debug() { 19 let_cxx_string!(s = "x\"y\'z"); 20 21 assert_eq!(format!("{:?}", s), r#""x\"y'z""#); 22 } 23