Skip to content

Commit

Permalink
test tools newconcatstring()
Browse files Browse the repository at this point in the history
  • Loading branch information
no-lex committed Oct 29, 2024
1 parent cadfb6a commit ab4f0e2
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/testutils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,16 @@ namespace
assert(std::strlen(s) == std::strlen(s1) + std::strlen(s2));
}

void test_newconcatstring()
{
std::printf("Testing new concat string\n");
const char *s1 = "test string";
const char *s2 = "second test string";
char *c = newconcatstring(s1, s2);
assert(std::string(c) == "test stringsecond test string");
delete[] c;
}

void test_endianswap()
{
std::printf("Testing endianswap\n");
Expand Down Expand Up @@ -592,6 +602,7 @@ testing tools functionality\n\
testcpath();
testcopystring();
testconcatstring();
test_newconcatstring();
test_matchstring();
testparentdir();
testfixpackagedir();
Expand Down

0 comments on commit ab4f0e2

Please sign in to comment.