@ -94,7 +94,7 @@ int basicBlocksTest()
@@ -94,7 +94,7 @@ int basicBlocksTest()
int blockLimitTest ( )
{
printf ( " Test BlockLimit \t \t \t : " ) ;
BlockLimit limit ( NULL , " TEST " ) ;
BlockLimit limit ( nullptr , " TEST " ) ;
// initial state
ASSERT_CL ( equal ( 1.0f , limit . getMax ( ) ) ) ;
ASSERT_CL ( equal ( - 1.0f , limit . getMin ( ) ) ) ;
@ -110,7 +110,7 @@ int blockLimitTest()
@@ -110,7 +110,7 @@ int blockLimitTest()
int blockLimitSymTest ( )
{
printf ( " Test BlockLimitSym \t \t : " ) ;
BlockLimitSym limit ( NULL , " TEST " ) ;
BlockLimitSym limit ( nullptr , " TEST " ) ;
// initial state
ASSERT_CL ( equal ( 1.0f , limit . getMax ( ) ) ) ;
ASSERT_CL ( equal ( 0.0f , limit . getDt ( ) ) ) ;
@ -125,7 +125,7 @@ int blockLimitSymTest()
@@ -125,7 +125,7 @@ int blockLimitSymTest()
int blockLowPassTest ( )
{
printf ( " Test BlockLowPass \t \t : " ) ;
BlockLowPass lowPass ( NULL , " TEST_LP " ) ;
BlockLowPass lowPass ( nullptr , " TEST_LP " ) ;
// test initial state
ASSERT_CL ( equal ( 10.0f , lowPass . getFCut ( ) ) ) ;
ASSERT_CL ( equal ( 0.0f , lowPass . getState ( ) ) ) ;
@ -153,7 +153,7 @@ int blockLowPassTest()
@@ -153,7 +153,7 @@ int blockLowPassTest()
int blockHighPassTest ( )
{
printf ( " Test BlockHighPass \t \t : " ) ;
BlockHighPass highPass ( NULL , " TEST_HP " ) ;
BlockHighPass highPass ( nullptr , " TEST_HP " ) ;
// test initial state
ASSERT_CL ( equal ( 10.0f , highPass . getFCut ( ) ) ) ;
ASSERT_CL ( equal ( 0.0f , highPass . getU ( ) ) ) ;
@ -184,7 +184,7 @@ int blockHighPassTest()
@@ -184,7 +184,7 @@ int blockHighPassTest()
int blockLowPass2Test ( )
{
printf ( " Test BlockLowPass2 \t \t : " ) ;
BlockLowPass2 lowPass ( NULL , " TEST_LP " , 100 ) ;
BlockLowPass2 lowPass ( nullptr , " TEST_LP " , 100 ) ;
// test initial state
ASSERT_CL ( equal ( 10.0f , lowPass . getFCutParam ( ) ) ) ;
ASSERT_CL ( equal ( 0.0f , lowPass . getState ( ) ) ) ;
@ -212,7 +212,7 @@ int blockLowPass2Test()
@@ -212,7 +212,7 @@ int blockLowPass2Test()
int blockIntegralTest ( )
{
printf ( " Test BlockIntegral \t \t : " ) ;
BlockIntegral integral ( NULL , " TEST_I " ) ;
BlockIntegral integral ( nullptr , " TEST_I " ) ;
// test initial state
ASSERT_CL ( equal ( 1.0f , integral . getMax ( ) ) ) ;
ASSERT_CL ( equal ( 0.0f , integral . getDt ( ) ) ) ;
@ -249,7 +249,7 @@ int blockIntegralTest()
@@ -249,7 +249,7 @@ int blockIntegralTest()
int blockIntegralTrapTest ( )
{
printf ( " Test BlockIntegralTrap \t \t : " ) ;
BlockIntegralTrap integral ( NULL , " TEST_I " ) ;
BlockIntegralTrap integral ( nullptr , " TEST_I " ) ;
// test initial state
ASSERT_CL ( equal ( 1.0f , integral . getMax ( ) ) ) ;
ASSERT_CL ( equal ( 0.0f , integral . getDt ( ) ) ) ;
@ -292,7 +292,7 @@ int blockIntegralTrapTest()
@@ -292,7 +292,7 @@ int blockIntegralTrapTest()
int blockDerivativeTest ( )
{
printf ( " Test BlockDerivative \t \t : " ) ;
BlockDerivative derivative ( NULL , " TEST_D " ) ;
BlockDerivative derivative ( nullptr , " TEST_D " ) ;
// test initial state
ASSERT_CL ( equal ( 0.0f , derivative . getU ( ) ) ) ;
ASSERT_CL ( equal ( 10.0f , derivative . getLP ( ) ) ) ;
@ -315,7 +315,7 @@ int blockDerivativeTest()
@@ -315,7 +315,7 @@ int blockDerivativeTest()
int blockPTest ( )
{
printf ( " Test BlockP \t \t \t : " ) ;
BlockP blockP ( NULL , " TEST_P " ) ;
BlockP blockP ( nullptr , " TEST_P " ) ;
// test initial state
ASSERT_CL ( equal ( 0.2f , blockP . getKP ( ) ) ) ;
ASSERT_CL ( equal ( 0.0f , blockP . getDt ( ) ) ) ;
@ -331,7 +331,7 @@ int blockPTest()
@@ -331,7 +331,7 @@ int blockPTest()
int blockPITest ( )
{
printf ( " Test BlockPI \t \t \t : " ) ;
BlockPI blockPI ( NULL , " TEST " ) ;
BlockPI blockPI ( nullptr , " TEST " ) ;
// test initial state
ASSERT_CL ( equal ( 0.2f , blockPI . getKP ( ) ) ) ;
ASSERT_CL ( equal ( 0.1f , blockPI . getKI ( ) ) ) ;
@ -353,7 +353,7 @@ int blockPITest()
@@ -353,7 +353,7 @@ int blockPITest()
int blockPDTest ( )
{
printf ( " Test BlockPD \t \t \t : " ) ;
BlockPD blockPD ( NULL , " TEST " ) ;
BlockPD blockPD ( nullptr , " TEST " ) ;
// test initial state
ASSERT_CL ( equal ( 0.2f , blockPD . getKP ( ) ) ) ;
ASSERT_CL ( equal ( 0.01f , blockPD . getKD ( ) ) ) ;
@ -378,7 +378,7 @@ int blockPDTest()
@@ -378,7 +378,7 @@ int blockPDTest()
int blockPIDTest ( )
{
printf ( " Test BlockPID \t \t \t : " ) ;
BlockPID blockPID ( NULL , " TEST " ) ;
BlockPID blockPID ( nullptr , " TEST " ) ;
// test initial state
ASSERT_CL ( equal ( 0.2f , blockPID . getKP ( ) ) ) ;
ASSERT_CL ( equal ( 0.1f , blockPID . getKI ( ) ) ) ;
@ -408,7 +408,7 @@ int blockPIDTest()
@@ -408,7 +408,7 @@ int blockPIDTest()
int blockOutputTest ( )
{
printf ( " Test BlockOutput \t \t : " ) ;
BlockOutput blockOutput ( NULL , " TEST " ) ;
BlockOutput blockOutput ( nullptr , " TEST " ) ;
// test initial state
ASSERT_CL ( equal ( 0.0f , blockOutput . getDt ( ) ) ) ;
ASSERT_CL ( equal ( 0.5f , blockOutput . get ( ) ) ) ;
@ -431,7 +431,7 @@ int blockRandUniformTest()
@@ -431,7 +431,7 @@ int blockRandUniformTest()
{
srand ( 1234 ) ;
printf ( " Test BlockRandUniform \t \t : " ) ;
BlockRandUniform blockRandUniform ( NULL , " TEST " ) ;
BlockRandUniform blockRandUniform ( nullptr , " TEST " ) ;
// test initial state
ASSERT_CL ( equal ( 0.0f , blockRandUniform . getDt ( ) ) ) ;
ASSERT_CL ( equal ( - 1.0f , blockRandUniform . getMin ( ) ) ) ;
@ -457,7 +457,7 @@ int blockRandGaussTest()
@@ -457,7 +457,7 @@ int blockRandGaussTest()
{
srand ( 1234 ) ;
printf ( " Test BlockRandGauss \t \t : " ) ;
BlockRandGauss blockRandGauss ( NULL , " TEST " ) ;
BlockRandGauss blockRandGauss ( nullptr , " TEST " ) ;
// test initial state
ASSERT_CL ( equal ( 0.0f , blockRandGauss . getDt ( ) ) ) ;
ASSERT_CL ( equal ( 1.0f , blockRandGauss . getMean ( ) ) ) ;
@ -486,7 +486,7 @@ int blockRandGaussTest()
@@ -486,7 +486,7 @@ int blockRandGaussTest()
int blockStatsTest ( )
{
printf ( " Test BlockStats \t \t \t : " ) ;
BlockStats < float , 1 > stats ( NULL , " TEST " ) ;
BlockStats < float , 1 > stats ( nullptr , " TEST " ) ;
ASSERT_CL ( equal ( 0.0f , stats . getMean ( ) ( 0 ) ) ) ;
ASSERT_CL ( equal ( 0.0f , stats . getStdDev ( ) ( 0 ) ) ) ;
stats . update ( matrix : : Scalar < float > ( 1.0f ) ) ;
@ -504,7 +504,7 @@ int blockDelayTest()
@@ -504,7 +504,7 @@ int blockDelayTest()
{
printf ( " Test BlockDelay \t \t \t : " ) ;
using namespace matrix ;
BlockDelay < float , 2 , 1 , 3 > delay ( NULL , " TEST " ) ;
BlockDelay < float , 2 , 1 , 3 > delay ( nullptr , " TEST " ) ;
Vector2f u1 ( 1 , 2 ) ;
Vector2f y1 = delay . update ( u1 ) ;
ASSERT_CL ( equal ( y1 ( 0 ) , u1 ( 0 ) ) ) ;