From 89d71f56b2f1d58a7973f8af79b9545b275b53db Mon Sep 17 00:00:00 2001 From: Sam Mikes Date: Fri, 24 Oct 2014 15:18:37 +0100 Subject: [PATCH] additional fixes suggested by @anba --- test/harness/sta.js | 2 +- tools/packaging/test262.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/test/harness/sta.js b/test/harness/sta.js index e779fc9108..7eb14b3856 100644 --- a/test/harness/sta.js +++ b/test/harness/sta.js @@ -13,7 +13,7 @@ function Test262Error(message) { } Test262Error.prototype.toString = function () { - return "Test262 Error: " + this.message; + return "Test262Error: " + this.message; }; var $ERROR; diff --git a/tools/packaging/test262.py b/tools/packaging/test262.py index 8e6fd0a105..aa396cbe10 100755 --- a/tools/packaging/test262.py +++ b/tools/packaging/test262.py @@ -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):