OpenWalnut  1.5.0dev
Public Member Functions | Private Attributes | List of all members
WValueTest Class Reference

Testsuite for WValue. More...

#include <WValue_test.h>

+ Inheritance diagram for WValueTest:
+ Collaboration diagram for WValueTest:

Public Member Functions

void setUp (void)
 Called before every test. More...
 
void testInstantiation (void)
 Instantiation should throw nothing. More...
 
void testSize (void)
 size should give the value we have put into the constructor More...
 
void testElementAccessOperator (void)
 Element access operator should return the right values. More...
 
void testConstElementAccessOperator (void)
 Const element access operator should return the right values. More...
 
void testEqualityOperator (void)
 == operator should return true if the WValues contain the same elements and false if the don't. More...
 
void testInEqualityOperator (void)
 != operator should return false if the WValues contain the same elements and false if the don't. More...
 
void testAssignmentOperator (void)
 assignment operator= should assign the correct values More...
 
void testPlusAssignmentOperator (void)
 plus assignment operator-= should assign the correct values More...
 
void testMinusAssignmentOperator (void)
 minus assignment operator-= should assign the correct values More...
 
void testProductWithScalarAssignmentOperator (void)
 product with scalar assignment operator*= should assign the correct values More...
 
void testComponentWiseProductAssignmentOperator (void)
 componentwise product assignment operator*= should assign the correct values More...
 
void testPlusOperator (void)
 plus operator+ More...
 
void testMinusOperator (void)
 minus operator+- More...
 
void testComponentWiseProductOperator (void)
 componentwise multiplication operator* More...
 
void testNormDouble (void)
 norm with doubles More...
 
void testNormInt (void)
 norm int More...
 
void testNormSquare (void)
 normsquare More...
 
void testNormalize (void)
 test normalization of the current WValue More...
 
void testNormalized (void)
 test returning normalized version More...
 
void testScalingLeftHandSide (void)
 scaling operator, scalar left hand side More...
 
void testScalingRightHandSide (void)
 scaling operator, scalar right hand side More...
 
void testScalingCommutativity (void)
 ensure scaling operator commutativity More...
 
void testOutputStreamOperator (void)
 Every WValue should have an operator<< for writing to ostreams. More...
 
void testMean (void)
 Test the mean calculation. More...
 
void testMedian (void)
 Test the median calculation. More...
 

Private Attributes

double delta
 Some values are allowed to differ by delta. More...
 

Detailed Description

Testsuite for WValue.

Definition at line 38 of file WValue_test.h.

Member Function Documentation

◆ setUp()

void WValueTest::setUp ( void  )
inline

Called before every test.

Definition at line 47 of file WValue_test.h.

References delta.

◆ testAssignmentOperator()

void WValueTest::testAssignmentOperator ( void  )
inline

assignment operator= should assign the correct values

Definition at line 152 of file WValue_test.h.

◆ testComponentWiseProductAssignmentOperator()

void WValueTest::testComponentWiseProductAssignmentOperator ( void  )
inline

componentwise product assignment operator*= should assign the correct values

Definition at line 320 of file WValue_test.h.

References delta.

◆ testComponentWiseProductOperator()

void WValueTest::testComponentWiseProductOperator ( void  )
inline

componentwise multiplication operator*

Definition at line 439 of file WValue_test.h.

References delta.

◆ testConstElementAccessOperator()

void WValueTest::testConstElementAccessOperator ( void  )
inline

Const element access operator should return the right values.

Definition at line 90 of file WValue_test.h.

◆ testElementAccessOperator()

void WValueTest::testElementAccessOperator ( void  )
inline

Element access operator should return the right values.

Definition at line 74 of file WValue_test.h.

◆ testEqualityOperator()

void WValueTest::testEqualityOperator ( void  )
inline

== operator should return true if the WValues contain the same elements and false if the don't.

Definition at line 102 of file WValue_test.h.

◆ testInEqualityOperator()

