summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 293c2b1)
raw | patch | inline | side by side (parent: 293c2b1)
author | Sebastian Harl <sh@tokkee.org> | |
Tue, 27 Aug 2013 06:04:45 +0000 (08:04 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Tue, 27 Aug 2013 06:04:45 +0000 (08:04 +0200) |
t/Makefile.am | patch | blob | history | |
t/libsysdb_test.c | patch | blob | history | |
t/utils/llist_test.c | patch | blob | history |
diff --git a/t/Makefile.am b/t/Makefile.am
index 0afba6434df881f926d5526a6ff9abff99a6489a..338ecbc19745048fece29d459cca401ae92e4f3a 100644 (file)
--- a/t/Makefile.am
+++ b/t/Makefile.am
+AM_CFLAGS = @STRICT_CFLAGS@
AM_CPPFLAGS = -I$(top_builddir)/src/include
TESTS = libsysdb_test
libsysdb_test_SOURCES = \
libsysdb_test.c libsysdb_test.h \
utils/llist_test.c
-libsysdb_test_CFLAGS = @CHECK_CFLAGS@
+libsysdb_test_CFLAGS = $(AM_CFLAGS) @CHECK_CFLAGS@
libsysdb_test_LDADD = $(top_builddir)/src/libsysdb.la @CHECK_LIBS@
test: check
diff --git a/t/libsysdb_test.c b/t/libsysdb_test.c
index dd5ce8e9ea3e7813d44f37f09900bda60b7c8b87..ab241492ea77db4bccf276676cfc8e46a49d5d62 100644 (file)
--- a/t/libsysdb_test.c
+++ b/t/libsysdb_test.c
main(void)
{
int failed = 0;
+
+ SRunner *sr;
Suite *s;
/* t/utils/llist_test */
s = util_llist_suite();
- SRunner *sr = srunner_create(s);
+ sr = srunner_create(s);
srunner_run_all(sr, CK_NORMAL);
failed += srunner_ntests_failed(sr);
srunner_free(sr);
diff --git a/t/utils/llist_test.c b/t/utils/llist_test.c
index 774520406b1c35833c89dee0f4a5f5b1756e3e93..b01dd0eafb1171952b55f14ab4766f1e8c02e872 100644 (file)
--- a/t/utils/llist_test.c
+++ b/t/utils/llist_test.c
static void
populate(void)
{
- int i;
+ size_t i;
for (i = 0; i < SDB_STATIC_ARRAY_LEN(golden_data); ++i) {
int check = sdb_llist_append(list, &golden_data[i]);
fail_unless(check == 0,
START_TEST(test_clone)
{
sdb_llist_t *clone;
- int i;
+ size_t i;
populate();
START_TEST(test_destroy)
{
- int i;
+ size_t i;
populate();
sdb_llist_destroy(list);
list = NULL;
START_TEST(test_append)
{
- int i;
+ size_t i;
for (i = 0; i < SDB_STATIC_ARRAY_LEN(golden_data); ++i) {
int check = sdb_llist_append(list, &golden_data[i]);
fail_unless(check == 0,
START_TEST(test_insert)
{
- int i;
+ size_t i;
for (i = 0; i < SDB_STATIC_ARRAY_LEN(golden_data); ++i) {
int check = sdb_llist_insert(list, &golden_data[i], 0);
fail_unless(check == 0,
START_TEST(test_insert_invalid)
{
- int i;
+ size_t i;
for (i = 0; i < SDB_STATIC_ARRAY_LEN(golden_data); ++i) {
/* none of these operations will succeed
* => 1 is invalid for each case */
START_TEST(test_search)
{
- int i;
+ size_t i;
populate();
for (i = 0; i < SDB_STATIC_ARRAY_LEN(golden_data); ++i) {
sdb_object_t *check = sdb_llist_search_by_name(list,
START_TEST(test_shift)
{
- int i;
+ size_t i;
populate();
for (i = 0; i < SDB_STATIC_ARRAY_LEN(golden_data); ++i) {
sdb_object_t *check = sdb_llist_shift(list);
START_TEST(test_iter)
{
sdb_llist_iter_t *iter;
- int i;
+ size_t i;
populate();