golang-image/font/basicfont/basicfont_test.go

20 lines
523 B
Go
Raw Normal View History

// Copyright 2018 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 basicfont
import (
"image"
"testing"
2018-12-06 17:03:52 +01:00
"git.gutmet.org/golang-image.git/font"
)
func TestMetrics(t *testing.T) {
want := font.Metrics{Height: 832, Ascent: 704, Descent: 128, XHeight: 704, CapHeight: 704, CaretSlope: image.Point{X: 0, Y: 1}}
if got := Face7x13.Metrics(); got != want {
t.Errorf("Face7x13: Metrics: got %v want %v", got, want)
}
}