Files
1641c3c852 feat: update for Ledger v2 (#468)
Co-authored-by: Antoine Wacheux <[email protected]>
Co-authored-by: Maxence Maireaux <[email protected]>
Co-authored-by: Brieuc Caillot <[email protected]>
2023-09-20 16:40:28 +02:00

21 lines
420 B
Go

package testing
import (
"math/big"
"testing"
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/require"
)
func bigIntComparer(v1 *big.Int, v2 *big.Int) bool {
return v1.String() == v2.String()
}
func RequireEqual(t *testing.T, expected, actual any) {
t.Helper()
if diff := cmp.Diff(expected, actual, cmp.Comparer(bigIntComparer)); diff != "" {
require.Failf(t, "Content not matching", diff)
}
}