Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
unit-tests
utilities
number
stabilized
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
}
utilities::number::stabilized_value::add
void add(T val)
Definition:
stabilized-value.h:45
utilities::number
Definition:
stabilized-value.h:11
utilities::number::stabilized_value::clear
void clear()
Definition:
stabilized-value.h:107
utilities::number::stabilized_value::empty
bool empty() const
Definition:
stabilized-value.h:113
CHECK_NOTHROW
#define CHECK_NOTHROW(...)
Definition:
catch.hpp:17421
TEST_CASE
TEST_CASE("empty test","[stabilized value]")
Definition:
test-empty.cpp:17
utilities::number::stabilized_value< float >
CHECK
#define CHECK(condition)
Definition:
easylogging++.h:4483
CHECK_FALSE
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