Add @SmallTest annotation to test classes so they get run in continuous

Change-Id: Ieb0e3af146a6668c813ff16a718221eae61e8e01
This commit is contained in:
Jerry Xie 2014-02-19 20:13:59 -08:00
parent aab398522a
commit 3555dc03bf
12 changed files with 26 additions and 0 deletions

View File

@ -19,6 +19,7 @@ package com.android.email;
import android.os.Handler;
import android.os.Message;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.mail.utils.Clock;
import com.android.mail.utils.Throttle;
@ -28,6 +29,7 @@ import java.util.TimerTask;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
@SmallTest
public class ThrottleTest extends AndroidTestCase {
private static final int MIN_TIMEOUT = 100;
private static final int MAX_TIMEOUT = 500;

View File

@ -19,10 +19,12 @@ package com.android.email;
import android.content.Context;
import android.os.Bundle;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.emailcommon.VendorPolicyLoader;
import com.android.emailcommon.VendorPolicyLoader.Provider;
@SmallTest
public class VendorPolicyLoaderTest extends AndroidTestCase {
private String mTestApkPackageName;

View File

@ -29,6 +29,7 @@ import android.provider.ContactsContract;
import android.provider.ContactsContract.StatusUpdates;
import android.test.ProviderTestCase2;
import android.test.mock.MockContentProvider;
import android.test.suitebuilder.annotation.SmallTest;
import java.io.ByteArrayOutputStream;
import java.util.ArrayList;
@ -44,6 +45,7 @@ import junit.framework.Assert;
* (shouldn't) know how {@link android.provider.ContactsContract.Data#getContactLookupUri} is
* implemented.
*/
@SmallTest
public class ContactStatusLoaderTest
extends ProviderTestCase2<ContactStatusLoaderTest.MockContactProvider> {
private static final String EMAIL = "a@b.c";

View File

@ -21,7 +21,9 @@ import com.android.emailcommon.utility.IntentUtilities;
import android.content.Intent;
import android.net.Uri;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
@SmallTest
public class IntentUtilitiesTests extends AndroidTestCase {
public void brokentestSimple() {
final Uri.Builder b = IntentUtilities.createActivityIntentUrlBuilder("/abc");

View File

@ -21,10 +21,12 @@ import com.android.email.R;
import android.app.Activity;
import android.content.Context;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.view.View;
import java.util.Locale;
@SmallTest
public class UiUtilitiesTests extends AndroidTestCase {
public void brokentestFormatSize() {
if (!"en".equalsIgnoreCase(Locale.getDefault().getLanguage())) {

View File

@ -18,7 +18,9 @@ package com.android.email.mail.store.imap;
import android.test.AndroidTestCase;
import android.test.MoreAsserts;
import android.test.suitebuilder.annotation.SmallTest;
@SmallTest
public class ImapUtilityTests extends AndroidTestCase {
public static final String[] EmptyArrayString = new String[0];

View File

@ -17,9 +17,11 @@
package com.android.email.mail.transport;
import android.test.MoreAsserts;
import android.test.suitebuilder.annotation.SmallTest;
import junit.framework.TestCase;
@SmallTest
public class DiscourseLoggerTest extends TestCase {
/** Shortcut to create a byte array */

View File

@ -20,9 +20,11 @@ package com.android.emailcommon;
import android.content.Context;
import android.telephony.TelephonyManager;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.mail.utils.LogUtils;
@SmallTest
public class DeviceTests extends AndroidTestCase {
public void testGetConsistentDeviceId() {

View File

@ -16,6 +16,8 @@
package com.android.emailcommon.mail;
import android.test.suitebuilder.annotation.SmallTest;
import com.android.emailcommon.mail.PackedString;
import junit.framework.TestCase;
@ -26,6 +28,7 @@ import junit.framework.TestCase;
* You can run this entire test case with:
* runtest -c com.android.email.mail.PackedStringTests email
*/
@SmallTest
public class PackedStringTests extends TestCase {
/** Note: copied from actual class */
private static final char DELIMITER_ELEMENT = '\1';

View File

@ -20,9 +20,11 @@ import com.android.emailcommon.provider.EmailContent;
import android.net.Uri;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import java.io.File;
@SmallTest
public class AttachmentUtilitiesTests extends AndroidTestCase {
/**
* Test static inferMimeType()

View File

@ -18,7 +18,9 @@ package com.android.emailcommon.utility;
import android.test.AndroidTestCase;
import android.test.MoreAsserts;
import android.test.suitebuilder.annotation.SmallTest;
@SmallTest
public class EmailAsyncTaskTests extends AndroidTestCase {
public void testAll() throws Exception {
// Because AsyncTask relies on the UI thread and how we use threads in test, we can't

View File

@ -23,9 +23,12 @@
package com.android.emailcommon.utility;
import android.test.AndroidTestCase;
import android.test.suitebuilder.annotation.SmallTest;
import android.text.SpannableStringBuilder;
import android.text.style.BackgroundColorSpan;
@SmallTest
public class TextUtilitiesTests extends AndroidTestCase {
public void testPlainSnippet() {