File: string_test.go

package info (click to toggle)
golang-github-dop251-goja 0.0~git20250630.0.58d95d8-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,264 kB
  • sloc: javascript: 454; perl: 184; makefile: 6; sh: 1
file content (16 lines) | stat: -rw-r--r-- 233 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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)
	}
}