We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 2ad98a0 + 6ac83de commit 96e3972Copy full SHA for 96e3972
src/libcollectionstest/string.rs
@@ -192,6 +192,17 @@ fn test_push_str() {
192
assert_eq!(&s[0..], "abcประเทศไทย中华Việt Nam");
193
}
194
195
+#[test]
196
+fn test_add_assign() {
197
+ let mut s = String::new();
198
+ s += "";
199
+ assert_eq!(s.as_str(), "");
200
+ s += "abc";
201
+ assert_eq!(s.as_str(), "abc");
202
+ s += "ประเทศไทย中华Việt Nam";
203
+ assert_eq!(s.as_str(), "abcประเทศไทย中华Việt Nam");
204
+}
205
+
206
#[test]
207
fn test_push() {
208
let mut data = String::from("ประเทศไทย中");
0 commit comments