• Home
  • Raw
  • Download

Lines Matching refs:t

24 func TestLibraryReuse(t *testing.T) {
25 t.Run("simple", func(t *testing.T) {
26 ctx := testCc(t, `
36 t.Fatalf("unexpected inputs to libfoo shared: %#v", libfooShared.Inputs.Strings())
40 t.Fatalf("unexpected inputs to libfoo static: %#v", libfooStatic.Inputs.Strings())
44 t.Errorf("static object not reused for shared library")
47 t.Errorf("static object not reused for shared library")
51 t.Run("extra static source", func(t *testing.T) {
52 ctx := testCc(t, `
65 t.Fatalf("unexpected inputs to libfoo shared: %#v", libfooShared.Inputs.Strings())
69 t.Fatalf("unexpected inputs to libfoo static: %#v", libfooStatic.Inputs.Strings())
73 t.Errorf("static object not reused for shared library")
77 t.Run("extra shared source", func(t *testing.T) {
78 ctx := testCc(t, `
91 t.Fatalf("unexpected inputs to libfoo shared: %#v", libfooShared.Inputs.Strings())
95 t.Fatalf("unexpected inputs to libfoo static: %#v", libfooStatic.Inputs.Strings())
99 t.Errorf("static object not reused for shared library")
103 t.Run("extra static cflags", func(t *testing.T) {
104 ctx := testCc(t, `
117 t.Fatalf("unexpected inputs to libfoo shared: %#v", libfooShared.Inputs.Strings())
121 t.Fatalf("unexpected inputs to libfoo static: %#v", libfooStatic.Inputs.Strings())
125 t.Errorf("static object reused for shared library when it shouldn't be")
129 t.Run("extra shared cflags", func(t *testing.T) {
130 ctx := testCc(t, `
143 t.Fatalf("unexpected inputs to libfoo shared: %#v", libfooShared.Inputs.Strings())
147 t.Fatalf("unexpected inputs to libfoo static: %#v", libfooStatic.Inputs.Strings())
151 t.Errorf("static object reused for shared library when it shouldn't be")
155 t.Run("global cflags for reused generated sources", func(t *testing.T) {
156 ctx := testCc(t, `
174 t.Fatalf("unexpected inputs to libfoo shared: %#v", libfooShared.Inputs.Strings())
178 t.Fatalf("unexpected inputs to libfoo static: %#v", libfooStatic.Inputs.Strings())
182 t.Errorf("static objects not reused for shared library")
187 t.Errorf("missing protobuf cflags")
192 func TestStubsVersions(t *testing.T) {
202 config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
204 ctx := testCcWithConfig(t, config)
210 t.Errorf("missing expected variant: %q", expectedVariant)
215 func TestStubsVersions_NotSorted(t *testing.T) {
225 config := TestConfig(t.TempDir(), android.Android, nil, bp, nil)
227 testCcErrorWithConfig(t, `"libfoo" .*: versions: not sorted`, config)
230 func TestStubsVersions_ParseError(t *testing.T) {
241 …testCcError(t, `"libfoo" .*: versions: "X" could not be parsed as an integer and is not a recogniz…