github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/talks/2014/testing/test1/string_test.go (about)

     1  package strings_test
     2  
     3  import (
     4  	"strings"
     5  	"testing"
     6  )
     7  
     8  func TestIndex(t *testing.T) {
     9  	const s, sep, want = "chicken", "ken", 4
    10  	got := strings.Index(s, sep)
    11  	if got != want {
    12  		t.Errorf("Index(%q,%q) = %v; want %v", s, sep, got, want)
    13  	}
    14  }