aboutsummaryrefslogtreecommitdiff
path: root/tests/core/go_test/BUILD.bazel
diff options
context:
space:
mode:
authorIan Cottrell <ian.the.hat@gmail.com>2018-01-24 11:23:33 -0500
committerGitHub <noreply@github.com>2018-01-24 11:23:33 -0500
commitaa34a0d0c8990ef7fddbfdb3595dd8c046c622bf (patch)
treeb16eaef5127714d6c0e5bcbad6f23561c464ab78 /tests/core/go_test/BUILD.bazel
parent56e5592cd6244e268076fb52c9eb3fa85445bcf0 (diff)
downloadbazelbuild-rules_go-aa34a0d0c8990ef7fddbfdb3595dd8c046c622bf.tar.gz
Basic go_test tests (#1269)
Diffstat (limited to 'tests/core/go_test/BUILD.bazel')
-rw-r--r--tests/core/go_test/BUILD.bazel33
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/core/go_test/BUILD.bazel b/tests/core/go_test/BUILD.bazel
new file mode 100644
index 00000000..50caa973
--- /dev/null
+++ b/tests/core/go_test/BUILD.bazel
@@ -0,0 +1,33 @@
+load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
+
+test_suite(
+ name = "go_test",
+)
+
+go_library(
+ name = "lib",
+ srcs = ["lib.go"],
+ importpath = "lib",
+)
+
+go_test(
+ name = "internal_test",
+ size = "small",
+ srcs = ["internal_test.go"],
+ embed = [":lib"],
+ x_defs = {
+ "lib.Got": "Internal",
+ "lib.Expect": "Internal",
+ },
+)
+
+go_test(
+ name = "external_test",
+ size = "small",
+ srcs = ["external_test.go"],
+ deps = [":lib"],
+ x_defs = {
+ "lib.Got": "External",
+ "Expect": "External",
+ },
+)