aboutsummaryrefslogtreecommitdiffstats
path: root/blockpool/test/util.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-03-27 05:42:46 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-03-27 05:42:46 +0800
commit6bd1f6cc49acd459e61559e5af515da2db2481e5 (patch)
tree3e4f7a51ca8e3cb03d24fbe1898578d88fd7456c /blockpool/test/util.go
parentbb12dbe233db2e064715b329b7ba987c76ba3bfa (diff)
parentb0b0939879b9fb8453ec1c8fa2ceb522e56df3bc (diff)
downloaddexon-6bd1f6cc49acd459e61559e5af515da2db2481e5.tar.gz
dexon-6bd1f6cc49acd459e61559e5af515da2db2481e5.tar.zst
dexon-6bd1f6cc49acd459e61559e5af515da2db2481e5.zip
Merge remote-tracking branch 'origin' into rpcargs
Conflicts: rpc/args.go
Diffstat (limited to 'blockpool/test/util.go')
-rw-r--r--blockpool/test/util.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/blockpool/test/util.go b/blockpool/test/util.go
index 0349493c3..930601278 100644
--- a/blockpool/test/util.go
+++ b/blockpool/test/util.go
@@ -10,16 +10,20 @@ import (
func CheckInt(name string, got int, expected int, t *testing.T) (err error) {
if got != expected {
- t.Errorf("status for %v incorrect. expected %v, got %v", name, expected, got)
- err = fmt.Errorf("")
+ err = fmt.Errorf("status for %v incorrect. expected %v, got %v", name, expected, got)
+ if t != nil {
+ t.Error(err)
+ }
}
return
}
func CheckDuration(name string, got time.Duration, expected time.Duration, t *testing.T) (err error) {
if got != expected {
- t.Errorf("status for %v incorrect. expected %v, got %v", name, expected, got)
- err = fmt.Errorf("")
+ err = fmt.Errorf("status for %v incorrect. expected %v, got %v", name, expected, got)
+ if t != nil {
+ t.Error(err)
+ }
}
return
}