|
Log Surgeon
Test & API docs
|
Unit tests for Query construction and interpretation. More...
Functions | |
| void | empty_query () |
| Creates and tests an empty Query. | |
| void | greedy_wildcard_query () |
| Creates and tests a greedy wildcard Query. | |
| void | repeated_greedy_wildcard_query () |
| Creates and tests a query with repeated greedy wildcards. | |
| void | mixed_wildcard_query () |
| Creates and tests a query with a non-greedy wildcard followed by a greedy wildcard. | |
| void | repeated_non_greedy_wildcard_query () |
| Creates and tests a query with a long non-greedy wildcard sequence. | |
| void | escaped_star_query () |
| Creates and tests a query with an escaped '*' character. | |
| void | escaped_question_mark_query () |
| Creates and tests a query with an escaped '?' character. | |
| void | int_query () |
| Creates and tests a numeric-only query. | |
| void | non_wildcard_multi_variable_query () |
| Creates and tests a query with multiple variable types. | |
| void | wildcard_multi_variable_query () |
| Creates and tests a query with multiple variable types. | |
Unit tests for Query construction and interpretation.
These unit tests contain the Query tag.
| void empty_query | ( | ) |
Creates and tests an empty Query.
| void escaped_question_mark_query | ( | ) |
Creates and tests a query with an escaped '?' character.
| void escaped_star_query | ( | ) |
Creates and tests a query with an escaped '*' character.
| void greedy_wildcard_query | ( | ) |
Creates and tests a greedy wildcard Query.
| void int_query | ( | ) |
Creates and tests a numeric-only query.
NOTE: This has a static-text case as strings "1", "2", and "3" in isolation aren't surrounded by delimiters. These tokens then build up the interpretation "123". Although additional interpretations don't impact correctness, they may impact performance. We can optimize these out, but it'll make the code messy. Instead, we should eventually remove the explicit tracking of static-tokens, in favor of only tracking variable tokens.
| void mixed_wildcard_query | ( | ) |
Creates and tests a query with a non-greedy wildcard followed by a greedy wildcard.
| void non_wildcard_multi_variable_query | ( | ) |
Creates and tests a query with multiple variable types.
This test ensures that each non-wildcard token is assigned to the highest priority variable.
NOTE: Similar to the above int_query test there are unneeded interpretations due to aggresively generating static-text tokens.
| void repeated_greedy_wildcard_query | ( | ) |
Creates and tests a query with repeated greedy wildcards.
| void repeated_non_greedy_wildcard_query | ( | ) |
Creates and tests a query with a long non-greedy wildcard sequence.
| void wildcard_multi_variable_query | ( | ) |
Creates and tests a query with multiple variable types.
This test ensures that each greedy wildcard token is identified as all correct token types.
NOTE: Similar to the above int_query test there are unneeded interpretations due to aggresively generating static-text tokens. This same issue causes interpretations with redundant wildcards.