test-empty.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 ../../../../common/utilities/number/stabilized-value.h
5 
6 
7 #include "../../../test.h"
8 #include <../common/utilities/number/stabilized-value.h>
9 
10 using namespace utilities::number;
11 
12 // Test group description:
13 // * This tests group verifies stabilized_value class.
14 //
15 // Current test description:
16 // * Verify that empty function works as expected
17 TEST_CASE( "empty test", "[stabilized value]" )
18 {
19  stabilized_value< float > stab_value( 5 );
20  CHECK( stab_value.empty() );
21  CHECK_NOTHROW( stab_value.add( 1.0f ) );
22  CHECK_FALSE( stab_value.empty() );
23  stab_value.clear();
24  CHECK( stab_value.empty() );
25 }
#define CHECK_NOTHROW(...)
Definition: catch.hpp:17421
TEST_CASE("empty test","[stabilized value]")
Definition: test-empty.cpp:17
#define CHECK(condition)
CHECK_FALSE(inverse(inverse(p))==p)


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