Change package to text_test
This commit is contained in:
parent
f72c39f382
commit
5ed20d5485
|
@ -1,18 +1,22 @@
|
||||||
package text
|
package text_test
|
||||||
|
|
||||||
import "testing"
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/faiface/pixel/text"
|
||||||
|
)
|
||||||
|
|
||||||
func TestAtlas7x13(t *testing.T) {
|
func TestAtlas7x13(t *testing.T) {
|
||||||
if Atlas7x13 == nil {
|
if text.Atlas7x13 == nil {
|
||||||
t.Fatalf("Atlas7x13 is nil")
|
t.Fatalf("Atlas7x13 is nil")
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, tt := range []struct {
|
for _, tt := range []struct {
|
||||||
runes []rune
|
runes []rune
|
||||||
want bool
|
want bool
|
||||||
}{{ASCII, true}, {[]rune("ÅÄÖ"), false}} {
|
}{{text.ASCII, true}, {[]rune("ÅÄÖ"), false}} {
|
||||||
for _, r := range tt.runes {
|
for _, r := range tt.runes {
|
||||||
if got := Atlas7x13.Contains(r); got != tt.want {
|
if got := text.Atlas7x13.Contains(r); got != tt.want {
|
||||||
t.Fatalf("Atlas7x13.Contains('%s') = %v, want %v", string(r), got, tt.want)
|
t.Fatalf("Atlas7x13.Contains('%s') = %v, want %v", string(r), got, tt.want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue