diff options
Diffstat (limited to 'veto/veto_test.go')
-rw-r--r-- | veto/veto_test.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/veto/veto_test.go b/veto/veto_test.go index 847c7a0..a5f4fb2 100644 --- a/veto/veto_test.go +++ b/veto/veto_test.go @@ -3,6 +3,8 @@ package veto import ( "math/rand" "testing" + + "kesim.org/seal/curve" ) func TestVoteGeneration(t *testing.T) { @@ -28,7 +30,7 @@ func TestRound2NoVeto(t *testing.T) { var ( vs = []*Vote{} cs = []*Commitment{} - gcys = []*point{} + gcys = []*curve.Curve25519Point{} num = 100 ) for i := range num { @@ -63,7 +65,7 @@ func TestRound2WithVeto(t *testing.T) { var ( vs = []*Vote{} cs = []*Commitment{} - gcys = []*point{} + gcys = []*curve.Curve25519Point{} num = 100 index = int(rand.Int31n(int32(num))) ) @@ -72,6 +74,9 @@ func TestRound2WithVeto(t *testing.T) { if e != nil { t.Fatalf("unexpected error: %v", e) } + if vote.veto { + t.Logf("Veto for index no. %d\n", i) + } com := vote.Commitment() if !com.VerifyProofs() { t.Fatalf("Proofs not correct for %d! %+v", i, com) @@ -82,10 +87,10 @@ func TestRound2WithVeto(t *testing.T) { for i := range num { gcy, e := vs[i].Round2(cs) - t.Logf("gcy: %v, e: %v", gcy, e) if e != nil { - t.Fatalf("Error calculating Round2: %v", e) + t.Fatalf("Error calculating Round2 for [%d]: %v", i, e) } + t.Logf("gcy[%d]: %v", i, gcy) gcys = append(gcys, gcy) } |