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 e2c73cc commit 9ed9e8cCopy full SHA for 9ed9e8c
src/libcore/to_str.rs
@@ -209,4 +209,18 @@ mod tests {
209
assert!(table_str == ~"{1: 2, 3: 4}" || table_str == ~"{3: 4, 1: 2}");
210
assert!(empty.to_str() == ~"{}");
211
}
212
+
213
+ #[test]
214
+ fn test_hashset() {
215
+ let mut set: HashSet<int, int> = HashSet::new();
216
+ let empty_set: HashSet<int, int> = HashSet::new();
217
218
+ set.insert(1);
219
+ set.insert(2);
220
221
+ let set_str = set.to_str();
222
223
+ assert!(set_str == ~"{1, 2}" || set_str == ~"{2, 1}");
224
+ assert!(empty.to_str() == ~"{}");
225
+ }
226
0 commit comments