()
| 66 | |
| 67 | impl HelloStringExercise { |
| 68 | pub fn strat() -> BoxedStrategy<Self> { |
| 69 | (unicode_string_strategy(),) |
| 70 | .prop_flat_map(|(test_word,)| { |
| 71 | ( |
| 72 | Just(test_word.clone()), |
| 73 | HostMemory::mem_area_strat(test_word.len() as u32), |
| 74 | HostMemory::mem_area_strat(4), |
| 75 | ) |
| 76 | }) |
| 77 | .prop_map(|(test_word, string_ptr_loc, return_ptr_loc)| Self { |
| 78 | test_word, |
| 79 | string_ptr_loc, |
| 80 | return_ptr_loc, |
| 81 | }) |
| 82 | .prop_filter("non-overlapping pointers", |e| { |
| 83 | MemArea::non_overlapping_set(&[e.string_ptr_loc, e.return_ptr_loc]) |
| 84 | }) |
| 85 | .boxed() |
| 86 | } |
| 87 | |
| 88 | pub fn test(&self) { |
| 89 | let mut ctx = WasiCtx::new(); |
nothing calls this directly
no test coverage detected