< prev index next > test/jdk/java/lang/invoke/VarHandles/generate-vh-tests.sh
Print this page
# Generates variable handle tests for objects and all primitive types
# This is likely to be a temporary testing approach as it may be more
# desirable to generate code using ASM which will allow more flexibility
# in the kinds of tests that are generated.
! for type in boolean byte short char int long float double String
do
Type="$(tr '[:lower:]' '[:upper:]' <<< ${type:0:1})${type:1}"
args="-K$type -Dtype=$type -DType=$Type"
args="$args -KCAS"
# Generates variable handle tests for objects and all primitive types
# This is likely to be a temporary testing approach as it may be more
# desirable to generate code using ASM which will allow more flexibility
# in the kinds of tests that are generated.
! for type in boolean byte short char int long float double String Value
do
Type="$(tr '[:lower:]' '[:upper:]' <<< ${type:0:1})${type:1}"
args="-K$type -Dtype=$type -DType=$Type"
args="$args -KCAS"
boolean|byte|short|char|int|long)
args="$args -KBitwise"
;;
esac
+ # Object = objects of identity or value class
+ # Value = value class
+ case $type in
+ String)
+ args="$args -KObject"
+ ;;
+ Value)
+ args="$args -KObject -KValue"
+ ;;
+ esac
+
wrong_primitive_type=boolean
case $type in
boolean)
value1=true
String)
value1=\"foo\"
value2=\"bar\"
value3=\"baz\"
;;
+ Value)
+ value1="Value.getInstance(10)"
+ value2="Value.getInstance(20)"
+ value3="Value.getInstance(30)"
+ ;;
esac
args="$args -Dvalue1=$value1 -Dvalue2=$value2 -Dvalue3=$value3 -Dwrong_primitive_type=$wrong_primitive_type"
echo $args
< prev index next >