summaryrefslogtreecommitdiff
path: root/test/005-annotations/src
AgeCommit message (Collapse)Author
2019-02-05Fix host-only exception in art test 005-annotations. Pete Gillin
This test involves a method which has an annotation which has an enum-valued parameter, and the enum value supplied exists in the version of the enum which is used at compile-time but not in the version of the enum on the classpath. The test previously asserted that calling java.lang.reflect.Method.getDeclaredAnnotations() should throw java.lang.NoSuchFieldError. This matches the libcore+art behaviour, so the test passes in --host mode. But it fails in --jvm mode, as a java.lang.annotation.AnnotationFormatError is thrown there. The javadoc doesn't strongly support an argument that one of these is more correct than the other, and there's no reason to believe that anyone is depending on one behaviour or the other. This change therefore doesn't affect the behaviour of art+libcore, but makes the test accept Error more generally. (https://developer.android.com/reference/java/lang/reflect/AnnotatedElement) This therefore stops the test throwing an exception in --jvm mode. There are still differences between the expected and actual output of the test, around e.g. whether string-valued parameters should be quoted or not. Bug: 73897123 Test: `art/test/run-test --jvm --dev 005-annotations` now completes successfully instead of failing with an exception Test: `art/test/run-test --jvm 005-annotations` now shows output diff instead of failing with an exception Test: `art/test/run-test --host 005-annotations` still passes Change-Id: I11a8c0933555c513adb26b34015e4918025a05df
2016-07-22ART: Fix type parameter in tests Andreas Gampe
Move Class to Class<?>, Constructor to Constructor<?>, and in general clean up reflection. Test: m test-art-host-run-test Change-Id: I3a4223ee8d14d032015edf34bf27135757f7138c
2016-05-27Relax annotation visibility so runtime includes build. Jeff Hao
Previous behavior in M and earlier would allow annotations marked VISIBILITY_BUILD to be visible to the runtime when they should not have been. When targeting older sdks, revert to this behavior. Bug: 28826610 (cherry-picked from commit 7e50a7a5a1ad947e84c425efb2e97c442f91b155) Change-Id: I43d2328be41ec9f4e679b3151f586c0b87b38c7c
2016-04-04Remove AnnotationAccess and its remaining uses. Jeff Hao
Art side of this change. Adds a test to ensure annotations not marked for runtime retention can't be seen at runtime. Bug: 27912552 Change-Id: I078069b7b3cb72bfe7d0b9ea61e527fee04d56a3
2015-12-07Replace proxy class names with deterministic ones for test output. Hiroshi Yamauchi
This should avoid potentially flaky test failures in 005-annotations and 044-proxy. (cherrypick commit bc7f8080d1f5d0138cb83cba73a747d43d62c23c) Bug: 25838574 Bug: 12687968 Change-Id: I08765abd82e41258ce4d1d8bb9dffce70c8b6689
2015-11-30Test case for getting annotations of renamed enums. Jeff Hao
The crashing app was trying to get enums explicitly by name, but could not find them since they had been renamed by Proguard. Regression test for bug 25802263. Change-Id: Iff78a82d81ca108f1289051916f4272cd0f1e6fe
2015-09-02Fix native annotations returning TypeNotPresentException. Jeff Hao
Also adds test cases for inner classes and TypeNotPresentException. Change-Id: I28041af455f09b43fcf0b07b79b5a21d4741079b
2014-10-03Add test for getDeclaredClasses of with missing class Brian Carlstrom
Bug: 17782530 Change-Id: I399621344c3835226c9df9678217fca62cbd5c92
2014-07-23ART: Make run tests out of oat tests Andreas Gampe
Transforms all former oat tests into run tests. Change-Id: I190dd39456454c36e5538a2c044d993965a67533