MCPcopy Create free account
hub / github.com/dop251/goja / TestString_AsUtf16

Function TestString_AsUtf16

unistring/string_test.go:5–16  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3import "testing"
4
5func TestString_AsUtf16(t *testing.T) {
6 const str = "más"
7 s := NewFromString(str)
8
9 if b := s.AsUtf16(); len(b) != 4 || b[0] != BOM {
10 t.Fatal(b)
11 }
12
13 if s.String() != str {
14 t.Fatal(s)
15 }
16}

Callers

nothing calls this directly

Calls 3

NewFromStringFunction · 0.85
AsUtf16Method · 0.80
StringMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…