Sha256: 9818d96e45de388edc228bc2af6912040974b4d14976ec127aa7e3aee4721bb1

Contents?: true

Size: 354 Bytes

Versions: 122

Compression:

Stored size: 354 Bytes

Contents

package luhn

import "testing"

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

122 entries across 122 versions & 1 rubygems

Version Path
trackler-2.2.1.78 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.77 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.76 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.75 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.74 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.73 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.72 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.71 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.70 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.69 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.68 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.67 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.66 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.65 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.64 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.63 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.62 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.61 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.60 tracks/go/exercises/luhn/luhn_test.go
trackler-2.2.1.59 tracks/go/exercises/luhn/luhn_test.go