(test *testing.T)
| 70 | } |
| 71 | |
| 72 | func TestSecretPolyEqual(test *testing.T) { |
| 73 | n := 10 |
| 74 | t := n/2 + 1 |
| 75 | |
| 76 | p1 := NewPriPoly(suite, t, nil, suite.RandomStream()) |
| 77 | p2 := NewPriPoly(suite, t, nil, suite.RandomStream()) |
| 78 | p3 := NewPriPoly(suite, t, nil, suite.RandomStream()) |
| 79 | |
| 80 | p12, _ := p1.Add(p2) |
| 81 | p13, _ := p1.Add(p3) |
| 82 | |
| 83 | p123, _ := p12.Add(p3) |
| 84 | p132, _ := p13.Add(p2) |
| 85 | |
| 86 | if !p123.Equal(p132) { |
| 87 | test.Fatal("private polynomials not equal") |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | func TestPublicCheck(test *testing.T) { |
| 92 | n := 10 |
nothing calls this directly
no test coverage detected