@ -20,94 +20,98 @@ void test_error()
int bound = 1000 ;
int val1 , val2 , val3 , val4 , val5 , val6 , val7 , val8 , val9 , val10 ;
int invalidErrorCodes_1 [ bound ] ;
int invalidErrorCodesLarge_2 [ bound ] ;
int invalidErrorCodesLargest_3 [ bound ] ;
val1 = rand ( ) % 1000 + 1 ;
int validErrorCodeUnsuccessfulLogin [ bound ] ;
val2 = rand ( ) % 1000 + 1 ;
int validErrorCodeMaximumNumberOfAttempts [ bound ] ;
val3 = rand ( ) % 1000 + 1 ;
int validErrorCodeNoMenuEntryForNumber [ bound ] ;
val4 = rand ( ) % 1000 + 1 ;
val5 = rand ( ) % 1000 + 1 ;
val6 = rand ( ) % 1000 + 1 ;
for ( int i = 0 ; i < bound ; + + i ) {
val7 = rand ( ) % 1000 + 1 ;
val8 = rand ( ) % 1000 + 1 ;
val9 = rand ( ) % 1 000 + 1 ;
invalidErrorCodes_1 [ i ] = rand ( ) % 2 000 + 1 ;
val10 = rand ( ) % 1000 + 1 ;
invalidErrorCodesLarge_2 [ i ] = ( rand ( ) % 100000000 ) + 1000000 ;
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val1 ) ) ) , (
invalidErrorCodesLargest_3 [ i ] = ( rand ( ) % 1000000001 ) + 1000000000 ;
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 30 ) , UNITY_DISPLAY_STYLE_INT ) ;
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val2 ) ) ) , (
validErrorCodeUnsuccessfulLogin [ i ] = - 1 ;
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 31 ) , UNITY_DISPLAY_STYLE_INT ) ;
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val3 ) ) ) , (
validErrorCodeMaximumNumberOfAttempts [ i ] = - 2 ;
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 32 ) , UNITY_DISPLAY_STYLE_INT ) ;
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val4 ) ) ) , (
validErrorCodeNoMenuEntryForNumber [ i ] = - 3 ;
}
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 33 ) , UNITY_DISPLAY_STYLE_INT ) ;
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val5 ) ) ) , (
for ( int i = 0 ; i < bound ; + + i ) {
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( invalidErrorCodes_1 [ i ] ) ) ) , (
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 3 4) , UNITY_DISPLAY_STYLE_INT ) ;
) , ( UNITY_UINT ) ( 40 ) , UNITY_DISPLAY_STYLE_INT ) ;
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val6 ) ) ) , (
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( invalidErrorCodesLarge_2 [ i ] ) ) ) , (
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 35 ) , UNITY_DISPLAY_STYLE_INT ) ;
) , ( UNITY_UINT ) ( 41 ) , UNITY_DISPLAY_STYLE_INT ) ;
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val7 ) ) ) , (
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( invalidErrorCodesLargest_3 [ i ] ) ) ) , (
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 36 ) , UNITY_DISPLAY_STYLE_INT ) ;
) , ( UNITY_UINT ) ( 42 ) , UNITY_DISPLAY_STYLE_INT ) ;
}
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val8 ) ) ) , (
for ( int i = 0 ; i < bound ; + + i ) {
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( - 1 ) ) , ( UNITY_INT ) ( ( error ( validErrorCodeUnsuccessfulLogin [ i ] ) ) ) , (
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 37 ) , UNITY_DISPLAY_STYLE_INT ) ;
) , ( UNITY_UINT ) ( 46 ) , UNITY_DISPLAY_STYLE_INT ) ;
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val9 ) ) ) , (
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( - 2 ) ) , ( UNITY_INT ) ( ( error ( validErrorCodeMaximumNumberOfAttempts [ i ] ) ) ) , (
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 38 ) , UNITY_DISPLAY_STYLE_INT ) ;
) , ( UNITY_UINT ) ( 47 ) , UNITY_DISPLAY_STYLE_INT ) ;
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( 0 ) ) , ( UNITY_INT ) ( ( error ( val10 ) ) ) , (
UnityAssertEqualNumber ( ( UNITY_INT ) ( ( - 3 ) ) , ( UNITY_INT ) ( ( error ( validErrorCodeNoMenuEntryForNumber [ i ] ) ) ) , (
( ( void * ) 0 )
) , ( UNITY_UINT ) ( 39 ) , UNITY_DISPLAY_STYLE_INT ) ;
) , ( UNITY_UINT ) ( 48 ) , UNITY_DISPLAY_STYLE_INT ) ;
}
}