Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
grn-test-memcached-assertions.h
Go to the documentation of this file.
1 /* -*- c-basic-offset: 2; coding: utf-8 -*- */
2 /*
3  Copyright (C) 2009 Kouhei Sutou <kou@clear-code.com>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Lesser General Public
7  License version 2.1 as published by the Free Software Foundation.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #ifndef __GRN_TEST_MEMCACHED_ASSERTIONS_H__
20 #define __GRN_TEST_MEMCACHED_ASSERTIONS_H__
21 
22 #include <libmemcached/memcached.h>
23 
24 #include "grn-test-utils.h"
25 
26 #define grn_test_memcached_assert(expression, ...) \
27  cut_trace_with_info_expression( \
28  cut_test_with_user_message( \
29  grn_test_memcached_assert_helper((expression), #expression), \
30  __VA_ARGS__), \
31  grn_test_assert(expression))
32 
33 #define grn_test_memcached_assert_equal_rc(expected, actual, ...) \
34  cut_trace_with_info_expression( \
35  cut_test_with_user_message( \
36  grn_test_memcached_assert_equal_rc_helper((expected), (actual), \
37  #expected, #actual), \
38  __VA_ARGS__), \
39  grn_test_assert_equal_rc(expected, actual))
40 
41 
42 void grn_test_memcached_assert_helper (memcached_return rc,
43  const gchar *expression);
45  (memcached_return expected,
46  memcached_return actual,
47  const gchar *expression_expected,
48  const gchar *expression_actual);
49 
50 #endif