1
0
Fork 0

Add tests for CodePointToGlyph

main
Daniele Tricoli 7 years ago
parent a8a1a825ec
commit 473189b745
  1. 16
      format/text_test.go

@ -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)
}
Loading…
Cancel
Save