Lines Matching refs:test

215 	for _, test := range testCases {
217 config.TestProductVariables.AAPTPrebuiltDPI = test.aaptPrebuiltDPI
218 config.TestProductVariables.Platform_sdk_version = &test.sdkVersion
219 config.TestProductVariables.DeviceArch = test.deviceArch
220 config.TestProductVariables.DeviceSecondaryArch = test.deviceSecondaryArch
226 for k, v := range test.expected {
229 test.name, k, actual, v)
468 for _, test := range testCases {
469 t.Run(test.name, func(t *testing.T) {
470 if test.expectedError == "" {
471 testJava(t, test.bp)
473 testJavaError(t, test.expectedError, test.bp)
744 for _, test := range testCases {
745 t.Run(test.name, func(t *testing.T) {
746 m := ctx.ModuleForTests(test.name, "android_common")
750 if len(test.assetPackages) > 0 {
756 if test.assetFlag != "" {
757 if !strings.Contains(aapt2Flags, test.assetFlag) {
758 t.Errorf("Can't find asset flag %q in aapt2 link flags %q", test.assetFlag, aapt2Flags)
767 if len(test.assetPackages) > 0 {
769 if !reflect.DeepEqual(test.assetPackages, mergeAssets.Inputs.Strings()) {
771 mergeAssets.Inputs.Strings(), test.assetPackages)
1091 for _, test := range testCases {
1092 t.Run(moduleType+" "+test.name, func(t *testing.T) {
1094 if test.platformApis {
1102 }`, moduleType, test.sdkVersion, platformApiProp)
1105 config.TestProductVariables.Platform_sdk_version = &test.platformSdkInt
1106 config.TestProductVariables.Platform_sdk_codename = &test.platformSdkCodename
1107 config.TestProductVariables.Platform_sdk_final = &test.platformSdkFinal
1126 if gotMinSdkVersion != test.expectedMinSdkVersion {
1128 test.expectedMinSdkVersion, gotMinSdkVersion)
1131 if gotTargetSdkVersion != test.expectedMinSdkVersion {
1133 test.expectedMinSdkVersion, gotTargetSdkVersion)
1195 for _, test := range testCases {
1196 t.Run(test.name, func(t *testing.T) {
1197 app := ctx.ModuleForTests(test.name, "android_common")
1207 if !reflect.DeepEqual(abis, test.abis) {
1208 t.Errorf("want abis %v, got %v", test.abis, abis)
1322 for _, test := range testCases {
1323 t.Run(test.name, func(t *testing.T) {
1324 app := ctx.ModuleForTests(test.name, "android_common")
1326 if g, w := (jniLibZip.Rule != nil), test.packaged; g != w {
1331 if g, w := !strings.Contains(jniLibZip.Args["jarArgs"], "-L 0"), test.compressed; g != w {
1412 for _, test := range testCases {
1413 t.Run(test.name, func(t *testing.T) {
1414 app := ctx.ModuleForTests(test.name, "android_common")
1422 if test.sdkJNI {
1426 } else if test.vendorJNI {
1555 for _, test := range testCases {
1556 t.Run(test.name, func(t *testing.T) {
1557 config := testAppConfig(nil, test.bp, nil)
1558 if test.certificateOverride != "" {
1559 config.TestProductVariables.CertificateOverrides = []string{test.certificateOverride}
1568 if test.expectedCertificate != signCertificateFlags {
1569 …t.Errorf("Incorrect signing flags, expected: %q, got: %q", test.expectedCertificate, signCertifica…
1573 if test.expectedLineage != signFlags {
1574 t.Errorf("Incorrect signing flags, expected: %q, got: %q", test.expectedLineage, signFlags)
1620 for _, test := range testCases {
1621 t.Run(test.name, func(t *testing.T) {
1622 config := testAppConfig(nil, test.bp, nil)
1623 if test.packageNameOverride != "" {
1624 config.TestProductVariables.PackageNameOverrides = []string{test.packageNameOverride}
1636 for _, e := range test.expected {
1994 for _, test := range testCases {
1995 variant := ctx.ModuleForTests(test.moduleName, test.variantName)
1998 if len(test.expectedFlags) > 0 {
2002 for _, flag := range test.expectedFlags {
2203 for _, test := range testCases {
2205 config.TestProductVariables.AAPTPreferredConfig = test.aaptPreferredConfig
2206 config.TestProductVariables.AAPTPrebuiltDPI = test.aaptPrebuiltDPI
2217 if test.expected != matches[1] {
2218 t.Errorf("wrong src apk, expected: %q got: %q", test.expected, matches[1])
2253 for _, test := range testCases {
2254 variant := ctx.ModuleForTests(test.name, "android_common")
2255 if variant.MaybeOutput(test.expected).Rule == nil {
2256 t.Errorf("can't find output named %q - all outputs: %v", test.expected, variant.AllOutputs())
2260 expectedValues := []string{test.expected}
2318 for _, test := range testCases {
2319 ctx, _ := testJava(t, test.bp)
2327 if test.expected != matches[1] {
2328 t.Errorf("wrong src apk, expected: %q got: %q", test.expected, matches[1])
2345 test := ctx.ModuleForTests("foo", "android_common").Module().(*AndroidTestImport)
2348 entries := android.AndroidMkEntriesForTest(t, config, "", test)[0]
2475 for _, test := range testCases {
2476 t.Run(test.name, func(t *testing.T) {
2477 app := ctx.ModuleForTests(test.name, "android_common")
2488 for _, jni := range test.jnis {
2667 for _, test := range testCases {
2668 t.Run(test.name, func(t *testing.T) {
2669 ctx := testApp(t, test.bp)
2673 if strings.Contains(manifestFixerArgs, "--has-no-code") != test.noCode {
2863 test := func(t *testing.T, bp string, want bool, unbundled bool) {
2892 test(t, tt.bp, tt.uncompressedPlatform, false)
2895 test(t, tt.bp, tt.uncompressedUnbundled, true)