aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/image/font/plan9font/plan9font_test.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2017-09-09 09:42:37 +0200
committerDimitri Sokolyuk <demon@dim13.org>2017-09-09 09:42:37 +0200
commit500caaeda74dd9c660279036293f4b2997cf0b03 (patch)
tree1226f60231a408b0aae67867faaa3f2cfbac8c83 /vendor/golang.org/x/image/font/plan9font/plan9font_test.go
parent413560591fc2d89a73eb8a33ba28b0cc3407b1db (diff)
Add vendor
Diffstat (limited to 'vendor/golang.org/x/image/font/plan9font/plan9font_test.go')
-rw-r--r--vendor/golang.org/x/image/font/plan9font/plan9font_test.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/golang.org/x/image/font/plan9font/plan9font_test.go b/vendor/golang.org/x/image/font/plan9font/plan9font_test.go
new file mode 100644
index 0000000..23393a1
--- /dev/null
+++ b/vendor/golang.org/x/image/font/plan9font/plan9font_test.go
@@ -0,0 +1,24 @@
+// Copyright 2016 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package plan9font
+
+import (
+ "io/ioutil"
+ "path/filepath"
+ "testing"
+)
+
+func BenchmarkParseSubfont(b *testing.B) {
+ subfontData, err := ioutil.ReadFile(filepath.FromSlash("../testdata/fixed/7x13.0000"))
+ if err != nil {
+ b.Fatal(err)
+ }
+ b.ResetTimer()
+ for i := 0; i < b.N; i++ {
+ if _, err := ParseSubfont(subfontData, 0); err != nil {
+ b.Fatal(err)
+ }
+ }
+}