+\r
+ /* The following are tests for a stream buffer of size one. */\r
+ /* Create a buffer of size one. */\r
+ xTempStreamBuffer = xStreamBufferCreate( sbSTREAM_BUFFER_LENGTH_ONE, sbTRIGGER_LEVEL_1 );\r
+ /* Ensure that the buffer was created successfully. */\r
+ configASSERT( xTempStreamBuffer );\r
+\r
+ /* Send one byte to the buffer. */\r
+ ux = xStreamBufferSend( xTempStreamBuffer, ( void * ) pcStringToSend, ( size_t ) 1, sbDONT_BLOCK );\r
+ /* Ensure that the byte was sent successfully. */\r
+ configASSERT( ux == 1 );\r
+ /* Try sending another byte to the buffer. */\r
+ ux = xStreamBufferSend( xTempStreamBuffer, ( void * ) pcStringToSend, ( size_t ) 1, sbDONT_BLOCK );\r
+ /* Make sure that send failed as the buffer is full. */\r
+ configASSERT( ux == 0 );\r
+\r
+ /* Receive one byte from the buffer. */\r
+ memset( pcStringReceived, 0x00, sbSTREAM_BUFFER_LENGTH_BYTES );\r
+ ux = xStreamBufferReceive( xTempStreamBuffer, ( void * ) pcStringReceived, ( size_t ) 1, sbDONT_BLOCK );\r
+ /* Ensure that the receive was successful. */\r
+ configASSERT( ux == 1 );\r
+ /* Ensure that the correct data was received. */\r
+ configASSERT( pcStringToSend[ 0 ] == pcStringReceived[ 0 ] );\r
+ /* Try receiving another byte from the buffer. */\r
+ ux = xStreamBufferReceive( xTempStreamBuffer, ( void * ) pcStringReceived, ( size_t ) 1, sbDONT_BLOCK );\r
+ /* Ensure that the receive failed as the buffer is empty. */\r
+ configASSERT( ux == 0 );\r
+\r
+ /* Try sending two bytes to the buffer. Since the size of the\r
+ * buffer is one, we must not be able to send more than one. */\r
+ ux = xStreamBufferSend( xTempStreamBuffer, ( void * ) pcStringToSend, ( size_t ) 2, sbDONT_BLOCK );\r
+ /* Ensure that only one byte was sent. */\r
+ configASSERT( ux == 1 );\r
+\r
+ /* Try receiving two bytes from the buffer. Since the size of the\r
+ * buffer is one, we must not be able to get more than one. */\r
+ memset( pcStringReceived, 0x00, sbSTREAM_BUFFER_LENGTH_BYTES );\r
+ ux = xStreamBufferReceive( xTempStreamBuffer, ( void * ) pcStringReceived, ( size_t ) 2, sbDONT_BLOCK );\r
+ /* Ensure that only one byte was received. */\r
+ configASSERT( ux == 1 );\r
+ /* Ensure that the correct data was received. */\r
+ configASSERT( pcStringToSend[ 0 ] == pcStringReceived[ 0 ] );\r
+\r
+ /* Delete the buffer. */\r
+ vStreamBufferDelete( xTempStreamBuffer );\r