git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Setting tag sliver-openvswitch-2.2.90-1
[sliver-openvswitch.git]
/
tests
/
test-list.c
diff --git
a/tests/test-list.c
b/tests/test-list.c
index
5e62e0c
..
5cba959
100644
(file)
--- a/
tests/test-list.c
+++ b/
tests/test-list.c
@@
-1,5
+1,5
@@
/*
/*
- * Copyright (c) 2008, 2009, 2010
Nicira Networks
.
+ * Copyright (c) 2008, 2009, 2010
, 2011, 2014 Nicira, Inc
.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-20,6
+20,7
@@
#include <config.h>
#include "list.h"
#include <string.h>
#include <config.h>
#include "list.h"
#include <string.h>
+#include "ovstest.h"
#undef NDEBUG
#include <assert.h>
#undef NDEBUG
#include <assert.h>
@@
-73,6
+74,8
@@
check_list(struct list *list, const int values[], size_t n)
assert(i == n);
assert(list_is_empty(list) == !n);
assert(i == n);
assert(list_is_empty(list) == !n);
+ assert(list_is_singleton(list) == (n == 1));
+ assert(list_is_short(list) == (n < 2));
assert(list_size(list) == n);
}
assert(list_size(list) == n);
}
@@
-164,12
+167,12
@@
run_test(void (*function)(void))
printf(".");
}
printf(".");
}
-int
-
main(void
)
+static void
+
test_list_main(int argc OVS_UNUSED, char *argv[] OVS_UNUSED
)
{
run_test(test_list_construction);
run_test(test_list_for_each_safe);
printf("\n");
{
run_test(test_list_construction);
run_test(test_list_for_each_safe);
printf("\n");
- return 0;
}
}
+OVSTEST_REGISTER("test-list", test_list_main);