Convert rand_test to checker

This commit is contained in:
Taylor Gerring 2014-11-11 19:18:52 +01:00
parent bfd1fe977e
commit c24d143c9e

View File

@ -1,9 +1,17 @@
package ethutil package ethutil
import ( import (
"testing" checker "gopkg.in/check.v1"
) )
func TestRandomUint64(t *testing.T) { type RandomSuite struct{}
RandomUint64()
var _ = checker.Suite(&RandomSuite{})
func (s *RandomSuite) TestRandomUint64(c *checker.C) {
res1, _ := RandomUint64()
res2, _ := RandomUint64()
c.Assert(res1, checker.NotNil)
c.Assert(res2, checker.NotNil)
c.Assert(res1, checker.Not(checker.Equals), res2)
} }