Skip to content
  • Thomas Helland's avatar
    util: Add tests for the string buffer · 584a2a22
    Thomas Helland authored
    
    
    More tests could probably be added, but this should cover
    concatenation, resizing, clearing, formatted printing,
    and checking the length, so it should be quite complete.
    
    Signed-off-by: default avatarThomas Helland <thomashelland90@gmail.com>
    Reviewed-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
    Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>
    
    V2: Address review feedback from Timothy, plus fixes
       - Use a large enough char array
       - Actually test the formatted appending
       - Test that clear function resets string length
    
    V3: Port to gtest
    
    V4: Fix test makefile
        Fix copyright header
        Fix missing extern C
        Use more appropriate name for C-file
        Add tests for append_char
    584a2a22