summaryrefslogtreecommitdiff
path: root/tests/scan.py
Commit message (Collapse)AuthorAgeFilesLines
* scan: support deprecated struct membersJason Crain2020-01-261-0/+17
| | | | | | | | | | | | | | | | | | gcc allows deprecating members of structs. For example: struct data { int x G_GNUC_DEPRECATED_FOR(replacement); }; However, this currently causes the entire struct to be marked as deprecated and confuses mkdb because it doesn't understand the G_GNUC_DEPRECATED_FOR symbol. Fix this by having the whole struct only be marked as deprecated if the '_DEPRECATED' is after the closing bracket of the struct, similar to how it already does for enums, and having scan automatically remove all G_GNUC_* decorators from struct members, similar to how it already does for functions.
* scan: extract function to init the scanner from optionsStefan Sauer2019-07-251-0/+5
| | | | This way we don't do this for each file.
* mkdb: fix skipping of inline function bodiesStefan Sauer2019-07-241-5/+85
| | | | | Add a bunch of tests for this. Fixes #90
* Add scanner unit tests for deprecation decoratorsXavier Claessens2019-07-171-0/+67
|
* scan: enable the new exceptionStefan Sauer2019-07-131-8/+6
| | | | | Fixed one test and removed the other one as is was non-sense one. Add code to handle the exception one level up.
* tests/scan: add another test for internal inline functionsStefan Sauer2019-07-111-3/+12
| | | | Add more variants to debugs #90.
* scan: reorder std checksNicola Fontana2019-03-261-0/+18
| | | | | Match _IS_%s_CLASS before _%s_CLASS. Fix #77.
* scan:reorder imports in testStefan Sauer2019-02-151-1/+2
|
* scan: fix test class nameStefan Sauer2019-02-021-1/+1
| | | | Only use ..TestCase for baseclasses.
* scan: add a test for title extractionStefan Sauer2019-02-021-0/+9
|
* scan: add more tests for the subsection logicStefan Sauer2019-02-021-1/+72
| | | | Add tests verifying handling of gobject related symbols.
* scan: use a header var in the macro testsStefan Sauer2019-02-021-12/+9
| | | | This is how we do this in the other tests too.
* scan: refactor subsection ordering to make the code testable.Stefan Sauer2019-02-021-0/+7
|
* Add tests for function pointer vars.Stefan Sauer2019-02-021-0/+6
|
* Add another test for typedef enum variantsStefan Sauer2019-02-021-1/+6
|
* tests: add scan test or typedefsStefan Sauer2019-02-011-0/+30
|
* tests: add more scan tests for structs and unionsStefan Sauer2019-01-311-0/+30
|
* scan: uinify code path around inline functions.Stefan Sauer2019-01-271-0/+11
| | | | Add a helper and remove a special matcher.
* scan: fix handling of deprecated sectionsStefan Sauer2019-01-271-0/+35
| | | | | | | When adding a comment on the end of a deprecated section, we might start a new one. Fixes #72.
* scan: add tests for internal functionsStefan Sauer2018-12-191-2/+19
|
* scan: move 3 tests for inline functions to unit testsStefan Sauer2018-12-181-0/+29
|
* scan: add more tests for function pointer typedefsStefan Sauer2018-12-131-1/+34
| | | | Fix handling of struct * return values and trim whitespace.
* tests: fix deprecation warning and make text executableStefan Sauer2018-12-121-0/+0
|
* scan: add more generic testsStefan Sauer2018-12-121-1/+18
| | | | Fix return value for the branch that detects internal headers.
* scan: add more coverage for functionsStefan Sauer2018-12-111-3/+10
| | | | Normalize more whitespace output.
* scan: add tests for internal struct/union.Stefan Sauer2018-12-091-0/+10
|
* scan: add parametrized tests for function pointersStefan Sauer2018-12-091-1/+19
| | | | Support more variants in function pointer return types.
* scan: add tests for function pointersStefan Sauer2018-12-071-9/+15
|
* scan: make more variables workStefan Sauer2018-12-061-4/+3
|
* scan: add more type coverageStefan Sauer2018-12-031-8/+32
| | | | Add more tests for functions and variables.
* scan: move more tests to unit testsStefan Sauer2018-12-011-0/+2
|
* scan: use parameterized for type testsStefan Sauer2018-12-011-11/+58
| | | | Create a list of type names and test them in combination with modifiers.
* tests: move more function tests to the unit testsStefan Sauer2018-11-301-5/+18
|
* scan: fix more whitespace issuesStefan Sauer2018-11-301-4/+3
|
* scan: add some tests for functionsStefan Sauer2018-11-301-28/+56
| | | | Fix some whitespace issue in scan and also unify assertion helpers.
* scan: move more enum/struct tests to unit testsStefan Sauer2018-11-271-0/+20
| | | | Also remove some cases that are alreaady covered.
* scan: move variable declaration tests into the unit testStefan Sauer2018-11-271-2/+32
|
* scan: move test from the regression suite to the unit testsStefan Sauer2018-11-271-0/+16
|
* scan: add tests for unions and fix detecting top-level unionsStefan Sauer2018-11-261-0/+36
|
* scan: add tests for enumStefan Sauer2018-11-261-1/+38
|
* scan: add tests for structsStefan Sauer2018-11-261-2/+45
| | | | Use textwrap module to handle indentation of testdata.
* tests: use multiline strings for inputs to preserve newlinesStefan Sauer2018-11-201-14/+13
| | | | This gets us closer to the real inputs.
* scan: fix types in test class nameStefan Sauer2018-11-201-4/+4
|
* scan: refactor testsuite to prepare for more testsStefan Sauer2018-11-201-11/+57
| | | | | Extract a base-class so that we can have test classes for each decl-type. Remove 'tests' from the 'bugs' suite that we now cover in the unit-tests.
* scan: actually add the test file :/Stefan Sauer2018-11-191-0/+76