ai_old/goja/unistring/string_test.go
2024-09-20 16:50:35 +08:00

17 lines
233 B
Go

package unistring
import "testing"
func TestString_AsUtf16(t *testing.T) {
const str = "más"
s := NewFromString(str)
if b := s.AsUtf16(); len(b) != 4 || b[0] != BOM {
t.Fatal(b)
}
if s.String() != str {
t.Fatal(s)
}
}