Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
grn-assertions.h File Reference
#include "grn-test-utils.h"
#include "grn-test-shortcut.h"
Include dependency graph for grn-assertions.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define grn_test_assert(expression,...)
#define grn_test_assert_equal_rc(expected, actual,...)
#define grn_test_assert_equal_id(context, expected, actual,...)
#define grn_test_assert_equal_type(context, expected, actual,...)
#define grn_test_assert_equal_record_id(context, table,expected, actual,...)
#define grn_test_assert_nil(expression,...)
#define grn_test_assert_not_nil(expression,...)
#define grn_test_assert_context(context,...)
#define grn_test_assert_error(rc, message, context,...)
#define grn_test_assert_null(context, object,...)
#define grn_test_assert_not_null(context, object,...)
#define grn_test_assert_select(context, expected, select_result,text_column_name,...)
#define grn_test_assert_expr(context, inspected, expr,...)
#define grn_test_assert_equal_encoding(expected, actual,...)
#define grn_test_assert_equal_table(context, expected, table,text_column_name,...)
#define grn_test_assert_send_command_error(context, expected_rc,expected_message, command,...)

Functions

G_BEGIN_DECLS void grn_test_assert_helper (grn_rc rc, const gchar *expression)
void grn_test_assert_equal_rc_helper (grn_rc expected, grn_rc actual, const gchar *expression_expected, const gchar *expression_actual)
void grn_test_assert_equal_id_helper (grn_ctx *context, grn_id expected, grn_id actual, const gchar *expression_context, const gchar *expression_expected, const gchar *expression_actual)
void grn_test_assert_equal_type_helper (grn_ctx *context, unsigned char expected, unsigned char actual, const gchar *expression_context, const gchar *expression_expected, const gchar *expression_actual)
void grn_test_assert_equal_record_id_helper (grn_ctx *context, grn_obj *table, grn_id expected, grn_id actual, const gchar *expression_context, const gchar *expression_table, const gchar *expression_expected, const gchar *expression_actual)
void grn_test_assert_nil_helper (grn_id id, const gchar *expression)
void grn_test_assert_not_nil_helper (grn_id id, const gchar *expression)
void grn_test_assert_context_helper (grn_ctx *context, const gchar *expression)
void grn_test_assert_error_helper (grn_rc expected_rc, const gchar *expected_message, grn_ctx *context, const gchar *expression)
void grn_test_assert_null_helper (grn_ctx *context, grn_obj *object, const gchar *expression)
void grn_test_assert_not_null_helper (grn_ctx *context, grn_obj *object, const gchar *expression)
void grn_test_assert_select_helper (grn_ctx *context, const GList *expected, grn_obj *select_result, const gchar *text_column_name, const gchar *expected_expression, const gchar *select_result_expression, const gchar *text_column_name_expression)
void grn_test_assert_expr_helper (grn_ctx *context, const gchar *inspected, grn_obj *expr, const gchar *inspected_expression, const gchar *expr_expression)
void grn_test_assert_equal_encoding_helper (grn_encoding expected, grn_encoding actual, const gchar *expression_expected, const gchar *expression_actual)
void grn_test_assert_equal_table_helper (grn_ctx *context, const GList *expected, grn_obj *table, const gchar *text_column_name, const gchar *expected_expression, const gchar *select_result_expression, const gchar *text_column_name_expression)
void grn_test_assert_send_command_error_helper (grn_ctx *context, grn_rc expected_rc, const gchar *expected_message, const gchar *command, const gchar *expected_rc_expression, const gchar *expected_message_expression, const gchar *command_expression)

Macro Definition Documentation

#define grn_test_assert (   expression,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
grn_test_assert_helper((expression), #expression), \
__VA_ARGS__), \
grn_test_assert(expression))

Definition at line 25 of file grn-assertions.h.

#define grn_test_assert_context (   context,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
__VA_ARGS__), \

Definition at line 85 of file grn-assertions.h.

#define grn_test_assert_equal_encoding (   expected,
  actual,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
grn_test_assert_equal_encoding_helper((expected), (actual), \
#expected, #actual), \
__VA_ARGS__), \
grn_test_assert_equal_encoding(expected, actual))

Definition at line 133 of file grn-assertions.h.

#define grn_test_assert_equal_id (   context,
  expected,
  actual,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
(expected), (actual), \
#context, \
#expected, #actual), \
__VA_ARGS__), \
grn_test_assert_equal_id(context, expected, actual))

Definition at line 40 of file grn-assertions.h.

#define grn_test_assert_equal_rc (   expected,
  actual,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
grn_test_assert_equal_rc_helper((expected), (actual), \
#expected, #actual), \
__VA_ARGS__), \
grn_test_assert_equal_rc(expected, actual))

Definition at line 32 of file grn-assertions.h.

#define grn_test_assert_equal_record_id (   context,
  table,
  expected,
  actual,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
(expected), (actual), \
#context, #table, \
#expected, #actual), \
__VA_ARGS__), \
grn_test_assert_equal_record_id(context, table, expected, actual))

Definition at line 60 of file grn-assertions.h.

#define grn_test_assert_equal_table (   context,
  expected,
  table,
  text_column_name,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
(table), (text_column_name), \
#expected, #table, \
#text_column_name), \
__VA_ARGS__), \

Definition at line 141 of file grn-assertions.h.

#define grn_test_assert_equal_type (   context,
  expected,
  actual,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
