reflectivity/l500/test-sanity.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:tag reflectivity
5 //#test:device L500*
6 
7 #include "../../func-common.h"
8 
9 // Test group description:
10 // * This tests group verifies IR reflectivity option restrictions,
11 // according to [RS-8358].
12 //
13 // Current test description:
14 // * All conditions for IR Reflectivity set, verify enabling option succeed.
15 // * All conditions for IR Reflectivity set and depth sensor is streaming, verify enabling option succeed.
16 //
17 // Note: * L515 specific test.
18 // * Test will pass if no L515 device is connected.
19 // * Test will be performed on the first L515 device detected.
20 
21 TEST_CASE( "Not streaming - sanity", "[reflectivity]" )
22 {
23  auto ds
25 
26  // Verify alt IR is off
27  if( ds.supports( RS2_OPTION_ALTERNATE_IR ) )
28  ds.set_option( RS2_OPTION_ALTERNATE_IR, 0 );
29 
35 }
36 
37 TEST_CASE("Streaming - sanity", "[reflectivity]")
38 {
39  auto ds
41 
42  // Verify alt IR is off
43  if (ds.supports(RS2_OPTION_ALTERNATE_IR))
44  ds.set_option(RS2_OPTION_ALTERNATE_IR, 0);
45 
49 
50  auto depth_vga_profile
52 
53  REQUIRE(depth_vga_profile);
54 
55  ds.open(depth_vga_profile);
56  ds.start([](rs2::frame f) {});
57 
60 
61  ds.stop();
62  ds.close();
63 }
64 
GLdouble f
REQUIRE(n_callbacks==1)
rs2::depth_sensor find_first_supported_depth_sensor_or_exit(const std::string &dev_name, rs2_option opt)
Definition: func-common.h:77
#define CHECK_NOTHROW(...)
Definition: catch.hpp:17421
TEST_CASE("Not streaming - sanity","[reflectivity]")
#define CHECK(condition)
rs2::stream_profile get_profile_by_stream_parameters(rs2::sensor s, rs2_stream stream=RS2_STREAM_ANY, rs2_format format=RS2_FORMAT_ANY, int width=-1, int height=-1, int fps=-1, int stream_index=-1)
Definition: func-common.h:227


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