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 | 23 |
1 files changed, 23 insertions, 0 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..bd62d1da1 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 @@ -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 |