From c6bf4075c96d8738ee375835a5b92b1332e4d929 Mon Sep 17 00:00:00 2001 From: Mikael Andreen Date: Wed, 1 Dec 2010 12:49:08 +0100 Subject: 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 --- test-runner/src/android/test/SingleLaunchActivityTestCase.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'test-runner/src') diff --git a/test-runner/src/android/test/SingleLaunchActivityTestCase.java b/test-runner/src/android/test/SingleLaunchActivityTestCase.java index b63b3ce..79c554a 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 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(); -- cgit v1.1