From fd627ffaec8fd8801d980b4c91ee7c0607ab6aaf Mon Sep 17 00:00:00 2001 From: Jan Eilers Date: Thu, 25 Feb 2021 17:44:00 +0000 Subject: IVGCVSW-5687 Update Doxygen Docu * Update Doxygen Documentation for 21.02 release Signed-off-by: Jan Eilers Change-Id: I9ed2f9caab038836ea99d7b378d7899fe431a4e5 --- 21.02/_unit_tests_8cpp.xhtml | 199 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 21.02/_unit_tests_8cpp.xhtml (limited to '21.02/_unit_tests_8cpp.xhtml') diff --git a/21.02/_unit_tests_8cpp.xhtml b/21.02/_unit_tests_8cpp.xhtml new file mode 100644 index 0000000000..56f8cbc8bc --- /dev/null +++ b/21.02/_unit_tests_8cpp.xhtml @@ -0,0 +1,199 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/UnitTests.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.02 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
UnitTests.cpp File Reference
+
+
+
#include <boost/test/unit_test.hpp>
+#include "UnitTests.hpp"
+#include <armnn/Logging.hpp>
+#include <armnn/utility/NumericCast.hpp>
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define BOOST_TEST_MODULE   UnitTests
 
+ + + + + +

+Functions

 BOOST_GLOBAL_FIXTURE (ConfigureLoggingFixture)
 
 BOOST_AUTO_TEST_CASE (LoggerTest)
 
+

Macro Definition Documentation

+ +

◆ BOOST_TEST_MODULE

+ +
+
+ + + + +
#define BOOST_TEST_MODULE   UnitTests
+
+ +

Definition at line 5 of file UnitTests.cpp.

+ +
+
+

Function Documentation

+ +

◆ BOOST_AUTO_TEST_CASE()

+ +
+
+ + + + + + + + +
BOOST_AUTO_TEST_CASE (LoggerTest )
+
+ +

Definition at line 67 of file UnitTests.cpp.

+ +

References ARMNN_LOG, BOOST_AUTO_TEST_SUITE_END(), armnn::debug, armnn::error, armnn::fatal, armnn::info, armnn::SetAllLoggingSinks(), armnn::SetLogFilter(), armnn::trace, and armnn::warning.

+
68 {
69  std::stringstream ss;
70 
71  {
72  struct StreamRedirector
73  {
74  public:
75  StreamRedirector(std::ostream& stream, std::streambuf* newStreamBuffer)
76  : m_Stream(stream)
77  , m_BackupBuffer(m_Stream.rdbuf(newStreamBuffer))
78  {}
79  ~StreamRedirector() { m_Stream.rdbuf(m_BackupBuffer); }
80 
81  private:
82  std::ostream& m_Stream;
83  std::streambuf* m_BackupBuffer;
84  };
85 
86 
87  StreamRedirector redirect(std::cout, ss.rdbuf());
88 
89  using namespace armnn;
90  SetLogFilter(LogSeverity::Trace);
91  SetAllLoggingSinks(true, false, false);
92 
93 
94  ARMNN_LOG(trace) << "My trace message; " << -2;
95  ARMNN_LOG(debug) << "My debug message; " << -1;
96  ARMNN_LOG(info) << "My info message; " << 0;
97  ARMNN_LOG(warning) << "My warning message; " << 1;
98  ARMNN_LOG(error) << "My error message; " << 2;
99  ARMNN_LOG(fatal) << "My fatal message; " << 3;
100 
101  SetLogFilter(LogSeverity::Fatal);
102 
103  }
104 
105  BOOST_CHECK(ss.str().find("Trace: My trace message; -2") != std::string::npos);
106  BOOST_CHECK(ss.str().find("Debug: My debug message; -1") != std::string::npos);
107  BOOST_CHECK(ss.str().find("Info: My info message; 0") != std::string::npos);
108  BOOST_CHECK(ss.str().find("Warning: My warning message; 1") != std::string::npos);
109  BOOST_CHECK(ss.str().find("Error: My error message; 2") != std::string::npos);
110  BOOST_CHECK(ss.str().find("Fatal: My fatal message; 3") != std::string::npos);
111 }
void SetAllLoggingSinks(bool standardOut, bool debugOut, bool coloured)
Definition: Logging.cpp:142
+
#define ARMNN_LOG(severity)
Definition: Logging.hpp:202
+
Copyright (c) 2021 ARM Limited and Contributors.
+
void SetLogFilter(LogSeverity level)
Definition: Logging.cpp:24
+
+
+
+ +

◆ BOOST_GLOBAL_FIXTURE()

+ +
+
+ + + + + + + + +
BOOST_GLOBAL_FIXTURE (ConfigureLoggingFixture )
+
+ +

Referenced by BOOST_AUTO_TEST_CASE().

+ +
+
+
+
+ + + + -- cgit v1.2.1