summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/disintegration/imaging/histogram_test.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2018-04-16 05:37:14 -0700
committerJoram Wilander <jwawilander@gmail.com>2018-04-16 08:37:14 -0400
commit6e2cb00008cbf09e556b00f87603797fcaa47e09 (patch)
tree3c0eb55ff4226a3f024aad373140d1fb860a6404 /vendor/github.com/disintegration/imaging/histogram_test.go
parentbf24f51c4e1cc6286885460672f7f449e8c6f5ef (diff)
downloadchat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.gz
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.tar.bz2
chat-6e2cb00008cbf09e556b00f87603797fcaa47e09.zip
Depenancy upgrades and movign to dep. (#8630)
Diffstat (limited to 'vendor/github.com/disintegration/imaging/histogram_test.go')
-rw-r--r--vendor/github.com/disintegration/imaging/histogram_test.go42
1 files changed, 0 insertions, 42 deletions
diff --git a/vendor/github.com/disintegration/imaging/histogram_test.go b/vendor/github.com/disintegration/imaging/histogram_test.go
deleted file mode 100644
index 10f4c3fef..000000000
--- a/vendor/github.com/disintegration/imaging/histogram_test.go
+++ /dev/null
@@ -1,42 +0,0 @@
-package imaging
-
-import (
- "image"
- "image/color"
- "testing"
-)
-
-func TestHistogram(t *testing.T) {
- b := image.Rectangle{image.Point{0, 0}, image.Point{2, 2}}
-
- i1 := image.NewRGBA(b)
- i1.Set(0, 0, image.Black)
- i1.Set(1, 0, image.White)
- i1.Set(1, 1, image.White)
- i1.Set(0, 1, color.Gray{123})
-
- h := Histogram(i1)
- if h[0] != 0.25 || h[123] != 0.25 || h[255] != 0.5 {
- t.Errorf("Incorrect histogram for image i1")
- }
-
- i2 := image.NewRGBA(b)
- i2.Set(0, 0, color.Gray{51})
- i2.Set(0, 1, color.Gray{14})
- i2.Set(1, 0, color.Gray{14})
-
- h = Histogram(i2)
- if h[14] != 0.5 || h[51] != 0.25 || h[0] != 0.25 {
- t.Errorf("Incorrect histogram for image i2")
- }
-
- b = image.Rectangle{image.Point{0, 0}, image.Point{0, 0}}
- i3 := image.NewRGBA(b)
- h = Histogram(i3)
- for _, val := range h {
- if val != 0 {
- t.Errorf("Histogram for an empty image should be a zero histogram.")
- return
- }
- }
-}