Sha256: 823076810141257ef7828946a172b224d722f41706c40314d8b179eaba00b7e8

Contents?: true

Size: 455 Bytes

Versions: 122

Compression:

Stored size: 455 Bytes

Contents

package flatten

import (
	"reflect"
	"testing"
)

func TestFlatten(t *testing.T) {
	for _, tc := range testCases {
		if actual := Flatten(tc.input); !reflect.DeepEqual(actual, tc.expected) {
			t.Fatalf("FAIL: %s\nExpected: %v\nActual: %v", tc.description, tc.expected, actual)
		}
		t.Logf("PASS: %s", tc.description)
	}
}

func BenchmarkFlatten(b *testing.B) {
	for i := 0; i < b.N; i++ {
		for _, tc := range testCases {
			Flatten(tc.input)
		}
	}
}

Version data entries

122 entries across 122 versions & 1 rubygems

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