Sha256: d2413d7a9b0fe4f8e75a309df5cbf4d6993e77ca6d5c807c80e2bcba52e22aff

Contents?: true

Size: 607 Bytes

Versions: 106

Compression:

Stored size: 607 Bytes

Contents

package atbash

import "testing"

const targetTestVersion = 2

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

func TestAtbash(t *testing.T) {
	for _, test := range tests {
		actual := Atbash(test.s)
		if actual != test.expected {
			t.Errorf("Atbash(%s): expected %s, actual %s", test.s, test.expected, actual)
		}
	}
}

func BenchmarkAtbash(b *testing.B) {
	b.StopTimer()
	for _, test := range tests {
		b.StartTimer()

		for i := 0; i < b.N; i++ {
			Atbash(test.s)
		}

		b.StopTimer()
	}
}

Version data entries

106 entries across 106 versions & 1 rubygems

Version Path
trackler-2.2.1.56 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.55 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.54 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.53 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.52 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.51 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.50 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.49 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.48 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.47 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.46 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.45 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.44 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.43 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.42 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.41 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.40 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.39 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.38 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.37 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go