Sha256: 500e73ec2ecb7a5338626689a429ed3d1fec7c4cdbcfc13b4cc6262288b17f39

Contents?: true

Size: 763 Bytes

Versions: 236

Compression:

Stored size: 763 Bytes

Contents

// +build asktoomuch

package series

import "testing"

func TestAskTooMuch(t *testing.T) {
	test := allTests[0]
	defer func() {
		if recover() != nil {
			t.Fatalf("Yikes, UnsafeFirst(%d, %q) panicked!", test.n, test.s)
		}
	}()
	for _, test = range allTests {
		switch res := UnsafeFirst(test.n, test.s); {
		case len(test.out) > 0: // well, this should work
			if res != test.out[0] {
				t.Fatalf("Yikes, UnsafeFirst(%d, %q) = %q, want %q.",
					test.n, test.s, res, test.out[0])
			}
		case len(res) != test.n:
			t.Fatalf("Yikes, UnsafeFirst(%d, %q) = %q, but %q doesn't have %d characters.",
				test.n, test.s, res, res, test.n)
		default:
			t.Fatalf("Yikes, UnsafeFirst(%d, %q) = %q, but %q isn't in %q",
				test.n, test.s, res, res, test.s)
		}
	}
}

Version data entries

236 entries across 236 versions & 1 rubygems

Version Path
trackler-2.2.1.180 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.179 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.178 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.177 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.176 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.175 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.174 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.173 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.172 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.171 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.170 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.169 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.167 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.166 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.165 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.164 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.163 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.162 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.161 tracks/go/exercises/series/asktoomuch_test.go
trackler-2.2.1.160 tracks/go/exercises/series/asktoomuch_test.go