Files
releases/util/test/subtest.go
T
Torin Sandall 7c4cd38e89 Add subtest utility and apply in topdown
Go 1.7 makes sub-tests available in the testing framework. Among other things,
the sub-tests are nice because they can be run directly from the command line.
2016-08-30 12:06:47 -07:00

15 lines
348 B
Go

// Copyright 2016 The OPA Authors. All rights reserved.
// Use of this source code is governed by an Apache2
// license that can be found in the LICENSE file.
// +build !go1.7
package test
import "testing"
// Subtest provides pre-1.7 backwards compatibility for sub-tests.
func Subtest(t *testing.T, name string, f func(*testing.T)) {
f(t)
}