fix bug with dynamic size calls (copy structs now work)

This commit is contained in:
Folkert 2022-07-27 14:29:44 +02:00
parent e19b272a9e
commit 66f9ff1d58
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
2 changed files with 6 additions and 3 deletions

View file

@ -153,15 +153,19 @@ impl<'a> ReplApp<'a> for ExpectReplApp<'a> {
fn call_function_dynamic_size<T, F>(
&mut self,
_main_fn_name: &str,
ret_bytes: usize,
_ret_bytes: usize,
transform: F,
) -> T
where
F: Fn(&'a Self::Memory, usize) -> T,
Self::Memory: 'a,
{
*self.memory.bytes_read.borrow_mut() = 0;
let result = transform(self.memory, self.offset);
self.offset += ret_bytes;
self.offset += *self.memory.bytes_read.borrow();
result
}
}

View file

@ -410,7 +410,6 @@ mod test {
}
#[test]
#[ignore]
fn lookup_copy_record() {
run_expect_test(
indoc!(