summaryrefslogtreecommitdiffstats
path: root/Godeps/_workspace/src/github.com/golang/freetype/truetype/truetype_test.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-11-23 15:53:48 -0800
committer=Corey Hulen <corey@hulen.com>2015-11-23 15:53:48 -0800
commit4f4cd5e63573da4d6edcc7d4213afaca67c19f88 (patch)
treecefbc7af53629d97644ca2f6b2369e9d879f0101 /Godeps/_workspace/src/github.com/golang/freetype/truetype/truetype_test.go
parentf8a3c9a14edca6df0647d89cf225f2470cbe025c (diff)
downloadchat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.tar.gz
chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.tar.bz2
chat-4f4cd5e63573da4d6edcc7d4213afaca67c19f88.zip
upgrading libs
Diffstat (limited to 'Godeps/_workspace/src/github.com/golang/freetype/truetype/truetype_test.go')
-rw-r--r--Godeps/_workspace/src/github.com/golang/freetype/truetype/truetype_test.go27
1 files changed, 25 insertions, 2 deletions
diff --git a/Godeps/_workspace/src/github.com/golang/freetype/truetype/truetype_test.go b/Godeps/_workspace/src/github.com/golang/freetype/truetype/truetype_test.go
index ce7f1277a..2382ab112 100644
--- a/Godeps/_workspace/src/github.com/golang/freetype/truetype/truetype_test.go
+++ b/Godeps/_workspace/src/github.com/golang/freetype/truetype/truetype_test.go
@@ -15,8 +15,8 @@ import (
"strings"
"testing"
- "golang.org/x/image/font"
- "golang.org/x/image/math/fixed"
+ "github.com/mattermost/platform/Godeps/_workspace/src/golang.org/x/image/font"
+ "github.com/mattermost/platform/Godeps/_workspace/src/golang.org/x/image/math/fixed"
)
func parseTestdataFont(name string) (f *Font, testdataIsOptional bool, err error) {
@@ -211,6 +211,29 @@ func TestIndex(t *testing.T) {
}
}
+func TestName(t *testing.T) {
+ testCases := map[string]string{
+ "luximr": "Luxi Mono",
+ "luxirr": "Luxi Serif",
+ "luxisr": "Luxi Sans",
+ }
+
+ for name, want := range testCases {
+ f, testdataIsOptional, err := parseTestdataFont(name)
+ if err != nil {
+ if testdataIsOptional {
+ t.Log(err)
+ } else {
+ t.Fatal(err)
+ }
+ continue
+ }
+ if got := f.Name(NameIDFontFamily); got != want {
+ t.Errorf("%s: got %q, want %q", name, got, want)
+ }
+ }
+}
+
type scalingTestData struct {
advanceWidth fixed.Int26_6
bounds fixed.Rectangle26_6