Added test cases for 'as' prefix

This commit is contained in:
Napalys
2024-11-29 15:23:06 +01:00
parent 029b567bb7
commit e33f7aa1c7
2 changed files with 10 additions and 0 deletions

View File

@@ -1,2 +1,3 @@
| test.qll:4:11:4:18 | ClasslessPredicate getValue | This predicate starts with 'get' but does not return a value. |
| test.qll:25:11:25:28 | ClasslessPredicate getImplementation2 | This predicate starts with 'get' but does not return a value. |
| test.qll:31:11:31:17 | ClasslessPredicate asValue | This predicate starts with 'get' but does not return a value. |

View File

@@ -26,3 +26,12 @@ predicate getImplementation2() { none() }
// OK -- is an alias
predicate getAlias2 = getImplementation2/0;
// NOT OK -- starts with as and does not return value
predicate asValue() { none() }
// OK -- starts with as but followed by a lowercase letter, probably should be ignored
predicate assessment() { none() }
// OK -- starts with as and returns a value
string asString() { result = "string" }