Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for testContains (0.24 sec)

  1. src/bytes/bytes_test.go

    }{
    	{[]byte("hello"), []byte("hel"), true},
    	{[]byte("日本語"), []byte("日本"), true},
    	{[]byte("hello"), []byte("Hello, world"), false},
    	{[]byte("東京"), []byte("京東"), false},
    }
    
    func TestContains(t *testing.T) {
    	for _, tt := range containsTests {
    		if got := Contains(tt.b, tt.subslice); got != tt.want {
    			t.Errorf("Contains(%q, %q) = %v, want %v", tt.b, tt.subslice, got, tt.want)
    		}
    	}
    }
    
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Wed Jan 24 16:07:25 GMT 2024
    - 56.2K bytes
    - Viewed (0)
Back to top