mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-26 10:15:39 -06:00
7c4cd38e89
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.
15 lines
348 B
Go
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)
|
|
}
|