Commit 29f7b243 authored by RILLING Louis's avatar RILLING Louis
Browse files

fake-vm/tests: Missing test send_too_big

parent faf156fd
......@@ -472,6 +472,34 @@ mod test {
drop(actor);
}
#[test]
fn send_too_big() {
init();
let actor = TestActorDesc::new("titi", recv_one_msg_actor);
let context = super::init(valid_args!(), Box::new(dummy_recv_callback))
.expect("init failed");
context.start()
.expect("start failed");
let src = local_vsg_address!();
let dest = remote_vsg_address!();
let buffer = [0u8; crate::MAX_PACKET_SIZE + 1];
match context.send(src, dest, &buffer).expect_err("send should have failed") {
crate::error::Error::SizeTooBig => (),
_ => assert!(false),
}
// Terminate gracefully
context.send(src, dest, b"Foo msg")
.expect("send failed");
context.stop();
drop(actor);
}
#[test]
fn gettimeofday() {
init();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment