Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for TestFinderCreation (0.15 sec)

  1. src/strings/search_test.go

    	for _, tc := range testCases {
    		got := StringFind(tc.pat, tc.text)
    		want := tc.index
    		if got != want {
    			t.Errorf("stringFind(%q, %q) got %d, want %d\n", tc.pat, tc.text, got, want)
    		}
    	}
    }
    
    func TestFinderCreation(t *testing.T) {
    	testCases := []struct {
    		pattern string
    		bad     [256]int
    		suf     []int
    	}{
    		{
    			"abc",
    			[256]int{'a': 2, 'b': 1, 'c': 3},
    			[]int{5, 4, 1},
    		},
    		{
    			"mississi",
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Jun 01 21:52:00 UTC 2018
    - 1.9K bytes
    - Viewed (0)
Back to top