lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] [1/7] git commit: refs/heads/ivars-wip1 - Fixup Lucy Test classes IVARS glitches.
Date Sun, 14 Jul 2013 00:14:47 GMT
Updated Branches:
  refs/heads/ivars-wip1 1e3d2bcce -> 38ad55831


Fixup Lucy Test classes IVARS glitches.

(Will be folded into earlier commit before merging to master.)


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/29660972
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/29660972
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/29660972

Branch: refs/heads/ivars-wip1
Commit: 296609723f680be019858cc0abaade014090363a
Parents: e733e2a
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Fri Jul 12 19:32:08 2013 -0700
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Sat Jul 13 15:17:27 2013 -0700

----------------------------------------------------------------------
 core/Lucy/Test/Search/TestQueryParserLogic.c | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/29660972/core/Lucy/Test/Search/TestQueryParserLogic.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Search/TestQueryParserLogic.c b/core/Lucy/Test/Search/TestQueryParserLogic.c
index a467c59..5bc51e9 100644
--- a/core/Lucy/Test/Search/TestQueryParserLogic.c
+++ b/core/Lucy/Test/Search/TestQueryParserLogic.c
@@ -899,7 +899,8 @@ TestQPLogic_run(TestQueryParserLogic *self, TestBatchRunner *runner) {
     // Run logical tests with default boolop of OR.
     for (i = 0; logical_test_funcs[i] != NULL; i++) {
         Lucy_TestQPLogic_Logical_Test_t test_func = logical_test_funcs[i];
-        TestQueryParserIVARS *test_case = TestQP_IVARS(test_func(BOOLOP_OR));
+        TestQueryParser *test_case_obj = test_func(BOOLOP_OR);
+        TestQueryParserIVARS *test_case = TestQP_IVARS(test_case_obj);
         Query *tree     = QParser_Tree(or_parser, test_case->query_string);
         Query *parsed   = QParser_Parse(or_parser, test_case->query_string);
         Hits  *hits     = IxSearcher_Hits(searcher, (Obj*)parsed, 0, 10, NULL);
@@ -911,13 +912,14 @@ TestQPLogic_run(TestQueryParserLogic *self, TestBatchRunner *runner)
{
         DECREF(hits);
         DECREF(parsed);
         DECREF(tree);
-        DECREF(test_case);
+        DECREF(test_case_obj);
     }
 
     // Run logical tests with default boolop of AND.
     for (i = 0; logical_test_funcs[i] != NULL; i++) {
         Lucy_TestQPLogic_Logical_Test_t test_func = logical_test_funcs[i];
-        TestQueryParserIVARS *test_case = TestQP_IVARS(test_func(BOOLOP_AND));
+        TestQueryParser *test_case_obj = test_func(BOOLOP_AND);
+        TestQueryParserIVARS *test_case = TestQP_IVARS(test_case_obj);
         Query *tree     = QParser_Tree(and_parser, test_case->query_string);
         Query *parsed   = QParser_Parse(and_parser, test_case->query_string);
         Hits  *hits     = IxSearcher_Hits(searcher, (Obj*)parsed, 0, 10, NULL);
@@ -929,13 +931,14 @@ TestQPLogic_run(TestQueryParserLogic *self, TestBatchRunner *runner)
{
         DECREF(hits);
         DECREF(parsed);
         DECREF(tree);
-        DECREF(test_case);
+        DECREF(test_case_obj);
     }
 
     // Run tests for QParser_Prune().
     for (i = 0; prune_test_funcs[i] != NULL; i++) {
         Lucy_TestQPLogic_Prune_Test_t test_func = prune_test_funcs[i];
-        TestQueryParserIVARS *test_case = TestQP_IVARS(test_func());
+        TestQueryParser *test_case_obj = test_func();
+        TestQueryParserIVARS *test_case = TestQP_IVARS(test_case_obj);
         CharBuf *qstring = test_case->tree
                            ? Query_To_String(test_case->tree)
                            : CB_new_from_trusted_utf8("(NULL)", 6);
@@ -956,7 +959,7 @@ TestQPLogic_run(TestQueryParserLogic *self, TestBatchRunner *runner) {
         DECREF(expanded);
         DECREF(pruned);
         DECREF(qstring);
-        DECREF(test_case);
+        DECREF(test_case_obj);
     }
 
     DECREF(and_parser);


Mime
View raw message