@@ -655,7 +655,7 @@ static void pfAddAllowedMAC( struct xNetworkInterface * pxInterface,
655
655
}
656
656
657
657
static void pfRemoveAllowedMAC ( struct xNetworkInterface * pxInterface ,
658
- const uint8_t * pucMacAddress )
658
+ const uint8_t * pucMacAddress )
659
659
{
660
660
xMACRemoveFunctionCalled = pdTRUE ;
661
661
}
@@ -665,7 +665,7 @@ static void pfRemoveAllowedMAC( struct xNetworkInterface * pxInterface,
665
665
*/
666
666
void test_vManageSolicitedNodeAddress_NoEndPoint_CatchAssert ( void )
667
667
{
668
- catch_assert ( vManageSolicitedNodeAddress (NULL , pdTRUE ) );
668
+ catch_assert ( vManageSolicitedNodeAddress ( NULL , pdTRUE ) );
669
669
}
670
670
671
671
@@ -675,7 +675,8 @@ void test_vManageSolicitedNodeAddress_NoEndPoint_CatchAssert( void )
675
675
void test_vManageSolicitedNodeAddress_NoInterface_CatchAssert ( void )
676
676
{
677
677
NetworkEndPoint_t xEndPoint = { 0 };
678
- catch_assert ( vManageSolicitedNodeAddress (& xEndPoint , pdTRUE ) );
678
+
679
+ catch_assert ( vManageSolicitedNodeAddress ( & xEndPoint , pdTRUE ) );
679
680
}
680
681
681
682
@@ -684,7 +685,6 @@ void test_vManageSolicitedNodeAddress_NoInterface_CatchAssert( void )
684
685
*/
685
686
void test_vManageSolicitedNodeAddress_NetworkGoingUp ( void )
686
687
{
687
-
688
688
NetworkInterface_t xInterface = { 0 };
689
689
NetworkEndPoint_t xEndPoint = { 0 };
690
690
BaseType_t xMACAddExpected = pdFALSE ;
@@ -716,11 +716,11 @@ void test_vManageSolicitedNodeAddress_NetworkGoingUp( void )
716
716
717
717
xMACAddFunctionCalled = pdFALSE ;
718
718
719
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_LinkLocal );
719
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_LinkLocal );
720
720
721
- vManageSolicitedNodeAddress (& xEndPoint , pdTRUE );
721
+ vManageSolicitedNodeAddress ( & xEndPoint , pdTRUE );
722
722
723
- TEST_ASSERT_EQUAL (pdTRUE , xMACAddFunctionCalled );
723
+ TEST_ASSERT_EQUAL ( pdTRUE , xMACAddFunctionCalled );
724
724
725
725
/* No MAC address add handler */
726
726
xInterface .pfAddAllowedMAC = NULL ;
@@ -729,11 +729,11 @@ void test_vManageSolicitedNodeAddress_NetworkGoingUp( void )
729
729
730
730
xMACAddFunctionCalled = pdFALSE ;
731
731
732
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_LinkLocal );
732
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_LinkLocal );
733
733
734
- vManageSolicitedNodeAddress (& xEndPoint , pdTRUE );
734
+ vManageSolicitedNodeAddress ( & xEndPoint , pdTRUE );
735
735
736
- TEST_ASSERT_EQUAL (pdFALSE , xMACAddFunctionCalled );
736
+ TEST_ASSERT_EQUAL ( pdFALSE , xMACAddFunctionCalled );
737
737
738
738
/* Happy path eIPv6_SiteLocal */
739
739
xInterface .pfAddAllowedMAC = & pfAddAllowedMAC ;
@@ -742,11 +742,11 @@ void test_vManageSolicitedNodeAddress_NetworkGoingUp( void )
742
742
743
743
xMACAddFunctionCalled = pdFALSE ;
744
744
745
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_SiteLocal );
745
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_SiteLocal );
746
746
747
- vManageSolicitedNodeAddress (& xEndPoint , pdTRUE );
747
+ vManageSolicitedNodeAddress ( & xEndPoint , pdTRUE );
748
748
749
- TEST_ASSERT_EQUAL (pdTRUE , xMACAddFunctionCalled );
749
+ TEST_ASSERT_EQUAL ( pdTRUE , xMACAddFunctionCalled );
750
750
751
751
/* Happy path eIPv6_Global */
752
752
xInterface .pfAddAllowedMAC = & pfAddAllowedMAC ;
@@ -755,11 +755,11 @@ void test_vManageSolicitedNodeAddress_NetworkGoingUp( void )
755
755
756
756
xMACAddFunctionCalled = pdFALSE ;
757
757
758
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_Global );
758
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_Global );
759
759
760
- vManageSolicitedNodeAddress (& xEndPoint , pdTRUE );
760
+ vManageSolicitedNodeAddress ( & xEndPoint , pdTRUE );
761
761
762
- TEST_ASSERT_EQUAL (pdTRUE , xMACAddFunctionCalled );
762
+ TEST_ASSERT_EQUAL ( pdTRUE , xMACAddFunctionCalled );
763
763
764
764
/* Unhappy path eIPv6_Loopback */
765
765
xInterface .pfAddAllowedMAC = & pfAddAllowedMAC ;
@@ -768,19 +768,18 @@ void test_vManageSolicitedNodeAddress_NetworkGoingUp( void )
768
768
769
769
xMACAddFunctionCalled = pdFALSE ;
770
770
771
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_Loopback );
771
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_Loopback );
772
772
773
- vManageSolicitedNodeAddress (& xEndPoint , pdTRUE );
773
+ vManageSolicitedNodeAddress ( & xEndPoint , pdTRUE );
774
774
775
- TEST_ASSERT_EQUAL (pdFALSE , xMACAddFunctionCalled );
775
+ TEST_ASSERT_EQUAL ( pdFALSE , xMACAddFunctionCalled );
776
776
}
777
777
778
778
/**
779
779
* @brief Validate the case were the network is going down
780
780
*/
781
781
void test_vManageSolicitedNodeAddress_NetworkGoingDown ( void )
782
782
{
783
-
784
783
NetworkInterface_t xInterface = { 0 };
785
784
NetworkEndPoint_t xEndPoint = { 0 };
786
785
BaseType_t xMACAddExpected = pdFALSE ;
@@ -812,11 +811,11 @@ void test_vManageSolicitedNodeAddress_NetworkGoingDown( void )
812
811
813
812
xMACRemoveFunctionCalled = pdFALSE ;
814
813
815
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_LinkLocal );
814
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_LinkLocal );
816
815
817
- vManageSolicitedNodeAddress (& xEndPoint , pdFALSE );
816
+ vManageSolicitedNodeAddress ( & xEndPoint , pdFALSE );
818
817
819
- TEST_ASSERT_EQUAL (pdTRUE , xMACRemoveFunctionCalled );
818
+ TEST_ASSERT_EQUAL ( pdTRUE , xMACRemoveFunctionCalled );
820
819
821
820
/* No MAC address add handler */
822
821
xInterface .pfAddAllowedMAC = NULL ;
@@ -825,11 +824,11 @@ void test_vManageSolicitedNodeAddress_NetworkGoingDown( void )
825
824
826
825
xMACRemoveFunctionCalled = pdFALSE ;
827
826
828
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_LinkLocal );
827
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_LinkLocal );
829
828
830
- vManageSolicitedNodeAddress (& xEndPoint , pdFALSE );
829
+ vManageSolicitedNodeAddress ( & xEndPoint , pdFALSE );
831
830
832
- TEST_ASSERT_EQUAL (pdFALSE , xMACRemoveFunctionCalled );
831
+ TEST_ASSERT_EQUAL ( pdFALSE , xMACRemoveFunctionCalled );
833
832
834
833
/* Happy path eIPv6_SiteLocal */
835
834
xInterface .pfAddAllowedMAC = & pfAddAllowedMAC ;
@@ -838,11 +837,11 @@ void test_vManageSolicitedNodeAddress_NetworkGoingDown( void )
838
837
839
838
xMACRemoveFunctionCalled = pdFALSE ;
840
839
841
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_SiteLocal );
840
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_SiteLocal );
842
841
843
- vManageSolicitedNodeAddress (& xEndPoint , pdFALSE );
842
+ vManageSolicitedNodeAddress ( & xEndPoint , pdFALSE );
844
843
845
- TEST_ASSERT_EQUAL (pdTRUE , xMACRemoveFunctionCalled );
844
+ TEST_ASSERT_EQUAL ( pdTRUE , xMACRemoveFunctionCalled );
846
845
847
846
/* Happy path eIPv6_Global */
848
847
xInterface .pfAddAllowedMAC = & pfAddAllowedMAC ;
@@ -851,11 +850,11 @@ void test_vManageSolicitedNodeAddress_NetworkGoingDown( void )
851
850
852
851
xMACRemoveFunctionCalled = pdFALSE ;
853
852
854
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_Global );
853
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_Global );
855
854
856
- vManageSolicitedNodeAddress (& xEndPoint , pdFALSE );
855
+ vManageSolicitedNodeAddress ( & xEndPoint , pdFALSE );
857
856
858
- TEST_ASSERT_EQUAL (pdTRUE , xMACRemoveFunctionCalled );
857
+ TEST_ASSERT_EQUAL ( pdTRUE , xMACRemoveFunctionCalled );
859
858
860
859
/* Unhappy path eIPv6_Loopback */
861
860
xInterface .pfAddAllowedMAC = & pfAddAllowedMAC ;
@@ -864,9 +863,9 @@ void test_vManageSolicitedNodeAddress_NetworkGoingDown( void )
864
863
865
864
xMACRemoveFunctionCalled = pdFALSE ;
866
865
867
- xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_Loopback );
866
+ xIPv6_GetIPType_ExpectAndReturn ( & xEndPoint .ipv6_settings .xIPAddress , eIPv6_Loopback );
868
867
869
- vManageSolicitedNodeAddress (& xEndPoint , pdFALSE );
868
+ vManageSolicitedNodeAddress ( & xEndPoint , pdFALSE );
870
869
871
- TEST_ASSERT_EQUAL (pdFALSE , xMACRemoveFunctionCalled );
872
- }
870
+ TEST_ASSERT_EQUAL ( pdFALSE , xMACRemoveFunctionCalled );
871
+ }
0 commit comments