additional fixes suggested by @anba

This commit is contained in:
Sam Mikes 2014-10-24 15:18:37 +01:00
parent e2b675f443
commit 89d71f56b2
2 changed files with 7 additions and 2 deletions

View File

@ -209,10 +209,15 @@ class TestResult(object):
if self.case.IsAsyncTest():
return self.AsyncHasFailed() or self.HasFailed()
elif self.case.IsNegative():
return not (self.HasFailed() and self.case.NegativeMatch(self.stderr))
return not (self.HasFailed() and self.case.NegativeMatch(self.GetErrorOutput()))
else:
return self.HasFailed()
def GetErrorOutput(self):
if len(self.stderr) != 0:
return self.stderr
return self.stdout
class TestCase(object):