blob: dc940509df5bc8fab860569ab6850c73a567c656 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
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
}
|