OpenWalnut  1.5.0dev
Public Member Functions | List of all members
WHistogramBasicTest Class Reference

Unit tests the WHistogramBasic class. More...

#include <WHistogramBasic_test.h>

+ Inheritance diagram for WHistogramBasicTest:
+ Collaboration diagram for WHistogramBasicTest:

Public Member Functions

void setUp ()
 Setup logger and other stuff for each test. More...
 
void testInitialization (void)
 Check when nothing was inserted every thing is empty. More...
 
void testInsert (void)
 Check normal insertion inside the min max boundaries. More...
 
void testInsertOnIntervalBorder (void)
 If the value is directly on the borderline it counts to the right interval. More...
 
void testInsertMin (void)
 If the minimum is inserted the first bin should be incremented. More...
 
void testInsertMax (void)
 If the maximum is inserted the right most interval is used. More...
 
void testInsertOutOfBounds (void)
 If above the maximum values are inserted a warning should be printed and nothing should happen. More...
 
void testOperatorToGetNumberOfElementsInsideTheBin (void)
 For each insert this number should increase by one. More...
 
void testInsertAlmostMax (void)
 Also for values near the maxium. More...
 

Detailed Description

Unit tests the WHistogramBasic class.

Definition at line 37 of file WHistogramBasic_test.h.

Member Function Documentation

◆ setUp()

void WHistogramBasicTest::setUp ( )
inline

Setup logger and other stuff for each test.

Definition at line 43 of file WHistogramBasic_test.h.

References WLogger::startup().

+ Here is the call graph for this function:

◆ testInitialization()

void WHistogramBasicTest::testInitialization ( void  )
inline

Check when nothing was inserted every thing is empty.

Definition at line 51 of file WHistogramBasic_test.h.

References WHistogram::size(), and WHistogramBasic::valuesSize().

+ Here is the call graph for this function:

◆ testInsert()

void WHistogramBasicTest::testInsert ( void  )
inline

Check normal insertion inside the min max boundaries.

Definition at line 61 of file WHistogramBasic_test.h.

References WHistogramBasic::insert(), WHistogram::size(), and WHistogramBasic::valuesSize().

+ Here is the call graph for this function:

◆ testInsertAlmostMax()

void WHistogramBasicTest::testInsertAlmostMax ( void  )
inline

Also for values near the maxium.

You may also see #186 for further details.

Definition at line 139 of file WHistogramBasic_test.h.

References wlimits::FLT_EPS, and WHistogramBasic::insert().

+ Here is the call graph for this function:

◆ testInsertMax()

void WHistogramBasicTest::testInsertMax ( void  )
inline

If the maximum is inserted the right most interval is used.

Definition at line 98 of file WHistogramBasic_test.h.

References WHistogramBasic::insert().

+ Here is the call graph for this function:

◆ testInsertMin()

void WHistogramBasicTest::testInsertMin ( void  )
inline

If the minimum is inserted the first bin should be incremented.

Definition at line 87 of file WHistogramBasic_test.h.

References WHistogramBasic::insert().

+ Here is the call graph for this function:

◆ testInsertOnIntervalBorder()

void WHistogramBasicTest::testInsertOnIntervalBorder ( void  )
inline

If the value is directly on the borderline it counts to the right interval.

Definition at line 73 of file WHistogramBasic_test.h.

References WHistogramBasic::insert().

+ Here is the call graph for this function:

◆ testInsertOutOfBounds()

void WHistogramBasicTest::testInsertOutOfBounds ( void  )
inline

If above the maximum values are inserted a warning should be printed and nothing should happen.

Definition at line 110 of file WHistogramBasic_test.h.

References wlimits::DBL_EPS, WHistogramBasic::insert(), and WHistogram::size().

+ Here is the call graph for this function:

◆ testOperatorToGetNumberOfElementsInsideTheBin()

void WHistogramBasicTest::testOperatorToGetNumberOfElementsInsideTheBin ( void  )
inline

For each insert this number should increase by one.

Definition at line 124 of file WHistogramBasic_test.h.

References WHistogramBasic::insert(), WHistogram::size(), and WHistogramBasic::valuesSize().

+ Here is the call graph for this function:

The documentation for this class was generated from the following file: