Add getMessage() to tcu::ResultCollector
authorPyry Haulos <phaulos@google.com>
Mon, 27 Apr 2015 13:00:14 +0000 (06:00 -0700)
committerPyry Haulos <phaulos@google.com>
Mon, 27 Apr 2015 13:00:14 +0000 (06:00 -0700)
Change-Id: I11651091fe609c663b6496c1f1e476ef85a8a4df

framework/common/tcuResultCollector.hpp

index d4af499..7fb8ed2 100644 (file)
@@ -43,24 +43,25 @@ class TestContext;
 class ResultCollector
 {
 public:
-                                       ResultCollector                 (void);
-                                       ResultCollector                 (TestLog& log, const std::string& prefix = "");
+                                               ResultCollector                 (void);
+                                               ResultCollector                 (TestLog& log, const std::string& prefix = "");
 
-       qpTestResult    getResult                               (void) const  { return m_result; }
+       qpTestResult            getResult                               (void) const { return m_result;         }
+       const std::string       getMessage                              (void) const { return m_message;        }
 
-       void                    fail                                    (const std::string& msg);
-       bool                    check                                   (bool condition, const std::string& msg);
+       void                            fail                                    (const std::string& msg);
+       bool                            check                                   (bool condition, const std::string& msg);
 
-       void                    addResult                               (qpTestResult result, const std::string& msg);
-       bool                    checkResult                             (bool condition, qpTestResult result, const std::string& msg);
+       void                            addResult                               (qpTestResult result, const std::string& msg);
+       bool                            checkResult                             (bool condition, qpTestResult result, const std::string& msg);
 
-       void                    setTestContextResult    (TestContext& testCtx);
+       void                            setTestContextResult    (TestContext& testCtx);
 
 private:
-       TestLog*                m_log;
-       std::string             m_prefix;
-       qpTestResult    m_result;
-       std::string             m_message;
+       TestLog* const          m_log;
+       const std::string       m_prefix;
+       qpTestResult            m_result;
+       std::string                     m_message;
 } DE_WARN_UNUSED_TYPE;
 
 } // tcu