From 03c7ff3f6188240baaeaeb405a357a0c58195fec Mon Sep 17 00:00:00 2001 From: Nikhil Raj Date: Tue, 22 Aug 2023 12:00:04 +0100 Subject: IVGCVSW-7702 Update Doxygen Docu for 23.08 Signed-off-by: Nikhil Raj Change-Id: I357a9f7e47614589327c1ac5d95b6224ff77103d --- 23.08/_unit_tests_8cpp.html | 225 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 225 insertions(+) create mode 100644 23.08/_unit_tests_8cpp.html (limited to '23.08/_unit_tests_8cpp.html') diff --git a/23.08/_unit_tests_8cpp.html b/23.08/_unit_tests_8cpp.html new file mode 100644 index 0000000000..f90c404085 --- /dev/null +++ b/23.08/_unit_tests_8cpp.html @@ -0,0 +1,225 @@ + + + + + + + + +Arm NN: src/armnnTestUtils/UnitTests.cpp File Reference + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  23.08 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+ +
+
UnitTests.cpp File Reference
+
+
+
#include <doctest/doctest.h>
+#include "UnitTests.hpp"
+
+Include dependency graph for UnitTests.cpp:
+
+
+
+
+
+

Go to the source code of this file.

+ + + + +

+Macros

#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
 
+ + + +

+Functions

 TEST_SUITE ("LoggerSuite")
 
+

Macro Definition Documentation

+ +

◆ DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN

+ +
+
+ + + + +
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
+
+ +

Definition at line 7 of file UnitTests.cpp.

+ +
+
+

Function Documentation

+ +

◆ TEST_SUITE()

+ +
+
+ + + + + + + + +
TEST_SUITE ("LoggerSuite" )
+
+ +

Definition at line 23 of file UnitTests.cpp.

+
24 {
+
25 TEST_CASE_FIXTURE(ConfigureLoggingFixture, "LoggerTest")
+
26 {
+
27  std::stringstream ss;
+
28  {
+
29  struct StreamRedirector
+
30  {
+
31  public:
+
32  StreamRedirector(std::ostream& stream, std::streambuf* newStreamBuffer)
+
33  : m_Stream(stream)
+
34  , m_BackupBuffer(m_Stream.rdbuf(newStreamBuffer))
+
35  {}
+
36  ~StreamRedirector() { m_Stream.rdbuf(m_BackupBuffer); }
+
37 
+
38  private:
+
39  std::ostream& m_Stream;
+
40  std::streambuf* m_BackupBuffer;
+
41  };
+
42 
+
43  StreamRedirector redirect(std::cout, ss.rdbuf());
+
44 
+
45  using namespace armnn;
+ +
47  SetAllLoggingSinks(true, false, false);
+
48 
+
49  ARMNN_LOG(trace) << "My trace message; " << -2;
+
50  ARMNN_LOG(debug) << "My debug message; " << -1;
+
51  ARMNN_LOG(info) << "My info message; " << 0;
+
52  ARMNN_LOG(warning) << "My warning message; " << 1;
+
53  ARMNN_LOG(error) << "My error message; " << 2;
+
54  ARMNN_LOG(fatal) << "My fatal message; " << 3;
+
55 
+ +
57  }
+
58 
+
59  CHECK(ss.str().find("Trace: My trace message; -2") != std::string::npos);
+
60  CHECK(ss.str().find("Debug: My debug message; -1") != std::string::npos);
+
61  CHECK(ss.str().find("Info: My info message; 0") != std::string::npos);
+
62  CHECK(ss.str().find("Warning: My warning message; 1") != std::string::npos);
+
63  CHECK(ss.str().find("Error: My error message; 2") != std::string::npos);
+
64  CHECK(ss.str().find("Fatal: My fatal message; 3") != std::string::npos);
+
65 }
+
66 
+
67 }
+
+

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

+ +
+
+
+
+ +
void SetLogFilter(LogSeverity level)
Definition: Logging.cpp:73
+
#define ARMNN_LOG(severity)
Definition: Logging.hpp:212
+
void SetAllLoggingSinks(bool standardOut, bool debugOut, bool coloured)
Definition: Logging.cpp:191
+ +
Copyright (c) 2021 ARM Limited and Contributors.
+ + + + -- cgit v1.2.1