Es 08 Folds

This commit is contained in:
2024-04-30 19:14:05 +02:00
parent 26bad7502f
commit 50fbdfa183
3 changed files with 78 additions and 0 deletions

8
tests/es08_folds.rs Normal file
View File

@@ -0,0 +1,8 @@
use esercizi::es08_folds::{num_vocali_struct, num_vocali_tuple, NumVocali, TuplaVocali};
#[test]
fn test_folds() {
let a = String::from(" Ciao Paola come stai ? Ok . Tu John come stai ? Ok ");
assert_eq!(TuplaVocali::new(5, 2, 3, 7, 1), num_vocali_tuple(&a));
assert_eq!(NumVocali::new(5, 2, 3, 7, 1), num_vocali_struct(&a));
}