test-ac-before.cpp
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2021 Intel Corporation. All Rights Reserved.
3 
4 //#test:device L500*
5 
6 #include "../func-common.h"
7 #include "alt-ir-common.h"
8 
9 using namespace rs2;
10 
11 TEST_CASE( "AC fails if AltIR was enabled before stream start", "[l500][live]" )
12 {
14  auto dev = devices[0];
15 
16  auto depth_sens = dev.first< rs2::depth_sensor >();
17  if( alt_ir_supported_or_message( depth_sens ) )
18  {
19  REQUIRE_NOTHROW( depth_sens.set_option( RS2_OPTION_ALTERNATE_IR, 1 ) );
20 
21  auto depth = find_default_depth_profile( depth_sens );
22  auto ir = find_default_ir_profile( depth_sens );
23 
24  enable_alt_ir_and_check_that_AC_fails( dev, depth_sens, { depth, ir } );
25  }
26 }
stream_profile find_default_depth_profile(rs2::depth_sensor depth_sens)
Definition: func-common.h:120
void enable_alt_ir_and_check_that_AC_fails(const rs2::device &dev, const rs2::depth_sensor &depth_sens, const std::vector< stream_profile > &expected_profiles)
Definition: alt-ir-common.h:30
GLint GLint GLsizei GLsizei GLsizei depth
Definition: cah-model.h:10
bool alt_ir_supported_or_message(const rs2::depth_sensor &depth_sens)
Definition: alt-ir-common.h:10
rs2::device_list find_devices_by_product_line_or_exit(int product)
Definition: func-common.h:24
devices
Definition: test-fg.py:9
stream_profile find_default_ir_profile(rs2::depth_sensor depth_sens)
Definition: func-common.h:134
#define RS2_PRODUCT_LINE_L500
Definition: rs_context.h:96
TEST_CASE("AC fails if AltIR was enabled before stream start","[l500][live]")
REQUIRE_NOTHROW(rs2_log(RS2_LOG_SEVERITY_INFO,"Log message using rs2_log()", nullptr))


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