Sha256: c4381c2ebcb1f74fcaa3eede200baeec4f2a70f9bf713e27d76e1c5b65ce7c6f

Contents?: true

Size: 512 Bytes

Versions: 102

Compression:

Stored size: 512 Bytes

Contents

// +build first

package slice

import "testing"

func TestFirst(t *testing.T) {
	for _, test := range allTests {
		switch res, ok := First(test.n, test.s); {
		case !ok:
			if len(test.out) > 0 {
				t.Fatalf("First(%d, %s) returned !ok, want ok.",
					test.n, test.s)
			}
		case len(test.out) == 0:
			t.Fatalf("First(%d, %s) = %s, %t.  Expected ok == false",
				test.n, test.s, res, ok)
		case res != test.out[0]:
			t.Fatalf("First(%d, %s) = %s.  Want %s.",
				test.n, test.s, res, test.out[0])
		}
	}
}

Version data entries

102 entries across 102 versions & 1 rubygems

Version Path
trackler-2.0.8.1 tracks/go/exercises/series/first_test.go
trackler-2.0.7.0 tracks/go/exercises/series/first_test.go
trackler-2.0.6.44 tracks/go/exercises/series/first_test.go
trackler-2.0.6.43 tracks/go/exercises/series/first_test.go
trackler-2.0.6.42 tracks/go/exercises/series/first_test.go
trackler-2.0.6.41 tracks/go/exercises/series/first_test.go
trackler-2.0.6.40 tracks/go/exercises/series/first_test.go
trackler-2.0.6.39 tracks/go/exercises/series/first_test.go
trackler-2.0.6.38 tracks/go/exercises/series/first_test.go
trackler-2.0.6.37 tracks/go/exercises/series/first_test.go
trackler-2.0.6.36 tracks/go/exercises/series/first_test.go
trackler-2.0.6.35 tracks/go/exercises/series/first_test.go
trackler-2.0.6.34 tracks/go/exercises/series/first_test.go
trackler-2.0.6.33 tracks/go/exercises/series/first_test.go
trackler-2.0.6.32 tracks/go/exercises/series/first_test.go
trackler-2.0.6.31 tracks/go/exercises/series/first_test.go
trackler-2.0.6.30 tracks/go/exercises/series/first_test.go
trackler-2.0.6.29 tracks/go/exercises/series/first_test.go
trackler-2.0.6.28 tracks/go/exercises/series/first_test.go
trackler-2.0.6.27 tracks/go/exercises/series/first_test.go