hce-node application  1.4.3
HCE Hierarchical Cluster Engine node application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
SphinxTestPrinter.hpp
Go to the documentation of this file.
1 
14 #ifndef SPHINX_TEST_PRINTER_HPP
15 #define SPHINX_TEST_PRINTER_HPP
16 
17 #include <gtest/gtest.h>
18 
19 namespace HCE
20 {
21 namespace sphinx
22 {
23 namespace tests
24 {
25 //-----------------------------------------------------------------------------
26 class SphinxTestPrinter : public ::testing::EmptyTestEventListener
27 {
28 
29  // Called before a test case starts.
30  virtual void OnTestStart(const ::testing::TestInfo& test_info)
31  {
32  printf("******* Test %s.%s starting.\n",
33  test_info.test_case_name(), test_info.name());
34  }
35 
36  // Called after a failed assertion or a SUCCEED() invocation.
37  virtual void OnTestPartResult(
38  const ::testing::TestPartResult& test_part_result) {
39  printf("%s in %s:%d\n%s\n",
40  test_part_result.failed() ? "******* Failure" : "Success",
41  test_part_result.file_name(),
42  test_part_result.line_number(),
43  test_part_result.summary());
44  }
45 
46  // Called after a test case ends.
47  virtual void OnTestEnd(const ::testing::TestInfo& test_info) {
48  printf("******* Test %s.%s ending.\n",
49  test_info.test_case_name(), test_info.name());
50  }
51 
52 };
53 //-----------------------------------------------------------------------------
54 //-----------------------------------------------------------------------------
55 } // namespace tests
56 } // namespace sphinx
57 } // namespace HCE
58 
59 #endif // SPHINX_TEST_PRINTER_HPP