aboutsummaryrefslogtreecommitdiff
path: root/tests/core/go_test/x_defs/foo_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'tests/core/go_test/x_defs/foo_test.go')
-rw-r--r--tests/core/go_test/x_defs/foo_test.go28
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/core/go_test/x_defs/foo_test.go b/tests/core/go_test/x_defs/foo_test.go
new file mode 100644
index 00000000..dc940509
--- /dev/null
+++ b/tests/core/go_test/x_defs/foo_test.go
@@ -0,0 +1,28 @@
+package foo_test
+
+import (
+ "testing"
+
+ "github.com/bazelbuild/rules_go/tests/core/go_test/x_defs/bar"
+)
+
+func TestBar(t *testing.T) {
+ Equal(t, "Bar", bar.Bar)
+}
+
+func TestBaz(t *testing.T) {
+ Equal(t, "Baz", bar.Baz)
+}
+
+func TestQux(t *testing.T) {
+ Equal(t, "Qux", bar.Qux)
+}
+
+func Equal(t *testing.T, expected string, actual string) bool {
+ if expected != actual {
+ t.Errorf("Not equal: \n"+
+ "expected: %s\n"+
+ "actual : %s", expected, actual)
+ }
+ return true
+}