diff options
author | Christopher Speller <crspeller@gmail.com> | 2017-04-24 20:11:36 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2017-04-24 20:11:36 -0400 |
commit | f5437632f486b7d0a0a181c58f113c86d032b02c (patch) | |
tree | 407388e3003a210a89f4b2128d7ad656f8b79d26 /vendor/github.com/disintegration/imaging/utils_test.go | |
parent | 7f68a60f8c228d5604e0566bf84cabb145d16c37 (diff) | |
download | chat-f5437632f486b7d0a0a181c58f113c86d032b02c.tar.gz chat-f5437632f486b7d0a0a181c58f113c86d032b02c.tar.bz2 chat-f5437632f486b7d0a0a181c58f113c86d032b02c.zip |
Upgrading server dependancies (#6215)
Diffstat (limited to 'vendor/github.com/disintegration/imaging/utils_test.go')
-rw-r--r-- | vendor/github.com/disintegration/imaging/utils_test.go | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/vendor/github.com/disintegration/imaging/utils_test.go b/vendor/github.com/disintegration/imaging/utils_test.go index 99aa8c82f..44cc75102 100644 --- a/vendor/github.com/disintegration/imaging/utils_test.go +++ b/vendor/github.com/disintegration/imaging/utils_test.go @@ -15,7 +15,7 @@ func testParallelN(enabled bool, n, procs int) bool { } }) for i := 0; i < n; i++ { - if data[i] != true { + if !data[i] { return false } } @@ -27,7 +27,7 @@ func TestParallel(t *testing.T) { for _, e := range []bool{true, false} { for _, n := range []int{1, 10, 100, 1000} { for _, p := range []int{1, 2, 4, 8, 16, 100} { - if testParallelN(e, n, p) != true { + if !testParallelN(e, n, p) { t.Errorf("test [parallel %v %d %d] failed", e, n, p) } } @@ -59,23 +59,3 @@ func TestClamp(t *testing.T) { } } } - -func TestClampint32(t *testing.T) { - td := []struct { - i int32 - u uint8 - }{ - {0, 0}, - {255, 255}, - {128, 128}, - {256, 255}, - {2500, 255}, - {-10, 0}, - } - - for _, d := range td { - if clampint32(d.i) != d.u { - t.Errorf("test [clampint32 %v %v] failed: %v", d.i, d.u, clampint32(d.i)) - } - } -} |