174 }
175
176 static class VarHandleSourceAccessTestCase extends AccessTestCase<VarHandleSource> {
177 final ByteArrayViewSource<?> bs;
178 final VarHandleSource vhs;
179
180 VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessTestAction<VarHandleSource> ata) {
181 this(desc, bs, vhs, ata, true);
182 }
183
184 VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessTestAction<VarHandleSource> ata, boolean loop) {
185 super(vhs + " -> " + bs + " " + desc, ata, loop);
186 this.bs = bs;
187 this.vhs = vhs;
188 }
189
190 @Override
191 VarHandleSource get() {
192 return vhs;
193 }
194 }
195
196
197 static double rotateLeft(double i, int distance) {
198 return Double.longBitsToDouble(
199 Long.rotateLeft(Double.doubleToRawLongBits(i), distance));
200 }
201
202 static double rotateRight(double i, int distance) {
203 return Double.longBitsToDouble(
204 Long.rotateRight(Double.doubleToRawLongBits(i), distance));
205 }
206
207 static float rotateLeft(float i, int distance) {
208 return Float.intBitsToFloat(
209 Integer.rotateLeft(Float.floatToRawIntBits(i), distance));
210 }
211
212 static float rotateRight(float i, int distance) {
213 return Float.intBitsToFloat(
|
174 }
175
176 static class VarHandleSourceAccessTestCase extends AccessTestCase<VarHandleSource> {
177 final ByteArrayViewSource<?> bs;
178 final VarHandleSource vhs;
179
180 VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessTestAction<VarHandleSource> ata) {
181 this(desc, bs, vhs, ata, true);
182 }
183
184 VarHandleSourceAccessTestCase(String desc, ByteArrayViewSource<?> bs, VarHandleSource vhs, AccessTestAction<VarHandleSource> ata, boolean loop) {
185 super(vhs + " -> " + bs + " " + desc, ata, loop);
186 this.bs = bs;
187 this.vhs = vhs;
188 }
189
190 @Override
191 VarHandleSource get() {
192 return vhs;
193 }
194
195 public String toString() {
196 return super.toString() + ", bs: " + bs + ", vhs: " + vhs;
197 }
198 }
199
200
201 static double rotateLeft(double i, int distance) {
202 return Double.longBitsToDouble(
203 Long.rotateLeft(Double.doubleToRawLongBits(i), distance));
204 }
205
206 static double rotateRight(double i, int distance) {
207 return Double.longBitsToDouble(
208 Long.rotateRight(Double.doubleToRawLongBits(i), distance));
209 }
210
211 static float rotateLeft(float i, int distance) {
212 return Float.intBitsToFloat(
213 Integer.rotateLeft(Float.floatToRawIntBits(i), distance));
214 }
215
216 static float rotateRight(float i, int distance) {
217 return Float.intBitsToFloat(
|