summaryrefslogtreecommitdiff
path: root/test/ProfileTestMultiDex
diff options
context:
space:
mode:
authorPete Gillin <peteg@google.com>2019-02-05 14:58:42 +0000
committerPete Gillin <peteg@google.com>2019-02-05 14:58:42 +0000
commit481bcb2d4f7cd2876d30dea7356df89d4ab94141 (patch)
tree33a0d3331a671d238c479833a7968edc708db350 /test/ProfileTestMultiDex
parent8a64e773d4d1221166c6a8206315b450e448705a (diff)
Fix host-only exception in art test 005-annotations.
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
Diffstat (limited to 'test/ProfileTestMultiDex')
0 files changed, 0 insertions, 0 deletions