ceremonyclient/bedlam/ot/mpint/mpint_test.go
Cassandra Heart dbd95bd9e9
v2.1.0 (#439)
* v2.1.0 [omit consensus and adjacent] - this commit will be amended with the full release after the file copy is complete

* 2.1.0 main node rollup
2025-09-30 02:48:15 -05:00

31 lines
445 B
Go

//
// mpint_test.go
//
// Copyright (c) 2019 Markku Rossi
//
// All rights reserved.
//
package mpint
import (
"testing"
)
var (
oneData = []byte{0x1}
twoData = []byte{0x2}
threeData = []byte{0x3}
)
func TestMPInt(t *testing.T) {
one := FromBytes(oneData)
two := FromBytes(twoData)
three := FromBytes(threeData)
sum := Add(one, two)
if sum.Cmp(three) != 0 {
t.Errorf("%s + %s = %s, expected %s\n", one, two, sum, three)
}
}