(expected), (actual), \
#context, \
#expected, #actual), \
__VA_ARGS__), \
grn_test_assert_equal_type(context, expected, actual))

Definition at line 50 of file grn-assertions.h.

#define grn_test_assert_error (   rc,
  message,
  context,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
__VA_ARGS__), \

Definition at line 92 of file grn-assertions.h.

#define grn_test_assert_expr (   context,
  inspected,
  expr,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
grn_test_assert_expr_helper((context), (inspected), (expr), \
#inspected, #expr), \
__VA_ARGS__), \
grn_test_assert_expr(context, inspected, expr))

Definition at line 125 of file grn-assertions.h.

#define grn_test_assert_nil (   expression,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
grn_test_assert_nil_helper((expression), #expression), \
__VA_ARGS__), \
grn_test_assert_nil(expression))

Definition at line 71 of file grn-assertions.h.

#define grn_test_assert_not_nil (   expression,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
grn_test_assert_not_nil_helper((expression), #expression), \
__VA_ARGS__), \

Definition at line 78 of file grn-assertions.h.

#define grn_test_assert_not_null (   context,
  object,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
grn_test_assert_not_null_helper((context), (object), #object), \
__VA_ARGS__), \

Definition at line 106 of file grn-assertions.h.

#define grn_test_assert_null (   context,
  object,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
grn_test_assert_null_helper((context), (object), #object), \
__VA_ARGS__), \

Definition at line 99 of file grn-assertions.h.

#define grn_test_assert_select (   context,
  expected,
  select_result,
  text_column_name,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
(select_result), \
(text_column_name), \
#expected, \
#select_result, #text_column_name), \
__VA_ARGS__), \
grn_test_assert_select(context, expected, select_result))

Definition at line 113 of file grn-assertions.h.

#define grn_test_assert_send_command_error (   context,
  expected_rc,
  expected_message,
  command,
  ... 
)
Value:
cut_trace_with_info_expression( \
cut_test_with_user_message( \
(expected_rc), \
(expected_message), \
(command), \
#expected_rc, \
#expected_message, \
#command), \
__VA_ARGS__), \
expected_rc, \
expected_message, \
command))

Definition at line 152 of file grn-assertions.h.

Function Documentation

void grn_test_assert_context_helper ( grn_ctx context,
const gchar *  expression 
)

Definition at line 205 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_equal_encoding_helper ( grn_encoding  expected,
grn_encoding  actual,
const gchar *  expression_expected,
const gchar *  expression_actual 
)

Definition at line 330 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_equal_id_helper ( grn_ctx context,
grn_id  expected,
grn_id  actual,
const gchar *  expression_context,
const gchar *  expression_expected,
const gchar *  expression_actual 
)

Definition at line 61 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_equal_rc_helper ( grn_rc  expected,
grn_rc  actual,
const gchar *  expression_expected,
const gchar *  expression_actual 
)

Definition at line 43 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_equal_record_id_helper ( grn_ctx context,
grn_obj table,
grn_id  expected,
grn_id  actual,
const gchar *  expression_context,
const gchar *  expression_table,
const gchar *  expression_expected,
const gchar *  expression_actual 
)

Definition at line 141 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_equal_table_helper ( grn_ctx context,
const GList *  expected,
grn_obj table,
const gchar *  text_column_name,
const gchar *  expected_expression,
const gchar *  select_result_expression,
const gchar *  text_column_name_expression 
)

Definition at line 349 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_equal_type_helper ( grn_ctx context,
unsigned char  expected,
unsigned char  actual,
const gchar *  expression_context,
const gchar *  expression_expected,
const gchar *  expression_actual 
)

Definition at line 103 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_error_helper ( grn_rc  expected_rc,
const gchar *  expected_message,
grn_ctx context,
const gchar *  expression 
)

Definition at line 226 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_expr_helper ( grn_ctx context,
const gchar *  inspected,
grn_obj expr,
const gchar *  inspected_expression,
const gchar *  expr_expression 
)

Definition at line 312 of file grn-assertions.c.

Here is the call graph for this function:

G_BEGIN_DECLS void grn_test_assert_helper ( grn_rc  rc,
const gchar *  expression 
)

Definition at line 30 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_nil_helper ( grn_id  id,
const gchar *  expression 
)

Definition at line 179 of file grn-assertions.c.

void grn_test_assert_not_nil_helper ( grn_id  id,
const gchar *  expression 
)

Definition at line 193 of file grn-assertions.c.

void grn_test_assert_not_null_helper ( grn_ctx context,
grn_obj object,
const gchar *  expression 
)

Definition at line 272 of file grn-assertions.c.

void grn_test_assert_null_helper ( grn_ctx context,
grn_obj object,
const gchar *  expression 
)

Definition at line 252 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_select_helper ( grn_ctx context,
const GList *  expected,
grn_obj select_result,
const gchar *  text_column_name,
const gchar *  expected_expression,
const gchar *  select_result_expression,
const gchar *  text_column_name_expression 
)

Definition at line 285 of file grn-assertions.c.

Here is the call graph for this function:

void grn_test_assert_send_command_error_helper ( grn_ctx context,
grn_rc  expected_rc,
const gchar *  expected_message,
const gchar *  command,
const gchar *  expected_rc_expression,
const gchar *  expected_message_expression,
const gchar *  command_expression 
)

Definition at line 364 of file grn-assertions.c.

Here is the call graph for this function: