shellmatta/test/shellmatta_utils/itoa.cpp

12 lines
335 B
C++
Raw Normal View History

#include "test/framework/catch.hpp"
#include "src/shellmatta_utils.c"
#include <string.h>
TEST_CASE( "shellmatta_utils.c itoa - 123456" ) {
char buffer[64];
memset(buffer, 0, sizeof(buffer));
CHECK( utils_shellItoa(123456, buffer, 16) == 5 );
CHECK( "12345" == "12345");
REQUIRE( strcmp(buffer, "123456") == 0);
}