Sha256: c253158a524c6492685c09f0fca2141a7d30f4f907eae79460f822b1f0148f93

Contents?: true

Size: 418 Bytes

Versions: 41

Compression:

Stored size: 418 Bytes

Contents

package atbash

import "testing"

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

41 entries across 41 versions & 1 rubygems

Version Path
trackler-2.2.1.97 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.96 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.95 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.94 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.93 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.92 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.91 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.90 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.89 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.88 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.87 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.86 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.85 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.84 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.83 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.82 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.81 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.80 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.79 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go
trackler-2.2.1.78 tracks/go/exercises/atbash-cipher/atbash_cipher_test.go