test-c-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 // See log_callback_function_ptr
9 size_t c_n_callbacks = 0;
11 {
12  REQUIRE( !arg );
13 
14  ++c_n_callbacks;
15  rs2_error* e = nullptr;
16  char const* str = rs2_get_full_log_message( msg, &e );
18  TRACE( str );
19 }
20 
21 
22 TEST_CASE( "Logging C ALL", "[log]" ) {
23  c_n_callbacks = 0;
24 
25  // ALL == will log everything
26  rs2_error* e = nullptr;
29  REQUIRE( !c_n_callbacks );
30  log_all();
31  REQUIRE( c_n_callbacks == 4 );
32 }
GLenum GLuint GLenum severity
const char * rs2_get_full_log_message(rs2_log_message const *msg, rs2_error **error)
Definition: rs.cpp:1385
Definition: arg_fwd.hpp:23
void c_callback(rs2_log_severity severity, rs2_log_message const *msg, void *arg)
Definition: test-c-all.cpp:10
e
Definition: rmse.py:177
void log_all()
Definition: log-common.h:35
void rs2_log_to_callback(rs2_log_severity min_severity, rs2_log_callback_ptr callback, void *arg, rs2_error **error)
Definition: rs.cpp:1351
TEST_CASE("Logging C ALL","[log]")
Definition: test-c-all.cpp:22
REQUIRE(n_callbacks==1)
size_t c_n_callbacks
Definition: test-c-all.cpp:9
struct rs2_log_message rs2_log_message
Definition: rs_types.h:259
static void handle(rs2_error *e)
Definition: rs_types.hpp:144
REQUIRE_NOTHROW(rs2_log(RS2_LOG_SEVERITY_INFO,"Log message using rs2_log()", nullptr))
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