itoa.cpp 335 B

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