1 2 3 4 5 6 7 8 9 10 11 12 13
use std::collections::BTreeSet; fn make_a_set() -> BTreeSet<String> { let mut s = BTreeSet::new(); s.insert("one".into()); s.insert("two".into()); s } #[test] fn set_has_two_elements() { assert_eq!(make_a_set().len(), 2); }