• Home
  • Raw
  • Download

Lines Matching refs:t

74 func _testAidl(t *testing.T, bp string, customizers ...testCustomizer) (*android.TestContext, andro…
75 t.Helper()
157 func testAidl(t *testing.T, bp string, customizers ...testCustomizer) (*android.TestContext, androi…
158 t.Helper()
159 ctx, config := _testAidl(t, bp, customizers...)
161 android.FailIfErrored(t, errs)
163 android.FailIfErrored(t, errs)
167 func testAidlError(t *testing.T, pattern, bp string, customizers ...testCustomizer) {
168 t.Helper()
169 ctx, config := _testAidl(t, bp, customizers...)
172 android.FailIfNoMatchingErrors(t, pattern, errs)
177 android.FailIfNoMatchingErrors(t, pattern, errs)
180 t.Fatalf("missing expected error %q (0 errors are returned)", pattern)
184 func assertModulesExists(t *testing.T, ctx *android.TestContext, names ...string) {
198t.Errorf("expected modules(%v) not found. all modules: %v", missing, android.SortedStringKeys(allM…
203 func TestVintfWithoutVersionInRelease(t *testing.T) {
213 testAidlError(t, expectedError, vintfWithoutVersionBp, setReleaseEnv())
215 ctx, _ := testAidl(t, vintfWithoutVersionBp)
216 assertModulesExists(t, ctx, "foo-java", "foo-cpp", "foo-ndk", "foo-ndk_platform")
220 func TestUnstableVersionUsageInRelease(t *testing.T) {
237 …testAidlError(t, expectedError, unstableVersionUsageInJavaBp, setReleaseEnv(), withFiles(map[strin…
241 testAidl(t, unstableVersionUsageInJavaBp, withFiles(map[string][]byte{
261 testAidl(t, stableVersionUsageInJavaBp, setReleaseEnv(), withFiles(map[string][]byte{
265 testAidl(t, stableVersionUsageInJavaBp, withFiles(map[string][]byte{
271 func TestNonVersionedModuleUsageInRelease(t *testing.T) {
286 testAidlError(t, expectedError, nonVersionedModuleUsageInJavaBp, setReleaseEnv())
287 testAidl(t, nonVersionedModuleUsageInJavaBp)
303 testAidl(t, nonVersionedUnstableModuleUsageInJavaBp, setReleaseEnv())
304 testAidl(t, nonVersionedUnstableModuleUsageInJavaBp)
307 func TestUnstableModules(t *testing.T) {
308 testAidlError(t, `module "foo_interface": stability: must be empty when "unstable" is true`, `
319 …testAidlError(t, `module "foo_interface": versions: cannot have versions for an unstable interface…
332 ctx, _ := testAidl(t, `
342 assertModulesExists(t, ctx, "foo-java", "foo-cpp", "foo-ndk", "foo-ndk_platform")
345 func TestCreatesModulesWithNoVersions(t *testing.T) {
346 ctx, _ := testAidl(t, `
355 assertModulesExists(t, ctx, "foo-java", "foo-cpp", "foo-ndk", "foo-ndk_platform")
358 func TestCreatesModulesWithFrozenVersions(t *testing.T) {
360 testAidlError(t, `aidl_api/foo/1`, `
372 ctx, _ := testAidl(t, `
387 assertModulesExists(t, ctx, "foo-java", "foo-cpp", "foo-ndk", "foo-ndk_platform")
391 assertModulesExists(t, ctx, "foo-V1-java")
394 …assertModulesExists(t, ctx, "foo-unstable-java", "foo-unstable-cpp", "foo-unstable-ndk", "foo-unst…
402 func TestNativeOutputIsAlwaysVersioned(t *testing.T) {
405 t.Helper()
408 t.Errorf("%s(%s): should be OutputFileProducer.", moduleName, variant)
412 t.Errorf("%s(%s): failed to get OutputFiles: %v", moduleName, variant, err)
415 t.Errorf("%s(%s): expected output %q, but got %v", moduleName, variant, outputFilename, paths)
420 ctx, _ = testAidl(t, `
433 ctx, _ = testAidl(t, `
463 func TestGenLogForNativeBackendRequiresJson(t *testing.T) {
464 testAidlError(t, `"foo-cpp" depends on .*"libjsoncpp"`, `
477 testAidl(t, `
495 func TestImports(t *testing.T) {
496 testAidlError(t, `Import does not exist:`, `
508 …testAidlError(t, `backend.java.enabled: Java backend not enabled in the imported AIDL interface "b…
531 …testAidlError(t, `backend.cpp.enabled: C\+\+ backend not enabled in the imported AIDL interface "b…
554 ctx, _ := testAidl(t, `
576 t.Errorf("%q is not found in %q", libBar, libFlags)