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