mirror of
https://github.com/open-policy-agent/opa.git
synced 2026-08-27 18:55:54 -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
337 B
Go
15 lines
337 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 executes a sub-test f under test t.
|
|
func Subtest(t *testing.T, name string, f func(*testing.T)) {
|
|
t.Run(name, f)
|
|
}
|