diff options
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.go | 27 |
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 |