1 /* 2 * Copyright (C) 2011 The Android Open Source Project 3 * 4 * Licensed under the Eclipse Public License, Version 1.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.eclipse.org/org/documents/epl-v10.php 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 package com.android.manifmerger; 18 19 20 /** 21 * Unit tests for {@link ManifestMerger}. 22 */ 23 public class ManifestMergerTest extends ManifestMergerTestCase { 24 25 /* 26 * Wait, I hear you, where are the tests? 27 * 28 * processTestFiles() uses loadTestData(), which infers the data filename 29 * from the caller method name. 30 * E.g. the method "test00_noop" will use the data file named "data/00_noop.xml". 31 * 32 * We could simplify this even further by simply iterating on the data 33 * files and getting rid of the test methods; however there's some value in 34 * having tests break on a method name that easily points to the data file. 35 */ 36 37 public void test00_noop() throws Exception { 38 processTestFiles(); 39 } 40 41 public void test01_ignore_app_attr() throws Exception { 42 processTestFiles(); 43 } 44 45 public void test02_ignore_instrumentation() throws Exception { 46 processTestFiles(); 47 } 48 49 public void test10_activity_merge() throws Exception { 50 processTestFiles(); 51 } 52 53 public void test11_activity_dup() throws Exception { 54 processTestFiles(); 55 } 56 57 public void test12_alias_dup() throws Exception { 58 processTestFiles(); 59 } 60 61 public void test13_service_dup() throws Exception { 62 processTestFiles(); 63 } 64 65 public void test14_receiver_dup() throws Exception { 66 processTestFiles(); 67 } 68 69 public void test15_provider_dup() throws Exception { 70 processTestFiles(); 71 } 72 73 public void test20_uses_lib_merge() throws Exception { 74 processTestFiles(); 75 } 76 77 public void test21_uses_lib_errors() throws Exception { 78 processTestFiles(); 79 } 80 81 public void test25_permission_merge() throws Exception { 82 processTestFiles(); 83 } 84 85 public void test26_permission_dup() throws Exception { 86 processTestFiles(); 87 } 88 89 public void test28_uses_perm_merge() throws Exception { 90 processTestFiles(); 91 } 92 93 public void test30_uses_sdk_ok() throws Exception { 94 processTestFiles(); 95 } 96 97 public void test32_uses_sdk_minsdk_ok() throws Exception { 98 processTestFiles(); 99 } 100 101 public void test33_uses_sdk_minsdk_conflict() throws Exception { 102 processTestFiles(); 103 } 104 105 public void test36_uses_sdk_targetsdk_warning() throws Exception { 106 processTestFiles(); 107 } 108 109 public void test40_uses_feat_merge() throws Exception { 110 processTestFiles(); 111 } 112 113 public void test41_uses_feat_errors() throws Exception { 114 processTestFiles(); 115 } 116 117 public void test45_uses_feat_gles_once() throws Exception { 118 processTestFiles(); 119 } 120 121 public void test47_uses_feat_gles_conflict() throws Exception { 122 processTestFiles(); 123 } 124 125 public void test50_uses_conf_warning() throws Exception { 126 processTestFiles(); 127 } 128 129 public void test52_support_screens_warning() throws Exception { 130 processTestFiles(); 131 } 132 133 public void test54_compat_screens_warning() throws Exception { 134 processTestFiles(); 135 } 136 137 public void test56_support_gltext_warning() throws Exception { 138 processTestFiles(); 139 } 140 } 141