void WValueTest::testInEqualityOperator ( void  )
inline

!= operator should return false if the WValues contain the same elements and false if the don't.

Definition at line 127 of file WValue_test.h.

◆ testInstantiation()

void WValueTest::testInstantiation ( void  )
inline

Instantiation should throw nothing.

Definition at line 55 of file WValue_test.h.

◆ testMean()

void WValueTest::testMean ( void  )
inline

Test the mean calculation.

Definition at line 649 of file WValue_test.h.

References WValue< T >::mean().

+ Here is the call graph for this function:

◆ testMedian()

void WValueTest::testMedian ( void  )
inline

Test the median calculation.

Definition at line 661 of file WValue_test.h.

References WValue< T >::mean().

+ Here is the call graph for this function:

◆ testMinusAssignmentOperator()

void WValueTest::testMinusAssignmentOperator ( void  )
inline

minus assignment operator-= should assign the correct values

Definition at line 234 of file WValue_test.h.

References delta.

◆ testMinusOperator()

void WValueTest::testMinusOperator ( void  )
inline

minus operator+-

Definition at line 404 of file WValue_test.h.

References delta.

◆ testNormalize()

void WValueTest::testNormalize ( void  )
inline

test normalization of the current WValue

Definition at line 520 of file WValue_test.h.

References delta, WValue< T >::norm(), and WValue< T >::normalize().

+ Here is the call graph for this function:

◆ testNormalized()

void WValueTest::testNormalized ( void  )
inline

test returning normalized version

Definition at line 538 of file WValue_test.h.

References delta, WValue< T >::norm(), and WValue< T >::normalized().

+ Here is the call graph for this function:

◆ testNormDouble()

void WValueTest::testNormDouble ( void  )
inline

norm with doubles

Definition at line 475 of file WValue_test.h.

References WValue< T >::norm().

+ Here is the call graph for this function:

◆ testNormInt()

void WValueTest::testNormInt ( void  )
inline

norm int

Definition at line 490 of file WValue_test.h.

References WValue< T >::norm().

+ Here is the call graph for this function:

◆ testNormSquare()

void WValueTest::testNormSquare ( void  )
inline

normsquare

Definition at line 505 of file WValue_test.h.

References delta, and WValue< T >::normSquare().

+ Here is the call graph for this function:

◆ testOutputStreamOperator()

void WValueTest::testOutputStreamOperator ( void  )
inline

Every WValue should have an operator<< for writing to ostreams.

Definition at line 635 of file WValue_test.h.

◆ testPlusAssignmentOperator()

void WValueTest::testPlusAssignmentOperator ( void  )
inline

plus assignment operator-= should assign the correct values

Definition at line 192 of file WValue_test.h.

References delta.

◆ testPlusOperator()

void WValueTest::testPlusOperator ( void  )
inline

plus operator+

Definition at line 369 of file WValue_test.h.

References delta.

◆ testProductWithScalarAssignmentOperator()

void WValueTest::testProductWithScalarAssignmentOperator ( void  )
inline

product with scalar assignment operator*= should assign the correct values

Definition at line 279 of file WValue_test.h.

References delta.

◆ testScalingCommutativity()

void WValueTest::testScalingCommutativity ( void  )
inline

ensure scaling operator commutativity

Definition at line 611 of file WValue_test.h.

◆ testScalingLeftHandSide()

void WValueTest::testScalingLeftHandSide ( void  )
inline

scaling operator, scalar left hand side

Definition at line 563 of file WValue_test.h.

References delta.

◆ testScalingRightHandSide()

void WValueTest::testScalingRightHandSide ( void  )
inline

scaling operator, scalar right hand side

Definition at line 587 of file WValue_test.h.

References delta.

◆ testSize()

void WValueTest::testSize ( void  )
inline

size should give the value we have put into the constructor

Definition at line 64 of file WValue_test.h.

References WValue< T >::size().

+ Here is the call graph for this function:

Member Data Documentation

◆ delta

double WValueTest::delta
private

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