3
* Copyright © 2009 Scott James Remnant <scott@netsplit.com>.
4
* Copyright © 2009 Canonical Ltd.
6
* This program is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License version 2, as
8
* published by the Free Software Foundation.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
#ifndef NIH_TEST_LIST_H
21
#define NIH_TEST_LIST_H
24
# error "This header may only be included by <nih/test.h>"
25
#endif /* NIH_IN_TEST_H */
32
* @_list: entry in list.
34
* Check that the list of which @_list is a member is empty, ie. that
35
* @_list is the sole member.
37
#define TEST_LIST_EMPTY(_list) \
38
if (! NIH_LIST_EMPTY (_list)) \
39
TEST_FAILED ("list %p (%s) not empty as expected", \
43
* TEST_LIST_NOT_EMPTY:
44
* @_list: entry in list.
46
* Check that the list of which @_list is a member is not empty, ie. that
47
* there are more members than just @_list.
49
#define TEST_LIST_NOT_EMPTY(_list) \
50
if (NIH_LIST_EMPTY (_list)) \
51
TEST_FAILED ("list %p (%s) empty, expected multiple members", \
54
#endif /* NIH_TEST_LIST_H */