You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
387 B

#include <gtest/gtest.h>
#include "utils/str_cat.hpp"
namespace devilution {
namespace {
TEST(StrCatTest, StrCatBasicTest)
{
EXPECT_EQ(StrCat("a", "b", "c", 5), "abc5");
}
TEST(StrCatTest, BufCopyBasicTest)
{
char buf[5];
char *end = BufCopy(buf, "a", "b", "c", 5);
EXPECT_EQ(string_view(buf, end - buf), "abc5");
}
} // namespace
} // namespace devilution