[groonga-dev,00170] Re: [PATCH] opstrsがgrn_operatorと不一致

Back to archive index

morit****@razil***** morit****@razil*****
2009年 8月 27日 (木) 13:51:38 JST


こんにちは。森です。

パッチありがとうございます!!
さっそく取り込ませていただきました。

>>> Yuto Hayamizu さんは書きました:
> 
> こんにちは。はやみずです。
> 
> grn_operators の各要素の名前を文字列の配列にした opstrs が、
> grn_operators の更新に対応していなかったので修正しました。
> また、httpのテストケースで使われていない変数を削除しました。
> 
> github で pull request をしてあります。よろしくおねがいします。
> 
> 
> diff --git a/lib/db.c b/lib/db.c
> index 10e56c6..b91fa2c 100644
> --- a/lib/db.c
> +++ b/lib/db.c
> @@ -5097,11 +5097,12 @@ static char *opstrs[] = {
>    "AND_ASSIGN",
>    "XOR_ASSIGN",
>    "OR_ASSIGN",
> -  "QUESTION",
> -  "COLON",
> +  "TERNARY",
> +  "COMMA",
>    "BITWISE_OR",
>    "BITWISE_XOR",
>    "BITWISE_AND",
> +  "BITWISE_NOT",
>    "EQUAL",
>    "NOT_EQUAL",
>    "LESS",
> @@ -5125,6 +5126,8 @@ static char *opstrs[] = {
>    "DELETE",
>    "INCR",
>    "DECR",
> +  "INCR_POST",
> +  "DECR_POST",
>    "NOT",
>    "ADJUST",
>    "EXACT",
> diff --git a/test/unit/http/Makefile.am b/test/unit/http/Makefile.am
> index e0aafa8..37690f3 100644
> --- a/test/unit/http/Makefile.am
> +++ b/test/unit/http/Makefile.am
> @@ -1,6 +1,7 @@
>  if WITH_SOUPCUTTER
>  noinst_LTLIBRARIES =				\
> -	test-http.la
> +	test-http.la				\
> +	test-blog.la
>  endif
>  
>  INCLUDES =			\
> @@ -21,4 +22,5 @@ LIBS =								\
>  	$(top_builddir)/test/unit/lib/libgrn-test-hash-utils.la
>  
>  test_http_la_SOURCES			= test-http.c
> +test_blog_la_SOURCES			= test-blog.c
>  
> diff --git a/test/unit/http/test-http.c b/test/unit/http/test-http.c
> index 6ff7f68..491800f 100644
> --- a/test/unit/http/test-http.c
> +++ b/test/unit/http/test-http.c
> @@ -28,12 +28,8 @@ static gchar *tmp_directory;
>  
>  static GCutEgg *egg;
>  
> -static SoupSession *session;
> -
>  static SoupCutClient *client;
>  
> -static SoupMessage *message;
> -
>  static grn_ctx context;
>  static grn_obj *database;
>  
> @@ -49,8 +45,6 @@ cut_setup(void)
>      cut_assert_errno();
>    }
>  
> -  session = NULL;
> -  message = NULL;
>    client = soupcut_client_new();
>    soupcut_client_set_base(client, cut_take_printf("http://localhost:%u/",
>                                                    GROONGA_TEST_PORT));
> @@ -69,8 +63,6 @@ cut_setup(void)
>    gcut_egg_hatch(egg, &error);
>    gcut_assert_error(error);
>  
> -  session = soup_session_sync_new();
> -
>    g_usleep(G_USEC_PER_SEC);
>  
>    database = grn_db_open(&context, db_path);
> @@ -83,14 +75,6 @@ cut_teardown(void)
>      g_object_unref(egg);
>    }
>  
> -  if (message) {
> -    g_object_unref(message);
> -  }
> -
> -  if (session) {
> -    g_object_unref(session);
> -  }
> -
>    if (client) {
>      g_object_unref(client);
>    }
> @@ -119,6 +103,7 @@ test_get_status(void)
>  {
>    soupcut_client_get(client, "/status", NULL);
>    
> +  soupcut_client_assert_response(client);
>    soupcut_client_assert_equal_content_type("text/javascript", client);
>    soupcut_client_assert_match_body("{\"starttime\":\\d+,\"uptime\":\\d+}",
>                                     client);
> 
> _______________________________________________
> groonga-dev mailing list
> groon****@lists*****
> http://lists.sourceforge.jp/mailman/listinfo/groonga-dev
> 
--
morita




groonga-dev メーリングリストの案内
Back to archive index