1
0
Fork 0

Add tests for CodePointToGlyph

This commit is contained in:
Daniele Tricoli 2015-11-22 18:37:44 +01:00
parent a8a1a825ec
commit 473189b745
1 changed files with 16 additions and 0 deletions

16
format/text_test.go Normal file
View File

@ -0,0 +1,16 @@
package format // import "eriol.xyz/piken/format"
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestCodePointToGlyph(t *testing.T) {
glyph, err := CodePointToGlyph("1F602")
assert.Nil(t, err)
assert.Equal(t, glyph, "😂")
glyph, err = CodePointToGlyph("1000000000")
assert.Equal(t, glyph, "")
assert.Error(t, err)
}