forked from unidoc/unitype
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvalidate_test.go
More file actions
44 lines (38 loc) · 782 Bytes
/
validate_test.go
File metadata and controls
44 lines (38 loc) · 782 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*
* This file is subject to the terms and conditions defined in
* file 'LICENSE.md', which is part of this source code package.
*/
package unitype
import (
"fmt"
"testing"
"time"
"github.com/sirupsen/logrus"
)
func TestFontValidation(t *testing.T) {
testcases := []struct {
fontPath string
}{
{
"./testdata/FreeSans.ttf",
},
{
"./testdata/wts11.ttf",
},
{
"./testdata/roboto/Roboto-BoldItalic.ttf",
},
}
for _, tcase := range testcases {
t.Logf("%s", tcase.fontPath)
fmt.Printf("==== %s\n", tcase.fontPath)
logrus.Debugf("==== %s", tcase.fontPath)
start := time.Now()
err := ValidateFile(tcase.fontPath)
if err != nil {
t.Fatalf("Error: %v", err)
}
diff := time.Now().Sub(start)
t.Logf("- took: %s", diff.String())
}
}