mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
tests: string: Remove pointless test for virStringListFreeCount
It's way more useful to run valgrind against the rest of the code than this test to see whether virStringListFreeCount works. Remove the test. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
0a6f02de70
commit
529564aba4
@ -392,24 +392,6 @@ testStringToDouble(const void *opaque)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The point of this test is to check whether all members of the array are
|
|
||||||
* freed. The test has to be checked using valgrind. */
|
|
||||||
static int
|
|
||||||
testVirStringListFreeCount(const void *opaque G_GNUC_UNUSED)
|
|
||||||
{
|
|
||||||
char **list;
|
|
||||||
|
|
||||||
list = g_new0(char *, 4);
|
|
||||||
|
|
||||||
list[0] = g_strdup("test1");
|
|
||||||
list[2] = g_strdup("test2");
|
|
||||||
list[3] = g_strdup("test3");
|
|
||||||
|
|
||||||
virStringListFreeCount(list, 4);
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
struct testStripData {
|
struct testStripData {
|
||||||
const char *string;
|
const char *string;
|
||||||
@ -718,11 +700,6 @@ mymain(void)
|
|||||||
NULL,
|
NULL,
|
||||||
3.141592653589793238462643383279502884197169399375105);
|
3.141592653589793238462643383279502884197169399375105);
|
||||||
|
|
||||||
/* test virStringListFreeCount */
|
|
||||||
if (virTestRun("virStringListFreeCount", testVirStringListFreeCount,
|
|
||||||
NULL) < 0)
|
|
||||||
ret = -1;
|
|
||||||
|
|
||||||
#define TEST_STRIP_IPV6_BRACKETS(str, res) \
|
#define TEST_STRIP_IPV6_BRACKETS(str, res) \
|
||||||
do { \
|
do { \
|
||||||
struct testStripData stripData = { \
|
struct testStripData stripData = { \
|
||||||
|
Loading…
Reference in New Issue
Block a user