Index: dart/tools/testing/test_runner.py |
diff --git a/dart/tools/testing/test_runner.py b/dart/tools/testing/test_runner.py |
index 00bdf38ebb3c9230df0f28d0ab9bf937fdfd3ff4..9b2a6e0e121b8b678f5c8413a1cc8a4a4b46cc4e 100755 |
--- a/dart/tools/testing/test_runner.py |
+++ b/dart/tools/testing/test_runner.py |
@@ -62,15 +62,18 @@ class TestOutput(object): |
Returns: |
True if the test had an unexpected output. |
""" |
+ return not self.GetOutcome() in self.test.outcomes |
+ |
+ def GetOutcome(self): |
+ """Returns one of testing.CRASH, testing.TIMEOUT, testing.FAIL, or |
+ testing.PASS.""" |
if self.HasCrashed(): |
- outcome = testing.CRASH |
- elif self.HasTimedOut(): |
- outcome = testing.TIMEOUT |
- elif self.HasFailed(): |
- outcome = testing.FAIL |
- else: |
- outcome = testing.PASS |
- return not outcome in self.test.outcomes |
+ return testing.CRASH |
+ if self.HasTimedOut(): |
+ return testing.TIMEOUT |
+ if self.HasFailed(): |
+ return testing.FAIL |
+ return testing.PASS |
def HasCrashed(self): |
"""Returns True if the test should be considered testing.CRASH.""" |