Sha256: 965cc073f90149982b758e8cf55ea00653eb2dbfa0fab698911ea3cc04130391

Contents?: true

Size: 478 Bytes

Versions: 80

Compression:

Stored size: 478 Bytes

Contents

package railfence

import "testing"

func testCases(op func(string, int) string, cases []testCase, t *testing.T) {
	for _, tc := range cases {
		if actual := op(tc.message, tc.rails); actual != tc.expected {
			t.Fatalf("FAIL: %s\nExpected: %q\nActual: %q", tc.description, tc.expected, actual)
		}
		t.Logf("PASS: %s", tc.description)
	}
}

func TestEncode(t *testing.T) { testCases(Encode, encodeTests, t) }
func TestDecode(t *testing.T) { testCases(Decode, decodeTests, t) }

Version data entries

80 entries across 80 versions & 1 rubygems

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