From f86be93b7492b381370cae7bf71eca8572a0cbae Mon Sep 17 00:00:00 2001 From: Matthew Sloyan Date: Tue, 24 Aug 2021 16:27:15 +0100 Subject: IVGCVSW-5924 Update 21.08 Doxygen Documents * Also updated latest symlink. Signed-off-by: Matthew Sloyan Change-Id: If9b4e0e52464abdf797b9eb858ae19bcc64c2aea --- 21.08/_unit_tests_8cpp_source.xhtml | 127 ++++++++++++++++++++++++++++++++++++ 1 file changed, 127 insertions(+) create mode 100644 21.08/_unit_tests_8cpp_source.xhtml (limited to '21.08/_unit_tests_8cpp_source.xhtml') diff --git a/21.08/_unit_tests_8cpp_source.xhtml b/21.08/_unit_tests_8cpp_source.xhtml new file mode 100644 index 0000000000..0041354b4a --- /dev/null +++ b/21.08/_unit_tests_8cpp_source.xhtml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + +ArmNN: src/armnn/test/UnitTests.cpp Source File + + + + + + + + + + + + + + + + +
+
+ + + + ArmNN + + + +
+
+  21.08 +
+
+
+ + + + + + + +
+
+ +
+
+
+ +
+ +
+
+ + +
+ +
+ +
+
+
UnitTests.cpp
+
+
+Go to the documentation of this file.
1 //
2 // Copyright © 2017 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #ifndef DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
7 #define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
8 #endif
9 #include <doctest/doctest.h>
10 
11 #include "UnitTests.hpp"
12 
13 struct ConfigureLoggingFixture
14 {
15  ConfigureLoggingFixture()
16  {
18  }
19 };
20 
21 
22 
23 TEST_SUITE("LoggerSuite")
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;
46  SetLogFilter(LogSeverity::Trace);
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 
56  SetLogFilter(LogSeverity::Fatal);
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 }
+
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.
+ +
TEST_CASE_FIXTURE(ClContextControlFixture, "CopyBetweenNeonAndGpu")
+
void SetLogFilter(LogSeverity level)
Definition: Logging.cpp:24
+ +
void ConfigureLoggingTest()
Definition: UnitTests.hpp:19
+ + +
TEST_SUITE("LoggerSuite")
Definition: UnitTests.cpp:23
+
+
+ + + + -- cgit v1.2.1