[lit] Add a display function for lit.Test.TestResult.
authorDaniel Dunbar <daniel@zuster.org>
Thu, 7 Feb 2013 21:34:34 +0000 (21:34 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Thu, 7 Feb 2013 21:34:34 +0000 (21:34 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174667 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/lit/Test.py

index db2e0324651e74bbe6c68bdcc0ed24c04a5845d6..9471e3a98bf5224de99809df71c8ef7b1f4b0ea2 100644 (file)
@@ -7,6 +7,10 @@ class TestResult:
         self.name = name
         self.isFailure = isFailure
 
+    def __repr__(self):
+        return '%s%r' % (self.__class__.__name__,
+                         (self.name, self.isFailure))
+
 PASS        = TestResult('PASS', False)
 XFAIL       = TestResult('XFAIL', False)
 FAIL        = TestResult('FAIL', True)