X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=fuzz%2Fsrc%2Fmsg_targets%2Fmsg_target_template.txt;h=14580183e5968f330f7d6f8e833b5ec7e1d9adf6;hb=cee1feb16558364e1639a7775464e8cc73111666;hp=6877918a5f6fb7d923f6b12e8b9eb2ba7abb186b;hpb=be677dc4f44fb8ec793d9280fada8b9a0ea833f8;p=rust-lightning diff --git a/fuzz/src/msg_targets/msg_target_template.txt b/fuzz/src/msg_targets/msg_target_template.txt index 6877918a..14580183 100644 --- a/fuzz/src/msg_targets/msg_target_template.txt +++ b/fuzz/src/msg_targets/msg_target_template.txt @@ -1,24 +1,25 @@ +// 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::MSG_TARGET, dataEXTRA_ARGS); +pub fn TARGET_NAME_test(data: &[u8], _out: Out) { + TEST_MSG!(MSG_TARGET, dataEXTRA_ARGS); } #[no_mangle] pub extern "C" fn TARGET_NAME_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!(MSG_TARGET, dataEXTRA_ARGS); }