X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Fmsg_targets%2Fmsg_shutdown.rs;h=e6e74cc661a9c5c586cb98793281a42f7a3e1fd7;hb=f9983de4856f5be0ea672119bfaf1d28e3916201;hp=c249ffcecce8619629cf940ee61712694a0640a0;hpb=e28fd78e67b92de9f42dae3636c5dbea5e9b1f86;p=rust-lightning diff --git a/fuzz/src/msg_targets/msg_shutdown.rs b/fuzz/src/msg_targets/msg_shutdown.rs index c249ffce..e6e74cc6 100644 --- a/fuzz/src/msg_targets/msg_shutdown.rs +++ b/fuzz/src/msg_targets/msg_shutdown.rs @@ -1,24 +1,27 @@ +// This file is Copyright its original authors, visible in version control +// history. +// +// This file is licensed under the Apache License, Version 2.0 or the MIT license +// , at your option. +// You may not use this file except in accordance with one or both of these +// licenses. + // This file is auto-generated by gen_target.sh based on msg_target_template.txt // To modify it, modify msg_target_template.txt and run gen_target.sh instead. use lightning::ln::msgs; use msg_targets::utils::VecWriter; +use utils::test_logger; #[inline] -pub fn do_test(data: &[u8]) { - test_msg!(msgs::Shutdown, data); +pub fn msg_shutdown_test(data: &[u8], _out: Out) { + test_msg_simple!(msgs::Shutdown, data); } #[no_mangle] pub extern "C" fn msg_shutdown_run(data: *const u8, datalen: usize) { - do_test(unsafe { std::slice::from_raw_parts(data, datalen) }); -} - -#[cfg(test)] -mod tests { - #[test] - fn duplicate_crash() { - super::do_test(&::hex::decode("00").unwrap()); - } + let data = unsafe { std::slice::from_raw_parts(data, datalen) }; + test_msg_simple!(msgs::Shutdown, data); }