Sha256: 77027ffd25a37cbe7ffae20119c996079b5ef4ab898b7ae8d6de1d78d7554db8

Contents?: true

Size: 1.04 KB

Versions: 115

Compression:

Stored size: 1.04 KB

Contents

package encode

import "testing"

func TestRunLengthEncode(t *testing.T) {
	for _, test := range encodeTests {
		if actual := RunLengthEncode(test.input); actual != test.expected {
			t.Errorf("FAIL %s - RunLengthEncode(%s) = %q, expected %q.",
				test.description, test.input, actual, test.expected)
		}
		t.Logf("PASS RunLengthEncode - %s", test.description)
	}
}
func TestRunLengthDecode(t *testing.T) {
	for _, test := range decodeTests {
		if actual := RunLengthDecode(test.input); actual != test.expected {
			t.Errorf("FAIL %s - RunLengthDecode(%s) = %q, expected %q.",
				test.description, test.input, actual, test.expected)
		}
		t.Logf("PASS RunLengthDecode - %s", test.description)
	}
}
func TestRunLengthEncodeDecode(t *testing.T) {
	for _, test := range encodeDecodeTests {
		if actual := RunLengthDecode(RunLengthEncode(test.input)); actual != test.expected {
			t.Errorf("FAIL %s - RunLengthDecode(RunLengthEncode(%s)) = %q, expected %q.",
				test.description, test.input, actual, test.expected)
		}
		t.Logf("PASS %s", test.description)
	}
}

Version data entries

115 entries across 115 versions & 1 rubygems

Version Path
trackler-2.2.1.159 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.158 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.157 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.156 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.155 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.154 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.153 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.152 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.151 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.150 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.149 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.148 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.147 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.146 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.145 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.144 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.143 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.142 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.141 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go
trackler-2.2.1.140 tracks/go/exercises/run-length-encoding/run_length_encoding_test.go