nds2-client - ClientDeveloper  0.16.8
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Functions
test_bsd_string.cc File Reference
#include "daq_bsd_string.h"
#include <string.h>
#include "catch.hpp"
Include dependency graph for test_bsd_string.cc:

Functions

 TEST_CASE ("daq_strlcpy copies strings safely when buffers are sufficiently large")
 
 TEST_CASE ("daq_strlcpy copies strings and truncates when the dst is too small")
 
 TEST_CASE ("daq_strlcpy does nothing when arguments are bad")
 
 TEST_CASE ("daq_strlcat appends strings safely when buffers are sufficiently large")
 
 TEST_CASE ("daq_strlcat appends strings safely and truncates when needed")
 
 TEST_CASE ("If given a non-null terminated dest, strlcat will truncate the ""destination and not overflow dest.")
 
 TEST_CASE ("daq_strlcat does nothing when arguments are bad")
 
 TEST_CASE ("An empty or NULL string has zero bytes remaining")
 
 TEST_CASE ("A string that is full will have zero bytes remaining")
 
 TEST_CASE ("A string that is not null terminated will have zero bytes remaining")
 
 TEST_CASE ("A string who's buffer is not full will give the proper length back")
 
 TEST_CASE ("You can slprintf into a string whos buffer is big enough")
 
 TEST_CASE ("You can slprintf into a string whos buffer is big enough to concatenate")
 
 TEST_CASE ("You can slprintf into a non-null terminated string and it will ""truncate the buffer")
 
 TEST_CASE ("You can call slprintf with bad arguments")
 

Function Documentation

TEST_CASE ( "daq_strlcpy copies strings safely when buffers are sufficiently large"  )
TEST_CASE ( "daq_strlcpy copies strings and truncates when the dst is too small"  )
TEST_CASE ( "daq_strlcpy does nothing when arguments are bad"  )
TEST_CASE ( "daq_strlcat appends strings safely when buffers are sufficiently large"  )
TEST_CASE ( "daq_strlcat appends strings safely and truncates when needed"  )
TEST_CASE ( "If given a non-null terminated  dest,
strlcat will truncate the" "destination and not overflow dest."   
)
TEST_CASE ( "daq_strlcat does nothing when arguments are bad"  )
TEST_CASE ( "An empty or NULL string has zero bytes remaining"  )
TEST_CASE ( "A string that is full will have zero bytes remaining"  )
TEST_CASE ( "A string that is not null terminated will have zero bytes remaining"  )
TEST_CASE ( "A string who's buffer is not full will give the proper length back"  )
TEST_CASE ( "You can slprintf into a string whos buffer is big enough"  )
TEST_CASE ( "You can slprintf into a string whos buffer is big enough to concatenate"  )
TEST_CASE ( "You can slprintf into a non-null terminated string and it will ""truncate the buffer"  )
TEST_CASE ( "You can call slprintf with bad arguments"  )