ui: fixed autocompletion issues
* click in autocompletions list causes search * right arrow for autocompletion * changed query operator has from '>' to '.' and operator sub from '.' to '+' * fixed autocompletions to fit to query and * fixed spectral layouting endless looping on unconnected node
This commit is contained in:
@@ -109,7 +109,7 @@ public:
|
||||
void test_operator_sub()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedFilteredTestGraph("'class'.'base'"),
|
||||
printedFilteredTestGraph("'class''base'"),
|
||||
|
||||
"1 nodes: class:A\n"
|
||||
"0 edges:\n"
|
||||
@@ -119,7 +119,7 @@ public:
|
||||
void test_operator_has()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedFilteredTestGraph("\"A\">'field'"),
|
||||
printedFilteredTestGraph("\"A\".'field'"),
|
||||
|
||||
"1 nodes: field:A::count\n"
|
||||
"0 edges:\n"
|
||||
@@ -139,7 +139,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"
|
||||
);
|
||||
}
|
||||
@@ -189,11 +189,11 @@ public:
|
||||
void test_operator_has_query()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedQueryTree("\"A\">\"B\""),
|
||||
printedQueryTree("\"A\".\"B\""),
|
||||
|
||||
"\"A\" > \"B\"\n"
|
||||
"\"A\" . \"B\"\n"
|
||||
" \"A\"\n"
|
||||
">\n"
|
||||
".\n"
|
||||
" \"B\"\n"
|
||||
);
|
||||
}
|
||||
@@ -276,7 +276,7 @@ public:
|
||||
|
||||
"\"A\" ( \"B\" )\n"
|
||||
" \"A\"\n"
|
||||
". IMPLICIT\n"
|
||||
"+ IMPLICIT\n"
|
||||
" (\"B\")\n"
|
||||
);
|
||||
}
|
||||
@@ -284,12 +284,12 @@ public:
|
||||
void test_operator_precedence_not_before_has()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedQueryTree("!'struct'.!'const'"),
|
||||
printedQueryTree("!'struct'+!'const'"),
|
||||
|
||||
"! 'struct' . ! 'const'\n"
|
||||
"! 'struct' + ! 'const'\n"
|
||||
" !\n"
|
||||
" 'struct'\n"
|
||||
".\n"
|
||||
"+\n"
|
||||
" !\n"
|
||||
" 'const'\n"
|
||||
);
|
||||
@@ -298,13 +298,13 @@ public:
|
||||
void test_operator_precedence_has_before_sub()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedQueryTree("'namespace'>'class'.'base'"),
|
||||
printedQueryTree("'namespace'.'class'+'base'"),
|
||||
|
||||
"'namespace' > 'class' . 'base'\n"
|
||||
"'namespace' . 'class' + 'base'\n"
|
||||
" 'namespace'\n"
|
||||
" >\n"
|
||||
" .\n"
|
||||
" 'class'\n"
|
||||
".\n"
|
||||
"+\n"
|
||||
" 'base'\n"
|
||||
);
|
||||
}
|
||||
@@ -312,11 +312,11 @@ public:
|
||||
void test_operator_precedence_has_before_or()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedQueryTree("'class'>'method'|'field'"),
|
||||
printedQueryTree("'class'.'method'|'field'"),
|
||||
|
||||
"'class' > 'method' | 'field'\n"
|
||||
"'class' . 'method' | 'field'\n"
|
||||
" 'class'\n"
|
||||
" >\n"
|
||||
" .\n"
|
||||
" 'method'\n"
|
||||
"|\n"
|
||||
" 'field'\n"
|
||||
@@ -326,22 +326,22 @@ public:
|
||||
void test_operator_precedence_respects_groups()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedQueryTree("'namespace'.('class'>'method')"),
|
||||
printedQueryTree("'namespace'+('class'.'method')"),
|
||||
|
||||
"'namespace' . ( 'class' > 'method' )\n"
|
||||
"'namespace' + ( 'class' . 'method' )\n"
|
||||
" 'namespace'\n"
|
||||
".\n"
|
||||
"+\n"
|
||||
" 'class'\n"
|
||||
" (>)\n"
|
||||
" (.)\n"
|
||||
" 'method'\n"
|
||||
);
|
||||
|
||||
TS_ASSERT_EQUALS(
|
||||
printedQueryTree("'class'>('method'|'field')"),
|
||||
printedQueryTree("'class'.('method'|'field')"),
|
||||
|
||||
"'class' > ( 'method' | 'field' )\n"
|
||||
"'class' . ( 'method' | 'field' )\n"
|
||||
" 'class'\n"
|
||||
">\n"
|
||||
".\n"
|
||||
" 'method'\n"
|
||||
" (|)\n"
|
||||
" 'field'\n"
|
||||
@@ -351,15 +351,15 @@ public:
|
||||
void test_spaces_get_stripped_out_of_query()
|
||||
{
|
||||
TS_ASSERT_EQUALS(
|
||||
printedQueryTree(" \"Field \">('method' | 'field') .'const' | 'public' "),
|
||||
printedQueryTree(" \"Field \".('method' | 'field') +'const' | 'public' "),
|
||||
|
||||
"\"Field\" > ( 'method' | 'field' ) . 'const' | 'public'\n"
|
||||
"\"Field\" . ( 'method' | 'field' ) + 'const' | 'public'\n"
|
||||
" \"Field\"\n"
|
||||
" >\n"
|
||||
" .\n"
|
||||
" 'method'\n"
|
||||
" (|)\n"
|
||||
" 'field'\n"
|
||||
" .\n"
|
||||
" +\n"
|
||||
" 'const'\n"
|
||||
"|\n"
|
||||
" 'public'\n"
|
||||
|
||||
@@ -212,6 +212,13 @@ public:
|
||||
TS_ASSERT(!utility::isPrefix(bar, foo));
|
||||
}
|
||||
|
||||
void test_to_lower_case()
|
||||
{
|
||||
TS_ASSERT_EQUALS("foobar", utility::toLowerCase("FooBar"));
|
||||
TS_ASSERT_EQUALS("foobar", utility::toLowerCase("FOOBAR"));
|
||||
TS_ASSERT_EQUALS("foobar", utility::toLowerCase("foobar"));
|
||||
}
|
||||
|
||||
void test_equals_case_insensitive_with_different_cases()
|
||||
{
|
||||
const std::string foo = "FooBar";
|
||||
|
||||
Reference in New Issue
Block a user