[Groonga-commit] groonga/groonga [master] test: use gcut_data

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Feb 5 17:53:42 JST 2013


Kouhei Sutou	2013-02-05 17:53:42 +0900 (Tue, 05 Feb 2013)

  New Revision: fde517d2e2694c266a83794d7ec2d1174766bd4f
  https://github.com/groonga/groonga/commit/fde517d2e2694c266a83794d7ec2d1174766bd4f

  Log:
    test: use gcut_data

  Modified files:
    test/unit/core/test-table-cursor.c

  Modified: test/unit/core/test-table-cursor.c (+5 -3)
===================================================================
--- test/unit/core/test-table-cursor.c    2013-02-05 17:16:32 +0900 (bbb500f)
+++ test/unit/core/test-table-cursor.c    2013-02-05 17:53:42 +0900 (057674e)
@@ -88,8 +88,10 @@ cut_teardown(void)
 void
 data_table(void)
 {
-#define ADD_DATA(label, flags)                                          \
-  cut_add_data(label, GINT_TO_POINTER(flags), NULL, NULL)
+#define ADD_DATA(label, flags)                  \
+  gcut_add_datum(label,                         \
+                 "flags", G_TYPE_INT, flags,    \
+                 NULL)
 
   ADD_DATA("no-key", GRN_OBJ_TABLE_NO_KEY);
   ADD_DATA("hash", GRN_OBJ_TABLE_HASH_KEY);
@@ -102,7 +104,7 @@ void
 test_table(gpointer data)
 {
   grn_obj *table;
-  grn_obj_flags flags = GPOINTER_TO_INT(data);
+  grn_obj_flags flags = gcut_data_get_int(data, "flags");
   grn_table_cursor *cursor;
 
   table = grn_table_create(context, NULL, 0, NULL,
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index