From 4f4cd5e63573da4d6edcc7d4213afaca67c19f88 Mon Sep 17 00:00:00 2001 From: =Corey Hulen Date: Mon, 23 Nov 2015 15:53:48 -0800 Subject: upgrading libs --- .../golang/freetype/truetype/truetype_test.go | 27 ++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'Godeps/_workspace/src/github.com/golang/freetype/truetype/truetype_test.go') 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 -- cgit v1.2.3-1-g7c22