first fun version

This commit is contained in:
spectre committed 2026-08-29 16:45:39 +02:00
1 parent 82dd6e7c62
commit 97ba6f98ae
3 files changed
+119 -8

No files matched your search

+26 -4
View File
@@ -1,11 +1,33 @@
#[cfg(test)]
mod tests {
use std::collections::HashMap;
use crate::{create_tree, get_stats};
use super::*;
use main;
#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
fn check_basic_functions() {
let test = get_stats("ZEHTZJATJAEJEF".to_string());
let case = HashMap::from([
("Z".to_string(), 2),
("E".to_string(), 3),
("H".to_string(), 1),
("T".to_string(), 2),
("J".to_string(), 3),
("A".to_string(), 2),
("F".to_string(), 1),
]);
println!("{:?} \n {:?}", test, case);
assert!(test == case);
}
#[test]
fn test2() {
let small_string : String = "aaaaaaaaaaaaaaaaaaa a a a a a a a bazbazoreb kjzbej kjqbzetjbqzefe jabzezf jbzaefe jbzae ljzbef ljsndsf lj".to_string();
let stats = get_stats(small_string);
create_tree(stats);
}
}