()
| 1233 | |
| 1234 | #[test] |
| 1235 | fn test_result_add_file() { |
| 1236 | let mut result = TreeCollectResult::new(); |
| 1237 | let item = TreeItem::file("test.rs", Inode::ROOT, Position::ROOT); |
| 1238 | |
| 1239 | result.add_file(item); |
| 1240 | |
| 1241 | assert_eq!(result.files_count, 1); |
| 1242 | assert_eq!(result.total_items(), 1); |
| 1243 | } |
| 1244 | |
| 1245 | #[test] |
| 1246 | fn test_result_add_directory() { |