summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Mikael Andreen <mikael.andreen@sonyericsson.com> 2010-12-01 12:49:08 +0100
committer Johan Redestig <johan.redestig@sonyericsson.com> 2011-01-11 15:27:23 +0100
commitc6bf4075c96d8738ee375835a5b92b1332e4d929 (patch)
tree71e532d6232669f7028d370982b192aabb95f3a6
parentcb8427538dfdc5eae941e377b11bfd11a95fc5a5 (diff)
Fix of tearDown() in SingleLaunchActivityTestCase.
Before a suite of SingleLaunchActivityTestCase tests are run, an activity is started. The activity is supposed to close when all the tests in the suite have run. The activity is however finished one test too early. This causes problems for the last test. Change-Id: Ie9fb2df350a70f827495a0dc30952e30fbe491e0
-rw-r--r--test-runner/src/android/test/SingleLaunchActivityTestCase.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/test-runner/src/android/test/SingleLaunchActivityTestCase.java b/test-runner/src/android/test/SingleLaunchActivityTestCase.java
index b63b3ce19759..79c554a46391 100644
--- a/test-runner/src/android/test/SingleLaunchActivityTestCase.java
+++ b/test-runner/src/android/test/SingleLaunchActivityTestCase.java
@@ -75,7 +75,7 @@ public abstract class SingleLaunchActivityTestCase<T extends Activity>
protected void tearDown() throws Exception {
// If it is the last test case, call finish on the activity.
sTestCaseCounter --;
- if (sTestCaseCounter == 1) {
+ if (sTestCaseCounter == 0) {
sActivity.finish();
}
super.tearDown();