brontide,lnwire,wtwire,zpay32: use CamelCase

Rename fuzz test functions to use CamelCase.
This commit is contained in:
Matt Morehouse 2022-11-07 14:58:46 -06:00
parent c77852a68c
commit 5a48568806
No known key found for this signature in database
GPG Key ID: CC8ECA224831C982
4 changed files with 85 additions and 85 deletions

View File

@ -136,8 +136,8 @@ func getStaticBrontideMachines() (*Machine, *Machine) {
return initiator, responder return initiator, responder
} }
// Fuzz_random_actone fuzz tests ActOne in the brontide handshake. // FuzzRandomActOne fuzz tests ActOne in the brontide handshake.
func Fuzz_random_actone(f *testing.F) { func FuzzRandomActOne(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Check if data is large enough. // Check if data is large enough.
if len(data) < ActOneSize { if len(data) < ActOneSize {
@ -158,8 +158,8 @@ func Fuzz_random_actone(f *testing.F) {
}) })
} }
// Fuzz_random_actthree fuzz tests ActThree in the brontide handshake. // FuzzRandomActThree fuzz tests ActThree in the brontide handshake.
func Fuzz_random_actthree(f *testing.F) { func FuzzRandomActThree(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Check if data is large enough. // Check if data is large enough.
if len(data) < ActThreeSize { if len(data) < ActThreeSize {
@ -200,8 +200,8 @@ func Fuzz_random_actthree(f *testing.F) {
}) })
} }
// Fuzz_random_acttwo fuzz tests ActTwo in the brontide handshake. // FuzzRandomActTwo fuzz tests ActTwo in the brontide handshake.
func Fuzz_random_acttwo(f *testing.F) { func FuzzRandomActTwo(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Check if data is large enough. // Check if data is large enough.
if len(data) < ActTwoSize { if len(data) < ActTwoSize {
@ -231,9 +231,9 @@ func Fuzz_random_acttwo(f *testing.F) {
}) })
} }
// Fuzz_random_init_decrypt fuzz tests decrypting arbitrary data with the // FuzzRandomInitDecrypt fuzz tests decrypting arbitrary data with the
// initiator. // initiator.
func Fuzz_random_init_decrypt(f *testing.F) { func FuzzRandomInitDecrypt(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// This will return brontide machines with random keys. // This will return brontide machines with random keys.
initiator, responder := getBrontideMachines() initiator, responder := getBrontideMachines()
@ -252,9 +252,9 @@ func Fuzz_random_init_decrypt(f *testing.F) {
}) })
} }
// Fuzz_random_init_enc_dec fuzz tests round-trip encryption and decryption // FuzzRandomInitEncDec fuzz tests round-trip encryption and decryption between
// between the initiator and the responder. // the initiator and the responder.
func Fuzz_random_init_enc_dec(f *testing.F) { func FuzzRandomInitEncDec(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Ensure that length of message is not greater than max allowed // Ensure that length of message is not greater than max allowed
// size. // size.
@ -294,9 +294,9 @@ func Fuzz_random_init_enc_dec(f *testing.F) {
}) })
} }
// Fuzz_random_init_encrypt fuzz tests the encryption of arbitrary data with // FuzzRandomInitEncrypt fuzz tests the encryption of arbitrary data with the
// the initiator. // initiator.
func Fuzz_random_init_encrypt(f *testing.F) { func FuzzRandomInitEncrypt(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Ensure that length of message is not greater than max allowed // Ensure that length of message is not greater than max allowed
// size. // size.
@ -324,9 +324,9 @@ func Fuzz_random_init_encrypt(f *testing.F) {
}) })
} }
// Fuzz_random_resp_decrypt fuzz tests the decryption of arbitrary data with // FuzzRandomRespDecrypt fuzz tests the decryption of arbitrary data with the
// the responder. // responder.
func Fuzz_random_resp_decrypt(f *testing.F) { func FuzzRandomRespDecrypt(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// This will return brontide machines with random keys. // This will return brontide machines with random keys.
initiator, responder := getBrontideMachines() initiator, responder := getBrontideMachines()
@ -345,9 +345,9 @@ func Fuzz_random_resp_decrypt(f *testing.F) {
}) })
} }
// Fuzz_random_resp_enc_dec fuzz tests round-trip encryption and decryption // FuzzRandomRespEncDec fuzz tests round-trip encryption and decryption between
// between the responder and the initiator. // the responder and the initiator.
func Fuzz_random_resp_enc_dec(f *testing.F) { func FuzzRandomRespEncDec(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Ensure that length of message is not greater than max allowed // Ensure that length of message is not greater than max allowed
// size. // size.
@ -387,9 +387,9 @@ func Fuzz_random_resp_enc_dec(f *testing.F) {
}) })
} }
// Fuzz_random_resp_encrypt fuzz tests encryption of arbitrary data with the // FuzzRandomRespEncrypt fuzz tests encryption of arbitrary data with the
// responder. // responder.
func Fuzz_random_resp_encrypt(f *testing.F) { func FuzzRandomRespEncrypt(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Ensure that length of message is not greater than max allowed // Ensure that length of message is not greater than max allowed
// size. // size.
@ -417,8 +417,8 @@ func Fuzz_random_resp_encrypt(f *testing.F) {
}) })
} }
// Fuzz_static_actone fuzz tests ActOne in the brontide handshake. // FuzzStaticActOne fuzz tests ActOne in the brontide handshake.
func Fuzz_static_actone(f *testing.F) { func FuzzStaticActOne(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Check if data is large enough. // Check if data is large enough.
if len(data) < ActOneSize { if len(data) < ActOneSize {
@ -439,8 +439,8 @@ func Fuzz_static_actone(f *testing.F) {
}) })
} }
// Fuzz_static_actthree fuzz tests ActThree in the brontide handshake. // FuzzStaticActThree fuzz tests ActThree in the brontide handshake.
func Fuzz_static_actthree(f *testing.F) { func FuzzStaticActThree(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Check if data is large enough. // Check if data is large enough.
if len(data) < ActThreeSize { if len(data) < ActThreeSize {
@ -481,8 +481,8 @@ func Fuzz_static_actthree(f *testing.F) {
}) })
} }
// Fuzz_static_acttwo fuzz tests ActTwo in the brontide handshake. // FuzzStaticActTwo fuzz tests ActTwo in the brontide handshake.
func Fuzz_static_acttwo(f *testing.F) { func FuzzStaticActTwo(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Check if data is large enough. // Check if data is large enough.
if len(data) < ActTwoSize { if len(data) < ActTwoSize {
@ -512,9 +512,9 @@ func Fuzz_static_acttwo(f *testing.F) {
}) })
} }
// Fuzz_static_init_decrypt fuzz tests the decryption of arbitrary data with // FuzzStaticInitDecrypt fuzz tests the decryption of arbitrary data with the
// the initiator. // initiator.
func Fuzz_static_init_decrypt(f *testing.F) { func FuzzStaticInitDecrypt(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// This will return brontide machines with static keys. // This will return brontide machines with static keys.
initiator, responder := getStaticBrontideMachines() initiator, responder := getStaticBrontideMachines()
@ -533,9 +533,9 @@ func Fuzz_static_init_decrypt(f *testing.F) {
}) })
} }
// Fuzz_static_init_enc_dec fuzz tests round-trip encryption and decryption // FuzzStaticInitEncDec fuzz tests round-trip encryption and decryption between
// between the initiator and the responder. // the initiator and the responder.
func Fuzz_static_init_enc_dec(f *testing.F) { func FuzzStaticInitEncDec(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Ensure that length of message is not greater than max allowed // Ensure that length of message is not greater than max allowed
// size. // size.
@ -576,9 +576,9 @@ func Fuzz_static_init_enc_dec(f *testing.F) {
}) })
} }
// Fuzz_static_init_encrypt fuzz tests the encryption of arbitrary data with // FuzzStaticInitEncrypt fuzz tests the encryption of arbitrary data with the
// the initiator. // initiator.
func Fuzz_static_init_encrypt(f *testing.F) { func FuzzStaticInitEncrypt(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Ensure that length of message is not greater than max allowed // Ensure that length of message is not greater than max allowed
// size. // size.
@ -606,9 +606,9 @@ func Fuzz_static_init_encrypt(f *testing.F) {
}) })
} }
// Fuzz_static_resp_decrypt fuzz tests the decryption of arbitrary data with // FuzzStaticRespDecrypt fuzz tests the decryption of arbitrary data with the
// the responder. // responder.
func Fuzz_static_resp_decrypt(f *testing.F) { func FuzzStaticRespDecrypt(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// This will return brontide machines with static keys. // This will return brontide machines with static keys.
initiator, responder := getStaticBrontideMachines() initiator, responder := getStaticBrontideMachines()
@ -627,9 +627,9 @@ func Fuzz_static_resp_decrypt(f *testing.F) {
}) })
} }
// Fuzz_static_resp_enc_dec fuzz tests the round-trip encryption and decryption // FuzzStaticRespEncDec fuzz tests the round-trip encryption and decryption
// between the responder and the initiator. // between the responder and the initiator.
func Fuzz_static_resp_enc_dec(f *testing.F) { func FuzzStaticRespEncDec(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Ensure that length of message is not greater than max allowed // Ensure that length of message is not greater than max allowed
// size. // size.
@ -670,9 +670,9 @@ func Fuzz_static_resp_enc_dec(f *testing.F) {
}) })
} }
// Fuzz_static_resp_encrypt fuzz tests the encryption of arbitrary data with // FuzzStaticRespEncrypt fuzz tests the encryption of arbitrary data with the
// the responder. // responder.
func Fuzz_static_resp_encrypt(f *testing.F) { func FuzzStaticRespEncrypt(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Ensure that length of message is not greater than max allowed // Ensure that length of message is not greater than max allowed
// size. // size.

View File

@ -59,7 +59,7 @@ func harness(t *testing.T, data []byte) {
} }
} }
func Fuzz_accept_channel(f *testing.F) { func FuzzAcceptChannel(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
data = prefixWithMsgType(data, MsgAcceptChannel) data = prefixWithMsgType(data, MsgAcceptChannel)
// Create a reader with the byte array. // Create a reader with the byte array.
@ -168,7 +168,7 @@ func Fuzz_accept_channel(f *testing.F) {
}) })
} }
func Fuzz_announce_signatures(f *testing.F) { func FuzzAnnounceSignatures(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgAnnounceSignatures. // Prefix with MsgAnnounceSignatures.
data = prefixWithMsgType(data, MsgAnnounceSignatures) data = prefixWithMsgType(data, MsgAnnounceSignatures)
@ -179,7 +179,7 @@ func Fuzz_announce_signatures(f *testing.F) {
}) })
} }
func Fuzz_channel_announcement(f *testing.F) { func FuzzChannelAnnouncement(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgChannelAnnouncement. // Prefix with MsgChannelAnnouncement.
data = prefixWithMsgType(data, MsgChannelAnnouncement) data = prefixWithMsgType(data, MsgChannelAnnouncement)
@ -190,7 +190,7 @@ func Fuzz_channel_announcement(f *testing.F) {
}) })
} }
func Fuzz_channel_reestablish(f *testing.F) { func FuzzChannelReestablish(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgChannelReestablish. // Prefix with MsgChannelReestablish.
data = prefixWithMsgType(data, MsgChannelReestablish) data = prefixWithMsgType(data, MsgChannelReestablish)
@ -201,7 +201,7 @@ func Fuzz_channel_reestablish(f *testing.F) {
}) })
} }
func Fuzz_channel_update(f *testing.F) { func FuzzChannelUpdate(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgChannelUpdate. // Prefix with MsgChannelUpdate.
data = prefixWithMsgType(data, MsgChannelUpdate) data = prefixWithMsgType(data, MsgChannelUpdate)
@ -212,7 +212,7 @@ func Fuzz_channel_update(f *testing.F) {
}) })
} }
func Fuzz_closing_signed(f *testing.F) { func FuzzClosingSigned(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgClosingSigned. // Prefix with MsgClosingSigned.
data = prefixWithMsgType(data, MsgClosingSigned) data = prefixWithMsgType(data, MsgClosingSigned)
@ -223,7 +223,7 @@ func Fuzz_closing_signed(f *testing.F) {
}) })
} }
func Fuzz_commit_sig(f *testing.F) { func FuzzCommitSig(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgCommitSig. // Prefix with MsgCommitSig.
data = prefixWithMsgType(data, MsgCommitSig) data = prefixWithMsgType(data, MsgCommitSig)
@ -234,7 +234,7 @@ func Fuzz_commit_sig(f *testing.F) {
}) })
} }
func Fuzz_error(f *testing.F) { func FuzzError(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgError. // Prefix with MsgError.
data = prefixWithMsgType(data, MsgError) data = prefixWithMsgType(data, MsgError)
@ -245,7 +245,7 @@ func Fuzz_error(f *testing.F) {
}) })
} }
func Fuzz_funding_created(f *testing.F) { func FuzzFundingCreated(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgFundingCreated. // Prefix with MsgFundingCreated.
data = prefixWithMsgType(data, MsgFundingCreated) data = prefixWithMsgType(data, MsgFundingCreated)
@ -256,7 +256,7 @@ func Fuzz_funding_created(f *testing.F) {
}) })
} }
func Fuzz_funding_locked(f *testing.F) { func FuzzFundingLocked(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgFundingLocked. // Prefix with MsgFundingLocked.
data = prefixWithMsgType(data, MsgFundingLocked) data = prefixWithMsgType(data, MsgFundingLocked)
@ -267,7 +267,7 @@ func Fuzz_funding_locked(f *testing.F) {
}) })
} }
func Fuzz_funding_signed(f *testing.F) { func FuzzFundingSigned(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgFundingSigned. // Prefix with MsgFundingSigned.
data = prefixWithMsgType(data, MsgFundingSigned) data = prefixWithMsgType(data, MsgFundingSigned)
@ -278,7 +278,7 @@ func Fuzz_funding_signed(f *testing.F) {
}) })
} }
func Fuzz_gossip_timestamp_range(f *testing.F) { func FuzzGossipTimestampRange(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgGossipTimestampRange. // Prefix with MsgGossipTimestampRange.
data = prefixWithMsgType(data, MsgGossipTimestampRange) data = prefixWithMsgType(data, MsgGossipTimestampRange)
@ -289,7 +289,7 @@ func Fuzz_gossip_timestamp_range(f *testing.F) {
}) })
} }
func Fuzz_init(f *testing.F) { func FuzzInit(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgInit. // Prefix with MsgInit.
data = prefixWithMsgType(data, MsgInit) data = prefixWithMsgType(data, MsgInit)
@ -300,7 +300,7 @@ func Fuzz_init(f *testing.F) {
}) })
} }
func Fuzz_node_announcement(f *testing.F) { func FuzzNodeAnnouncement(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgNodeAnnouncement. // Prefix with MsgNodeAnnouncement.
data = prefixWithMsgType(data, MsgNodeAnnouncement) data = prefixWithMsgType(data, MsgNodeAnnouncement)
@ -391,7 +391,7 @@ func Fuzz_node_announcement(f *testing.F) {
}) })
} }
func Fuzz_open_channel(f *testing.F) { func FuzzOpenChannel(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgOpenChannel. // Prefix with MsgOpenChannel.
data = prefixWithMsgType(data, MsgOpenChannel) data = prefixWithMsgType(data, MsgOpenChannel)
@ -524,7 +524,7 @@ func Fuzz_open_channel(f *testing.F) {
}) })
} }
func Fuzz_ping(f *testing.F) { func FuzzPing(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgPing. // Prefix with MsgPing.
data = prefixWithMsgType(data, MsgPing) data = prefixWithMsgType(data, MsgPing)
@ -535,7 +535,7 @@ func Fuzz_ping(f *testing.F) {
}) })
} }
func Fuzz_pong(f *testing.F) { func FuzzPong(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgPong. // Prefix with MsgPong.
data = prefixWithMsgType(data, MsgPong) data = prefixWithMsgType(data, MsgPong)
@ -546,7 +546,7 @@ func Fuzz_pong(f *testing.F) {
}) })
} }
func Fuzz_query_channel_range(f *testing.F) { func FuzzQueryChannelRange(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgQueryChannelRange. // Prefix with MsgQueryChannelRange.
data = prefixWithMsgType(data, MsgQueryChannelRange) data = prefixWithMsgType(data, MsgQueryChannelRange)
@ -557,7 +557,7 @@ func Fuzz_query_channel_range(f *testing.F) {
}) })
} }
func Fuzz_zlib_query_short_chan_ids(f *testing.F) { func FuzzZlibQueryShortChanIDs(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
var buf bytes.Buffer var buf bytes.Buffer
zlibWriter := zlib.NewWriter(&buf) zlibWriter := zlib.NewWriter(&buf)
@ -595,7 +595,7 @@ func Fuzz_zlib_query_short_chan_ids(f *testing.F) {
}) })
} }
func Fuzz_query_short_chan_ids(f *testing.F) { func FuzzQueryShortChanIDs(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgQueryShortChanIDs. // Prefix with MsgQueryShortChanIDs.
data = prefixWithMsgType(data, MsgQueryShortChanIDs) data = prefixWithMsgType(data, MsgQueryShortChanIDs)
@ -606,7 +606,7 @@ func Fuzz_query_short_chan_ids(f *testing.F) {
}) })
} }
func Fuzz_zlib_reply_channel_range(f *testing.F) { func FuzzZlibReplyChannelRange(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
var buf bytes.Buffer var buf bytes.Buffer
zlibWriter := zlib.NewWriter(&buf) zlibWriter := zlib.NewWriter(&buf)
@ -652,7 +652,7 @@ func Fuzz_zlib_reply_channel_range(f *testing.F) {
}) })
} }
func Fuzz_reply_channel_range(f *testing.F) { func FuzzReplyChannelRange(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgReplyChannelRange. // Prefix with MsgReplyChannelRange.
data = prefixWithMsgType(data, MsgReplyChannelRange) data = prefixWithMsgType(data, MsgReplyChannelRange)
@ -663,7 +663,7 @@ func Fuzz_reply_channel_range(f *testing.F) {
}) })
} }
func Fuzz_reply_short_chan_ids_end(f *testing.F) { func FuzzReplyShortChanIDsEnd(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgReplyShortChanIDsEnd. // Prefix with MsgReplyShortChanIDsEnd.
data = prefixWithMsgType(data, MsgReplyShortChanIDsEnd) data = prefixWithMsgType(data, MsgReplyShortChanIDsEnd)
@ -674,7 +674,7 @@ func Fuzz_reply_short_chan_ids_end(f *testing.F) {
}) })
} }
func Fuzz_revoke_and_ack(f *testing.F) { func FuzzRevokeAndAck(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgRevokeAndAck. // Prefix with MsgRevokeAndAck.
data = prefixWithMsgType(data, MsgRevokeAndAck) data = prefixWithMsgType(data, MsgRevokeAndAck)
@ -685,7 +685,7 @@ func Fuzz_revoke_and_ack(f *testing.F) {
}) })
} }
func Fuzz_shutdown(f *testing.F) { func FuzzShutdown(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgShutdown. // Prefix with MsgShutdown.
data = prefixWithMsgType(data, MsgShutdown) data = prefixWithMsgType(data, MsgShutdown)
@ -696,7 +696,7 @@ func Fuzz_shutdown(f *testing.F) {
}) })
} }
func Fuzz_update_add_htlc(f *testing.F) { func FuzzUpdateAddHTLC(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgUpdateAddHTLC. // Prefix with MsgUpdateAddHTLC.
data = prefixWithMsgType(data, MsgUpdateAddHTLC) data = prefixWithMsgType(data, MsgUpdateAddHTLC)
@ -707,7 +707,7 @@ func Fuzz_update_add_htlc(f *testing.F) {
}) })
} }
func Fuzz_update_fail_htlc(f *testing.F) { func FuzzUpdateFailHTLC(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgUpdateFailHTLC. // Prefix with MsgUpdateFailHTLC.
data = prefixWithMsgType(data, MsgUpdateFailHTLC) data = prefixWithMsgType(data, MsgUpdateFailHTLC)
@ -718,7 +718,7 @@ func Fuzz_update_fail_htlc(f *testing.F) {
}) })
} }
func Fuzz_update_fail_malformed_htlc(f *testing.F) { func FuzzUpdateFailMalformedHTLC(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgUpdateFailMalformedHTLC. // Prefix with MsgUpdateFailMalformedHTLC.
data = prefixWithMsgType(data, MsgUpdateFailMalformedHTLC) data = prefixWithMsgType(data, MsgUpdateFailMalformedHTLC)
@ -729,7 +729,7 @@ func Fuzz_update_fail_malformed_htlc(f *testing.F) {
}) })
} }
func Fuzz_update_fee(f *testing.F) { func FuzzUpdateFee(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgUpdateFee. // Prefix with MsgUpdateFee.
data = prefixWithMsgType(data, MsgUpdateFee) data = prefixWithMsgType(data, MsgUpdateFee)
@ -740,7 +740,7 @@ func Fuzz_update_fee(f *testing.F) {
}) })
} }
func Fuzz_update_fulfill_htlc(f *testing.F) { func FuzzUpdateFulfillHTLC(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgUpdateFulFillHTLC. // Prefix with MsgUpdateFulFillHTLC.
data = prefixWithMsgType(data, MsgUpdateFulfillHTLC) data = prefixWithMsgType(data, MsgUpdateFulfillHTLC)

View File

@ -62,7 +62,7 @@ func harness(t *testing.T, data []byte, emptyMsg Message) {
} }
} }
func Fuzz_create_session_reply(f *testing.F) { func FuzzCreateSessionReply(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgCreateSessionReply. // Prefix with MsgCreateSessionReply.
data = prefixWithMsgType(data, MsgCreateSessionReply) data = prefixWithMsgType(data, MsgCreateSessionReply)
@ -77,7 +77,7 @@ func Fuzz_create_session_reply(f *testing.F) {
}) })
} }
func Fuzz_create_session(f *testing.F) { func FuzzCreateSession(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgCreateSession. // Prefix with MsgCreateSession.
data = prefixWithMsgType(data, MsgCreateSession) data = prefixWithMsgType(data, MsgCreateSession)
@ -92,7 +92,7 @@ func Fuzz_create_session(f *testing.F) {
}) })
} }
func Fuzz_delete_session_reply(f *testing.F) { func FuzzDeleteSessionReply(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgDeleteSessionReply. // Prefix with MsgDeleteSessionReply.
data = prefixWithMsgType(data, MsgDeleteSessionReply) data = prefixWithMsgType(data, MsgDeleteSessionReply)
@ -107,7 +107,7 @@ func Fuzz_delete_session_reply(f *testing.F) {
}) })
} }
func Fuzz_delete_session(f *testing.F) { func FuzzDeleteSession(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgDeleteSession. // Prefix with MsgDeleteSession.
data = prefixWithMsgType(data, MsgDeleteSession) data = prefixWithMsgType(data, MsgDeleteSession)
@ -122,7 +122,7 @@ func Fuzz_delete_session(f *testing.F) {
}) })
} }
func Fuzz_error(f *testing.F) { func FuzzError(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgError. // Prefix with MsgError.
data = prefixWithMsgType(data, MsgError) data = prefixWithMsgType(data, MsgError)
@ -137,7 +137,7 @@ func Fuzz_error(f *testing.F) {
}) })
} }
func Fuzz_init(f *testing.F) { func FuzzInit(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgInit. // Prefix with MsgInit.
data = prefixWithMsgType(data, MsgInit) data = prefixWithMsgType(data, MsgInit)
@ -152,7 +152,7 @@ func Fuzz_init(f *testing.F) {
}) })
} }
func Fuzz_state_update_reply(f *testing.F) { func FuzzStateUpdateReply(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgStateUpdateReply. // Prefix with MsgStateUpdateReply.
data = prefixWithMsgType(data, MsgStateUpdateReply) data = prefixWithMsgType(data, MsgStateUpdateReply)
@ -167,7 +167,7 @@ func Fuzz_state_update_reply(f *testing.F) {
}) })
} }
func Fuzz_state_update(f *testing.F) { func FuzzStateUpdate(f *testing.F) {
f.Fuzz(func(t *testing.T, data []byte) { f.Fuzz(func(t *testing.T, data []byte) {
// Prefix with MsgStateUpdate. // Prefix with MsgStateUpdate.
data = prefixWithMsgType(data, MsgStateUpdate) data = prefixWithMsgType(data, MsgStateUpdate)

View File

@ -11,7 +11,7 @@ import (
"github.com/btcsuite/btcd/chaincfg/chainhash" "github.com/btcsuite/btcd/chaincfg/chainhash"
) )
func Fuzz_decode(f *testing.F) { func FuzzDecode(f *testing.F) {
f.Fuzz(func(t *testing.T, data string) { f.Fuzz(func(t *testing.T, data string) {
inv, err := Decode(data, &chaincfg.TestNet3Params) inv, err := Decode(data, &chaincfg.TestNet3Params)
if err != nil { if err != nil {
@ -25,7 +25,7 @@ func Fuzz_decode(f *testing.F) {
}) })
} }
func Fuzz_encode(f *testing.F) { func FuzzEncode(f *testing.F) {
f.Fuzz(func(t *testing.T, data string) { f.Fuzz(func(t *testing.T, data string) {
inv, err := Decode(data, &chaincfg.TestNet3Params) inv, err := Decode(data, &chaincfg.TestNet3Params)
if err != nil { if err != nil {