diff options
Diffstat (limited to 'dx/tests/135-invoke-custom/run')
-rwxr-xr-x | dx/tests/135-invoke-custom/run | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/dx/tests/135-invoke-custom/run b/dx/tests/135-invoke-custom/run index 7fa1963d4..a66144736 100755 --- a/dx/tests/135-invoke-custom/run +++ b/dx/tests/135-invoke-custom/run @@ -33,39 +33,3 @@ for SDK_VERSION in ${UNSUPPORTED_SDK_VERSION} ${SUPPORTED_SDK_VERSION}; do exit 1 fi done - -# Check each invokedynamic instruction produced one invoke-custom -INVOKEDYNAMIC_COUNT=$( javap -c -v -cp invokecustom.jar invokecustom.InvokeCustom | \ - grep "invokedynamic #" | \ - wc -l ) -INVOKE_CUSTOM_COUNT=$( dexdump -d invokecustom.dex | \ - grep ": invoke-custom" | \ - wc -l ) -if [ "${INVOKEDYNAMIC_COUNT}" -ne "${INVOKE_CUSTOM_COUNT}" ]; then - echo Found ${INVOKEDYNAMIC_COUNT} uses of invokedynamic but ${INVOKE_CUSTOM_COUNT} uses of invoke-custom. - exit 1 -fi - -# Check there is a 1:1 correspondance between the number of call site ids and invoke-custom bytecodes. -CALL_SITE_ID_COUNT=$( dexdump invokecustom.dex | \ - sed -n -e '/Call Site #/ p' | \ - wc -l ) -if [ ${CALL_SITE_ID_COUNT} -gt ${INVOKE_CUSTOM_COUNT} ]; then - echo Found ${CALL_SITE_ID_COUNT} call sites but ${INVOKE_CUSTOM_COUNT} uses of invoke-custom. - exit 1 -fi - -# Check number of invokedynamic constants matches the number of unique call sites -CST_INDY_COUNT=$( javap -c -v -cp invokecustom.jar invokecustom.InvokeCustom | \ - sed -n -e '/: invokedynamic/ { s/.*invokedynamic #\([0-9]*\),.*/\1/ ; p }' | \ - sort | \ - uniq -c | \ - wc -l ) -CALL_SITE_COUNT=$( dexdump invokecustom.dex | \ - sed -n -e '/^Call Site/ { s/[0-9]\+// ; p }' | \ - uniq -c | \ - wc -l) -if [ ${CST_INDY_COUNT} -ne ${CALL_SITE_COUNT} ]; then - echo Found ${CST_INDY_COUNT} invokedynamic constants but ${CALL_SITE_COUNT} call sites. - exit 1 -fi |