Merge "Log exception when creating Activity in ActivityUnitTestCase." into lmp-sprout-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
49e2371a27
@@ -26,6 +26,9 @@ import android.os.Bundle;
|
|||||||
import android.os.IBinder;
|
import android.os.IBinder;
|
||||||
import android.test.mock.MockApplication;
|
import android.test.mock.MockApplication;
|
||||||
import android.view.Window;
|
import android.view.Window;
|
||||||
|
import android.util.Log;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class provides isolated testing of a single activity. The activity under test will
|
* This class provides isolated testing of a single activity. The activity under test will
|
||||||
@@ -73,6 +76,7 @@ import android.view.Window;
|
|||||||
public abstract class ActivityUnitTestCase<T extends Activity>
|
public abstract class ActivityUnitTestCase<T extends Activity>
|
||||||
extends ActivityTestCase {
|
extends ActivityTestCase {
|
||||||
|
|
||||||
|
private static final String TAG = "ActivityUnitTestCase";
|
||||||
private Class<T> mActivityClass;
|
private Class<T> mActivityClass;
|
||||||
|
|
||||||
private Context mActivityContext;
|
private Context mActivityContext;
|
||||||
@@ -144,6 +148,7 @@ public abstract class ActivityUnitTestCase<T extends Activity>
|
|||||||
token, mApplication, intent, info, title, mMockParent, id,
|
token, mApplication, intent, info, title, mMockParent, id,
|
||||||
lastNonConfigurationInstance);
|
lastNonConfigurationInstance);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Log.w(TAG, "Catching exception", e);
|
||||||
assertNotNull(newActivity);
|
assertNotNull(newActivity);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user