Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestRunes (0.1 sec)

  1. src/bytes/bytes_test.go

    	{"abc", []rune{97, 98, 99}, false},
    	{"\u65e5\u672c\u8a9e", []rune{26085, 26412, 35486}, false},
    	{"ab\x80c", []rune{97, 98, 0xFFFD, 99}, true},
    	{"ab\xc0c", []rune{97, 98, 0xFFFD, 99}, true},
    }
    
    func TestRunes(t *testing.T) {
    	for _, tt := range RunesTests {
    		tin := []byte(tt.in)
    		a := Runes(tin)
    		if !slices.Equal(a, tt.out) {
    			t.Errorf("Runes(%q) = %v; want %v", tin, a, tt.out)
    			continue
    		}
    Registered: Tue Nov 05 11:13:11 UTC 2024
    - Last Modified: Mon Aug 19 19:09:04 UTC 2024
    - 61.2K bytes
    - Viewed (0)
Back to top