~blainsmith/hare-icmp

fdc89fa1f12f3f68b9336cf6c68e943c3437bcd9 — Conrad Hoffmann 6 months ago 4a98d18
test: properly initialize structs

Not sure this still makes for a good API like this, but just make it
compile for now.

Signed-off-by: Conrad Hoffmann <ch@bitfehler.net>
1 files changed, 30 insertions(+), 5 deletions(-)

M net/icmp/+test.ha
M net/icmp/+test.ha => net/icmp/+test.ha +30 -5
@@ 21,7 21,12 @@ use bytes;

	let msg = memio::buffer(&outbuf);

	let outmsg = message {...};
	let outmsg = message {
		body = echo {
			...
		},
		...
	};
	let inbuf = memio::dynamic_from(msg);
	let decsz = decode(&outmsg, &inbuf)! as size;
	assert(decsz == 13);


@@ 58,7 63,12 @@ use bytes;

	let msg = memio::buffer(&outbuf);

	let outmsg = message {...};
	let outmsg = message {
		body = reply {
			...
		},
		...
	};
	let inbuf = memio::dynamic_from(msg);
	let decsz = decode(&outmsg, &inbuf)! as size;
	assert(decsz == 13);


@@ 91,7 101,12 @@ use bytes;

	let msg = memio::buffer(&outbuf);

	let outmsg = message {...};
	let outmsg = message {
		body = destination_unreachable {
			...
		},
		...
	};
	let inbuf = memio::dynamic_from(msg);
	let decsz = decode(&outmsg, &inbuf)! as size;
	assert(decsz == 4);


@@ 117,7 132,12 @@ use bytes;

	let msg = memio::buffer(&outbuf);

	let outmsg = message {...};
	let outmsg = message {
		body = time_exeeded {
			...
		},
		...
	};
	let inbuf = memio::dynamic_from(msg);
	let decsz = decode(&outmsg, &inbuf)! as size;
	assert(decsz == 4);


@@ 144,7 164,12 @@ use bytes;

	let msg = memio::buffer(&outbuf);

	let outmsg = message {...};
	let outmsg = message {
		body = parameter_problem {
			...
		},
		...
	};
	let inbuf = memio::dynamic_from(msg);
	let decsz = decode(&outmsg, &inbuf)! as size;
	assert(decsz == 6);