celestiaorg / rsmt2d

Go implementation of two dimensional Reed-Solomon merkle tree data availability scheme.
Apache License 2.0
162 stars 79 forks source link

`TestMarshalJSON` doesn't test the function it describes #288

Closed rootulp closed 9 months ago

rootulp commented 9 months ago

Context

https://github.com/celestiaorg/rsmt2d/blob/bb5e119c2e8571fc8eb7aff3b6bca4915ffb4b18/extendeddatasquare_test.go#L89-L112

Problem

This test should be testing the behavior of MarshalJSON but it never invokes MarshalJSON.

Proposal

Update the test to invoke the function MarshalJSON

https://github.com/celestiaorg/rsmt2d/blob/bb5e119c2e8571fc8eb7aff3b6bca4915ffb4b18/extendeddatasquare.go#L22-L32