test-cpp-all.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2020 Intel Corporation. All Rights Reserved.
3 
4 //#cmake:add-file log-common.h
5 #include "log-common.h"
6 
7 
8 TEST_CASE( "Logging C++ ALL", "[log]" ) {
9 
10  size_t n_callbacks = 0;
11  auto callback = [&]( rs2_log_severity severity, rs2::log_message const& msg )
12  {
13  ++n_callbacks;
14  TRACE( severity << ' ' << msg.filename() << '+' << msg.line_number() << ": " << msg.raw() );
15  };
16 
17  // ALL == will log everything
19  REQUIRE( !n_callbacks );
20  log_all();
21  REQUIRE( n_callbacks == 4 );
22 }
GLenum GLuint GLenum severity
void log_to_callback(rs2_log_severity min_severity, S callback)
Definition: rs.hpp:139
TEST_CASE("Logging C++ ALL","[log]")
Definition: test-cpp-all.cpp:8
void log_all()
Definition: log-common.h:35
REQUIRE(n_callbacks==1)
def callback(frame)
Definition: t265_stereo.py:91
rs2_log_severity
Severity of the librealsense logger.
Definition: rs_types.h:153


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:50:11