lnwire: replace all wire msg tests with a single property-based test

This commit does away with all the old manual message equality tests
and replace it with a single property-based test that uses the
testing/quick package. This test uses a single scenario which MUST hold
for all the messages type and all possible messages generated for those
types. As a result we are able to do away with all the prior manually
generated test data as the fuzzer to scan the input space looking for a
message that violates the scenario.
This commit is contained in:
Olaoluwa Osuntokun committed 2017-04-19 16:17:00 -07:00
1 parent febc8c399a
commit e3686cbc69
23 files changed
+583 -853

No files matched your search

-6
View File
@@ -26,12 +26,6 @@ type CloseComplete struct {
ResponderCloseSig *btcec.Signature
}
// NewCloseComplete creates a new empty CloseComplete message.
// TODO(roasbeef): add params to all constructors...
func NewCloseComplete() *CloseComplete {
return &CloseComplete{}
}
// A compile time check to ensure CloseComplete implements the lnwire.Message
// interface.
var _ Message = (*CloseComplete)(nil)