Sha256: 1cafcbd68720957eb7ba5aa0dc4f2cd43fe99e65bdbea1a1d4adf508e6bfc908

Contents?: true

Size: 543 Bytes

Versions: 161

Compression:

Stored size: 543 Bytes

Contents

package luhn

import "testing"

const targetTestVersion = 2

func TestTestVersion(t *testing.T) {
	if testVersion != targetTestVersion {
		t.Errorf("Found testVersion = %v, want %v", testVersion, targetTestVersion)
	}
}

func TestValid(t *testing.T) {
	for _, test := range testCases {
		if ok := Valid(test.input); ok != test.ok {
			t.Fatalf("Valid(%s): %s\n\t Expected: %t\n\t Got: %t", test.input, test.description, test.ok, ok)
		}
	}
}

func BenchmarkValid(b *testing.B) {
	for i := 0; i < b.N; i++ {
		Valid("2323 2005 7766 3554")
	}
}

Version data entries

161 entries across 161 versions & 1 rubygems

Version Path
trackler-2.2.1.36 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.35 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.34 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.33 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.32 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.31 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.30 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.29 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.28 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.27 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.26 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.25 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.24 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.23 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.22 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.21 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.20 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.19 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.18 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.17 tracks/go/exercises/luhn/luhn_test.go