lucy-commits mailing list archives

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


Fixup more 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/2de870ad
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/2de870ad
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/2de870ad

Branch: refs/heads/ivars-wip1
Commit: 2de870adead87d2fd87f279321bc9a87771d9f50
Parents: 38ad558
Author: Nick Wellnhofer <wellnhofer@aevum.de>
Authored: Sun Jul 14 14:10:00 2013 +0200
Committer: Nick Wellnhofer <wellnhofer@aevum.de>
Committed: Sun Jul 14 14:10:00 2013 +0200

----------------------------------------------------------------------
 core/Lucy/Test/Search/TestQueryParserSyntax.c | 36 ++++++++++++----------
 1 file changed, 19 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/2de870ad/core/Lucy/Test/Search/TestQueryParserSyntax.c
----------------------------------------------------------------------
diff --git a/core/Lucy/Test/Search/TestQueryParserSyntax.c b/core/Lucy/Test/Search/TestQueryParserSyntax.c
index ccfe5cd..47dff21 100644
--- a/core/Lucy/Test/Search/TestQueryParserSyntax.c
+++ b/core/Lucy/Test/Search/TestQueryParserSyntax.c
@@ -397,18 +397,19 @@ test_query_parser_syntax(TestBatchRunner *runner) {
 
     for (uint32_t i = 0; leaf_test_funcs[i] != NULL; i++) {
         Lucy_TestQPSyntax_Test_t test_func = leaf_test_funcs[i];
-        TestQueryParserIVARS *test_case = TestQP_IVARS(test_func());
-        Query *tree     = QParser_Tree(qparser, test_case->query_string);
-        Query *expanded = QParser_Expand_Leaf(qparser, test_case->tree);
-        Query *parsed   = QParser_Parse(qparser, test_case->query_string);
+        TestQueryParser *test_case = test_func();
+        TestQueryParserIVARS *ivars = TestQP_IVARS(test_case);
+        Query *tree     = QParser_Tree(qparser, ivars->query_string);
+        Query *expanded = QParser_Expand_Leaf(qparser, ivars->tree);
+        Query *parsed   = QParser_Parse(qparser, ivars->query_string);
         Hits  *hits     = IxSearcher_Hits(searcher, (Obj*)parsed, 0, 10, NULL);
 
-        TEST_TRUE(runner, Query_Equals(tree, (Obj*)test_case->tree),
-                  "tree()    %s", (char*)CB_Get_Ptr8(test_case->query_string));
-        TEST_TRUE(runner, Query_Equals(expanded, (Obj*)test_case->expanded),
-                  "expand_leaf()    %s", (char*)CB_Get_Ptr8(test_case->query_string));
-        TEST_INT_EQ(runner, Hits_Total_Hits(hits), test_case->num_hits,
-                    "hits:    %s", (char*)CB_Get_Ptr8(test_case->query_string));
+        TEST_TRUE(runner, Query_Equals(tree, (Obj*)ivars->tree),
+                  "tree()    %s", (char*)CB_Get_Ptr8(ivars->query_string));
+        TEST_TRUE(runner, Query_Equals(expanded, (Obj*)ivars->expanded),
+                  "expand_leaf()    %s", (char*)CB_Get_Ptr8(ivars->query_string));
+        TEST_INT_EQ(runner, Hits_Total_Hits(hits), ivars->num_hits,
+                    "hits:    %s", (char*)CB_Get_Ptr8(ivars->query_string));
         DECREF(hits);
         DECREF(parsed);
         DECREF(expanded);
@@ -418,15 +419,16 @@ test_query_parser_syntax(TestBatchRunner *runner) {
 
     for (uint32_t i = 0; syntax_test_funcs[i] != NULL; i++) {
         Lucy_TestQPSyntax_Test_t test_func = syntax_test_funcs[i];
-        TestQueryParserIVARS *test_case = TestQP_IVARS(test_func());
-        Query *tree   = QParser_Tree(qparser, test_case->query_string);
-        Query *parsed = QParser_Parse(qparser, test_case->query_string);
+        TestQueryParser *test_case = test_func();
+        TestQueryParserIVARS *ivars = TestQP_IVARS(test_case);
+        Query *tree   = QParser_Tree(qparser, ivars->query_string);
+        Query *parsed = QParser_Parse(qparser, ivars->query_string);
         Hits  *hits   = IxSearcher_Hits(searcher, (Obj*)parsed, 0, 10, NULL);
 
-        TEST_TRUE(runner, Query_Equals(tree, (Obj*)test_case->tree),
-                  "tree()    %s", (char*)CB_Get_Ptr8(test_case->query_string));
-        TEST_INT_EQ(runner, Hits_Total_Hits(hits), test_case->num_hits,
-                    "hits:    %s", (char*)CB_Get_Ptr8(test_case->query_string));
+        TEST_TRUE(runner, Query_Equals(tree, (Obj*)ivars->tree),
+                  "tree()    %s", (char*)CB_Get_Ptr8(ivars->query_string));
+        TEST_INT_EQ(runner, Hits_Total_Hits(hits), ivars->num_hits,
+                    "hits:    %s", (char*)CB_Get_Ptr8(ivars->query_string));
         DECREF(hits);
         DECREF(parsed);
         DECREF(tree);


Mime
View raw message