tests/thirdparty: package metadata (#223)
Fetches third-party package metadata from Github.
This commit is contained in:
committed by
GitHub
parent
afe2d539b8
commit
f355d27b13
@@ -2,6 +2,7 @@
|
||||
package test
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
@@ -12,6 +13,17 @@ import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
var network = flag.Bool("net", false, "allow network access")
|
||||
|
||||
// RequiresNetwork declares that a test requires network access. The test is
|
||||
// skipped if network access isn't enabled with the -net flag.
|
||||
func RequiresNetwork(t *testing.T) {
|
||||
t.Helper()
|
||||
if !*network {
|
||||
t.Skip("requires network: enable with -net flag")
|
||||
}
|
||||
}
|
||||
|
||||
// Assembles asserts that the given assembly code passes the go assembler.
|
||||
func Assembles(t *testing.T, asm []byte) {
|
||||
t.Helper()
|
||||
|
||||
Reference in New Issue
Block a user