(t *testing.T)
| 89 | } |
| 90 | |
| 91 | func TestSmartPoolSubmitCorrectClaim(t *testing.T) { |
| 92 | sp := newTestSmartPool() |
| 93 | sp.ShareThreshold = 1 |
| 94 | sp.AcceptSolution(&testSolution{Counter: big.NewInt(9)}) |
| 95 | sp.AcceptSolution(&testSolution{Counter: big.NewInt(8)}) |
| 96 | sp.AcceptSolution(&testSolution{Counter: big.NewInt(10)}) |
| 97 | sp.AcceptSolution(&testSolution{Counter: big.NewInt(5)}) |
| 98 | sp.Submit() |
| 99 | |
| 100 | testContract := sp.Contract.(*testContract) |
| 101 | claim := testContract.GetLastSubmittedClaim() |
| 102 | if claim.NumShares().Cmp(big.NewInt(4)) != 0 { |
| 103 | t.Fail() |
| 104 | } |
| 105 | } |
| 106 | |
| 107 | func TestSmartPoolReturnFalseIfNoClaim(t *testing.T) { |
| 108 | sp := newTestSmartPool() |
nothing calls this directly
no test coverage detected