SetFlagsRule Annotations Update
Update AnnotationsRetriever
* Output is effectively Map<String, Boolean> which is clearer to test
* Retriever will assert if the annotations on a method conflict
* Retriever will assert if the annotations on a class conflict
* Retriever will assert if the annotations on a method conflict with the class
* Retriever no longer ignores enabled requirements of the class when the method defines enabled requirements, while leaving class disabled requirements in place; and vice versa
note: at the time of authoring, there are no examples outside of AnnotationsRetrieverTest where these annotations are defined on both the class and method for the same test.
Update SetFlagsRule
* Will now set flags based on @EnableFlags / @DisableFlags annotations
* Supports FlagParameterization, including skipping test parameterizations that are inconsistent with @EnableFlags / @DisableFlags annotations
* Fails if any inconsistencies are detected among FlagsParameterization / @RequiresFlagsEnabled / @RequiresFlagsDisabled / @EnableFlags / @DisableFlags
* Throws FlagSetException when calling enableFlags or disableFlags on any flag that is set by annotation or parameterization, or required by annotation.
Update CheckFlagsRule
* Fails if any inconsistencies are detected among @RequiresFlagsEnabled / @RequiresFlagsDisabled / @EnableFlags / @DisableFlags
Fixes: 309625167
Fixes: 309522666
Test: atest AnnotationsRetrieverTest
Flag: NA
Change-Id: I2e03868b614cf19f4b09b333d523944934080cfa
17 files changed