本文整理汇总了C++中TestQP_new函数的典型用法代码示例。如果您正苦于以下问题:C++ TestQP_new函数的具体用法?C++ TestQP_new怎么用?C++ TestQP_new使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了TestQP_new函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: logical_test_simple_term
static TestQueryParser*
logical_test_simple_term(u32_t boolop)
{
Query *tree = make_leaf_query(NULL, "b");
UNUSED_VAR(boolop);
return TestQP_new("b", tree, NULL, 3);
}
示例2: logical_test_one_nested_term
static TestQueryParser*
logical_test_one_nested_term(u32_t boolop)
{
Query *leaf = make_leaf_query(NULL, "a");
Query *tree = make_poly_query(boolop, leaf, NULL);
return TestQP_new("(a)", tree, NULL, 4);
}
示例3: logical_test_nested_empty_phrase
static TestQueryParser*
logical_test_nested_empty_phrase(u32_t boolop)
{
Query *leaf = make_leaf_query(NULL, "\"\"");
Query *tree = make_poly_query(boolop, leaf, NULL);
return TestQP_new("(\"\")", tree, NULL, 0);
}
示例4: prune_test_nomatch
static TestQueryParser*
prune_test_nomatch()
{
Query *tree = (Query*)NoMatchQuery_new();
Query *pruned = (Query*)NoMatchQuery_new();
return TestQP_new(NULL, tree, pruned, 0);
}
示例5: logical_test_nested_empty_parens
static TestQueryParser*
logical_test_nested_empty_parens(u32_t boolop)
{
Query *inner = make_poly_query(boolop, NULL);
Query *tree = make_poly_query(boolop, inner, NULL);
return TestQP_new("(())", tree, NULL, 0);
}
示例6: logical_test_one_term_phrase
static TestQueryParser*
logical_test_one_term_phrase(u32_t boolop)
{
Query *tree = make_leaf_query(NULL, "\"a\"");
UNUSED_VAR(boolop);
return TestQP_new("\"a\"", tree, NULL, 4);
}
示例7: syntax_test_padded_minus
static TestQueryParser*
syntax_test_padded_minus() {
Query *minus = make_leaf_query(NULL, "-");
Query *a = make_leaf_query(NULL, "a");
Query *tree = make_poly_query(BOOLOP_OR, minus, a, NULL);
return TestQP_new("- a", tree, NULL, 4);
}
示例8: syntax_test_minus_minus
static TestQueryParser*
syntax_test_minus_minus()
{
// Not a perfect result, but then it's not a good query string.
Query *tree = make_leaf_query(NULL, "a");
return TestQP_new("--a", tree, NULL, 4);
}
示例9: logical_test_pure_negation
static TestQueryParser*
logical_test_pure_negation(uint32_t boolop) {
Query *leaf = make_leaf_query(NULL, "x");
Query *tree = make_not_query(leaf);
UNUSED_VAR(boolop);
return TestQP_new("-x", tree, NULL, 0);
}
示例10: logical_test_double_negative
static TestQueryParser*
logical_test_double_negative(u32_t boolop)
{
Query *tree = make_leaf_query(NULL, "a");
UNUSED_VAR(boolop);
return TestQP_new("--a", tree, NULL, 4);
}
示例11: leaf_test_unrecognized_field
static TestQueryParser*
leaf_test_unrecognized_field()
{
Query *tree = make_leaf_query("bogusfield", "b");
Query *expanded = make_term_query("bogusfield", "b");
return TestQP_new("bogusfield:b", tree, expanded, 0);
}
示例12: logical_test_triple_negative
static TestQueryParser*
logical_test_triple_negative(uint32_t boolop) {
Query *leaf = make_leaf_query(NULL, "a");
Query *tree = make_not_query(leaf);
UNUSED_VAR(boolop);
return TestQP_new("---a", tree, NULL, 0);
}
示例13: leaf_test_field
static TestQueryParser*
leaf_test_field()
{
Query *tree = make_leaf_query("plain", "b");
Query *expanded = make_term_query("plain", "b");
return TestQP_new("plain:b", tree, expanded, 3);
}
示例14: syntax_test_unclosed_parens
static TestQueryParser*
syntax_test_unclosed_parens() {
// Not a perfect result, but then it's not a good query string.
Query *inner = make_poly_query(BOOLOP_OR, NULL);
Query *tree = make_poly_query(BOOLOP_OR, inner, NULL);
return TestQP_new("((", tree, NULL, 0);
}
示例15: syntax_test_minus_plus
static TestQueryParser*
syntax_test_minus_plus()
{
Query *leaf = make_leaf_query(NULL, "a");
Query *tree = make_not_query(leaf);
return TestQP_new("-+a", tree, NULL, 0);
}