X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libtest%2Funittest.cc;h=6b11c3b0114f6600c54caff77222f9806938ce3c;hb=17690735658d7b44f91579df91e31da9ae185158;hp=b3e90c79dcdb7d927ef57c7678f0b6546f83260e;hpb=381d409b224ca3b4510e770a98bc960084cdf2c4;p=awesomized%2Flibmemcached diff --git a/libtest/unittest.cc b/libtest/unittest.cc index b3e90c79..6b11c3b0 100644 --- a/libtest/unittest.cc +++ b/libtest/unittest.cc @@ -618,6 +618,17 @@ static test_return_t vchar_t_TEST(void *) return TEST_SUCCESS; } +static test_return_t vchar_t_make_append_TEST(void *) +{ + libtest::vchar_t hostname; + libtest::vchar::make(hostname, 23); + libtest::vchar::append(hostname, ".com"); + ASSERT_EQ(28, hostname.size()); + ASSERT_EQ(0, hostname[27]); + + return TEST_SUCCESS; +} + static test_return_t vchar_t_compare_neg_TEST(void *) { libtest::vchar_t response; @@ -1086,6 +1097,7 @@ test_st dns_TESTS[] ={ test_st application_tests[] ={ {"vchar_t", 0, vchar_t_TEST }, + {"vchar_t make() append()", 0, vchar_t_make_append_TEST }, {"vchar_t compare()", 0, vchar_t_compare_neg_TEST }, {"true", 0, application_true_BINARY }, {"gbd true --fubar", 0, application_gdb_true_BINARY },