aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2014-11-12 02:18:52 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2014-11-12 02:18:52 +0800
commitc24d143c9e08f9782d7ad063868ea7c647db2a03 (patch)
treeab278bc0a5a61ac06fe538e9aae3bfedf348430f
parentbfd1fe977e1a4f921fce6b4ca522b024df0b2733 (diff)
downloaddexon-c24d143c9e08f9782d7ad063868ea7c647db2a03.tar.gz
dexon-c24d143c9e08f9782d7ad063868ea7c647db2a03.tar.zst
dexon-c24d143c9e08f9782d7ad063868ea7c647db2a03.zip
Convert rand_test to checker
-rw-r--r--ethutil/rand_test.go14
1 files changed, 11 insertions, 3 deletions
diff --git a/ethutil/rand_test.go b/ethutil/rand_test.go
index cc64c73e5..c12698538 100644
--- a/ethutil/rand_test.go
+++ b/ethutil/rand_test.go
@@ -1,9 +1,17 @@
package ethutil
import (
- "testing"
+ checker "gopkg.in/check.v1"
)
-func TestRandomUint64(t *testing.T) {
- RandomUint64()
+type RandomSuite struct{}
+
+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)
}