ui: fixed issues in smart search box
* spaces can be entered again * fixed completer disappearing when going through the list * changed query operators to sub: > and has: . and changed
This commit is contained in:
@@ -108,7 +108,7 @@ public:
|
||||
void test_operator_sub()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedFilteredTestGraph("'class'.'base'"),
|
||||
printedFilteredTestGraph("'class'>'base'"),
|
||||
|
||||
"1 nodes: class:A\n"
|
||||
"0 edges:\n"
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
void test_operator_has()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedFilteredTestGraph("\"A\">'field'"),
|
||||
printedFilteredTestGraph("\"A\".'field'"),
|
||||
|
||||
"1 nodes: field:A::count\n"
|
||||
"0 edges:\n"
|
||||
@@ -138,7 +138,7 @@ public:
|
||||
void test_operator_group()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedFilteredTestGraph("('static'|'const').'public'"),
|
||||
printedFilteredTestGraph("('static'|'const')>'public'"),
|
||||
|
||||
"1 nodes: method:A::getCount\n"
|
||||
"0 edges:\n"
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
|
||||
"A \" INVALID\n"
|
||||
" \"A\"\n"
|
||||
". IMPLICIT\n"
|
||||
"> IMPLICIT\n"
|
||||
" \"\"\n"
|
||||
);
|
||||
}
|
||||
@@ -276,36 +276,36 @@ public:
|
||||
|
||||
"\"A\" ( \"B\" )\n"
|
||||
" \"A\"\n"
|
||||
". IMPLICIT\n"
|
||||
"> IMPLICIT\n"
|
||||
" (\"B\")\n"
|
||||
);
|
||||
}
|
||||
|
||||
void test_operator_precedence_not_before_sub()
|
||||
void test_operator_precedence_not_before_has()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedQueryTree("!'method'.!'const'"),
|
||||
printedQueryTree("!'struct'.!'const'"),
|
||||
|
||||
"! 'method' . ! 'const'\n"
|
||||
"! 'struct' . ! 'const'\n"
|
||||
" !\n"
|
||||
" 'method'\n"
|
||||
" 'struct'\n"
|
||||
".\n"
|
||||
" !\n"
|
||||
" 'const'\n"
|
||||
);
|
||||
}
|
||||
|
||||
void test_operator_precedence_sub_before_has()
|
||||
void test_operator_precedence_has_before_sub()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedQueryTree("'namespace'.'class'>'method'"),
|
||||
printedQueryTree("'namespace'.'class'>'base'"),
|
||||
|
||||
"'namespace' . 'class' > 'method'\n"
|
||||
"'namespace' . 'class' > 'base'\n"
|
||||
" 'namespace'\n"
|
||||
" .\n"
|
||||
" 'class'\n"
|
||||
">\n"
|
||||
" 'method'\n"
|
||||
" 'base'\n"
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user