Merge "Sensor CTS tests" into lmp-dev
diff --git a/CtsTestCaseList.mk b/CtsTestCaseList.mk
index cba171f..a72fef6 100644
--- a/CtsTestCaseList.mk
+++ b/CtsTestCaseList.mk
@@ -111,6 +111,7 @@
CtsSaxTestCases \
CtsSecurityTestCases \
CtsSpeechTestCases \
+ CtsTelecommTestCases \
CtsTelephonyTestCases \
CtsTextTestCases \
CtsTextureViewTestCases \
diff --git a/apps/CtsVerifier/assets/scripts/execute_power_tests.py b/apps/CtsVerifier/assets/scripts/execute_power_tests.py
index 71d2850..92b79ca 100755
--- a/apps/CtsVerifier/assets/scripts/execute_power_tests.py
+++ b/apps/CtsVerifier/assets/scripts/execute_power_tests.py
@@ -24,6 +24,11 @@
import gflags as flags # http://code.google.com/p/python-gflags/
import pkgutil
import threading
+import Queue
+
+# queue to signal thread to exit
+signal_exit_q = Queue.Queue()
+signal_abort = Queue.Queue()
# let this script know about the power monitor impementations
sys.path = [os.path.basename(__file__)] + sys.path
@@ -34,15 +39,14 @@
FLAGS = flags.FLAGS
-#Whether to use a strict delay to ensure screen is off,
-#or attempt to use power measurements to do so
+# whether to use a strict delay to ensure screen is off, or attempt to use power measurements
USE_STRICT_DELAY = False
if USE_STRICT_DELAY:
DELAY_SCREEN_OFF = 30.0
else:
DELAY_SCREEN_OFF = 2.0
-#whether to log data collected to a file for each sensor run:
+# whether to log data collected to a file for each sensor run:
LOG_DATA_TO_FILE = True
logging.getLogger().setLevel(logging.ERROR)
@@ -55,20 +59,20 @@
mod = getattr(mod, comp)
return mod
+
class PowerTest:
"""Class to run a suite of power tests"""
- #Thresholds for max allowed power usage per sensor tested
+ # Thresholds for max allowed power usage per sensor tested
MAX_ACCEL_POWER = 0.08 # Amps
MAX_MAG_POWER = 0.08 # Amps
MAX_GYRO_POWER = 0.08 # Amps
MAX_SIGMO_POWER = 0.08 # Amps
MAX_STEP_COUNTER_POWER = 0.08 # Amps
MAX_STEP_DETECTOR_POWER = 0.08 # Amps
-
-
-
- PORT = 0 # any available port
+
+
+ PORT = 0 # any available port
DOMAIN_NAME = "/android/cts/powertest"
SAMPLE_COUNT_NOMINAL = 1000
RATE_NOMINAL = 100
@@ -85,28 +89,26 @@
self._native_hz = status["sampleRate"] * 1000
self._current_test = "None"
self._external_storage = self.executeOnDevice(PowerTest.QUERY_EXTERNAL_STORAGE, reportErrors=True )
-
+
def __del__(self):
self.finalize()
-
+
def finalize(self):
"""To be called upon termination of host connection to device"""
if PowerTest.PORT > 0:
- #tell device side to exit connection loop, and
- #remove the forwarding connection
+ # tell device side to exit connection loop, and remove the forwarding connection
self.executeOnDevice("EXIT", reportErrors=False)
self.executeLocal("adb forward --remove tcp:%d" % PowerTest.PORT)
PowerTest.PORT = 0
if self._power_monitor:
self._power_monitor.Close()
self._power_monitor = None
-
+
def _send(self, msg, report_errors=True):
"""Connect to the device, send the given commmand, and then disconnect"""
if PowerTest.PORT == 0:
- #on first attempt to send a command, connect to device
- #via any open port number, forwarding that port to
- #a local socket on the device via adb
+ # on first attempt to send a command, connect to device via any open port number,
+ # forwarding that port to a local socket on the device via adb
logging.debug("Seeking port for communication...")
# discover an open port
dummysocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
@@ -118,14 +120,14 @@
if report_errors:
self.reportErrorIf(status != 0, msg="Unable to forward requests to client over adb")
logging.info("Forwarding requests over local port %d" % PowerTest.PORT)
-
+
link = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
logging.debug("Connecting to device...")
link.connect (("localhost", PowerTest.PORT))
logging.debug("Connected.")
- except:
+ except:
if report_errors:
self.reportErrorIf(True, msg="Unable to communicate with device: connection refused")
logging.debug("Sending '%s'" % msg)
@@ -141,11 +143,11 @@
False otherwise"""
logging.info("Querying device with '%s'" % query)
return self._send(query) == "OK"
-
+
def executeOnDevice(self, cmd , reportErrors=True):
"""Execute a (string) command on the remote device"""
return self._send(cmd , reportErrors)
-
+
def executeLocal(self, cmd, check_status=True):
"""execute a shell command locally (on the host)"""
from subprocess import call
@@ -155,7 +157,7 @@
else:
logging.debug("Executed \"%s\"" % cmd)
return status
-
+
def reportErrorIf(self, condition, msg):
"""Report an error condition to the device if condition is True.
Will raise an exception on the device if condition is True"""
@@ -164,12 +166,12 @@
logging.error("Exiting on error: %s" % msg)
self.executeOnDevice("RAISE " + self._current_test + " " + msg , False)
except:
-
+
logging.error("Unable to communicate with device to report error: %s" % msg)
self.finalize()
sys.exit(msg)
raise Exception(msg)
-
+
def setUSBEnabled(self, enabled, verbose=True):
if enabled:
val = 1
@@ -177,9 +179,9 @@
val = 0
self._power_monitor.SetUsbPassthrough(val)
tries = 0
-
- #Sometimes command won't go through first time, paricularly if
- #immediately after a data collection, so allow for retries
+
+ # Sometimes command won't go through first time, paricularly if immediately after a data
+ # collection, so allow for retries
status = self._power_monitor.GetStatus()
while status is None and tries < 5:
tries += 1
@@ -190,7 +192,7 @@
status = self._power_monitor.GetStatus()
if enabled:
- if verbose: print("...USB enabled, waiting for device")
+ if verbose: print("...USB enabled, waiting for device")
self.executeLocal ("adb wait-for-device")
if verbose: print("...device online")
else:
@@ -199,22 +201,21 @@
if enabled and PowerTest.PORT > 0:
status = self.executeLocal("adb forward tcp:%d localabstract:%s" % (PowerTest.PORT, PowerTest.DOMAIN_NAME))
self.reportErrorIf(status != 0, msg="Unable to forward requests to client over adb")
-
+
def waitForScreenOff(self):
- # disconnect of USB will cause screen to go on, so
- # must wait (1 second more than screen off timeout)
+ # disconnect of USB will cause screen to go on, so must wait (1 second more than screen off
+ # timeout)
if USE_STRICT_DELAY:
time.sleep(DELAY_SCREEN_OFF)
return
-
- # need at least 100 sequential clean low-power measurements
- # to know screen is off
+
+ # need at least 100 sequential clean low-power measurements to know screen is off
THRESHOLD_COUNT_LOW_POWER = 100
CURRENT_LOW_POWER_THRESHOLD = 0.060 # mAmps
TIMEOUT_SCREEN_OFF = 30 #this many tries at most
count_good = 0
tries = 0
- print("Waiting for screen off...")
+ print("Waiting for screen off and application processor in suspend mode...")
while count_good < THRESHOLD_COUNT_LOW_POWER:
measurements = self.collectMeasurements( THRESHOLD_COUNT_LOW_POWER,
PowerTest.RATE_NOMINAL,
@@ -223,14 +224,17 @@
count_good = len([m for m in measurements
if m < CURRENT_LOW_POWER_THRESHOLD])
tries += 1
+ if count_good < THRESHOLD_COUNT_LOW_POWER and measurements:
+ print("This current high: %.2f mAmps. Device is probably not in suspend mode. Waiting..."%\
+ (1000.0*(sum(measurements)/len(measurements))))
if tries >= TIMEOUT_SCREEN_OFF:
- self.reportErrorIf(tries>=TIMEOUT_SCREEN_OFF, msg="Unable to determine screen off status.")
+ self.reportErrorIf(tries>=TIMEOUT_SCREEN_OFF, msg="Unable to determine application processor suspend mode status.")
break
if DELAY_SCREEN_OFF:
- #add additional delay time if necessary
+ # add additional delay time if necessary
time.sleep(DELAY_SCREEN_OFF)
- print("...Screen off.")
-
+ print("...Screen off and device in suspend mode.")
+
def collectMeasurements(self, measurementCount, rate ,
ensure_screen_off=True,
verbose=True,
@@ -252,30 +256,30 @@
self._power_monitor.StopDataCollection()
self._power_monitor.StartDataCollection()
time.sleep(1.0)
- tries += 1
+ tries += 1
additional = self._power_monitor.CollectData()
if additional is not None:
tries = 0
sub_measurements.extend(additional)
while len(sub_measurements) >= decimate_by:
sub_avg = sum(sub_measurements) / len(sub_measurements)
- measurements.append(sub_avg)
+ measurements.append(sub_avg)
sub_measurements = sub_measurements[decimate_by:]
if verbose:
sys.stdout.write("\33[1A\33[2K")
print ("MEASURED[%d]: %f" % (len(measurements),measurements[-1]))
finally:
self._power_monitor.StopDataCollection()
-
+
self.reportErrorIf(measurementCount > len(measurements),
"Unable to collect all requested measurements")
return measurements
-
+
def request_user_acknowledgment(self, msg):
"""Post message to user on screen and wait for acknowledgment"""
response = self.executeOnDevice("REQUEST USER RESPONSE " + msg)
self.reportErrorIf(response != "OK", "Unable to request user acknowledgment")
-
+
def setTestResult (self, testname, condition, msg):
if condition is False:
val = "FAIL"
@@ -292,8 +296,10 @@
self.reportErrorIf(response == "ERR", "Unable to set sensor %s state"%sensor)
logging.info("Set %s %s" % (sensor, {True:"ON", False:"OFF"}[powered_on]))
return response
-
+
def runPowerTest(self, sensor, max_power_allowed, user_request = None):
+ if not signal_abort.empty():
+ sys.exit( signal_abort.get() )
self._current_test = "%s_Power_Test_While_%s" % (sensor, {True:"Under_Motion", False:"Still"}[user_request is not None])
try:
print ("\n\n---------------------------------")
@@ -307,18 +313,21 @@
self.setTestResult(self._current_test, condition="SKIPPED", msg="Sensor %s not available on this platform"%sensor)
self.setPowerOn("ALL", False)
if response == "UNAVAILABLE":
- self.setTestResult(self._current_test, condition="SKIPPED",
+ self.setTestResult(self._current_test, condition="SKIPPED",
msg="Sensor %s not available on this device"%sensor)
return
self.reportErrorIf(response != "OK", "Unable to set all sensor off")
+ if not signal_abort.empty():
+ sys.exit( signal_abort.get() )
+ self.executeOnDevice("MESSAGE: \nPlease turn screen off or wait for screen to turn off. Do not interact with the device until screen is turned on again.")
self.setUSBEnabled(False)
print("Collecting background measurements...")
measurements = self.collectMeasurements( PowerTest.SAMPLE_COUNT_NOMINAL,
PowerTest.RATE_NOMINAL,
plot_data = True)
if measurements and LOG_DATA_TO_FILE:
- with open( "/tmp/cts-power-tests-%s-%s-background-data.log"%(sensor,
+ with open( "/tmp/cts-power-tests-%s-%s-background-data.log"%(sensor,
{True:"Under_Motion", False:"Still"}[user_request is not None] ),'w') as f:
for m in measurements:
f.write( "%.4f\n"%m)
@@ -332,21 +341,23 @@
"==========================================="
)
self.request_user_acknowledgment(user_request)
+ else:
+ self.executeOnDevice("MESSAGE: Turn screen off or wait for screen to turn off and do not interact with the device until screen is turned on again.")
self.setUSBEnabled(False)
self.reportErrorIf(response != "OK", "Unable to set sensor %s ON" % sensor)
print ("Collecting sensor %s measurements" % sensor)
measurements = self.collectMeasurements(PowerTest.SAMPLE_COUNT_NOMINAL,
PowerTest.RATE_NOMINAL)
-
+
if measurements and LOG_DATA_TO_FILE:
- with open( "/tmp/cts-power-tests-%s-%s-sensor-data.log"%(sensor,
+ with open( "/tmp/cts-power-tests-%s-%s-sensor-data.log"%(sensor,
{True:"Under_Motion", False:"Still"}[user_request is not None] ),'w') as f:
for m in measurements:
f.write( "%.4f\n"%m)
self.setUSBEnabled(True, verbose = False)
print("Saving raw data files to device...")
- self.executeLocal("adb shell mkdir -p %s/sensor_power_test_data"%self._external_storage, False)
- self.executeLocal("adb push %s %s/sensor_power_test_data/."%(f.name, self._external_storage))
+ self.executeLocal("adb shell mkdir -p %s/ctsVerifierData/sensor_power_test_data"%self._external_storage, False)
+ self.executeLocal("adb push %s %s/ctsVerifierData/sensor_power_test_data/."%(f.name, self._external_storage))
self.setUSBEnabled(False, verbose = False)
self.reportErrorIf(not measurements, "No measurements could be taken for %s" % sensor)
avg = sum(measurements) / len(measurements)
@@ -371,11 +382,10 @@
import traceback
traceback.print_exc()
self.setTestResult(self._current_test, condition="FAIL", msg="Exception occurred during run of test.")
-
-
+
+
@staticmethod
def run_tests():
-
testrunner = None
try:
GENERIC_MOTION_REQUEST = "\n===> Please press Next and when the screen is off, keep the device under motion with only tiny, slow movements" + \
@@ -404,20 +414,21 @@
testrunner.runPowerTest("SIGNIFICANT_MOTION", PowerTest.MAX_SIGMO_POWER, user_request = None)
testrunner.runPowerTest("STEP_DETECTOR", PowerTest.MAX_STEP_DETECTOR_POWER, user_request = None)
testrunner.runPowerTest("STEP_COUNTER", PowerTest.MAX_STEP_COUNTER_POWER, user_request = None)
- except:
+ except:
import traceback
traceback.print_exc()
finally:
+ signal_exit_q.put(0) # anything will signal thread to terminate
logging.info("TESTS COMPLETE")
if testrunner:
try:
testrunner.finalize()
except socket.error:
- sys.exit("============================\nUnable to connect to device under test. Make sure the device is connected,"+\
+ sys.exit("============================\nUnable to connect to device under test. Make sure the device is connected via the usb passthrough,"+\
" the CtsVerifier app is running the SensorPowerTest on the device, and USB passthrough is enabled."
"\n===========================")
-
-
+
+
def main(argv):
""" Simple command-line interface for a power test application."""
useful_flags = ["voltage", "status", "usbpassthrough",
@@ -426,7 +437,7 @@
print __doc__.strip()
print FLAGS.MainModuleHelp()
return
-
+
if FLAGS.avg and FLAGS.avg < 0:
loggign.error("--avg must be greater than 0")
return
@@ -437,14 +448,14 @@
try:
response = raw_input("Voltage of %.3f requested. Confirm this is correct (Y/N)"%FLAGS.voltage)
if response.upper() != "Y":
- sys.exit("Aborting")
+ sys.exit("Aborting")
except:
sys.exit("Aborting.")
-
+
if not FLAGS.power_monitor:
sys.exit("You must specify a '--power_monitor' option to specify which power monitor type you are using.\n"+
"One of:\n " +
- "\n ".join(available_monitors))
+ "\n ".join(available_monitors))
power_monitors = do_import('power_monitors.%s' % FLAGS.power_monitor)
try:
mon = power_monitors.Power_Monitor(device=FLAGS.device)
@@ -452,9 +463,9 @@
import traceback
traceback.print_exc()
sys.exit("No power monitors found")
-
- if FLAGS.voltage is not None:
-
+
+ if FLAGS.voltage is not None:
+
if FLAGS.ramp is not None:
mon.RampVoltage(mon.start_voltage, FLAGS.voltage)
else:
@@ -537,10 +548,11 @@
if FLAGS.run:
if not FLAGS.power_monitor:
- sys.exit("When running power tests, you must specify which type of power monitor to use" +
+ sys.exit("When running power tests, you must specify which type of power monitor to use" +
" with '--power_monitor <type of power monitor>'")
PowerTest.run_tests()
-
+
+
if __name__ == "__main__":
flags.DEFINE_boolean("status", None, "Print power meter status")
flags.DEFINE_integer("avg", None,
@@ -559,5 +571,4 @@
flags.DEFINE_boolean("run", False, "Run the test suite for power")
flags.DEFINE_string("power_monitor", None, "Type of power monitor to use")
sys.exit(main(FLAGS(sys.argv)))
-
diff --git a/apps/CtsVerifier/res/layout/snsr_error.xml b/apps/CtsVerifier/res/layout/snsr_error.xml
new file mode 100644
index 0000000..4b3869a
--- /dev/null
+++ b/apps/CtsVerifier/res/layout/snsr_error.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/snsr_boxed_padding_bottom"
+ android:paddingTop="@dimen/snsr_boxed_padding_top"
+ android:paddingLeft="@dimen/snsr_boxed_padding_left"
+ android:paddingRight="@dimen/snsr_boxed_padding_right"
+ android:background="@color/snsr_error_background"
+ android:textColor="@color/snsr_error" />
diff --git a/apps/CtsVerifier/res/layout/snsr_information.xml b/apps/CtsVerifier/res/layout/snsr_information.xml
new file mode 100644
index 0000000..4b4a4cb
--- /dev/null
+++ b/apps/CtsVerifier/res/layout/snsr_information.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/snsr_boxed_padding_bottom"
+ android:paddingTop="@dimen/snsr_boxed_padding_top"
+ android:paddingLeft="@dimen/snsr_boxed_padding_left"
+ android:paddingRight="@dimen/snsr_boxed_padding_right"
+ android:background="@color/snsr_information_background"
+ android:textColor="@color/snsr_information" />
diff --git a/apps/CtsVerifier/res/layout/snsr_instruction.xml b/apps/CtsVerifier/res/layout/snsr_instruction.xml
new file mode 100644
index 0000000..9a48cf6
--- /dev/null
+++ b/apps/CtsVerifier/res/layout/snsr_instruction.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/snsr_log_padding_bottom"
+ android:paddingTop="@dimen/snsr_log_padding_top"
+ android:paddingLeft="@dimen/snsr_log_padding_left"
+ android:paddingRight="@dimen/snsr_log_padding_right" />
diff --git a/apps/CtsVerifier/res/layout/snsr_rotvec.xml b/apps/CtsVerifier/res/layout/snsr_rotvec.xml
index 1a896db..5d7bc8b 100644
--- a/apps/CtsVerifier/res/layout/snsr_rotvec.xml
+++ b/apps/CtsVerifier/res/layout/snsr_rotvec.xml
@@ -16,28 +16,39 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent" >
- <TextView android:id="@+id/log_text"
- android:layout_height="0dp"
- android:layout_width="wrap_content"
- android:layout_weight="1"
- android:paddingBottom="5dip"
- android:paddingLeft="10dip"
- android:paddingRight="10dip"
- android:paddingTop="5dip"
- android:scrollbars="vertical" />
+ <ScrollView android:id="@+id/log_scroll_view"
+ android:layout_height="0dp"
+ android:layout_width="wrap_content"
+ android:layout_weight="1" >
+
+ <LinearLayout android:id="@+id/log_layout"
+ android:orientation="vertical"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content" />
+
+ </ScrollView>
<android.opengl.GLSurfaceView android:id="@+id/gl_surface_view"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2" />
- <Button android:id="@+id/next_button"
- android:layout_gravity="center_horizontal"
- android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:layout_weight="0"
- android:text="@string/next_button_text" />
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:layout_weight="0"
+ android:paddingBottom="@dimen/snsr_view_padding_bottom"
+ android:paddingTop="@dimen/snsr_view_padding_top" >
+
+ <Button android:id="@+id/next_button"
+ android:layout_gravity="center_horizontal"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/next_button_text" />
+
+ </LinearLayout>
</LinearLayout>
diff --git a/apps/CtsVerifier/res/layout/snsr_semi_auto_test.xml b/apps/CtsVerifier/res/layout/snsr_semi_auto_test.xml
index c816021..7b0d977 100644
--- a/apps/CtsVerifier/res/layout/snsr_semi_auto_test.xml
+++ b/apps/CtsVerifier/res/layout/snsr_semi_auto_test.xml
@@ -16,26 +16,33 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
- android:layout_height="match_parent">
+ android:layout_height="match_parent" >
- <TextView android:id="@+id/log_text"
- android:layout_height="0dp"
- android:layout_width="wrap_content"
- android:layout_weight="1"
- android:layout_gravity="bottom"
- android:paddingBottom="5dip"
- android:paddingLeft="10dip"
- android:paddingRight="10dip"
- android:paddingTop="5dip"
- android:scrollbars="vertical"
- />
+ <ScrollView android:id="@+id/log_scroll_view"
+ android:layout_height="0dp"
+ android:layout_width="wrap_content"
+ android:layout_weight="1" >
- <Button android:id="@+id/next_button"
- android:layout_gravity="center_horizontal"
- android:layout_height="wrap_content"
+ <LinearLayout android:id="@+id/log_layout"
+ android:orientation="vertical"
android:layout_width="wrap_content"
- android:paddingBottom="5dip"
- android:text="@string/next_button_text"
- />
+ android:layout_height="wrap_content" />
+
+ </ScrollView>
+
+ <LinearLayout
+ android:orientation="vertical"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/snsr_view_padding_bottom"
+ android:paddingTop="@dimen/snsr_view_padding_top" >
+
+ <Button android:id="@+id/next_button"
+ android:layout_gravity="center_horizontal"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:text="@string/next_button_text" />
+
+ </LinearLayout>
</LinearLayout>
diff --git a/apps/CtsVerifier/res/layout/snsr_success.xml b/apps/CtsVerifier/res/layout/snsr_success.xml
new file mode 100644
index 0000000..7aaad57
--- /dev/null
+++ b/apps/CtsVerifier/res/layout/snsr_success.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/snsr_boxed_padding_bottom"
+ android:paddingTop="@dimen/snsr_boxed_padding_top"
+ android:paddingLeft="@dimen/snsr_boxed_padding_left"
+ android:paddingRight="@dimen/snsr_boxed_padding_right"
+ android:background="@color/snsr_success_background"
+ android:textColor="@color/snsr_success" />
diff --git a/apps/CtsVerifier/res/layout/snsr_test_title.xml b/apps/CtsVerifier/res/layout/snsr_test_title.xml
new file mode 100644
index 0000000..69e9fad
--- /dev/null
+++ b/apps/CtsVerifier/res/layout/snsr_test_title.xml
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/snsr_boxed_padding_bottom"
+ android:paddingTop="@dimen/snsr_boxed_padding_top"
+ android:paddingLeft="@dimen/snsr_boxed_padding_left"
+ android:paddingRight="@dimen/snsr_boxed_padding_right"
+ android:textStyle="bold" />
diff --git a/apps/CtsVerifier/res/layout/snsr_warning.xml b/apps/CtsVerifier/res/layout/snsr_warning.xml
new file mode 100644
index 0000000..6f102bb
--- /dev/null
+++ b/apps/CtsVerifier/res/layout/snsr_warning.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2014 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+<TextView xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:paddingBottom="@dimen/snsr_boxed_padding_bottom"
+ android:paddingTop="@dimen/snsr_boxed_padding_top"
+ android:paddingLeft="@dimen/snsr_boxed_padding_left"
+ android:paddingRight="@dimen/snsr_boxed_padding_right"
+ android:background="@color/snsr_warning_background"
+ android:textColor="@color/snsr_warning" />
diff --git a/apps/CtsVerifier/res/values/colors.xml b/apps/CtsVerifier/res/values/colors.xml
index 707255b..c855d5f 100644
--- a/apps/CtsVerifier/res/values/colors.xml
+++ b/apps/CtsVerifier/res/values/colors.xml
@@ -2,4 +2,14 @@
<resources>
<color name="red">#F00</color>
<color name="green">#0F0</color>
+
+ <!-- Sensor tests log colors -->
+ <color name="snsr_error_background">#F5D1D1</color>
+ <color name="snsr_error">#AA0404</color>
+ <color name="snsr_success_background">#DDF6D2</color>
+ <color name="snsr_success">#467701</color>
+ <color name="snsr_warning_background">#F0E4B6</color>
+ <color name="snsr_warning">#75540C</color>
+ <color name="snsr_information_background">#D0D2F6</color>
+ <color name="snsr_information">#41576B</color>
</resources>
diff --git a/apps/CtsVerifier/res/values/dimens.xml b/apps/CtsVerifier/res/values/dimens.xml
index 00257a9..b1367f7 100644
--- a/apps/CtsVerifier/res/values/dimens.xml
+++ b/apps/CtsVerifier/res/values/dimens.xml
@@ -18,4 +18,22 @@
<dimen name="widget_margin_bottom">8dp</dimen>
<dimen name="widget_margin_left">8dp</dimen>
<dimen name="widget_margin_right">8dp</dimen>
+
+ <!-- Sensor logging values -->
+
+ <dimen name="snsr_boxed_padding_top">15dp</dimen>
+ <dimen name="snsr_boxed_padding_bottom">15dp</dimen>
+ <dimen name="snsr_boxed_padding_left">15dp</dimen>
+ <dimen name="snsr_boxed_padding_right">15dp</dimen>
+
+ <dimen name="snsr_log_padding_top">1dp</dimen>
+ <dimen name="snsr_log_padding_bottom">1dp</dimen>
+ <dimen name="snsr_log_padding_left">8dp</dimen>
+ <dimen name="snsr_log_padding_right">8dp</dimen>
+
+ <dimen name="snsr_view_padding_top">8dp</dimen>
+ <dimen name="snsr_view_padding_bottom">8dp</dimen>
+ <dimen name="snsr_view_padding_left">8dp</dimen>
+ <dimen name="snsr_view_padding_right">8dp</dimen>
+
</resources>
\ No newline at end of file
diff --git a/apps/CtsVerifier/res/values/strings.xml b/apps/CtsVerifier/res/values/strings.xml
index 2a61323..e70f44b 100644
--- a/apps/CtsVerifier/res/values/strings.xml
+++ b/apps/CtsVerifier/res/values/strings.xml
@@ -432,17 +432,23 @@
<string name="snsr_executing_test">\nExecuting test case \'%1$s\'..\n</string>
<string name="snsr_orientation_portrait">[Device orientation]: Portrait.</string>
<string name="snsr_orientation_landscape">[Device orientation]: Landscape.</string>
+ <string name="snsr_register_listener">Expected to be able to register sensor listener. Found=%b.</string>
<!-- Strings to interact with users in Sensor Tests -->
<string name="snsr_test_play_sound">A sound will be played once the verification is complete...</string>
<string name="snsr_device_steady">Keep the device steady.</string>
<string name="snsr_wait_for_user">Press \'Next\' to continue.</string>
<string name="snsr_on_complete_return">After completing the task, go back to this test.</string>
- <string name="snsr_airplane_mode_set">Airplane mode set.</string>
- <string name="snsr_airplane_mode_request">You will be redirected to set \'Airplane Mode\' ON.</string>
- <string name="snsr_screen_off_timeout">Screen Off Timeout set to: %1$d seconds.</string>
- <string name="snsr_screen_off_request">You will be redirected to set \'Display Sleep\' to %1$d seconds.</string>
<string name="snsr_movement_expected">Movement was expected during the test. Found=%1$b.</string>
+ <string name="snsr_sensor_feature_deactivation">Additionally, turn off any other features installed in the device, that register for sensors. Once you are done, you can continue the test.</string>
+ <string name="snsr_setting_mode_request">You will be redirected to set \'%1$s\' to: %2$s.</string>
+ <string name="snsr_setting_mode_set">\'%1$s\' set to: %2$s.</string>
+ <string name="snsr_setting_mode_not_set">\'%1$s\' not set to: %2$s.</string>
+ <string name="snsr_setting_airplane_mode">Airplane mode</string>
+ <string name="snsr_setting_screen_brightness_mode">Adaptive Brightness</string>
+ <string name="snsr_setting_auto_rotate_screen_mode">Auto-rotate screen</string>
+ <string name="snsr_setting_location_mode">Location</string>
+ <string name="snsr_setting_auto_screen_off_mode">Display Sleep</string>
<!-- Accelerometer -->
<string name="snsr_accel_test">Accelerometer Test</string>
@@ -498,6 +504,12 @@
<!-- Sensor Batching -->
<string name="snsr_batch_test">Sensor Batching Tests</string>
+ <string name="snsr_batching_walking_needed">Once the test begins, you will have to walk.</string>
+ <string name="snsr_batching_interrupt_needed">Once the test begins, you will have to wave your hand over the front of the device.</string>
+ <string name="snsr_batching_no_interaction">Leave the device on top of a flat surface.</string>
+ <string name="snsr_batching_fifo_count">FifoReservedEventCount=%1$d. Expected to be at most FifoMaxEventCount=%2$d.</string>
+ <string name="snsr_batching_first_event_arrival">Batched events expected to arrive after %1$d ns. Found=%2$d ns.</string>
+ <string name="snsr_batching_flush_complete">Event \'onFlushComplete\' expected. Found=%1$b.</string>
<!-- Sensor Synchronization -->
<string name="snsr_synch_test">Sensor Synchronization Test</string>
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/BaseSensorTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/BaseSensorTestActivity.java
index b3f7085..9a5fb6f 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/BaseSensorTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/BaseSensorTestActivity.java
@@ -1,4 +1,5 @@
/*
+
* Copyright (C) 2014 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
@@ -18,6 +19,7 @@
import com.android.cts.verifier.R;
import com.android.cts.verifier.TestResult;
+import com.android.cts.verifier.sensors.helpers.SensorFeaturesDeactivator;
import junit.framework.Assert;
@@ -28,17 +30,14 @@
import android.graphics.Color;
import android.hardware.cts.helpers.SensorNotSupportedException;
import android.media.MediaPlayer;
-import android.os.Build;
import android.os.Bundle;
import android.os.Vibrator;
import android.provider.Settings;
-import android.text.Spannable;
-import android.text.SpannableStringBuilder;
import android.text.TextUtils;
-import android.text.method.ScrollingMovementMethod;
-import android.text.style.ForegroundColorSpan;
import android.util.Log;
import android.view.View;
+import android.widget.LinearLayout;
+import android.widget.ScrollView;
import android.widget.TextView;
import java.lang.reflect.InvocationTargetException;
@@ -49,7 +48,6 @@
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.Semaphore;
-import java.util.concurrent.TimeUnit;
/**
* Base class to author Sensor test cases. It provides access to the following flow:
@@ -69,12 +67,14 @@
protected final Class mTestClass;
private final int mLayoutId;
+ private final DeactivatorActivityHandler mDeactivatorActivityHandler;
+ protected final SensorFeaturesDeactivator mSensorFeaturesDeactivator;
private final Semaphore mSemaphore = new Semaphore(0);
- private TextView mLogView;
+ private ScrollView mLogScrollView;
+ private LinearLayout mLogLayout;
private View mNextView;
private Thread mWorkerThread;
- private CountDownLatch mCountDownLatch;
private volatile int mTestPassedCounter;
private volatile int mTestSkippedCounter;
@@ -87,6 +87,8 @@
protected BaseSensorTestActivity(Class testClass, int layoutId) {
mTestClass = testClass;
mLayoutId = layoutId;
+ mDeactivatorActivityHandler = new DeactivatorActivityHandler();
+ mSensorFeaturesDeactivator = new SensorFeaturesDeactivator(mDeactivatorActivityHandler);
}
@Override
@@ -94,10 +96,10 @@
super.onCreate(savedInstanceState);
setContentView(mLayoutId);
- mLogView = (TextView) this.findViewById(R.id.log_text);
- mNextView = this.findViewById(R.id.next_button);
+ mLogScrollView = (ScrollView) findViewById(R.id.log_scroll_view);
+ mLogLayout = (LinearLayout) findViewById(R.id.log_layout);
+ mNextView = findViewById(R.id.next_button);
mNextView.setOnClickListener(this);
- mLogView.setMovementMethod(new ScrollingMovementMethod());
updateButton(false /*enabled*/);
mWorkerThread = new Thread(this);
@@ -130,6 +132,8 @@
logTestDetails(testDetails.result, testDetails.summary);
overallTestResults.append(testDetails.toString() + "\n");
}
+ appendText(R.string.snsr_test_complete);
+
// log to screen and save the overall test summary (activity level)
SensorTestDetails testDetails = getOverallTestDetails();
logTestDetails(testDetails.result, testDetails.summary);
@@ -143,14 +147,13 @@
Log.e(LOG_TAG, "An error occurred on Activity CleanUp.", e);
}
- appendText(R.string.snsr_test_complete);
waitForUser();
finish();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
- mCountDownLatch.countDown();
+ mDeactivatorActivityHandler.onActivityResult();
}
private static class SensorTestDetails {
@@ -192,33 +195,36 @@
}
private void logTestDetails(SensorTestResult testResult, String testSummary) {
- int textColor;
+ int textViewResId;
+ int testResultResId;
int logPriority;
- String testResultString;
switch(testResult) {
case SKIPPED:
- textColor = Color.YELLOW;
+ textViewResId = R.layout.snsr_warning;
+ testResultResId = R.string.snsr_test_skipped;
logPriority = Log.INFO;
- testResultString = getString(R.string.snsr_test_skipped);
break;
case PASS:
- textColor = Color.GREEN;
+ textViewResId = R.layout.snsr_success;
+ testResultResId = R.string.snsr_test_pass;
logPriority = Log.DEBUG;
- testResultString = getString(R.string.snsr_test_pass);
break;
case FAIL:
- textColor = Color.RED;
+ textViewResId = R.layout.snsr_error;
+ testResultResId = R.string.snsr_test_fail;
logPriority = Log.ERROR;
- testResultString = getString(R.string.snsr_test_fail);
break;
default:
throw new InvalidParameterException("Unrecognized testResult.");
}
if (TextUtils.isEmpty(testSummary)) {
- testSummary = testResultString;
+ testSummary = getString(testResultResId);
}
- appendText("\n" + testSummary, textColor);
Log.println(logPriority, LOG_TAG, testSummary);
+
+ TextAppender textAppender = new TextAppender(textViewResId);
+ textAppender.setText(testSummary);
+ textAppender.append();
}
/**
@@ -237,29 +243,36 @@
*/
protected void activityCleanUp() throws Throwable {}
+ @Deprecated
protected void appendText(int resId, int textColor) {
- appendText(getString(resId), textColor);
+ appendText(resId);
}
@Deprecated
protected void appendText(String text, int textColor) {
- this.runOnUiThread(new TextAppender(mLogView, text, textColor));
+ appendText(text);
}
+ @Deprecated
protected void appendText(int resId) {
- appendText(getString(resId));
+ TextAppender textAppender = new TextAppender(R.layout.snsr_instruction);
+ textAppender.setText(resId);
+ textAppender.append();
}
@Deprecated
protected void appendText(String text) {
- this.runOnUiThread(new TextAppender(mLogView, text));
+ TextAppender textAppender = new TextAppender(R.layout.snsr_instruction);
+ textAppender.setText(text);
+ textAppender.append();
}
+ @Deprecated
protected void clearText() {
this.runOnUiThread(new Runnable() {
@Override
public void run() {
- mLogView.setText("");
+ mLogLayout.removeAllViews();
}
});
}
@@ -298,6 +311,23 @@
vibrator.vibrate(pattern, -1);
}
+ // TODO: move to sensor assertions
+ protected String assertTimestampSynchronization(
+ long eventTimestamp,
+ long receivedTimestamp,
+ long deltaThreshold,
+ String sensorName) {
+ long timestampDelta = Math.abs(eventTimestamp - receivedTimestamp);
+ String timestampMessage = getString(
+ R.string.snsr_event_time,
+ receivedTimestamp,
+ eventTimestamp,
+ deltaThreshold,
+ sensorName);
+ Assert.assertTrue(timestampMessage, timestampDelta < deltaThreshold);
+ return timestampMessage;
+ }
+
private List<Method> findTestMethods() {
ArrayList<Method> testMethods = new ArrayList<Method>();
for (Method method : mTestClass.getDeclaredMethods()) {
@@ -313,10 +343,14 @@
private SensorTestDetails executeTest(Method testMethod) {
SensorTestDetails testDetails = new SensorTestDetails();
- testDetails.name = String.format("%s#%s", getTestClassName(), testMethod.getName());
+ String testMethodName = testMethod.getName();
+ testDetails.name = String.format("%s#%s", getTestClassName(), testMethodName);
try {
- appendText(getString(R.string.snsr_executing_test, testDetails.name));
+ TextAppender textAppender = new TextAppender(R.layout.snsr_test_title);
+ textAppender.setText(testMethodName);
+ textAppender.append();
+
testDetails.summary = (String) testMethod.invoke(this);
testDetails.result = SensorTestResult.PASS;
++mTestPassedCounter;
@@ -367,29 +401,34 @@
return mTestClass.getName();
}
- private class TextAppender implements Runnable {
+ private class TextAppender {
private final TextView mTextView;
- private final SpannableStringBuilder mMessageBuilder;
- public TextAppender(TextView textView, String message, int textColor) {
- mTextView = textView;
- mMessageBuilder = new SpannableStringBuilder(message + "\n");
-
- ForegroundColorSpan colorSpan = new ForegroundColorSpan(textColor);
- mMessageBuilder.setSpan(
- colorSpan,
- 0 /*start*/,
- message.length(),
- Spannable.SPAN_INCLUSIVE_INCLUSIVE);
+ public TextAppender(int textViewResId) {
+ mTextView = (TextView) getLayoutInflater().inflate(textViewResId, null /* viewGroup */);
}
- public TextAppender(TextView textView, String message) {
- this(textView, message, textView.getCurrentTextColor());
+ public void setText(String text) {
+ mTextView.setText(text);
}
- @Override
- public void run() {
- mTextView.append(mMessageBuilder);
+ public void setText(int textResId) {
+ mTextView.setText(textResId);
+ }
+
+ public void append() {
+ runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ mLogLayout.addView(mTextView);
+ mLogScrollView.post(new Runnable() {
+ @Override
+ public void run() {
+ mLogScrollView.fullScroll(View.FOCUS_DOWN);
+ }
+ });
+ }
+ });
}
}
@@ -408,102 +447,41 @@
}
}
- // TODO: ideally we want to store the original state of each feature, and make sure that we can
- // restore their values at the end of the test
+ private class DeactivatorActivityHandler implements SensorFeaturesDeactivator.ActivityHandler {
+ private static final int SENSOR_FEATURES_DEACTIVATOR_RESULT = 0;
- protected void askToSetAirplaneMode() throws InterruptedException {
- if (isAirplaneModeOn()) {
- appendText(R.string.snsr_airplane_mode_set);
- appendText(R.string.snsr_on_complete_return);
- return;
+ private CountDownLatch mCountDownLatch;
+
+ @Override
+ public ContentResolver getContentResolver() {
+ return BaseSensorTestActivity.this.getContentResolver();
}
- appendText(R.string.snsr_airplane_mode_request);
- waitForUser();
- launchAndWaitForSubactivity(Settings.ACTION_WIRELESS_SETTINGS);
-
- if (!isAirplaneModeOn()) {
- throw new IllegalStateException("Airplane Mode is not set.");
- }
- }
-
- protected void askToSetScreenOffTimeout(int timeoutInSec) throws InterruptedException {
- long timeoutInMs = TimeUnit.SECONDS.toMillis(timeoutInSec);
- if (isScreenOffTimeout(timeoutInMs)) {
- appendText(getString(R.string.snsr_screen_off_timeout, timeoutInSec));
- return;
+ @Override
+ public void logInstructions(int instructionsResId, Object ... params) {
+ appendText(BaseSensorTestActivity.this.getString(instructionsResId, params));
}
- appendText(getString(R.string.snsr_screen_off_request, timeoutInSec));
- waitForUser();
- launchAndWaitForSubactivity(Settings.ACTION_DISPLAY_SETTINGS);
-
- if (!isScreenOffTimeout(timeoutInMs)) {
- throw new IllegalStateException("'Display Sleep' not set to " + timeoutInSec +
- " seconds.");
+ @Override
+ public void waitForUser() {
+ BaseSensorTestActivity.this.waitForUser();
}
- }
- // TODO: move to sensor assertions
- protected String assertTimestampSynchronization(
- long eventTimestamp,
- long receivedTimestamp,
- long deltaThreshold,
- String sensorName) {
- long timestampDelta = Math.abs(eventTimestamp - receivedTimestamp);
- String timestampMessage = getString(
- R.string.snsr_event_time,
- receivedTimestamp,
- eventTimestamp,
- timestampDelta,
- deltaThreshold,
- sensorName);
- Assert.assertTrue(timestampMessage, timestampDelta < deltaThreshold);
- return timestampMessage;
-
- }
-
- private void launchAndWaitForSubactivity(String action) throws InterruptedException {
- launchAndWaitForSubactivity(new Intent(action));
- }
-
- private void launchAndWaitForSubactivity(Intent intent) throws InterruptedException {
- mCountDownLatch = new CountDownLatch(1);
- startActivityForResult(intent, 0);
- mCountDownLatch.await();
- }
-
- private boolean isAirplaneModeOn() {
- ContentResolver contentResolver = getContentResolver();
- int airplaneModeOn;
- // Settings.System.AIRPLANE_MODE_ON is deprecated in API 17
- if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
- try {
- airplaneModeOn =
- Settings.System.getInt(contentResolver, Settings.System.AIRPLANE_MODE_ON);
- } catch (Settings.SettingNotFoundException e) {
- airplaneModeOn = 0;
- }
- } else {
- try {
- airplaneModeOn =
- Settings.Global.getInt(contentResolver, Settings.Global.AIRPLANE_MODE_ON);
- } catch (Settings.SettingNotFoundException e) {
- airplaneModeOn = 0;
- }
+ @Override
+ public void launchAndWaitForSubactivity(String action) throws InterruptedException {
+ mCountDownLatch = new CountDownLatch(1);
+ Intent intent = new Intent(action);
+ startActivityForResult(intent, SENSOR_FEATURES_DEACTIVATOR_RESULT);
+ mCountDownLatch.await();
}
- return airplaneModeOn != 0;
- }
- private boolean isScreenOffTimeout(long expectedTimeoutInMs) {
- ContentResolver contentResolver = getContentResolver();
- long screenOffTimeoutInMs;
- try {
- screenOffTimeoutInMs =
- Settings.System.getLong(contentResolver, Settings.System.SCREEN_OFF_TIMEOUT);
- } catch(Settings.SettingNotFoundException e) {
- screenOffTimeoutInMs = Integer.MAX_VALUE;
+ public void onActivityResult() {
+ mCountDownLatch.countDown();
}
- return screenOffTimeoutInMs <= expectedTimeoutInMs;
+
+ @Override
+ public String getString(int resId, Object ... params) {
+ return BaseSensorTestActivity.this.getString(resId, params);
+ }
}
}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/BatchingTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/BatchingTestActivity.java
index f536704..9e60dc1 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/BatchingTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/BatchingTestActivity.java
@@ -16,304 +16,206 @@
package com.android.cts.verifier.sensors;
+import com.android.cts.verifier.R;
+
+import junit.framework.Assert;
+
+import android.content.Context;
+import android.hardware.Sensor;
+import android.hardware.SensorEvent;
+import android.hardware.SensorEventListener2;
+import android.hardware.SensorManager;
+import android.hardware.cts.helpers.SensorNotSupportedException;
+import android.hardware.cts.helpers.TestSensorEvent;
+import android.os.Bundle;
+import android.os.PowerManager;
+import android.os.SystemClock;
+
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.TimeUnit;
-import junit.framework.Assert;
-import android.annotation.TargetApi;
-import android.content.Context;
-import android.graphics.Color;
-import android.hardware.Sensor;
-import android.hardware.SensorEvent;
-import android.hardware.SensorEventListener2;
-import android.hardware.SensorManager;
-import android.hardware.cts.helpers.TestSensorEvent;
-import android.media.AudioManager;
-import android.media.ToneGenerator;
-import android.os.Build;
-import android.os.Bundle;
-import android.os.PowerManager;
-import android.os.SystemClock;
-import android.util.Log;
-
/**
* Activity that verifies batching capabilities for sensors
- * (https://source.android.com/devices/sensors/batching.html). If sensor
- * supports the batching mode, FifoReservedEventCount for that sensor should be
- * greater than one.
+ * (https://source.android.com/devices/sensors/batching.html).
+ *
+ * If a sensor supports the batching mode, FifoReservedEventCount for that sensor should be greater
+ * than one.
*/
-@TargetApi(Build.VERSION_CODES.KITKAT)
-public class BatchingTestActivity extends
- BaseSensorSemiAutomatedTestActivity implements SensorEventListener2 {
+public class BatchingTestActivity extends BaseSensorTestActivity implements SensorEventListener2 {
+ public BatchingTestActivity() {
+ super(BatchingTestActivity.class);
+ }
- private final double NANOS_PER_MILLI = 1e6;
- private final int TWO_SECONDS_MILLIS = 2000;
- private final int TEN_SECONDS_MILLIS = 10000;
- private final int DATA_COLLECTION_TIME_IN_MS = TEN_SECONDS_MILLIS;
- private final int MIN_BATCH_TIME_MILLIS = 5000;
- private final int SENSOR_RATE = SensorManager.SENSOR_DELAY_FASTEST;
- private final int MAX_BATCH_REPORT_LATENCY_US = DATA_COLLECTION_TIME_IN_MS * 500;
- private final double MAX_DEVIATION_FROM_AVG = 1.5;
+ private final long TWO_SECONDS_MILLIS = TimeUnit.SECONDS.toMillis(2);
+ private static final long DATA_COLLECTION_TIME_IN_MS = TimeUnit.SECONDS.toMillis(10);
+ private final long MIN_BATCH_TIME_NANOS = TimeUnit.SECONDS.toNanos(5);
+ private final long MAX_BATCH_REPORT_LATENCY_US = DATA_COLLECTION_TIME_IN_MS * 500;
- private SensorManager mSensorManager = null;
- private Sensor mSensorUnderTest = null;
- private List<TestSensorEvent> mSensorEvents = new ArrayList<TestSensorEvent>();
- private int mFifoMaxEventCount = 0;
- private int mFifoReservedEventCount = 0;
- private long mTimeBatchingStarted = 0L;
- private long mTimeFirstBatchedEventReceived = 0L;
- private boolean mSynchronousTimestampsCheck = false;
- private boolean mAssertAtEnd = false;
+ private final List<TestSensorEvent> mSensorEvents = new ArrayList<TestSensorEvent>();
+
+ private SensorManager mSensorManager;
+
+ private volatile Sensor mSensorUnderTest;
+ private volatile long mTimeFirstBatchedEventReceivedNanos;
private CountDownLatch mSensorEventReceived;
private CountDownLatch mFlushCompleteReceived;
private PowerManager.WakeLock mWakeLock;
- private void startBatching(int sensorType, String sensorName) throws Throwable {
- appendText(" Batching...");
-
- mSensorEvents.clear();
- mSensorUnderTest = mSensorManager.getDefaultSensor(sensorType);
- if (mSensorUnderTest == null) {
- Log.d(LOG_TAG, String.format("No default sensor of type %d was found...continuing",
- sensorType));
- return;
- }
-
- mFifoReservedEventCount = mSensorUnderTest.getFifoReservedEventCount();
- mFifoMaxEventCount = mSensorUnderTest.getFifoMaxEventCount();
-
- Assert.assertTrue(
- "FifoReservedEventCount should be 0 or greater and at most FifoMaxEventCount.",
- ((mFifoReservedEventCount <= mFifoMaxEventCount) & (mFifoReservedEventCount >= 0)));
-
- // Time when start batching
- mTimeBatchingStarted = System.currentTimeMillis();
- mTimeFirstBatchedEventReceived = 0;
-
- // Batch with the fastest rate and set report latency large enough to
- // ensure full batching occurs.
- mSensorManager.registerListener(this, mSensorUnderTest, SENSOR_RATE,
- MAX_BATCH_REPORT_LATENCY_US);
- }
-
- private void stopBatching() throws Throwable {
- mSensorManager.flush(this);
- }
-
- private void analyzeData(int sensorType, String sensorName) throws Throwable {
- int numberOfCollectedEvents = mSensorEvents.size();
- assertTrueDeferred(String.format(
- "Sensor %s was not batched eventhough reported Fifo size is nonzero", sensorName),
- numberOfCollectedEvents > 1, false);
- if (numberOfCollectedEvents <= 1)
- return;
-
- boolean isTimeDetectedIncreases = true;
- long maxTimeGapBetweenEventsNanos = 0;
- long sumTimeGapBetweenEventsNanos = 0;
-
- long lastTimeDetected = mSensorEvents.get(0).timestamp;
- for (int i = 1; i < numberOfCollectedEvents; i++) {
- long currentTimeDetected = mSensorEvents.get(i).timestamp;
- if (currentTimeDetected < lastTimeDetected) {
- isTimeDetectedIncreases = false;
- }
- long timeDetectDelta = Math.abs(currentTimeDetected - lastTimeDetected);
- if (timeDetectDelta > maxTimeGapBetweenEventsNanos) {
- maxTimeGapBetweenEventsNanos = timeDetectDelta;
- }
- sumTimeGapBetweenEventsNanos += timeDetectDelta;
-
- lastTimeDetected = currentTimeDetected;
- }
- double maxTimeGapBetweenEventsMillis =
- (double) (maxTimeGapBetweenEventsNanos / NANOS_PER_MILLI);
- double avgTimeGapBetweenEventsMillis =
- (double) (sumTimeGapBetweenEventsNanos / numberOfCollectedEvents / NANOS_PER_MILLI);
- appendText(" Events detected: " + numberOfCollectedEvents);
- appendText(String.format(" Maximum timestamp difference (msec): %6.4f",
- maxTimeGapBetweenEventsMillis));
- appendText(String.format(" Average timestamp difference (msec): %6.4f",
- avgTimeGapBetweenEventsMillis));
-
- if (mSynchronousTimestampsCheck) {
- assertTrueDeferred(String.format("Timestamp gap in events during "
- + " batching %6.4f more than %f times the average %6.4f.\n"
- + "This will fail in future versions of CtsVerifier.",
- maxTimeGapBetweenEventsMillis, MAX_DEVIATION_FROM_AVG,
- avgTimeGapBetweenEventsMillis), (maxTimeGapBetweenEventsMillis
- < MAX_DEVIATION_FROM_AVG * avgTimeGapBetweenEventsMillis), true);
- }
- assertTrueDeferred("Event detection time does not increase monotonically",
- isTimeDetectedIncreases, false);
- }
-
- private void testSensorInBatchingMode(int sensorType, String sensorName) throws Throwable {
- // Register to wait for first sensor event arrival, and when FIFO
- // has been flushed
- mSensorEventReceived = new CountDownLatch(1);
- mFlushCompleteReceived = new CountDownLatch(1);
-
- startBatching(sensorType, sensorName);
-
- // add a buffer to the duration of the test for timeout
- boolean awaitSuccess =
- mSensorEventReceived.await(DATA_COLLECTION_TIME_IN_MS + TWO_SECONDS_MILLIS,
- TimeUnit.MILLISECONDS);
- // verify the minimum batching time
- if((mTimeFirstBatchedEventReceived - mTimeBatchingStarted) >= MIN_BATCH_TIME_MILLIS) {
- appendText(" ...events arrived at batch report latency as expected.");
- }
- assertTrueDeferred(String.format(
- "Batching did not wait the minimum %d msec to report first event.",
- MIN_BATCH_TIME_MILLIS),
- ((mTimeFirstBatchedEventReceived - mTimeBatchingStarted) >= MIN_BATCH_TIME_MILLIS)
- && awaitSuccess, false);
- // batch a bit more to test the flush
- Thread.sleep((int) (0.5*MIN_BATCH_TIME_MILLIS));
- stopBatching();
-
- boolean flushAwaitSuccess =
- mFlushCompleteReceived.await(DATA_COLLECTION_TIME_IN_MS + TWO_SECONDS_MILLIS,
- TimeUnit.MILLISECONDS);
- if (flushAwaitSuccess) {
- appendText(" ...events arrived after flush batching as expected.");
- analyzeData(sensorType, sensorName);
- } else {
- appendText("FIFO flush event not received.", Color.RED);
- mAssertAtEnd = true;
- }
- }
-
- private void assertTrueDeferred(String msg, boolean condition, boolean onlyWarn) {
- if (!condition) {
- if (onlyWarn) {
- appendText(msg, Color.YELLOW);
- } else {
- appendText(msg, Color.RED);
- mAssertAtEnd = true;
- }
- }
- }
-
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
- // TODO: extend TestSensorManager to batching cases as needed and
- // refactor there
- mSensorManager = (SensorManager) getApplicationContext()
- .getSystemService(Context.SENSOR_SERVICE);
+ }
+ @Override
+ protected void activitySetUp() throws InterruptedException {
+ mSensorManager = (SensorManager) getSystemService(Context.SENSOR_SERVICE);
PowerManager powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
mWakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, "BatchingTests");
- }
- @Override
- protected void onPause() {
- super.onPause();
- mWakeLock.release();
- mSensorManager.unregisterListener(this);
- }
-
- // TODO: refactor to use beep in upstream SensorCtsHelper after merge
- private void beep() {
- final ToneGenerator tg = new ToneGenerator(
- AudioManager.STREAM_NOTIFICATION, 100);
- tg.startTone(ToneGenerator.TONE_PROP_BEEP);
- }
-
- @Override
- protected void onRun() throws Throwable {
- List<Sensor> walkingNeeded = new ArrayList<Sensor>();
- walkingNeeded.add(mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER));
- walkingNeeded.add(mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR));
-
- List<Sensor> relaxedTimestampReq = new ArrayList<Sensor>();
- relaxedTimestampReq.add(mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY));
- relaxedTimestampReq.add(mSensorManager.getDefaultSensor(Sensor.TYPE_LIGHT));
-
- // TODO: can launch a UI to show user where to turn off screen rotation
- appendText("Turn off all features that register for sensors including screen rotation"
- + " then click 'Next' to start batching tests.");
-
+ mSensorFeaturesDeactivator.requestDeactivationOfFeatures();
mWakeLock.acquire();
+ }
- mAssertAtEnd = false;
+ @Override
+ protected void activityCleanUp() throws InterruptedException {
+ mWakeLock.release();
+ mSensorFeaturesDeactivator.requestToRestoreFeatures();
+ }
+
+ // TODO: refactor to discover all available sensors of each type and dinamically generate test
+ // cases for all of them
+ public String testStepCounter() throws Throwable {
+ return runTest(Sensor.TYPE_STEP_COUNTER, R.string.snsr_batching_walking_needed);
+ }
+
+ public String testStepDetector() throws Throwable {
+ return runTest(Sensor.TYPE_STEP_DETECTOR, R.string.snsr_batching_walking_needed);
+ }
+
+ public String testProximity() throws Throwable {
+ return runTest(Sensor.TYPE_PROXIMITY, R.string.snsr_batching_interrupt_needed);
+ }
+
+ public String testLight() throws Throwable {
+ return runTest(Sensor.TYPE_LIGHT, R.string.snsr_batching_interrupt_needed);
+ }
+
+ // TODO: move sensors that do not require interaction to CTS
+ public String testGameRotationVector() throws Throwable {
+ return runTest(Sensor.TYPE_GAME_ROTATION_VECTOR, R.string.snsr_batching_no_interaction);
+ }
+
+ public String testGeomagneticRotationVector() throws Throwable {
+ return runTest(Sensor.TYPE_GEOMAGNETIC_ROTATION_VECTOR, R.string.snsr_batching_no_interaction);
+ }
+
+ public String testAccelerometer() throws Throwable {
+ return runTest(Sensor.TYPE_ACCELEROMETER, R.string.snsr_batching_no_interaction);
+ }
+
+ public String testGyroscope() throws Throwable {
+ return runTest(Sensor.TYPE_GYROSCOPE, R.string.snsr_batching_no_interaction);
+ }
+
+ public String testGyroscopeUncalibrated() throws Throwable {
+ return runTest(Sensor.TYPE_GYROSCOPE_UNCALIBRATED, R.string.snsr_batching_no_interaction);
+ }
+
+ public String testMagneticField() throws Throwable {
+ return runTest(Sensor.TYPE_MAGNETIC_FIELD, R.string.snsr_batching_no_interaction);
+ }
+
+ public String testMagneticFieldUncalibrated() throws Throwable {
+ return runTest(Sensor.TYPE_MAGNETIC_FIELD_UNCALIBRATED, R.string.snsr_batching_no_interaction);
+ }
+
+ public String testRotationVector() throws Throwable {
+ return runTest(Sensor.TYPE_ROTATION_VECTOR, R.string.snsr_batching_no_interaction);
+ }
+
+ // TODO: split batching and flush scenarios
+ private String runTest(int sensorType, int instructionsResId) throws Throwable {
+ mSensorUnderTest = mSensorManager.getDefaultSensor(sensorType);
+ // TODO: add exception for batching not supported
+ if (mSensorUnderTest == null || mSensorUnderTest.getFifoMaxEventCount() < 1) {
+ throw new SensorNotSupportedException(Sensor.TYPE_STEP_COUNTER);
+ }
+
+ appendText(instructionsResId);
waitForUser();
- clearText();
- // step batching needs user movement
- appendText("Walk to batch step events", Color.GREEN);
- for (Sensor ssr : walkingNeeded) {
- appendText(String.format("\nSensor %s\n FifoMaxEventCount: %d", ssr.getName(),
- ssr.getFifoMaxEventCount()));
- if (ssr.getFifoMaxEventCount() > 1) {
- mSynchronousTimestampsCheck = false;
- testSensorInBatchingMode(ssr.getType(), ssr.getName());
- } else {
- appendText("Batching not supported, continuing...", Color.YELLOW);
- }
- }
+ // Register to wait for first sensor event arrival, and when FIFO has been flushed
+ mSensorEventReceived = new CountDownLatch(1);
+ mFlushCompleteReceived = new CountDownLatch(1);
+ mSensorEvents.clear();
- beep();
- appendText("Walking tests done, click 'Next' for additional batching tests", Color.GREEN);
- waitForUser();
- clearText();
+ int fifoReservedEventCount = mSensorUnderTest.getFifoReservedEventCount();
+ int fifoMaxEventCount = mSensorUnderTest.getFifoMaxEventCount();
+ String fifoMessage = getString(
+ R.string.snsr_batching_fifo_count,
+ fifoReservedEventCount,
+ fifoMaxEventCount);
+ Assert.assertTrue(fifoMessage, fifoReservedEventCount <= fifoMaxEventCount);
- // proximity (and sometimes light) are interrupt based and hence should
- // have user intervention
- appendText("Wave hand over the proximity sensor (usually near top front of device)",
- Color.GREEN);
- for (Sensor ssr : relaxedTimestampReq) {
- appendText(String.format("\nSensor %s\n FifoMaxEventCount: %d", ssr.getName(),
- ssr.getFifoMaxEventCount()));
- if (ssr.getFifoMaxEventCount() > 1) {
- mSynchronousTimestampsCheck = false;
- testSensorInBatchingMode(ssr.getType(), ssr.getName());
- } else {
- appendText("Batching not supported, continuing...", Color.YELLOW);
- }
- }
+ // Time when start batching
+ mTimeFirstBatchedEventReceivedNanos = 0;
+ long timeBatchingStartedNanos = SystemClock.elapsedRealtimeNanos();
- beep();
- appendText("Interrupt based tests done, click 'Next' for additional batching tests",
- Color.GREEN);
- waitForUser();
- clearText();
+ // Batch with the fastest rate and set report latency large enough to ensure full batching
+ // occurs
+ boolean registerResult = mSensorManager.registerListener(
+ this /* listener */,
+ mSensorUnderTest,
+ SensorManager.SENSOR_DELAY_FASTEST,
+ (int) MAX_BATCH_REPORT_LATENCY_US);
+ Assert.assertTrue(
+ getString(R.string.snsr_register_listener, registerResult),
+ registerResult);
- appendText("Remaining sensors will be tested for batching.", Color.GREEN);
- for (Sensor ssr : mSensorManager.getSensorList(Sensor.TYPE_ALL)) {
- if (walkingNeeded.contains(ssr) || relaxedTimestampReq.contains(ssr)) {
- continue;
- }
- appendText(String.format("\nSensor %s\n FifoMaxEventCount: %d", ssr.getName(),
- ssr.getFifoMaxEventCount()));
- if (ssr.getFifoMaxEventCount() > 1) {
- mSynchronousTimestampsCheck = true;
- testSensorInBatchingMode(ssr.getType(), ssr.getName());
- } else {
- appendText("Batching not supported, continuing...", Color.YELLOW);
- }
- }
+ // add a buffer to the duration of the test for timeout
+ mSensorEventReceived
+ .await(DATA_COLLECTION_TIME_IN_MS + TWO_SECONDS_MILLIS, TimeUnit.MILLISECONDS);
+ // TODO: add delayed assertion for await
- beep();
- if (mAssertAtEnd) {
- Assert.fail("\nSome batching test failures occurred.");
- }
- appendText("\nAll batching tests passed.", Color.GREEN);
+ // verify the minimum batching time
+ long firstTimeArrivalDelta = mTimeFirstBatchedEventReceivedNanos - timeBatchingStartedNanos;
+ String firstTimeArrivalMessage = getString(
+ R.string.snsr_batching_first_event_arrival,
+ MIN_BATCH_TIME_NANOS,
+ firstTimeArrivalDelta);
+ Assert.assertTrue(firstTimeArrivalMessage, firstTimeArrivalDelta >= MIN_BATCH_TIME_NANOS);
+
+ // batch a bit more to test the flush
+ long sleepTime = TimeUnit.NANOSECONDS.toMillis(MIN_BATCH_TIME_NANOS / 2);
+ Thread.sleep(sleepTime);
+ mSensorManager.flush(this);
+
+ boolean flushAwaitSuccess = mFlushCompleteReceived
+ .await(DATA_COLLECTION_TIME_IN_MS + TWO_SECONDS_MILLIS, TimeUnit.MILLISECONDS);
+ Assert.assertTrue(
+ getString(R.string.snsr_batching_flush_complete, flushAwaitSuccess),
+ flushAwaitSuccess);
+
+ playSound();
+ // TODO: use SensorTestVerifications to check for event ordering and event gap
+ return null;
}
@Override
public void onSensorChanged(SensorEvent sensorEvent) {
- if (sensorEvent.sensor.getType() == mSensorUnderTest.getType()) {
- mSensorEvents.add(new TestSensorEvent(sensorEvent, SystemClock.elapsedRealtimeNanos()));
- if (mTimeFirstBatchedEventReceived == 0) {
- mTimeFirstBatchedEventReceived = System.currentTimeMillis();
- mSensorEventReceived.countDown();
- }
+ long elapsedTime = SystemClock.elapsedRealtimeNanos();
+ if (sensorEvent.sensor.getType() != mSensorUnderTest.getType()) {
+ // TODO: add delayed assertion
+ return;
+ }
+
+ mSensorEvents.add(new TestSensorEvent(sensorEvent, elapsedTime));
+ if (mTimeFirstBatchedEventReceivedNanos == 0) {
+ mTimeFirstBatchedEventReceivedNanos = elapsedTime;
+ mSensorEventReceived.countDown();
}
}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/SensorPowerTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/SensorPowerTestActivity.java
index 97901ac..f992107 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/SensorPowerTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/SensorPowerTestActivity.java
@@ -20,9 +20,10 @@
import junit.framework.Assert;
+import java.util.concurrent.TimeUnit;
+
public class SensorPowerTestActivity extends BaseSensorTestActivity implements
PowerTestHostLink.HostToDeviceInterface {
-
public class TestExecutionException extends Exception {
public TestExecutionException(final String message) {
super(message);
@@ -33,7 +34,6 @@
super(SensorPowerTestActivity.class);
}
- private String TAG = "SensorPowerTestActivity";
private PowerTestHostLink mHostLink;
/** HostToDeviceInterface implementation **/
@@ -57,19 +57,30 @@
setTestResult(testId, testResult, testDetails);
}
+ @Override
+ protected void activitySetUp() throws InterruptedException {
+ mSensorFeaturesDeactivator.requestToSetScreenOffTimeout(15, TimeUnit.SECONDS);
+ mSensorFeaturesDeactivator.requestDeactivationOfFeatures();
+ }
+
+ @Override
+ protected void activityCleanUp() throws InterruptedException {
+ if (mHostLink != null) {
+ mHostLink.close();
+ }
+
+ mSensorFeaturesDeactivator.requestToRestoreFeatures();
+ mSensorFeaturesDeactivator.requestToResetScreenOffTimeout();
+ }
+
public String testSensorsPower() throws Throwable {
String testDetails = "";
if (mHostLink == null) {
// prepare Activity screen to show instructions to the operator
clearText();
- // test setup, make sure the device is in the correct state before
- // executing the scenarios
- askToSetAirplaneMode();
- askToSetScreenOffTimeout(15 /* seconds */);
-
// ask the operator to set up the host
- appendText("Connect the device to the host machine.");
+ appendText("Connect the device to the host machine via the USB passthrough.");
appendText("Execute the following script (the command is available in CtsVerifier.zip):");
appendText(" # python power/execute_power_tests.py --power_monitor <implementation> --run");
appendText("where \"<implementation>\" is the power monitor implementation being used, for example \"monsoon\"");
@@ -85,14 +96,14 @@
// sequentially here:
final PowerTestHostLink.PowerTestResult testResult = mHostLink.run();
testDetails = testResult.testDetails;
- Assert.assertEquals(testDetails, 0, testResult.failedCount );
+ Assert.assertEquals(testDetails, 0, testResult.failedCount);
} finally {
mHostLink.close();
mHostLink = null;
}
} else {
- throw new IllegalStateException("Attempt to run test twice");
+ throw new IllegalStateException("Attempt to run test twice");
}
return testDetails;
}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/StepCounterTestActivity.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/StepCounterTestActivity.java
index fd1f057..cc75a11 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/StepCounterTestActivity.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/StepCounterTestActivity.java
@@ -71,7 +71,7 @@
mSensorStepCounter = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_COUNTER);
mSensorStepDetector = mSensorManager.getDefaultSensor(Sensor.TYPE_STEP_DETECTOR);
- View screen = findViewById(R.id.log_text);
+ View screen = findViewById(R.id.log_layout);
screen.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/PowerTestHostLink.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/PowerTestHostLink.java
index f8b7dda..828baaa 100644
--- a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/PowerTestHostLink.java
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/PowerTestHostLink.java
@@ -27,69 +27,56 @@
import android.net.LocalSocket;
import android.os.PowerManager;
import android.provider.Settings;
-import android.provider.Settings.SettingNotFoundException;
import android.util.Log;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
-import java.text.DateFormat;
-import java.util.Date;
import java.util.List;
import java.util.StringTokenizer;
/*
- * This class handles communication with the host to respond to commands
- * The command/response link is through a TCP socket on the host side,
- * forwarded via adb to a local socket on the device. The system uses a
- * standard "accept-read_command-send_response-close" to execute commands
- * sent from the host.
+ * This class handles communication with the host to respond to commands.
+ * The command/response link is through a TCP socket on the host side, forwarded via adb to a local
+ * socket on the device. The system uses a standard "accept-read_command-send_response-close" to
+ * execute commands sent from the host.
*
- * CAUTION: The local socket name (SOCKET_NAME below) must match that used by the host
- * to set up the adb-forwarding.
+ * CAUTION: The local socket name (SOCKET_NAME below) must match that used by the host to set up
+ * the adb-forwarding.
*/
public class PowerTestHostLink {
/*
- * Host-to-device bridge will use a Listener instance to drive the test via
- * the CtsVerifier running on the device.
+ * Host-to-device bridge will use a Listener instance to drive the test via the CtsVerifier
+ * running on the device.
*/
public interface HostToDeviceInterface {
-
- public void logTestResult(final String testName,
- final SensorTestResult result,
- final String message);
-
- public void raiseError(final String testName, final String message) throws Exception;
-
- public void waitForUserAcknowledgement(final String message);
-
- public void logText(String text);
-
+ void logTestResult(String testName, SensorTestResult result, String message);
+ void raiseError(String testName, String message) throws Exception;
+ void waitForUserAcknowledgement(String message);
+ void logText(String text);
};
-
- /** This is a data-only message to communicate result of a power test **/
+
+ /** This is a data-only message to communicate result of a power test */
public class PowerTestResult{
public int passedCount = 0;
public int skippedCount = 0;
public int failedCount = 0;
public String testDetails = "";
};
-
+
public final String TAG = "PowerTestHostLink";
/**
- * Standard response types back to host. Host-side code must match these
- * definitions
+ * Standard response types back to host. Host-side code must match these definitions.
*/
private final static String RESPONSE_OK = "OK";
private final static String RESPONSE_ERR = "ERR";
private final static String RESPONSE_UNAVAILABLE = "UNAVAILABLE";
/**
- * Socket name for host adb forwarded communications. Must match naem in
- * host-side code
+ * Socket name for host adb forwarded communications. Must match naem in host-side code.
*/
public final static String SOCKET_NAME = "/android/cts/powertest";
@@ -126,17 +113,15 @@
}
/**
- * Ensure connection to host is closed; stop accepting requests
+ * Ensure connection to host is closed; stop accepting requests.
**/
public void close() {
mStopThread = true;
}
-
-
/**
- * Run the suite of tests via the host, responding to host requests
- *
+ * Run the suite of tests via the host, responding to host requests.
+ *
* @return number of failed test cases
* @throws Exception
*/
@@ -206,8 +191,7 @@
Log.d(TAG, "Sending response " + response);
streamOut.write(response.getBytes(), 0, response.length());
}
- // null response means response is defered awaiting user
- // response
+ // null response means response is defered awaiting user response
} catch (Exception e) {
Log.e(TAG, "Error executing " + clientRequest, e);
streamOut.write(RESPONSE_ERR.getBytes(), 0, RESPONSE_ERR.length());
@@ -229,21 +213,18 @@
}
}
mHostToDeviceExecutor.logText("Device disconnected.");
- if (mStringBuilder!=null){
+ if (mStringBuilder != null){
mTestResult.testDetails = mStringBuilder.toString();
}
Log.d(TAG, "Returning " + mTestResult.passedCount + "passed " + mTestResult.skippedCount + "skipped " +
mTestResult.failedCount + "failed :" + mTestResult.testDetails);
return mTestResult;
}
-
- protected String processClientRequest(String request) throws SettingNotFoundException,
- Exception {
+ protected String processClientRequest(String request) throws Exception {
final String USER_REQUEST = "REQUEST USER RESPONSE";
String response = RESPONSE_ERR;
- // Queries must appear first and then commands to direct actions after
- // in this if/else construct
+ // Queries must appear first and then commands to direct actions after in these statements
if (request.startsWith("SCREEN OFF TIMEOUT?")) {
int timeout = Settings.System.getInt(mContext.getContentResolver(),
Settings.System.SCREEN_OFF_TIMEOUT);
@@ -264,7 +245,7 @@
} else if (request.startsWith("EXTERNAL STORAGE?")){
response = System.getenv("EXTERNAL_STORAGE");
Log.d(TAG,"External storage is " + response);
- }else if (request.startsWith("SCREEN OFF?")) {
+ } else if (request.startsWith("SCREEN OFF?")) {
boolean screenOn = mPowerManager.isScreenOn();
response = screenOn ? RESPONSE_ERR : RESPONSE_OK;
} else if (request.startsWith("SCREEN ON?")) {
@@ -307,12 +288,8 @@
return response;
}
- protected String getCurrentTime() {
- return DateFormat.getDateTimeInstance().format(new Date());
- }
-
protected String handleSetTestResultCmd(final String request) {
- String response = RESPONSE_OK;
+ String response;
StringTokenizer tokenizer = new StringTokenizer(request, " ");
String testName = "";
SensorTestResult result = SensorTestResult.FAIL;
@@ -358,7 +335,7 @@
}
protected String handleSensorSensorSwitchCmd(String sensorList, boolean switchOn) {
- String response = RESPONSE_ERR;
+ String response;
try {
StringTokenizer tokenizer = new StringTokenizer(sensorList, " ");
int n = tokenizer.countTokens();
@@ -432,7 +409,7 @@
}
protected String switchSensor(int sensorId, boolean switchOn, String requestFrequency) {
- String response = RESPONSE_ERR;
+ String response;
int rateUs = SensorManager.SENSOR_DELAY_NORMAL;
if (requestFrequency.compareToIgnoreCase("SENSOR_DELAY_FASTEST") == 0) {
@@ -479,5 +456,4 @@
public void onSensorChanged(SensorEvent event) {
}
};
-
}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/SensorFeaturesDeactivator.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/SensorFeaturesDeactivator.java
new file mode 100644
index 0000000..9e6e04f
--- /dev/null
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/SensorFeaturesDeactivator.java
@@ -0,0 +1,223 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.cts.verifier.sensors.helpers;
+
+import com.android.cts.verifier.R;
+
+import android.content.ContentResolver;
+import android.os.Build;
+import android.provider.Settings;
+import android.util.Log;
+
+import java.util.concurrent.TimeUnit;
+
+/**
+ * A helper class that provides a mechanism to prompt users to deactivate features that are known
+ * to register for sensor data.
+ *
+ * It also keeps stored the initial state for each feature modified.
+ */
+public class SensorFeaturesDeactivator {
+ private static final String TAG = "SensorFeaturesDeactivator";
+
+ private final ActivityHandler mActivityHandler;
+
+ private boolean mInitialStateCaptured;
+ private long mScreenOffTimeoutInMs;
+
+ private final SensorSettingContainer mAirplaneMode;
+ private final SensorSettingContainer mScreenBrightnessMode;
+ private final SensorSettingContainer mAutoRotateScreenMode;
+ private final SensorSettingContainer mLocationMode;
+
+ public interface ActivityHandler {
+ ContentResolver getContentResolver();
+ void logInstructions(int instructionsResId, Object ... params);
+ void waitForUser();
+ void launchAndWaitForSubactivity(String action) throws InterruptedException;
+ String getString(int resId, Object ... params);
+ }
+
+ public SensorFeaturesDeactivator(ActivityHandler activityHandler) {
+ mActivityHandler = activityHandler;
+ mAirplaneMode = new AirplaneModeSettingContainer();
+ mScreenBrightnessMode = new ScreenBrightnessModeSettingContainer();
+ mAutoRotateScreenMode = new AutoRotateScreenModeSettingContainer();
+ mLocationMode = new LocationModeSettingContainer();
+ }
+
+ public synchronized void requestDeactivationOfFeatures() throws InterruptedException {
+ captureInitialState();
+
+ mAirplaneMode.requestToSetMode(true);
+ mScreenBrightnessMode.requestToSetMode(false);
+ mAutoRotateScreenMode.requestToSetMode(false);
+ mLocationMode.requestToSetMode(false);
+
+ // TODO: try to use adb shell dumpsys sensorservice to find out if there are clients still
+ // registered at this time
+ mActivityHandler.logInstructions(R.string.snsr_sensor_feature_deactivation);
+ mActivityHandler.waitForUser();
+ }
+
+ public synchronized void requestToRestoreFeatures() throws InterruptedException {
+ if (!isInitialStateCaptured()) {
+ return;
+ }
+ mAirplaneMode.requestToResetMode();
+ mScreenBrightnessMode.requestToResetMode();
+ mAutoRotateScreenMode.requestToResetMode();
+ mLocationMode.requestToResetMode();
+ }
+
+ public synchronized void requestToResetScreenOffTimeout() throws InterruptedException {
+ if (!isInitialStateCaptured()) {
+ return;
+ }
+ try {
+ requestToSetScreenOffTimeout(mScreenOffTimeoutInMs, TimeUnit.MILLISECONDS);
+ } catch (IllegalStateException e) {
+ Log.e(TAG, "Error resetting screen off timeout.", e);
+ }
+ }
+
+ public synchronized void requestToSetScreenOffTimeout(long timeout, TimeUnit timeUnit)
+ throws InterruptedException {
+ captureInitialState();
+
+ String settingName = mActivityHandler.getString(R.string.snsr_setting_auto_screen_off_mode);
+ long timeoutInMs = TimeUnit.MILLISECONDS.convert(timeout, timeUnit);
+ long timeoutInSec = TimeUnit.SECONDS.convert(timeout, timeUnit);
+ if (isScreenOffTimeout(timeoutInMs)) {
+ mActivityHandler.logInstructions(
+ R.string.snsr_setting_mode_set,
+ settingName,
+ timeoutInSec + "s");
+ return;
+ }
+
+ mActivityHandler.logInstructions(
+ R.string.snsr_setting_mode_request,
+ settingName,
+ timeoutInSec + "s");
+ mActivityHandler.logInstructions(R.string.snsr_on_complete_return);
+ mActivityHandler.waitForUser();
+ mActivityHandler.launchAndWaitForSubactivity(Settings.ACTION_DISPLAY_SETTINGS);
+
+ if (!isScreenOffTimeout(timeoutInMs)) {
+ String message = mActivityHandler
+ .getString(R.string.snsr_setting_mode_not_set, settingName, timeoutInSec + "s");
+ throw new IllegalStateException(message);
+ }
+ }
+
+ private void captureInitialState() {
+ if (mInitialStateCaptured) {
+ return;
+ }
+
+ mAirplaneMode.captureInitialState();
+ mScreenBrightnessMode.captureInitialState();
+ mAutoRotateScreenMode.captureInitialState();
+ mLocationMode.captureInitialState();
+ mScreenOffTimeoutInMs = getScreenOffTimeoutInMs();
+
+ mInitialStateCaptured = true;
+ }
+
+ private boolean isInitialStateCaptured() {
+ return mInitialStateCaptured;
+ }
+
+ private boolean isScreenOffTimeout(long expectedTimeoutInMs) {
+ return getScreenOffTimeoutInMs() == expectedTimeoutInMs;
+ }
+
+ private long getScreenOffTimeoutInMs() {
+ return Settings.System.getLong(
+ mActivityHandler.getContentResolver(),
+ Settings.System.SCREEN_OFF_TIMEOUT,
+ Integer.MAX_VALUE);
+ }
+
+ private class AirplaneModeSettingContainer extends SensorSettingContainer {
+ public AirplaneModeSettingContainer() {
+ super(mActivityHandler,
+ Settings.ACTION_WIRELESS_SETTINGS,
+ R.string.snsr_setting_airplane_mode);
+ }
+
+ @Override
+ protected int getSettingMode() {
+ ContentResolver contentResolver = mActivityHandler.getContentResolver();
+ // Settings.System.AIRPLANE_MODE_ON is deprecated in API 17
+ if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
+ return Settings.System.getInt(contentResolver, Settings.System.AIRPLANE_MODE_ON, 0);
+ } else {
+ return Settings.Global.getInt(contentResolver, Settings.Global.AIRPLANE_MODE_ON, 0);
+ }
+ }
+ }
+
+ private class ScreenBrightnessModeSettingContainer extends SensorSettingContainer {
+ public ScreenBrightnessModeSettingContainer() {
+ super(mActivityHandler,
+ Settings.ACTION_DISPLAY_SETTINGS,
+ R.string.snsr_setting_screen_brightness_mode);
+ }
+
+ @Override
+ public int getSettingMode() {
+ return Settings.System.getInt(
+ mActivityHandler.getContentResolver(),
+ Settings.System.SCREEN_BRIGHTNESS_MODE,
+ Settings.System.SCREEN_BRIGHTNESS_MODE_MANUAL);
+ }
+ }
+
+ private class AutoRotateScreenModeSettingContainer extends SensorSettingContainer {
+ public AutoRotateScreenModeSettingContainer() {
+ super(mActivityHandler,
+ Settings.ACTION_ACCESSIBILITY_SETTINGS,
+ R.string.snsr_setting_auto_rotate_screen_mode);
+ }
+
+ @Override
+ protected int getSettingMode() {
+ return Settings.System.getInt(
+ mActivityHandler.getContentResolver(),
+ Settings.System.ACCELEROMETER_ROTATION,
+ 0 /* default */);
+ }
+ }
+
+ private class LocationModeSettingContainer extends SensorSettingContainer {
+ public LocationModeSettingContainer() {
+ super(mActivityHandler,
+ Settings.ACTION_LOCATION_SOURCE_SETTINGS,
+ R.string.snsr_setting_location_mode);
+ }
+
+ @Override
+ protected int getSettingMode() {
+ return Settings.Secure.getInt(
+ mActivityHandler.getContentResolver(),
+ Settings.Secure.LOCATION_MODE,
+ Settings.Secure.LOCATION_MODE_OFF);
+ }
+ }
+}
diff --git a/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/SensorSettingContainer.java b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/SensorSettingContainer.java
new file mode 100644
index 0000000..aa73d6c
--- /dev/null
+++ b/apps/CtsVerifier/src/com/android/cts/verifier/sensors/helpers/SensorSettingContainer.java
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+
+package com.android.cts.verifier.sensors.helpers;
+
+import com.android.cts.verifier.R;
+
+import android.util.Log;
+
+/**
+ * A helper class for {@link SensorFeaturesDeactivator}. It abstracts the responsibility of handling
+ * device settings that affect sensors.
+ *
+ * This class is not thread safe. It is meant to be used only by {@link SensorFeaturesDeactivator}.
+ */
+abstract class SensorSettingContainer {
+ private static final String TAG = "SensorSettingContainer";
+ private final SensorFeaturesDeactivator.ActivityHandler mActivityHandler;
+ private final String mAction;
+ private final int mSettingNameResId;
+
+ private boolean mCapturedModeOn;
+
+ public SensorSettingContainer(
+ SensorFeaturesDeactivator.ActivityHandler activityHandler,
+ String action,
+ int settingNameResId) {
+ mActivityHandler = activityHandler;
+ mAction = action;
+ mSettingNameResId = settingNameResId;
+ }
+
+ public void captureInitialState() {
+ mCapturedModeOn = getCurrentSettingMode();
+ }
+
+ public synchronized void requestToSetMode(boolean modeOn) throws InterruptedException {
+ String settingName = mActivityHandler.getString(mSettingNameResId);
+ if (getCurrentSettingMode() == modeOn) {
+ mActivityHandler.logInstructions(R.string.snsr_setting_mode_set, settingName, modeOn);
+ return;
+ }
+
+ mActivityHandler.logInstructions(R.string.snsr_setting_mode_request, settingName, modeOn);
+ mActivityHandler.logInstructions(R.string.snsr_on_complete_return);
+ mActivityHandler.waitForUser();
+
+ mActivityHandler.launchAndWaitForSubactivity(mAction);
+ if (getCurrentSettingMode() != modeOn) {
+ String message = mActivityHandler
+ .getString(R.string.snsr_setting_mode_not_set, settingName, modeOn);
+ throw new IllegalStateException(message);
+ }
+ }
+
+ public synchronized void requestToResetMode() throws InterruptedException {
+ try {
+ requestToSetMode(mCapturedModeOn);
+ } catch (IllegalStateException e) {
+ Log.e(TAG, "Error restoring state of action: " + mAction, e);
+ }
+ }
+
+ private boolean getCurrentSettingMode() {
+ return getSettingMode() != 0;
+ }
+
+ protected abstract int getSettingMode();
+}
diff --git a/libs/testserver/src/android/webkit/cts/TestWebServer.java b/libs/testserver/src/android/webkit/cts/TestWebServer.java
new file mode 100644
index 0000000..9f03939
--- /dev/null
+++ b/libs/testserver/src/android/webkit/cts/TestWebServer.java
@@ -0,0 +1,625 @@
+// Copyright 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+// Any changes to this file should be done in upstream chromium.org:
+// net/test/android/javatests/src/org/chromium/net/test/util/TestWebServer.java
+
+package android.webkit.cts;
+
+import android.util.Base64;
+import android.util.Log;
+import android.util.Pair;
+
+import org.apache.http.HttpException;
+import org.apache.http.HttpRequest;
+import org.apache.http.HttpResponse;
+import org.apache.http.HttpStatus;
+import org.apache.http.HttpVersion;
+import org.apache.http.RequestLine;
+import org.apache.http.StatusLine;
+import org.apache.http.entity.ByteArrayEntity;
+import org.apache.http.impl.DefaultHttpServerConnection;
+import org.apache.http.impl.cookie.DateUtils;
+import org.apache.http.message.BasicHttpResponse;
+import org.apache.http.params.BasicHttpParams;
+import org.apache.http.params.CoreProtocolPNames;
+import org.apache.http.params.HttpParams;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.ServerSocket;
+import java.net.Socket;
+import java.net.URI;
+import java.net.URL;
+import java.net.URLConnection;
+import java.security.KeyManagementException;
+import java.security.KeyStore;
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.X509Certificate;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
+import javax.net.ssl.HostnameVerifier;
+import javax.net.ssl.HttpsURLConnection;
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.KeyManagerFactory;
+import javax.net.ssl.SSLContext;
+import javax.net.ssl.SSLSession;
+import javax.net.ssl.X509TrustManager;
+
+/**
+ * Simple http test server for testing.
+ *
+ * This server runs in a thread in the current process, so it is convenient
+ * for loopback testing without the need to setup tcp forwarding to the
+ * host computer.
+ *
+ * Based heavily on the CTSWebServer in Android.
+ */
+public class TestWebServer {
+ private static final String TAG = "TestWebServer";
+
+ public static final String SHUTDOWN_PREFIX = "/shutdown";
+
+ private static TestWebServer sInstance;
+ private static TestWebServer sSecureInstance;
+ private static Hashtable<Integer, String> sReasons;
+
+ private final ServerThread mServerThread;
+ private String mServerUri;
+ private final boolean mSsl;
+
+ private static class Response {
+ final byte[] mResponseData;
+ final List<Pair<String, String>> mResponseHeaders;
+ final boolean mIsRedirect;
+ final Runnable mResponseAction;
+ final boolean mIsNotFound;
+
+ Response(byte[] responseData, List<Pair<String, String>> responseHeaders,
+ boolean isRedirect, boolean isNotFound, Runnable responseAction) {
+ mIsRedirect = isRedirect;
+ mIsNotFound = isNotFound;
+ mResponseData = responseData;
+ mResponseHeaders = responseHeaders == null ?
+ new ArrayList<Pair<String, String>>() : responseHeaders;
+ mResponseAction = responseAction;
+ }
+ }
+
+ // The Maps below are modified on both the client thread and the internal server thread, so
+ // need to use a lock when accessing them.
+ private final Object mLock = new Object();
+ private final Map<String, Response> mResponseMap = new HashMap<String, Response>();
+ private final Map<String, Integer> mResponseCountMap = new HashMap<String, Integer>();
+ private final Map<String, HttpRequest> mLastRequestMap = new HashMap<String, HttpRequest>();
+
+ /**
+ * Create and start a local HTTP server instance.
+ * @param ssl True if the server should be using secure sockets.
+ * @throws Exception
+ */
+ public TestWebServer(boolean ssl) throws Exception {
+ mSsl = ssl;
+ if (mSsl) {
+ mServerUri = "https:";
+ if (sSecureInstance != null) {
+ sSecureInstance.shutdown();
+ }
+ } else {
+ mServerUri = "http:";
+ if (sInstance != null) {
+ sInstance.shutdown();
+ }
+ }
+
+ setInstance(this, mSsl);
+ mServerThread = new ServerThread(this, mSsl);
+ mServerThread.start();
+ mServerUri += "//localhost:" + mServerThread.mSocket.getLocalPort();
+ }
+
+ /**
+ * Terminate the http server.
+ */
+ public void shutdown() {
+ try {
+ // Avoid a deadlock between two threads where one is trying to call
+ // close() and the other one is calling accept() by sending a GET
+ // request for shutdown and having the server's one thread
+ // sequentially call accept() and close().
+ URL url = new URL(mServerUri + SHUTDOWN_PREFIX);
+ URLConnection connection = openConnection(url);
+ connection.connect();
+
+ // Read the input from the stream to send the request.
+ InputStream is = connection.getInputStream();
+ is.close();
+
+ // Block until the server thread is done shutting down.
+ mServerThread.join();
+
+ } catch (MalformedURLException e) {
+ throw new IllegalStateException(e);
+ } catch (InterruptedException e) {
+ throw new RuntimeException(e);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ } catch (NoSuchAlgorithmException e) {
+ throw new IllegalStateException(e);
+ } catch (KeyManagementException e) {
+ throw new IllegalStateException(e);
+ }
+
+ setInstance(null, mSsl);
+ }
+
+ private static void setInstance(TestWebServer instance, boolean isSsl) {
+ if (isSsl) {
+ sSecureInstance = instance;
+ } else {
+ sInstance = instance;
+ }
+ }
+
+ private static final int RESPONSE_STATUS_NORMAL = 0;
+ private static final int RESPONSE_STATUS_MOVED_TEMPORARILY = 1;
+ private static final int RESPONSE_STATUS_NOT_FOUND = 2;
+
+ private String setResponseInternal(
+ String requestPath, byte[] responseData,
+ List<Pair<String, String>> responseHeaders, Runnable responseAction,
+ int status) {
+ final boolean isRedirect = (status == RESPONSE_STATUS_MOVED_TEMPORARILY);
+ final boolean isNotFound = (status == RESPONSE_STATUS_NOT_FOUND);
+
+ synchronized (mLock) {
+ mResponseMap.put(requestPath, new Response(
+ responseData, responseHeaders, isRedirect, isNotFound, responseAction));
+ mResponseCountMap.put(requestPath, Integer.valueOf(0));
+ mLastRequestMap.put(requestPath, null);
+ }
+ return getResponseUrl(requestPath);
+ }
+
+ /**
+ * Gets the URL on the server under which a particular request path will be accessible.
+ *
+ * This only gets the URL, you still need to set the response if you intend to access it.
+ *
+ * @param requestPath The path to respond to.
+ * @return The full URL including the requestPath.
+ */
+ public String getResponseUrl(String requestPath) {
+ return mServerUri + requestPath;
+ }
+
+ /**
+ * Sets a 404 (not found) response to be returned when a particular request path is passed in.
+ *
+ * @param requestPath The path to respond to.
+ * @return The full URL including the path that should be requested to get the expected
+ * response.
+ */
+ public String setResponseWithNotFoundStatus(
+ String requestPath) {
+ return setResponseInternal(requestPath, "".getBytes(), null, null,
+ RESPONSE_STATUS_NOT_FOUND);
+ }
+
+ /**
+ * Sets a response to be returned when a particular request path is passed
+ * in (with the option to specify additional headers).
+ *
+ * @param requestPath The path to respond to.
+ * @param responseString The response body that will be returned.
+ * @param responseHeaders Any additional headers that should be returned along with the
+ * response (null is acceptable).
+ * @return The full URL including the path that should be requested to get the expected
+ * response.
+ */
+ public String setResponse(
+ String requestPath, String responseString,
+ List<Pair<String, String>> responseHeaders) {
+ return setResponseInternal(requestPath, responseString.getBytes(), responseHeaders, null,
+ RESPONSE_STATUS_NORMAL);
+ }
+
+ /**
+ * Sets a response to be returned when a particular request path is passed
+ * in with the option to specify additional headers as well as an arbitrary action to be
+ * executed on each request.
+ *
+ * @param requestPath The path to respond to.
+ * @param responseString The response body that will be returned.
+ * @param responseHeaders Any additional headers that should be returned along with the
+ * response (null is acceptable).
+ * @param responseAction The action to be performed when fetching the response. This action
+ * will be executed for each request and will be handled on a background
+ * thread.
+ * @return The full URL including the path that should be requested to get the expected
+ * response.
+ */
+ public String setResponseWithRunnableAction(
+ String requestPath, String responseString, List<Pair<String, String>> responseHeaders,
+ Runnable responseAction) {
+ return setResponseInternal(
+ requestPath, responseString.getBytes(), responseHeaders, responseAction,
+ RESPONSE_STATUS_NORMAL);
+ }
+
+ /**
+ * Sets a redirect.
+ *
+ * @param requestPath The path to respond to.
+ * @param targetPath The path to redirect to.
+ * @return The full URL including the path that should be requested to get the expected
+ * response.
+ */
+ public String setRedirect(
+ String requestPath, String targetPath) {
+ List<Pair<String, String>> responseHeaders = new ArrayList<Pair<String, String>>();
+ responseHeaders.add(Pair.create("Location", targetPath));
+
+ return setResponseInternal(requestPath, targetPath.getBytes(), responseHeaders, null,
+ RESPONSE_STATUS_MOVED_TEMPORARILY);
+ }
+
+ /**
+ * Sets a base64 encoded response to be returned when a particular request path is passed
+ * in (with the option to specify additional headers).
+ *
+ * @param requestPath The path to respond to.
+ * @param base64EncodedResponse The response body that is base64 encoded. The actual server
+ * response will the decoded binary form.
+ * @param responseHeaders Any additional headers that should be returned along with the
+ * response (null is acceptable).
+ * @return The full URL including the path that should be requested to get the expected
+ * response.
+ */
+ public String setResponseBase64(
+ String requestPath, String base64EncodedResponse,
+ List<Pair<String, String>> responseHeaders) {
+ return setResponseInternal(
+ requestPath, Base64.decode(base64EncodedResponse, Base64.DEFAULT),
+ responseHeaders, null, RESPONSE_STATUS_NORMAL);
+ }
+
+ /**
+ * Get the number of requests was made at this path since it was last set.
+ */
+ public int getRequestCount(String requestPath) {
+ Integer count = null;
+ synchronized (mLock) {
+ count = mResponseCountMap.get(requestPath);
+ }
+ if (count == null) throw new IllegalArgumentException("Path not set: " + requestPath);
+ return count.intValue();
+ }
+
+ /**
+ * Returns the last HttpRequest at this path. Can return null if it is never requested.
+ */
+ public HttpRequest getLastRequest(String requestPath) {
+ synchronized (mLock) {
+ if (!mLastRequestMap.containsKey(requestPath))
+ throw new IllegalArgumentException("Path not set: " + requestPath);
+ return mLastRequestMap.get(requestPath);
+ }
+ }
+
+ public String getBaseUrl() {
+ return mServerUri + "/";
+ }
+
+ private URLConnection openConnection(URL url)
+ throws IOException, NoSuchAlgorithmException, KeyManagementException {
+ if (mSsl) {
+ // Install hostname verifiers and trust managers that don't do
+ // anything in order to get around the client not trusting
+ // the test server due to a lack of certificates.
+
+ HttpsURLConnection connection = (HttpsURLConnection) url.openConnection();
+ connection.setHostnameVerifier(new TestHostnameVerifier());
+
+ SSLContext context = SSLContext.getInstance("TLS");
+ TestTrustManager trustManager = new TestTrustManager();
+ context.init(null, new TestTrustManager[] {trustManager}, null);
+ connection.setSSLSocketFactory(context.getSocketFactory());
+
+ return connection;
+ } else {
+ return url.openConnection();
+ }
+ }
+
+ /**
+ * {@link X509TrustManager} that trusts everybody. This is used so that
+ * the client calling {@link TestWebServer#shutdown()} can issue a request
+ * for shutdown by blindly trusting the {@link TestWebServer}'s
+ * credentials.
+ */
+ private static class TestTrustManager implements X509TrustManager {
+ @Override
+ public void checkClientTrusted(X509Certificate[] chain, String authType) {
+ // Trust the TestWebServer...
+ }
+
+ @Override
+ public void checkServerTrusted(X509Certificate[] chain, String authType) {
+ // Trust the TestWebServer...
+ }
+
+ @Override
+ public X509Certificate[] getAcceptedIssuers() {
+ return null;
+ }
+ }
+
+ /**
+ * {@link HostnameVerifier} that verifies everybody. This permits
+ * the client to trust the web server and call
+ * {@link TestWebServer#shutdown()}.
+ */
+ private static class TestHostnameVerifier implements HostnameVerifier {
+ @Override
+ public boolean verify(String hostname, SSLSession session) {
+ return true;
+ }
+ }
+
+ private void servedResponseFor(String path, HttpRequest request) {
+ synchronized (mLock) {
+ mResponseCountMap.put(path, Integer.valueOf(
+ mResponseCountMap.get(path).intValue() + 1));
+ mLastRequestMap.put(path, request);
+ }
+ }
+
+ /**
+ * Generate a response to the given request.
+ *
+ * <p>Always executed on the background server thread.
+ *
+ * <p>If there is an action associated with the response, it will be executed inside of
+ * this function.
+ *
+ * @throws InterruptedException
+ */
+ private HttpResponse getResponse(HttpRequest request) throws InterruptedException {
+ assert Thread.currentThread() == mServerThread
+ : "getResponse called from non-server thread";
+
+ RequestLine requestLine = request.getRequestLine();
+ HttpResponse httpResponse = null;
+ Log.i(TAG, requestLine.getMethod() + ": " + requestLine.getUri());
+ String uriString = requestLine.getUri();
+ URI uri = URI.create(uriString);
+ String path = uri.getPath();
+
+ Response response = null;
+ synchronized (mLock) {
+ response = mResponseMap.get(path);
+ }
+ if (path.equals(SHUTDOWN_PREFIX)) {
+ httpResponse = createResponse(HttpStatus.SC_OK);
+ } else if (response == null) {
+ httpResponse = createResponse(HttpStatus.SC_NOT_FOUND);
+ } else if (response.mIsNotFound) {
+ httpResponse = createResponse(HttpStatus.SC_NOT_FOUND);
+ servedResponseFor(path, request);
+ } else if (response.mIsRedirect) {
+ httpResponse = createResponse(HttpStatus.SC_MOVED_TEMPORARILY);
+ for (Pair<String, String> header : response.mResponseHeaders) {
+ httpResponse.addHeader(header.first, header.second);
+ }
+ servedResponseFor(path, request);
+ } else {
+ if (response.mResponseAction != null) response.mResponseAction.run();
+
+ httpResponse = createResponse(HttpStatus.SC_OK);
+ ByteArrayEntity entity = createEntity(response.mResponseData);
+ httpResponse.setEntity(entity);
+ httpResponse.setHeader("Content-Length", "" + entity.getContentLength());
+ for (Pair<String, String> header : response.mResponseHeaders) {
+ httpResponse.addHeader(header.first, header.second);
+ }
+ servedResponseFor(path, request);
+ }
+ StatusLine sl = httpResponse.getStatusLine();
+ Log.i(TAG, sl.getStatusCode() + "(" + sl.getReasonPhrase() + ")");
+ setDateHeaders(httpResponse);
+ return httpResponse;
+ }
+
+ private void setDateHeaders(HttpResponse response) {
+ response.addHeader("Date", DateUtils.formatDate(new Date(), DateUtils.PATTERN_RFC1123));
+ }
+
+ /**
+ * Create an empty response with the given status.
+ */
+ private HttpResponse createResponse(int status) {
+ HttpResponse response = new BasicHttpResponse(HttpVersion.HTTP_1_0, status, null);
+ String reason = null;
+
+ // This synchronized silences findbugs.
+ synchronized (TestWebServer.class) {
+ if (sReasons == null) {
+ sReasons = new Hashtable<Integer, String>();
+ sReasons.put(HttpStatus.SC_UNAUTHORIZED, "Unauthorized");
+ sReasons.put(HttpStatus.SC_NOT_FOUND, "Not Found");
+ sReasons.put(HttpStatus.SC_FORBIDDEN, "Forbidden");
+ sReasons.put(HttpStatus.SC_MOVED_TEMPORARILY, "Moved Temporarily");
+ }
+ // Fill in error reason. Avoid use of the ReasonPhraseCatalog, which is
+ // Locale-dependent.
+ reason = sReasons.get(status);
+ }
+
+ if (reason != null) {
+ StringBuffer buf = new StringBuffer("<html><head><title>");
+ buf.append(reason);
+ buf.append("</title></head><body>");
+ buf.append(reason);
+ buf.append("</body></html>");
+ ByteArrayEntity entity = createEntity(buf.toString().getBytes());
+ response.setEntity(entity);
+ response.setHeader("Content-Length", "" + entity.getContentLength());
+ }
+ return response;
+ }
+
+ /**
+ * Create a string entity for the given content.
+ */
+ private ByteArrayEntity createEntity(byte[] data) {
+ ByteArrayEntity entity = new ByteArrayEntity(data);
+ entity.setContentType("text/html");
+ return entity;
+ }
+
+ private static class ServerThread extends Thread {
+ private TestWebServer mServer;
+ private ServerSocket mSocket;
+ private boolean mIsSsl;
+ private boolean mIsCancelled;
+ private SSLContext mSslContext;
+
+ /**
+ * Defines the keystore contents for the server, BKS version. Holds just a
+ * single self-generated key. The subject name is "Test Server".
+ */
+ private static final String SERVER_KEYS_BKS =
+ "AAAAAQAAABQDkebzoP1XwqyWKRCJEpn/t8dqIQAABDkEAAVteWtleQAAARpYl20nAAAAAQAFWC41" +
+ "MDkAAAJNMIICSTCCAbKgAwIBAgIESEfU1jANBgkqhkiG9w0BAQUFADBpMQswCQYDVQQGEwJVUzET" +
+ "MBEGA1UECBMKQ2FsaWZvcm5pYTEMMAoGA1UEBxMDTVRWMQ8wDQYDVQQKEwZHb29nbGUxEDAOBgNV" +
+ "BAsTB0FuZHJvaWQxFDASBgNVBAMTC1Rlc3QgU2VydmVyMB4XDTA4MDYwNTExNTgxNFoXDTA4MDkw" +
+ "MzExNTgxNFowaTELMAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExDDAKBgNVBAcTA01U" +
+ "VjEPMA0GA1UEChMGR29vZ2xlMRAwDgYDVQQLEwdBbmRyb2lkMRQwEgYDVQQDEwtUZXN0IFNlcnZl" +
+ "cjCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LIdKaIr9/vsTq8BZlA3R+NFWRaH4lGsTAQy" +
+ "DPMF9ZqEDOaL6DJuu0colSBBBQ85hQTPa9m9nyJoN3pEi1hgamqOvQIWcXBk+SOpUGRZZFXwniJV" +
+ "zDKU5nE9MYgn2B9AoiH3CSuMz6HRqgVaqtppIe1jhukMc/kHVJvlKRNy9XMCAwEAATANBgkqhkiG" +
+ "9w0BAQUFAAOBgQC7yBmJ9O/eWDGtSH9BH0R3dh2NdST3W9hNZ8hIa8U8klhNHbUCSSktZmZkvbPU" +
+ "hse5LI3dh6RyNDuqDrbYwcqzKbFJaq/jX9kCoeb3vgbQElMRX8D2ID1vRjxwlALFISrtaN4VpWzV" +
+ "yeoHPW4xldeZmoVtjn8zXNzQhLuBqX2MmAAAAqwAAAAUvkUScfw9yCSmALruURNmtBai7kQAAAZx" +
+ "4Jmijxs/l8EBaleaUru6EOPioWkUAEVWCxjM/TxbGHOi2VMsQWqRr/DZ3wsDmtQgw3QTrUK666sR" +
+ "MBnbqdnyCyvM1J2V1xxLXPUeRBmR2CXorYGF9Dye7NkgVdfA+9g9L/0Au6Ugn+2Cj5leoIgkgApN" +
+ "vuEcZegFlNOUPVEs3SlBgUF1BY6OBM0UBHTPwGGxFBBcetcuMRbUnu65vyDG0pslT59qpaR0TMVs" +
+ "P+tcheEzhyjbfM32/vwhnL9dBEgM8qMt0sqF6itNOQU/F4WGkK2Cm2v4CYEyKYw325fEhzTXosck" +
+ "MhbqmcyLab8EPceWF3dweoUT76+jEZx8lV2dapR+CmczQI43tV9btsd1xiBbBHAKvymm9Ep9bPzM" +
+ "J0MQi+OtURL9Lxke/70/MRueqbPeUlOaGvANTmXQD2OnW7PISwJ9lpeLfTG0LcqkoqkbtLKQLYHI" +
+ "rQfV5j0j+wmvmpMxzjN3uvNajLa4zQ8l0Eok9SFaRr2RL0gN8Q2JegfOL4pUiHPsh64WWya2NB7f" +
+ "V+1s65eA5ospXYsShRjo046QhGTmymwXXzdzuxu8IlnTEont6P4+J+GsWk6cldGbl20hctuUKzyx" +
+ "OptjEPOKejV60iDCYGmHbCWAzQ8h5MILV82IclzNViZmzAapeeCnexhpXhWTs+xDEYSKEiG/camt" +
+ "bhmZc3BcyVJrW23PktSfpBQ6D8ZxoMfF0L7V2GQMaUg+3r7ucrx82kpqotjv0xHghNIm95aBr1Qw" +
+ "1gaEjsC/0wGmmBDg1dTDH+F1p9TInzr3EFuYD0YiQ7YlAHq3cPuyGoLXJ5dXYuSBfhDXJSeddUkl" +
+ "k1ufZyOOcskeInQge7jzaRfmKg3U94r+spMEvb0AzDQVOKvjjo1ivxMSgFRZaDb/4qw=";
+
+ private static final String PASSWORD = "android";
+
+ /**
+ * Loads a keystore from a base64-encoded String. Returns the KeyManager[]
+ * for the result.
+ */
+ private KeyManager[] getKeyManagers() throws Exception {
+ byte[] bytes = Base64.decode(SERVER_KEYS_BKS, Base64.DEFAULT);
+ InputStream inputStream = new ByteArrayInputStream(bytes);
+
+ KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType());
+ keyStore.load(inputStream, PASSWORD.toCharArray());
+ inputStream.close();
+
+ String algorithm = KeyManagerFactory.getDefaultAlgorithm();
+ KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(algorithm);
+ keyManagerFactory.init(keyStore, PASSWORD.toCharArray());
+
+ return keyManagerFactory.getKeyManagers();
+ }
+
+
+ public ServerThread(TestWebServer server, boolean ssl) throws Exception {
+ super("ServerThread");
+ mServer = server;
+ mIsSsl = ssl;
+ int retry = 3;
+ while (true) {
+ try {
+ if (mIsSsl) {
+ mSslContext = SSLContext.getInstance("TLS");
+ mSslContext.init(getKeyManagers(), null, null);
+ mSocket = mSslContext.getServerSocketFactory().createServerSocket(0);
+ } else {
+ mSocket = new ServerSocket(0);
+ }
+ return;
+ } catch (IOException e) {
+ Log.w(TAG, e);
+ if (--retry == 0) {
+ throw e;
+ }
+ // sleep in case server socket is still being closed
+ Thread.sleep(1000);
+ }
+ }
+ }
+
+ @Override
+ public void run() {
+ HttpParams params = new BasicHttpParams();
+ params.setParameter(CoreProtocolPNames.PROTOCOL_VERSION, HttpVersion.HTTP_1_0);
+ while (!mIsCancelled) {
+ try {
+ Socket socket = mSocket.accept();
+ DefaultHttpServerConnection conn = new DefaultHttpServerConnection();
+ conn.bind(socket, params);
+
+ // Determine whether we need to shutdown early before
+ // parsing the response since conn.close() will crash
+ // for SSL requests due to UnsupportedOperationException.
+ HttpRequest request = conn.receiveRequestHeader();
+ if (isShutdownRequest(request)) {
+ mIsCancelled = true;
+ }
+
+ HttpResponse response = mServer.getResponse(request);
+ conn.sendResponseHeader(response);
+ conn.sendResponseEntity(response);
+ conn.close();
+
+ } catch (IOException e) {
+ // normal during shutdown, ignore
+ Log.w(TAG, e);
+ } catch (HttpException e) {
+ Log.w(TAG, e);
+ } catch (InterruptedException e) {
+ Log.w(TAG, e);
+ } catch (UnsupportedOperationException e) {
+ // DefaultHttpServerConnection's close() throws an
+ // UnsupportedOperationException.
+ Log.w(TAG, e);
+ }
+ }
+ try {
+ mSocket.close();
+ } catch (IOException ignored) {
+ // safe to ignore
+ }
+ }
+
+ private boolean isShutdownRequest(HttpRequest request) {
+ RequestLine requestLine = request.getRequestLine();
+ String uriString = requestLine.getUri();
+ URI uri = URI.create(uriString);
+ String path = uri.getPath();
+ return path.equals(SHUTDOWN_PREFIX);
+ }
+ }
+}
diff --git a/tests/res/drawable/vector_icon_stroke_1.xml b/tests/res/drawable/vector_icon_stroke_1.xml
index 9b766c0..af351f1 100644
--- a/tests/res/drawable/vector_icon_stroke_1.xml
+++ b/tests/res/drawable/vector_icon_stroke_1.xml
@@ -35,6 +35,7 @@
<path
android:name="twoLines"
android:pathData="M 100,20 l 0 80 l -30 -80"
+ android:fillColor="#FF000000"
android:strokeColor="#FF00FF00"
android:strokeLineCap="butt"
android:strokeLineJoin="miter"
diff --git a/tests/res/drawable/vector_icon_stroke_2.xml b/tests/res/drawable/vector_icon_stroke_2.xml
index b0f0cee..f85d5fc 100644
--- a/tests/res/drawable/vector_icon_stroke_2.xml
+++ b/tests/res/drawable/vector_icon_stroke_2.xml
@@ -35,6 +35,7 @@
<path
android:name="twoLines"
android:pathData="M 100,20 l 0 80 l -30 -80"
+ android:fillColor="#FF000000"
android:strokeColor="#FF00FF00"
android:strokeLineCap="round"
android:strokeLineJoin="round"
diff --git a/tests/res/drawable/vector_icon_stroke_3.xml b/tests/res/drawable/vector_icon_stroke_3.xml
index cd7bb16..8f3d47e 100644
--- a/tests/res/drawable/vector_icon_stroke_3.xml
+++ b/tests/res/drawable/vector_icon_stroke_3.xml
@@ -35,6 +35,7 @@
<path
android:name="twoLines"
android:pathData="M 100,20 l 0 80 l -30 -80"
+ android:fillColor="#FF000000"
android:strokeColor="#FF00FF00"
android:strokeLineCap="square"
android:strokeLineJoin="bevel"
diff --git a/tests/src/android/renderscript/cts/TestAtanh.rs b/tests/src/android/renderscript/cts/TestAtanh.rs
index fc946b6..081996c 100644
--- a/tests/src/android/renderscript/cts/TestAtanh.rs
+++ b/tests/src/android/renderscript/cts/TestAtanh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testAtanhFloatFloat(float in) {
- return atanh(in);
+float __attribute__((kernel)) testAtanhFloatFloat(float inV) {
+ return atanh(inV);
}
-float2 __attribute__((kernel)) testAtanhFloat2Float2(float2 in) {
- return atanh(in);
+float2 __attribute__((kernel)) testAtanhFloat2Float2(float2 inV) {
+ return atanh(inV);
}
-float3 __attribute__((kernel)) testAtanhFloat3Float3(float3 in) {
- return atanh(in);
+float3 __attribute__((kernel)) testAtanhFloat3Float3(float3 inV) {
+ return atanh(inV);
}
-float4 __attribute__((kernel)) testAtanhFloat4Float4(float4 in) {
- return atanh(in);
+float4 __attribute__((kernel)) testAtanhFloat4Float4(float4 inV) {
+ return atanh(inV);
}
diff --git a/tests/src/android/renderscript/cts/TestNativeAtanh.rs b/tests/src/android/renderscript/cts/TestNativeAtanh.rs
index eba5fd6..de772e7 100644
--- a/tests/src/android/renderscript/cts/TestNativeAtanh.rs
+++ b/tests/src/android/renderscript/cts/TestNativeAtanh.rs
@@ -20,18 +20,18 @@
// Don't edit this file! It is auto-generated by frameworks/rs/api/gen_runtime.
-float __attribute__((kernel)) testNativeAtanhFloatFloat(float in) {
- return native_atanh(in);
+float __attribute__((kernel)) testNativeAtanhFloatFloat(float inIn) {
+ return native_atanh(inIn);
}
-float2 __attribute__((kernel)) testNativeAtanhFloat2Float2(float2 in) {
- return native_atanh(in);
+float2 __attribute__((kernel)) testNativeAtanhFloat2Float2(float2 inIn) {
+ return native_atanh(inIn);
}
-float3 __attribute__((kernel)) testNativeAtanhFloat3Float3(float3 in) {
- return native_atanh(in);
+float3 __attribute__((kernel)) testNativeAtanhFloat3Float3(float3 inIn) {
+ return native_atanh(inIn);
}
-float4 __attribute__((kernel)) testNativeAtanhFloat4Float4(float4 in) {
- return native_atanh(in);
+float4 __attribute__((kernel)) testNativeAtanhFloat4Float4(float4 inIn) {
+ return native_atanh(inIn);
}
diff --git a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
index 33aa0d2..43acbcd 100644
--- a/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
+++ b/tests/tests/accessibilityservice/src/android/accessibilityservice/cts/AccessibilityWindowQueryTest.java
@@ -27,7 +27,9 @@
import android.accessibilityservice.AccessibilityServiceInfo;
import android.app.UiAutomation;
import android.graphics.Rect;
+import android.os.SystemClock;
import android.test.suitebuilder.annotation.MediumTest;
+import android.util.Log;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
@@ -39,6 +41,7 @@
import java.util.LinkedList;
import java.util.List;
import java.util.Queue;
+import java.util.concurrent.TimeoutException;
/**
* Test cases for testing the accessibility APIs for querying of the screen content.
@@ -118,50 +121,31 @@
public void testTraverseAllWindows() throws Exception {
setAccessInteractiveWindowsFlag();
try {
- final UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
-
- getInstrumentation().getUiAutomation().waitForIdle(
- TIMEOUT_WINDOW_STATE_IDLE,
- TIMEOUT_ASYNC_PROCESSING);
+ UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
List<AccessibilityWindowInfo> windows = uiAutomation.getWindows();
-
Rect boundsInScreen = new Rect();
- // Verify the navigation bar window.
- AccessibilityWindowInfo navBarWindow = windows.get(0);
- navBarWindow.getBoundsInScreen(boundsInScreen);
- assertFalse(boundsInScreen.isEmpty()); // Varies on screen size, just emptiness check.
- assertSame(navBarWindow.getType(), AccessibilityWindowInfo.TYPE_SYSTEM);
- assertFalse(navBarWindow.isFocused());
- assertFalse(navBarWindow.isActive());
- assertNull(navBarWindow.getParent());
- assertSame(0, navBarWindow.getChildCount());
- assertNotNull(navBarWindow.getRoot());
+ final int windowCount = windows.size();
+ for (int i = 0; i < windowCount; i++) {
+ AccessibilityWindowInfo window = windows.get(i);
- // Verify the status bar window.
- AccessibilityWindowInfo statusBarWindow = windows.get(1);
- statusBarWindow.getBoundsInScreen(boundsInScreen);
- assertFalse(boundsInScreen.isEmpty()); // Varies on screen size, just emptiness check.
- assertSame(statusBarWindow.getType(), AccessibilityWindowInfo.TYPE_SYSTEM);
- assertFalse(statusBarWindow.isFocused());
- assertFalse(statusBarWindow.isActive());
- assertNull(statusBarWindow.getParent());
- assertSame(0, statusBarWindow.getChildCount());
- assertNotNull(statusBarWindow.getRoot());
+ window.getBoundsInScreen(boundsInScreen);
+ assertFalse(boundsInScreen.isEmpty()); // Varies on screen size, emptiness check.
+ assertNull(window.getParent());
+ assertSame(0, window.getChildCount());
+ assertNull(window.getParent());
+ assertNotNull(window.getRoot());
- // Verify the application window.
- AccessibilityWindowInfo appWindow = windows.get(2);
- appWindow.getBoundsInScreen(boundsInScreen);
- assertFalse(boundsInScreen.isEmpty()); // Varies on screen size, just emptiness check.
- assertSame(appWindow.getType(), AccessibilityWindowInfo.TYPE_APPLICATION);
- assertTrue(appWindow.isFocused());
- assertTrue(appWindow.isActive());
- assertNull(appWindow.getParent());
- assertSame(0, appWindow.getChildCount());
- assertNotNull(appWindow.getRoot());
-
- verifyNodesInAppWindow(appWindow.getRoot());
+ if (window.getType() == AccessibilityWindowInfo.TYPE_APPLICATION) {
+ assertTrue(window.isFocused());
+ assertTrue(window.isActive());
+ verifyNodesInAppWindow(window.getRoot());
+ } else if (window.getType() == AccessibilityWindowInfo.TYPE_SYSTEM) {
+ assertFalse(window.isFocused());
+ assertFalse(window.isActive());
+ }
+ }
} finally {
clearAccessInteractiveWindowsFlag();
}
@@ -287,11 +271,23 @@
public void testInteractWithNavBarWindow() throws Exception {
setAccessInteractiveWindowsFlag();
try {
- UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
- AccessibilityWindowInfo window = uiAutomation.getWindows().get(0);
- assertTrue(window.getRoot().performAction(
- AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS));
+ final UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
+ uiAutomation.executeAndWaitForEvent(new Runnable() {
+ @Override
+ public void run() {
+ AccessibilityWindowInfo window = uiAutomation.getWindows().get(0);
+ assertTrue(window.getRoot().performAction(
+ AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS));
+ }
+ }, new UiAutomation.AccessibilityEventFilter() {
+ @Override
+ public boolean accept(AccessibilityEvent event) {
+ return event.getEventType() ==
+ AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED;
+ }
+ }, TIMEOUT_ASYNC_PROCESSING);
} finally {
+ ensureAccessibilityFocusCleared();
clearAccessInteractiveWindowsFlag();
}
}
@@ -300,11 +296,24 @@
public void testInteractWithStatusBarWindow() throws Exception {
setAccessInteractiveWindowsFlag();
try {
- UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
- AccessibilityWindowInfo window = uiAutomation.getWindows().get(1);
- assertTrue(window.getRoot().performAction(
- AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS));
+ final UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
+ uiAutomation.executeAndWaitForEvent(new Runnable() {
+ @Override
+ public void run() {
+ AccessibilityWindowInfo window = uiAutomation.getWindows().get(1);
+ assertTrue(window.getRoot().performAction(
+ AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS));
+
+ }
+ }, new UiAutomation.AccessibilityEventFilter() {
+ @Override
+ public boolean accept(AccessibilityEvent event) {
+ return event.getEventType() ==
+ AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUSED;
+ }
+ }, TIMEOUT_ASYNC_PROCESSING);
} finally {
+ ensureAccessibilityFocusCleared();
clearAccessInteractiveWindowsFlag();
}
}
@@ -313,23 +322,37 @@
public void testSingleAccessibilityFocusAcrossWindows() throws Exception {
setAccessInteractiveWindowsFlag();
try {
- UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
+ final UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
uiAutomation.waitForIdle(TIMEOUT_WINDOW_STATE_IDLE, TIMEOUT_ASYNC_PROCESSING);
+ getInstrumentation().getUiAutomation().executeAndWaitForEvent(new Runnable() {
+ @Override
+ public void run() {
+ // Set focus in the first window.
+ List<AccessibilityWindowInfo> windows = uiAutomation.getWindows();
+ AccessibilityNodeInfo firstWindowRoot = windows.get(0).getRoot();
+ assertTrue(firstWindowRoot.performAction(
+ AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS));
+ }
+ }, new UiAutomation.AccessibilityEventFilter() {
+ @Override
+ public boolean accept(AccessibilityEvent event) {
+ return event.getEventType() == AccessibilityEvent.TYPE_WINDOWS_CHANGED;
+ }
+ }, TIMEOUT_ASYNC_PROCESSING);
+
+ // Wait for things to settle.
+ waitForIdle();
+
List<AccessibilityWindowInfo> windows = uiAutomation.getWindows();
AccessibilityNodeInfo firstWindowRoot = windows.get(0).getRoot();
AccessibilityNodeInfo secondWindowRoot = windows.get(1).getRoot();
AccessibilityNodeInfo thirdWindowRoot = windows.get(2).getRoot();
-
- // Set focus in the first window.
- assertTrue(firstWindowRoot.performAction(
- AccessibilityNodeInfo.ACTION_ACCESSIBILITY_FOCUS));
-
- // Wait for things to settle.
- uiAutomation.waitForIdle(TIMEOUT_WINDOW_STATE_IDLE, TIMEOUT_ASYNC_PROCESSING);
+ // Ensure accessibility focus is where we put it.
+ assertTrue(windows.get(0).isAccessibilityFocused());
// Make sure there only one accessibility focus.
assertEquals(uiAutomation.findFocus(
@@ -392,6 +415,7 @@
assertNull(thirdWindowRoot.findFocus(
AccessibilityNodeInfo.FOCUS_ACCESSIBILITY));
} finally {
+ ensureAccessibilityFocusCleared();
clearAccessInteractiveWindowsFlag();
}
}
@@ -644,6 +668,10 @@
// Sleep a bit so the UI is settles.
waitForIdle();
+ // This is a necessary since the back action does not
+ // dismiss recents until they stop animating. Sigh...
+ SystemClock.sleep(5000);
+
// Clean up.
getInstrumentation().getUiAutomation().performGlobalAction(
AccessibilityService.GLOBAL_ACTION_BACK);
@@ -747,6 +775,34 @@
uiAutomation.setServiceInfo(info);
}
+ private void ensureAccessibilityFocusCleared() {
+ try {
+ final UiAutomation uiAutomation = getInstrumentation().getUiAutomation();
+ uiAutomation.executeAndWaitForEvent(new Runnable() {
+ @Override
+ public void run() {
+ List<AccessibilityWindowInfo> windows = uiAutomation.getWindows();
+ final int windowCount = windows.size();
+ for (int i = 0; i < windowCount; i++) {
+ AccessibilityWindowInfo window = windows.get(i);
+ if (window.isAccessibilityFocused()) {
+ window.getRoot().performAction(
+ AccessibilityNodeInfo.ACTION_CLEAR_ACCESSIBILITY_FOCUS);
+ }
+ }
+ }
+ }, new UiAutomation.AccessibilityEventFilter() {
+ @Override
+ public boolean accept(AccessibilityEvent event) {
+ return event.getEventType() ==
+ AccessibilityEvent.TYPE_VIEW_ACCESSIBILITY_FOCUS_CLEARED;
+ }
+ }, TIMEOUT_ASYNC_PROCESSING);
+ } catch (TimeoutException te) {
+ /* ignore */
+ }
+ }
+
private void verifyNodesInAppWindow(AccessibilityNodeInfo root) throws Exception {
try {
AccessibilityServiceInfo info = getInstrumentation().getUiAutomation().getServiceInfo();
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/CameraCharacteristicsTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/CameraCharacteristicsTest.java
deleted file mode 100644
index 1a5c272..0000000
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/CameraCharacteristicsTest.java
+++ /dev/null
@@ -1,1516 +0,0 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/**
- * ! Do not edit this file directly !
- *
- * Generated automatically from system/media/camera/docs/CameraCharacteristicsTest.mako.
- * This file contains only the auto-generated CameraCharacteristics CTS tests; it does
- * not contain any additional manual tests, which would be in a separate file.
- */
-
-package android.hardware.camera2.cts;
-
-import android.content.Context;
-import android.hardware.camera2.CameraCharacteristics;
-import android.hardware.camera2.CameraManager;
-import android.hardware.camera2.CameraCharacteristics.Key;
-import android.test.AndroidTestCase;
-import android.util.Log;
-
-import java.util.List;
-
-/**
- * Auto-generated CTS test for CameraCharacteristics fields.
- */
-public class CameraCharacteristicsTest extends AndroidTestCase {
- private CameraManager mCameraManager;
- private static final String TAG = "CameraCharacteristicsTest";
-
- @Override
- public void setContext(Context context) {
- super.setContext(context);
- mCameraManager = (CameraManager)context.getSystemService(Context.CAMERA_SERVICE);
- assertNotNull("Can't connect to camera manager", mCameraManager);
- }
-
- @Override
- protected void setUp() throws Exception {
- super.setUp();
- }
-
- @Override
- protected void tearDown() throws Exception {
- super.tearDown();
- }
-
- public void testCameraCharacteristicsAndroidColorCorrectionAvailableAberrationModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.colorCorrection.availableAberrationModes",
- props.get(CameraCharacteristics.COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.colorCorrection.availableAberrationModes", allKeys.contains(
- CameraCharacteristics.COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAeAvailableAntibandingModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.aeAvailableAntibandingModes",
- props.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_ANTIBANDING_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.aeAvailableAntibandingModes", allKeys.contains(
- CameraCharacteristics.CONTROL_AE_AVAILABLE_ANTIBANDING_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAeAvailableModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.aeAvailableModes",
- props.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.aeAvailableModes", allKeys.contains(
- CameraCharacteristics.CONTROL_AE_AVAILABLE_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAeAvailableTargetFpsRanges() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.aeAvailableTargetFpsRanges",
- props.get(CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.aeAvailableTargetFpsRanges", allKeys.contains(
- CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAeCompensationRange() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.aeCompensationRange",
- props.get(CameraCharacteristics.CONTROL_AE_COMPENSATION_RANGE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.aeCompensationRange", allKeys.contains(
- CameraCharacteristics.CONTROL_AE_COMPENSATION_RANGE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAeCompensationStep() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.aeCompensationStep",
- props.get(CameraCharacteristics.CONTROL_AE_COMPENSATION_STEP));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.aeCompensationStep", allKeys.contains(
- CameraCharacteristics.CONTROL_AE_COMPENSATION_STEP));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAfAvailableModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.afAvailableModes",
- props.get(CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.afAvailableModes", allKeys.contains(
- CameraCharacteristics.CONTROL_AF_AVAILABLE_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAvailableEffects() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.availableEffects",
- props.get(CameraCharacteristics.CONTROL_AVAILABLE_EFFECTS));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.availableEffects", allKeys.contains(
- CameraCharacteristics.CONTROL_AVAILABLE_EFFECTS));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAvailableSceneModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.availableSceneModes",
- props.get(CameraCharacteristics.CONTROL_AVAILABLE_SCENE_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.availableSceneModes", allKeys.contains(
- CameraCharacteristics.CONTROL_AVAILABLE_SCENE_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAvailableVideoStabilizationModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.availableVideoStabilizationModes",
- props.get(CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.availableVideoStabilizationModes", allKeys.contains(
- CameraCharacteristics.CONTROL_AVAILABLE_VIDEO_STABILIZATION_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlAwbAvailableModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.awbAvailableModes",
- props.get(CameraCharacteristics.CONTROL_AWB_AVAILABLE_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.awbAvailableModes", allKeys.contains(
- CameraCharacteristics.CONTROL_AWB_AVAILABLE_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlMaxRegionsAe() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.maxRegionsAe",
- props.get(CameraCharacteristics.CONTROL_MAX_REGIONS_AE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.maxRegionsAe", allKeys.contains(
- CameraCharacteristics.CONTROL_MAX_REGIONS_AE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlMaxRegionsAwb() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.maxRegionsAwb",
- props.get(CameraCharacteristics.CONTROL_MAX_REGIONS_AWB));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.maxRegionsAwb", allKeys.contains(
- CameraCharacteristics.CONTROL_MAX_REGIONS_AWB));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidControlMaxRegionsAf() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.control.maxRegionsAf",
- props.get(CameraCharacteristics.CONTROL_MAX_REGIONS_AF));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.control.maxRegionsAf", allKeys.contains(
- CameraCharacteristics.CONTROL_MAX_REGIONS_AF));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidEdgeAvailableEdgeModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.edge.availableEdgeModes",
- props.get(CameraCharacteristics.EDGE_AVAILABLE_EDGE_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.edge.availableEdgeModes", allKeys.contains(
- CameraCharacteristics.EDGE_AVAILABLE_EDGE_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidFlashInfoAvailable() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.flash.info.available",
- props.get(CameraCharacteristics.FLASH_INFO_AVAILABLE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.flash.info.available", allKeys.contains(
- CameraCharacteristics.FLASH_INFO_AVAILABLE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidHotPixelAvailableHotPixelModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.hotPixel.availableHotPixelModes",
- props.get(CameraCharacteristics.HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.hotPixel.availableHotPixelModes", allKeys.contains(
- CameraCharacteristics.HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidJpegAvailableThumbnailSizes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.jpeg.availableThumbnailSizes",
- props.get(CameraCharacteristics.JPEG_AVAILABLE_THUMBNAIL_SIZES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.jpeg.availableThumbnailSizes", allKeys.contains(
- CameraCharacteristics.JPEG_AVAILABLE_THUMBNAIL_SIZES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidLensFacing() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.lens.facing",
- props.get(CameraCharacteristics.LENS_FACING));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.lens.facing", allKeys.contains(
- CameraCharacteristics.LENS_FACING));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidLensInfoAvailableApertures() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.lens.info.availableApertures",
- props.get(CameraCharacteristics.LENS_INFO_AVAILABLE_APERTURES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.lens.info.availableApertures", allKeys.contains(
- CameraCharacteristics.LENS_INFO_AVAILABLE_APERTURES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidLensInfoAvailableFilterDensities() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.lens.info.availableFilterDensities",
- props.get(CameraCharacteristics.LENS_INFO_AVAILABLE_FILTER_DENSITIES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.lens.info.availableFilterDensities", allKeys.contains(
- CameraCharacteristics.LENS_INFO_AVAILABLE_FILTER_DENSITIES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidLensInfoAvailableFocalLengths() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.lens.info.availableFocalLengths",
- props.get(CameraCharacteristics.LENS_INFO_AVAILABLE_FOCAL_LENGTHS));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.lens.info.availableFocalLengths", allKeys.contains(
- CameraCharacteristics.LENS_INFO_AVAILABLE_FOCAL_LENGTHS));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidLensInfoAvailableOpticalStabilization() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.lens.info.availableOpticalStabilization",
- props.get(CameraCharacteristics.LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.lens.info.availableOpticalStabilization", allKeys.contains(
- CameraCharacteristics.LENS_INFO_AVAILABLE_OPTICAL_STABILIZATION));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidLensInfoHyperfocalDistance() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.lens.info.hyperfocalDistance",
- props.get(CameraCharacteristics.LENS_INFO_HYPERFOCAL_DISTANCE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.lens.info.hyperfocalDistance", allKeys.contains(
- CameraCharacteristics.LENS_INFO_HYPERFOCAL_DISTANCE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidLensInfoMinimumFocusDistance() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.lens.info.minimumFocusDistance",
- props.get(CameraCharacteristics.LENS_INFO_MINIMUM_FOCUS_DISTANCE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.lens.info.minimumFocusDistance", allKeys.contains(
- CameraCharacteristics.LENS_INFO_MINIMUM_FOCUS_DISTANCE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidLensInfoFocusDistanceCalibration() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.lens.info.focusDistanceCalibration",
- props.get(CameraCharacteristics.LENS_INFO_FOCUS_DISTANCE_CALIBRATION));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.lens.info.focusDistanceCalibration", allKeys.contains(
- CameraCharacteristics.LENS_INFO_FOCUS_DISTANCE_CALIBRATION));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidNoiseReductionAvailableNoiseReductionModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.noiseReduction.availableNoiseReductionModes",
- props.get(CameraCharacteristics.NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.noiseReduction.availableNoiseReductionModes", allKeys.contains(
- CameraCharacteristics.NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidRequestMaxNumOutputRaw() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.request.maxNumOutputRaw",
- props.get(CameraCharacteristics.REQUEST_MAX_NUM_OUTPUT_RAW));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.request.maxNumOutputRaw", allKeys.contains(
- CameraCharacteristics.REQUEST_MAX_NUM_OUTPUT_RAW));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidRequestMaxNumOutputProc() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.request.maxNumOutputProc",
- props.get(CameraCharacteristics.REQUEST_MAX_NUM_OUTPUT_PROC));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.request.maxNumOutputProc", allKeys.contains(
- CameraCharacteristics.REQUEST_MAX_NUM_OUTPUT_PROC));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidRequestMaxNumOutputProcStalling() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.request.maxNumOutputProcStalling",
- props.get(CameraCharacteristics.REQUEST_MAX_NUM_OUTPUT_PROC_STALLING));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.request.maxNumOutputProcStalling", allKeys.contains(
- CameraCharacteristics.REQUEST_MAX_NUM_OUTPUT_PROC_STALLING));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidRequestPipelineMaxDepth() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.request.pipelineMaxDepth",
- props.get(CameraCharacteristics.REQUEST_PIPELINE_MAX_DEPTH));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.request.pipelineMaxDepth", allKeys.contains(
- CameraCharacteristics.REQUEST_PIPELINE_MAX_DEPTH));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidRequestPartialResultCount() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.request.partialResultCount",
- props.get(CameraCharacteristics.REQUEST_PARTIAL_RESULT_COUNT));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.request.partialResultCount", allKeys.contains(
- CameraCharacteristics.REQUEST_PARTIAL_RESULT_COUNT));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidRequestAvailableCapabilities() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.request.availableCapabilities",
- props.get(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.request.availableCapabilities", allKeys.contains(
- CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidScalerAvailableMaxDigitalZoom() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.scaler.availableMaxDigitalZoom",
- props.get(CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.scaler.availableMaxDigitalZoom", allKeys.contains(
- CameraCharacteristics.SCALER_AVAILABLE_MAX_DIGITAL_ZOOM));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidScalerStreamConfigurationMap() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.scaler.streamConfigurationMap",
- props.get(CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.scaler.streamConfigurationMap", allKeys.contains(
- CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidScalerCroppingType() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.scaler.croppingType",
- props.get(CameraCharacteristics.SCALER_CROPPING_TYPE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.scaler.croppingType", allKeys.contains(
- CameraCharacteristics.SCALER_CROPPING_TYPE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorReferenceIlluminant1() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.referenceIlluminant1",
- props.get(CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT1));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.referenceIlluminant1", allKeys.contains(
- CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT1));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorReferenceIlluminant2() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.referenceIlluminant2",
- props.get(CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT2));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.referenceIlluminant2", allKeys.contains(
- CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT2));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorCalibrationTransform1() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.sensor.calibrationTransform1",
- props.get(CameraCharacteristics.SENSOR_CALIBRATION_TRANSFORM1));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.calibrationTransform1", allKeys.contains(
- CameraCharacteristics.SENSOR_CALIBRATION_TRANSFORM1));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorCalibrationTransform2() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.sensor.calibrationTransform2",
- props.get(CameraCharacteristics.SENSOR_CALIBRATION_TRANSFORM2));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.calibrationTransform2", allKeys.contains(
- CameraCharacteristics.SENSOR_CALIBRATION_TRANSFORM2));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorColorTransform1() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.sensor.colorTransform1",
- props.get(CameraCharacteristics.SENSOR_COLOR_TRANSFORM1));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.colorTransform1", allKeys.contains(
- CameraCharacteristics.SENSOR_COLOR_TRANSFORM1));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorColorTransform2() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.sensor.colorTransform2",
- props.get(CameraCharacteristics.SENSOR_COLOR_TRANSFORM2));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.colorTransform2", allKeys.contains(
- CameraCharacteristics.SENSOR_COLOR_TRANSFORM2));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorForwardMatrix1() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.sensor.forwardMatrix1",
- props.get(CameraCharacteristics.SENSOR_FORWARD_MATRIX1));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.forwardMatrix1", allKeys.contains(
- CameraCharacteristics.SENSOR_FORWARD_MATRIX1));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorForwardMatrix2() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.sensor.forwardMatrix2",
- props.get(CameraCharacteristics.SENSOR_FORWARD_MATRIX2));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.forwardMatrix2", allKeys.contains(
- CameraCharacteristics.SENSOR_FORWARD_MATRIX2));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorBlackLevelPattern() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.sensor.blackLevelPattern",
- props.get(CameraCharacteristics.SENSOR_BLACK_LEVEL_PATTERN));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.blackLevelPattern", allKeys.contains(
- CameraCharacteristics.SENSOR_BLACK_LEVEL_PATTERN));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorMaxAnalogSensitivity() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.sensor.maxAnalogSensitivity",
- props.get(CameraCharacteristics.SENSOR_MAX_ANALOG_SENSITIVITY));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.maxAnalogSensitivity", allKeys.contains(
- CameraCharacteristics.SENSOR_MAX_ANALOG_SENSITIVITY));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorOrientation() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.orientation",
- props.get(CameraCharacteristics.SENSOR_ORIENTATION));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.orientation", allKeys.contains(
- CameraCharacteristics.SENSOR_ORIENTATION));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorAvailableTestPatternModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- Integer hwLevel = props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
- assertNotNull("No hardware level reported! android.info.supportedHardwareLevel",
- hwLevel);
- if (hwLevel == CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL)
- {
-
- assertNotNull("Invalid property: android.sensor.availableTestPatternModes",
- props.get(CameraCharacteristics.SENSOR_AVAILABLE_TEST_PATTERN_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.availableTestPatternModes", allKeys.contains(
- CameraCharacteristics.SENSOR_AVAILABLE_TEST_PATTERN_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorInfoActiveArraySize() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.info.activeArraySize",
- props.get(CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.info.activeArraySize", allKeys.contains(
- CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorInfoSensitivityRange() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.info.sensitivityRange",
- props.get(CameraCharacteristics.SENSOR_INFO_SENSITIVITY_RANGE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.info.sensitivityRange", allKeys.contains(
- CameraCharacteristics.SENSOR_INFO_SENSITIVITY_RANGE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorInfoColorFilterArrangement() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.info.colorFilterArrangement",
- props.get(CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.info.colorFilterArrangement", allKeys.contains(
- CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorInfoExposureTimeRange() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.info.exposureTimeRange",
- props.get(CameraCharacteristics.SENSOR_INFO_EXPOSURE_TIME_RANGE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.info.exposureTimeRange", allKeys.contains(
- CameraCharacteristics.SENSOR_INFO_EXPOSURE_TIME_RANGE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorInfoMaxFrameDuration() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.info.maxFrameDuration",
- props.get(CameraCharacteristics.SENSOR_INFO_MAX_FRAME_DURATION));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.info.maxFrameDuration", allKeys.contains(
- CameraCharacteristics.SENSOR_INFO_MAX_FRAME_DURATION));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorInfoPhysicalSize() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.info.physicalSize",
- props.get(CameraCharacteristics.SENSOR_INFO_PHYSICAL_SIZE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.info.physicalSize", allKeys.contains(
- CameraCharacteristics.SENSOR_INFO_PHYSICAL_SIZE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorInfoPixelArraySize() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.info.pixelArraySize",
- props.get(CameraCharacteristics.SENSOR_INFO_PIXEL_ARRAY_SIZE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.info.pixelArraySize", allKeys.contains(
- CameraCharacteristics.SENSOR_INFO_PIXEL_ARRAY_SIZE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorInfoWhiteLevel() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.info.whiteLevel",
- props.get(CameraCharacteristics.SENSOR_INFO_WHITE_LEVEL));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.info.whiteLevel", allKeys.contains(
- CameraCharacteristics.SENSOR_INFO_WHITE_LEVEL));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSensorInfoTimestampSource() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sensor.info.timestampSource",
- props.get(CameraCharacteristics.SENSOR_INFO_TIMESTAMP_SOURCE));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sensor.info.timestampSource", allKeys.contains(
- CameraCharacteristics.SENSOR_INFO_TIMESTAMP_SOURCE));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidStatisticsInfoAvailableFaceDetectModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.statistics.info.availableFaceDetectModes",
- props.get(CameraCharacteristics.STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.statistics.info.availableFaceDetectModes", allKeys.contains(
- CameraCharacteristics.STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidStatisticsInfoMaxFaceCount() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.statistics.info.maxFaceCount",
- props.get(CameraCharacteristics.STATISTICS_INFO_MAX_FACE_COUNT));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.statistics.info.maxFaceCount", allKeys.contains(
- CameraCharacteristics.STATISTICS_INFO_MAX_FACE_COUNT));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidStatisticsInfoAvailableHotPixelMapModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.statistics.info.availableHotPixelMapModes",
- props.get(CameraCharacteristics.STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.statistics.info.availableHotPixelMapModes", allKeys.contains(
- CameraCharacteristics.STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidTonemapMaxCurvePoints() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.tonemap.maxCurvePoints",
- props.get(CameraCharacteristics.TONEMAP_MAX_CURVE_POINTS));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.tonemap.maxCurvePoints", allKeys.contains(
- CameraCharacteristics.TONEMAP_MAX_CURVE_POINTS));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidTonemapAvailableToneMapModes() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.tonemap.availableToneMapModes",
- props.get(CameraCharacteristics.TONEMAP_AVAILABLE_TONE_MAP_MODES));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.tonemap.availableToneMapModes", allKeys.contains(
- CameraCharacteristics.TONEMAP_AVAILABLE_TONE_MAP_MODES));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidInfoSupportedHardwareLevel() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.info.supportedHardwareLevel",
- props.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.info.supportedHardwareLevel", allKeys.contains(
- CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL));
-
- }
-
- }
- }
-
- public void testCameraCharacteristicsAndroidSyncMaxLatency() throws Exception {
- String[] ids = mCameraManager.getCameraIdList();
- for (int i = 0; i < ids.length; i++) {
- CameraCharacteristics props = mCameraManager.getCameraCharacteristics(ids[i]);
- assertNotNull(String.format("Can't get camera characteristics from: ID %s", ids[i]),
- props);
-
- {
-
- assertNotNull("Invalid property: android.sync.maxLatency",
- props.get(CameraCharacteristics.SYNC_MAX_LATENCY));
- List<Key<?>> allKeys = props.getKeys();
- assertNotNull(String.format("Can't get camera characteristics keys from: ID %s",
- ids[i]), allKeys);
- assertTrue("Key not in keys list: android.sync.maxLatency", allKeys.contains(
- CameraCharacteristics.SYNC_MAX_LATENCY));
-
- }
-
- }
- }
-}
-
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/CameraDeviceTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/CameraDeviceTest.java
index 7f50c5a..7ddae65 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/CameraDeviceTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/CameraDeviceTest.java
@@ -33,6 +33,7 @@
import android.hardware.camera2.CaptureResult;
import android.hardware.camera2.TotalCaptureResult;
import android.hardware.camera2.cts.testcases.Camera2AndroidTestCase;
+import android.hardware.camera2.params.MeteringRectangle;
import android.os.Handler;
import android.os.SystemClock;
import android.util.Log;
@@ -989,6 +990,25 @@
}
/**
+ * <p>Check if 3A metering settings are "up to HAL" in request template</p>
+ *
+ * <p>This function doesn't fail the test immediately, it updates the
+ * test pass/fail status and appends the failure message to the error collector each key.</p>
+ *
+ * @param regions The metering rectangles to be checked
+ */
+ private void checkMeteringRect(MeteringRectangle[] regions) {
+ if (regions == null) {
+ return;
+ }
+ mCollector.expectNotEquals("Number of metering region should not be 0", 0, regions.length);
+ for (int i = 0; i < regions.length; i++) {
+ mCollector.expectEquals("Default metering regions should have all zero weight",
+ 0, regions[i].getMeteringWeight());
+ }
+ }
+
+ /**
* <p>Check if the request settings are suitable for a given request template.</p>
*
* <p>This function doesn't fail the test immediately, it updates the
@@ -1044,12 +1064,18 @@
}
if (maxRegionsAe > 0) {
mCollector.expectKeyValueNotNull(request, CONTROL_AE_REGIONS);
+ MeteringRectangle[] aeRegions = request.get(CONTROL_AE_REGIONS);
+ checkMeteringRect(aeRegions);
}
if (maxRegionsAwb > 0) {
mCollector.expectKeyValueNotNull(request, CONTROL_AWB_REGIONS);
+ MeteringRectangle[] awbRegions = request.get(CONTROL_AWB_REGIONS);
+ checkMeteringRect(awbRegions);
}
if (maxRegionsAf > 0) {
mCollector.expectKeyValueNotNull(request, CONTROL_AF_REGIONS);
+ MeteringRectangle[] afRegions = request.get(CONTROL_AF_REGIONS);
+ checkMeteringRect(afRegions);
}
}
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureRequestTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureRequestTest.java
index ec79151..6856438 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureRequestTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureRequestTest.java
@@ -1600,7 +1600,7 @@
}
private void digitalZoomTestByCamera(Size previewSize) throws Exception {
- final int ZOOM_STEPS = 30;
+ final int ZOOM_STEPS = 15;
final PointF[] TEST_ZOOM_CENTERS;
final int croppingType = mStaticInfo.getScalerCroppingTypeChecked();
@@ -1635,7 +1635,10 @@
CaptureRequest.Builder requestBuilder =
mCamera.createCaptureRequest(CameraDevice.TEMPLATE_PREVIEW);
SimpleCaptureListener listener = new SimpleCaptureListener();
- startPreview(requestBuilder, previewSize, listener);
+
+ updatePreviewSurface(previewSize);
+ configurePreviewOutput(requestBuilder);
+
CaptureRequest[] requests = new CaptureRequest[ZOOM_STEPS];
// Set algorithm regions to full active region
@@ -1681,6 +1684,9 @@
requestBuilder.set(CaptureRequest.SCALER_CROP_REGION, cropRegions[i]);
requests[i] = requestBuilder.build();
for (int j = 0; j < CAPTURE_SUBMIT_REPEAT; ++j) {
+ if (VERBOSE) {
+ Log.v(TAG, "submit crop region " + cropRegions[i]);
+ }
mSession.capture(requests[i], listener, mHandler);
}
@@ -1746,20 +1752,46 @@
previousCrop.height() < activeArraySize.height()));
}
}
-
- stopPreview();
}
private void digitalZoomPreviewCombinationTestByCamera() throws Exception {
+ final double ASPECT_RATIO_THRESHOLD = 0.001;
+ List<Double> aspectRatiosTested = new ArrayList<Double>();
+ Size maxPreviewSize = mOrderedPreviewSizes.get(0);
+ aspectRatiosTested.add((double)(maxPreviewSize.getWidth()) / maxPreviewSize.getHeight());
+
for (Size size : mOrderedPreviewSizes) {
+ // Max preview size was already tested in testDigitalZoom test. skip it.
+ if (size.equals(maxPreviewSize)) {
+ continue;
+ }
+
+ // Only test the largest size for each aspect ratio.
+ double aspectRatio = (double)(size.getWidth()) / size.getHeight();
+ if (isAspectRatioContained(aspectRatiosTested, aspectRatio, ASPECT_RATIO_THRESHOLD)) {
+ continue;
+ }
+
if (VERBOSE) {
Log.v(TAG, "Test preview size " + size.toString() + " digital zoom");
}
+ aspectRatiosTested.add(aspectRatio);
digitalZoomTestByCamera(size);
}
}
+ private static boolean isAspectRatioContained(List<Double> aspectRatioList,
+ double aspectRatio, double delta) {
+ for (Double ratio : aspectRatioList) {
+ if (Math.abs(ratio - aspectRatio) < delta) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
private void sceneModeTestByCamera() throws Exception {
int[] sceneModes = mStaticInfo.getAvailableSceneModesChecked();
Size maxPreviewSize = mOrderedPreviewSizes.get(0);
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureResultTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureResultTest.java
index ed75deb..ba4fce0 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureResultTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/CaptureResultTest.java
@@ -188,15 +188,21 @@
for (int frame = 0; frame < NUM_FRAMES_TESTED; frame++) {
Pair<TotalCaptureResult, List<CaptureResult>> resultPair =
listener.getCaptureResultPairs(WAIT_FOR_RESULT_TIMOUT_MS);
- if (resultPair.second == null) {
+
+ List<CaptureResult> partialResults = resultPair.second;
+
+ if (partialResults == null) {
// HAL only sends total result is legal
- continue;
+ partialResults = new ArrayList<>();
}
+
+ TotalCaptureResult totalResult = resultPair.first;
+
mCollector.expectLessOrEqual("Too many partial results",
- partialResultCount, resultPair.second.size());
+ partialResultCount, partialResults.size());
Set<CaptureResult.Key<?>> appearedPartialKeys =
new HashSet<CaptureResult.Key<?>>();
- for (CaptureResult partialResult : resultPair.second) {
+ for (CaptureResult partialResult : partialResults) {
List<CaptureResult.Key<?>> partialKeys = partialResult.getKeys();
mCollector.expectValuesUnique("Partial result keys: ", partialKeys);
for (CaptureResult.Key<?> key : partialKeys) {
@@ -207,10 +213,23 @@
}
appearedPartialKeys.addAll(partialKeys);
}
- List<CaptureResult.Key<?>> totalResultKeys = resultPair.first.getKeys();
+
+ // Test total result against the partial results
+ List<CaptureResult.Key<?>> totalResultKeys = totalResult.getKeys();
mCollector.expectTrue(
- "TotalCaptureResult should be a super set of partial capture results",
+ "TotalCaptureResult must be a super set of partial capture results",
totalResultKeys.containsAll(appearedPartialKeys));
+
+ List<CaptureResult> totalResultPartials = totalResult.getPartialResults();
+ mCollector.expectEquals("TotalCaptureResult's partial results must match " +
+ "the ones observed by #onCaptureProgressed",
+ partialResults, totalResultPartials);
+
+ if (VERBOSE) {
+ Log.v(TAG, "testPartialResult - Observed " +
+ partialResults.size() + "; queried for " +
+ totalResultPartials.size());
+ }
}
int errorCode = listener.getErrorCode();
@@ -511,9 +530,9 @@
private final LinkedBlockingQueue<Pair<TotalCaptureResult, List<CaptureResult>> > mQueue =
new LinkedBlockingQueue<>();
- private HashMap<CaptureRequest, List<CaptureResult>> mPartialResultsMap =
+ private final HashMap<CaptureRequest, List<CaptureResult>> mPartialResultsMap =
new HashMap<CaptureRequest, List<CaptureResult>>();
- private HashSet<CaptureRequest> completedRequests = new HashSet<>();
+ private final HashSet<CaptureRequest> completedRequests = new HashSet<>();
private int errorCode = 0;
@Override
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/DngCreatorTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/DngCreatorTest.java
index 136cd0d..1173eab 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/DngCreatorTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/DngCreatorTest.java
@@ -25,6 +25,8 @@
import android.hardware.camera2.DngCreator;
import android.hardware.camera2.cts.helpers.StaticMetadata;
import android.hardware.camera2.cts.testcases.Camera2AndroidTestCase;
+import android.location.Location;
+import android.media.ExifInterface;
import android.media.Image;
import android.media.ImageReader;
import android.util.Log;
@@ -45,7 +47,7 @@
public class DngCreatorTest extends Camera2AndroidTestCase {
private static final String TAG = "DngCreatorTest";
private static final boolean VERBOSE = Log.isLoggable(TAG, Log.VERBOSE);
- private static final String DEBUG_DNG_FILE = "/raw16.dng";
+ private static final String DEBUG_DNG_FILE = "raw16.dng";
@Override
protected void setUp() throws Exception {
@@ -85,7 +87,7 @@
StaticMetadata.StreamDirection.Output);
if (targetCaptureSizes.length == 0) {
if (VERBOSE) {
- Log.v(TAG, "Skipping testSingleImageBasic - " +
+ Log.i(TAG, "Skipping testSingleImageBasic - " +
"no raw output streams for camera " + deviceId);
}
continue;
@@ -106,15 +108,15 @@
outputStream = new ByteArrayOutputStream();
dngCreator.writeImage(outputStream, resultPair.first);
- if (VERBOSE && i == 0) {
+ if (VERBOSE) {
+ String filePath = DEBUG_FILE_NAME_BASE + "camera_" + deviceId + "_" +
+ DEBUG_DNG_FILE;
// Write out captured DNG file for the first camera device if setprop is enabled
- fileStream = new FileOutputStream(DEBUG_FILE_NAME_BASE +
- DEBUG_DNG_FILE);
+ fileStream = new FileOutputStream(filePath);
fileStream.write(outputStream.toByteArray());
fileStream.flush();
fileStream.close();
- Log.v(TAG, "Test DNG file for camera " + deviceId + " saved to " +
- DEBUG_FILE_NAME_BASE + DEBUG_DNG_FILE);
+ Log.v(TAG, "Test DNG file for camera " + deviceId + " saved to " + filePath);
}
} finally {
closeDevice(deviceId);
@@ -131,7 +133,121 @@
}
}
- // TODO: Further tests for DNG header validation.
+ /**
+ * Test basic raw capture and DNG saving with a thumbnail, rotation, usercomment, and GPS tags
+ * set.
+ *
+ * <p>
+ * For each camera, capture a single RAW16 image at the first capture size reported for
+ * the raw format on that device, and save that image as a DNG file. No further validation
+ * is done.
+ * </p>
+ *
+ * <p>
+ * Note: Enabling adb shell setprop log.tag.DngCreatorTest VERBOSE will also cause the
+ * raw image captured for the first reported camera device to be saved to an output file.
+ * </p>
+ */
+ public void testSingleImageThumbnail() throws Exception {
+ for (int i = 0; i < mCameraIds.length; i++) {
+ String deviceId = mCameraIds[i];
+ List<ImageReader> captureReaders = new ArrayList<ImageReader>();
+ List<CameraTestUtils.SimpleImageReaderListener> captureListeners =
+ new ArrayList<CameraTestUtils.SimpleImageReaderListener>();
+ FileOutputStream fileStream = null;
+ ByteArrayOutputStream outputStream = null;
+ try {
+ openDevice(deviceId);
+
+ Size[] targetCaptureSizes =
+ mStaticInfo.getAvailableSizesForFormatChecked(ImageFormat.RAW_SENSOR,
+ StaticMetadata.StreamDirection.Output);
+ if (targetCaptureSizes.length == 0) {
+ if (VERBOSE) {
+ Log.i(TAG, "Skipping testSingleImageThumbnail - " +
+ "no raw output streams for camera " + deviceId);
+ }
+ continue;
+ }
+
+ Size[] targetPreviewSizes =
+ mStaticInfo.getAvailableSizesForFormatChecked(ImageFormat.YUV_420_888,
+ StaticMetadata.StreamDirection.Output);
+ // Get smallest preview size
+ Size previewSize = mOrderedPreviewSizes.get(mOrderedPreviewSizes.size() - 1);
+
+ Size s = targetCaptureSizes[0];
+
+ // Create capture image reader
+ CameraTestUtils.SimpleImageReaderListener captureListener
+ = new CameraTestUtils.SimpleImageReaderListener();
+ captureReaders.add(createImageReader(s, ImageFormat.RAW_SENSOR, 2,
+ captureListener));
+ captureListeners.add(captureListener);
+
+ CameraTestUtils.SimpleImageReaderListener previewListener
+ = new CameraTestUtils.SimpleImageReaderListener();
+
+ captureReaders.add(createImageReader(previewSize, ImageFormat.YUV_420_888, 2,
+ previewListener));
+ captureListeners.add(previewListener);
+
+ Pair<List<Image>, CaptureResult> resultPair = captureSingleRawShot(s, captureReaders,
+ captureListeners);
+ CameraCharacteristics characteristics = mStaticInfo.getCharacteristics();
+
+ // Test simple writeImage, no header checks
+ DngCreator dngCreator = new DngCreator(characteristics, resultPair.second);
+ Location l = new Location("test");
+ l.reset();
+ l.setLatitude(37.420016);
+ l.setLongitude(-122.081987);
+ l.setTime(System.currentTimeMillis());
+ dngCreator.setLocation(l);
+
+ dngCreator.setDescription("helloworld");
+ dngCreator.setOrientation(ExifInterface.ORIENTATION_FLIP_VERTICAL);
+ dngCreator.setThumbnail(resultPair.first.get(1));
+ outputStream = new ByteArrayOutputStream();
+ dngCreator.writeImage(outputStream, resultPair.first.get(0));
+
+ if (VERBOSE) {
+ String filePath = DEBUG_FILE_NAME_BASE + "camera_" + deviceId + "_" +
+ DEBUG_DNG_FILE;
+ // Write out captured DNG file for the first camera device if setprop is enabled
+ fileStream = new FileOutputStream(filePath);
+ fileStream.write(outputStream.toByteArray());
+ fileStream.flush();
+ fileStream.close();
+ Log.v(TAG, "Test DNG file for camera " + deviceId + " saved to " + filePath);
+ }
+ } finally {
+ closeDevice(deviceId);
+ for (ImageReader r : captureReaders) {
+ closeImageReader(r);
+ }
+
+ if (outputStream != null) {
+ outputStream.close();
+ }
+
+ if (fileStream != null) {
+ fileStream.close();
+ }
+ }
+ }
+ }
+
+ private Pair<Image, CaptureResult> captureSingleRawShot(Size s, ImageReader captureReader,
+ CameraTestUtils.SimpleImageReaderListener captureListener) throws Exception {
+ List<ImageReader> readers = new ArrayList<ImageReader>();
+ readers.add(captureReader);
+ List<CameraTestUtils.SimpleImageReaderListener> listeners =
+ new ArrayList<CameraTestUtils.SimpleImageReaderListener>();
+ listeners.add(captureListener);
+ Pair<List<Image>, CaptureResult> res = captureSingleRawShot(s, readers, listeners);
+ return new Pair<Image, CaptureResult>(res.first.get(0), res.second);
+ }
/**
* Capture a single raw image.
@@ -142,8 +258,8 @@
* device.
* @return a pair containing the {@link Image} and {@link CaptureResult} used for this capture.
*/
- private Pair<Image, CaptureResult> captureSingleRawShot(Size s, ImageReader captureReader,
- CameraTestUtils.SimpleImageReaderListener captureListener) throws Exception {
+ private Pair<List<Image>, CaptureResult> captureSingleRawShot(Size s, List<ImageReader> captureReaders,
+ List<CameraTestUtils.SimpleImageReaderListener> captureListeners) throws Exception {
if (VERBOSE) {
Log.v(TAG, "captureSingleRawShot - Capturing raw image.");
}
@@ -162,11 +278,15 @@
}
}
assertTrue("Capture size is supported.", validSize);
- Surface captureSurface = captureReader.getSurface();
+
// Capture images.
List<Surface> outputSurfaces = new ArrayList<Surface>();
- outputSurfaces.add(captureSurface);
+ for (ImageReader captureReader : captureReaders) {
+ Surface captureSurface = captureReader.getSurface();
+ outputSurfaces.add(captureSurface);
+ }
+
CaptureRequest.Builder request = prepareCaptureRequestForSurfaces(outputSurfaces);
request.set(CaptureRequest.STATISTICS_LENS_SHADING_MAP_MODE,
CaptureRequest.STATISTICS_LENS_SHADING_MAP_MODE_ON);
@@ -178,14 +298,18 @@
// Verify capture result and images
CaptureResult result = resultListener.getCaptureResult(CAPTURE_WAIT_TIMEOUT_MS);
- Image captureImage = captureListener.getImage(CAPTURE_WAIT_TIMEOUT_MS);
+ List<Image> resultImages = new ArrayList<Image>();
+ for (CameraTestUtils.SimpleImageReaderListener captureListener : captureListeners) {
+ Image captureImage = captureListener.getImage(CAPTURE_WAIT_TIMEOUT_MS);
- CameraTestUtils.validateImage(captureImage, s.getWidth(), s.getHeight(),
- ImageFormat.RAW_SENSOR, null);
+ /*CameraTestUtils.validateImage(captureImage, s.getWidth(), s.getHeight(),
+ ImageFormat.RAW_SENSOR, null);*/
+ resultImages.add(captureImage);
+ }
// Stop capture, delete the streams.
stopCapture(/*fast*/false);
- return new Pair<Image, CaptureResult>(captureImage, result);
+ return new Pair<List<Image>, CaptureResult>(resultImages, result);
}
private CaptureRequest.Builder prepareCaptureRequestForSurfaces(List<Surface> surfaces)
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java
index e15192c..2ddff9f 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/ExtendedCameraCharacteristicsTest.java
@@ -22,9 +22,12 @@
import android.hardware.camera2.CameraCharacteristics.Key;
import android.hardware.camera2.CameraManager;
import android.hardware.camera2.cts.helpers.CameraErrorCollector;
+import android.hardware.camera2.params.BlackLevelPattern;
+import android.hardware.camera2.params.ColorSpaceTransform;
import android.hardware.camera2.params.StreamConfigurationMap;
import android.test.AndroidTestCase;
import android.util.Log;
+import android.util.Rational;
import android.util.Size;
import java.util.ArrayList;
@@ -44,6 +47,11 @@
private static final String PREFIX_ANDROID = "android";
private static final String PREFIX_VENDOR = "com";
+ /*
+ * Constants for static RAW metadata.
+ */
+ private static final int MIN_ALLOWABLE_WHITELEVEL = 32; // must have sensor bit depth > 5
+
private CameraManager mCameraManager;
private List<CameraCharacteristics> mCharacteristics;
private String[] mIds;
@@ -57,6 +65,7 @@
private static final int LEGACY = CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LEGACY;
private static final int LIMITED = CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_LIMITED;
private static final int FULL = CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL_FULL;
+ private static final int OPT = -1; // For keys that are optional on all hardware levels.
/*
* Capabilities short hand
@@ -177,6 +186,7 @@
*/
{
// (Key Name) (HW Level) (Capabilities <Var-Arg>)
+ expectKeyAvailable(c, CameraCharacteristics.COLOR_CORRECTION_AVAILABLE_ABERRATION_MODES , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.CONTROL_AE_AVAILABLE_ANTIBANDING_MODES , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.CONTROL_AE_AVAILABLE_MODES , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.CONTROL_AE_AVAILABLE_TARGET_FPS_RANGES , LEGACY , BC );
@@ -192,6 +202,7 @@
expectKeyAvailable(c, CameraCharacteristics.CONTROL_MAX_REGIONS_AWB , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.EDGE_AVAILABLE_EDGE_MODES , FULL , NONE );
expectKeyAvailable(c, CameraCharacteristics.FLASH_INFO_AVAILABLE , LEGACY , BC );
+ expectKeyAvailable(c, CameraCharacteristics.HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES , OPT , RAW );
expectKeyAvailable(c, CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.JPEG_AVAILABLE_THUMBNAIL_SIZES , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.LENS_FACING , LEGACY , BC );
@@ -202,6 +213,7 @@
expectKeyAvailable(c, CameraCharacteristics.LENS_INFO_FOCUS_DISTANCE_CALIBRATION , LIMITED , MANUAL_SENSOR );
expectKeyAvailable(c, CameraCharacteristics.LENS_INFO_HYPERFOCAL_DISTANCE , LIMITED , MANUAL_SENSOR );
expectKeyAvailable(c, CameraCharacteristics.LENS_INFO_MINIMUM_FOCUS_DISTANCE , LIMITED , NONE );
+ expectKeyAvailable(c, CameraCharacteristics.NOISE_REDUCTION_AVAILABLE_NOISE_REDUCTION_MODES , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.REQUEST_MAX_NUM_OUTPUT_PROC , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.REQUEST_MAX_NUM_OUTPUT_PROC_STALLING , LEGACY , BC );
@@ -212,17 +224,28 @@
expectKeyAvailable(c, CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.SCALER_CROPPING_TYPE , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.SENSOR_AVAILABLE_TEST_PATTERN_MODES , LEGACY , NONE );
- expectKeyAvailable(c, CameraCharacteristics.SENSOR_BLACK_LEVEL_PATTERN , FULL , MANUAL_SENSOR );
- expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE , LEGACY , BC , RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_BLACK_LEVEL_PATTERN , FULL , MANUAL_SENSOR, RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_CALIBRATION_TRANSFORM1 , OPT , RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_CALIBRATION_TRANSFORM2 , OPT , RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_COLOR_TRANSFORM1 , OPT , RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_COLOR_TRANSFORM2 , OPT , RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_FORWARD_MATRIX1 , OPT , RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_FORWARD_MATRIX2 , OPT , RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_ACTIVE_ARRAY_SIZE , LEGACY , BC, RAW );
expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT , FULL , RAW );
expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_EXPOSURE_TIME_RANGE , FULL , MANUAL_SENSOR );
expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_MAX_FRAME_DURATION , FULL , MANUAL_SENSOR );
expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_PHYSICAL_SIZE , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_PIXEL_ARRAY_SIZE , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_SENSITIVITY_RANGE , FULL , MANUAL_SENSOR );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_WHITE_LEVEL , OPT , RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_INFO_TIMESTAMP_SOURCE , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.SENSOR_MAX_ANALOG_SENSITIVITY , FULL , MANUAL_SENSOR );
expectKeyAvailable(c, CameraCharacteristics.SENSOR_ORIENTATION , LEGACY , BC );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT1 , OPT , RAW );
+ expectKeyAvailable(c, CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT2 , OPT , RAW );
expectKeyAvailable(c, CameraCharacteristics.STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES , LEGACY , BC );
+ expectKeyAvailable(c, CameraCharacteristics.STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES , OPT , RAW );
expectKeyAvailable(c, CameraCharacteristics.STATISTICS_INFO_MAX_FACE_COUNT , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.SYNC_MAX_LATENCY , LEGACY , BC );
expectKeyAvailable(c, CameraCharacteristics.TONEMAP_AVAILABLE_TONE_MAP_MODES , FULL , MANUAL_SENSOR );
@@ -238,6 +261,84 @@
}
/**
+ * Test values for static metadata used by the RAW capability.
+ */
+ public void testStaticRawCharacteristics() {
+ int counter = 0;
+ for (CameraCharacteristics c : mCharacteristics) {
+ int[] actualCapabilities = c.get(CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES);
+ assertNotNull("android.request.availableCapabilities must never be null");
+ if (!arrayContains(actualCapabilities,
+ CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_RAW)) {
+ Log.i(TAG, "RAW capability is not supported in camera " + counter++ +
+ ". Skip the test.");
+ continue;
+ }
+
+ Integer actualHwLevel = c.get(CameraCharacteristics.INFO_SUPPORTED_HARDWARE_LEVEL);
+ if (actualHwLevel != null && actualHwLevel == FULL) {
+ mCollector.expectKeyValueContains(c,
+ CameraCharacteristics.HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES,
+ CameraCharacteristics.HOT_PIXEL_MODE_FAST);
+ }
+ mCollector.expectKeyValueContains(c,
+ CameraCharacteristics.STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES, false);
+ mCollector.expectKeyValueGreaterThan(c, CameraCharacteristics.SENSOR_INFO_WHITE_LEVEL,
+ MIN_ALLOWABLE_WHITELEVEL);
+
+ mCollector.expectKeyValueIsIn(c,
+ CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT,
+ CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGGB,
+ CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GRBG,
+ CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_GBRG,
+ CameraCharacteristics.SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_BGGR);
+ // TODO: SENSOR_INFO_COLOR_FILTER_ARRANGEMENT_RGB isn't supported yet.
+
+ mCollector.expectKeyValueInRange(c, CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT1,
+ CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT,
+ CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN);
+ mCollector.expectKeyValueInRange(c, CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT2,
+ (byte) CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT1_DAYLIGHT,
+ (byte) CameraCharacteristics.SENSOR_REFERENCE_ILLUMINANT1_ISO_STUDIO_TUNGSTEN);
+
+ Rational[] zeroes = new Rational[9];
+ Arrays.fill(zeroes, Rational.ZERO);
+
+ ColorSpaceTransform zeroed = new ColorSpaceTransform(zeroes);
+ mCollector.expectNotEquals("Forward Matrix1 should not contain all zeroes.", zeroed,
+ c.get(CameraCharacteristics.SENSOR_FORWARD_MATRIX1));
+ mCollector.expectNotEquals("Forward Matrix2 should not contain all zeroes.", zeroed,
+ c.get(CameraCharacteristics.SENSOR_FORWARD_MATRIX2));
+ mCollector.expectNotEquals("Calibration Transform1 should not contain all zeroes.",
+ zeroed, c.get(CameraCharacteristics.SENSOR_CALIBRATION_TRANSFORM1));
+ mCollector.expectNotEquals("Calibration Transform2 should not contain all zeroes.",
+ zeroed, c.get(CameraCharacteristics.SENSOR_CALIBRATION_TRANSFORM2));
+ mCollector.expectNotEquals("Color Transform1 should not contain all zeroes.",
+ zeroed, c.get(CameraCharacteristics.SENSOR_COLOR_TRANSFORM1));
+ mCollector.expectNotEquals("Color Transform2 should not contain all zeroes.",
+ zeroed, c.get(CameraCharacteristics.SENSOR_COLOR_TRANSFORM2));
+
+ BlackLevelPattern blackLevel = mCollector.expectKeyValueNotNull(c,
+ CameraCharacteristics.SENSOR_BLACK_LEVEL_PATTERN);
+ if (blackLevel != null) {
+ int[] blackLevelPattern = new int[BlackLevelPattern.COUNT];
+ blackLevel.copyTo(blackLevelPattern, /*offset*/0);
+ Integer whitelevel = c.get(CameraCharacteristics.SENSOR_INFO_WHITE_LEVEL);
+ if (whitelevel != null) {
+ mCollector.expectValuesInRange("BlackLevelPattern", blackLevelPattern, 0,
+ whitelevel);
+ } else {
+ mCollector.addMessage(
+ "No WhiteLevel available, cannot check BlackLevelPattern range.");
+ }
+ }
+
+ // TODO: profileHueSatMap, and profileToneCurve aren't supported yet.
+ counter++;
+ }
+ }
+
+ /**
* Check key is present in characteristics if the hardware level is at least {@code hwLevel};
* check that the key is present if the actual capabilities are one of {@code capabilities};
* lastly check that {@code LEGACY} devices don't list any addition keys that they shouldn't
@@ -285,7 +386,7 @@
Arrays.toString(actualCapabilities)),
allKeys.contains(key));
} else {
- if (actualHwLevel == LEGACY) {
+ if (actualHwLevel == LEGACY && hwLevel != OPT) {
mCollector.expectTrue(
String.format("Key (%s) must not be in characteristics for LEGACY devices",
key.getName()),
@@ -376,6 +477,8 @@
/** Remap HW levels worst<->best, 0 = worst, 2 = best */
private static int remapHardwareLevel(int level) {
switch (level) {
+ case OPT:
+ return -1;
case LEGACY:
return 0; // lowest
case LIMITED:
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/RecordingTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/RecordingTest.java
index 05b6243..92fbb7f 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/RecordingTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/RecordingTest.java
@@ -283,8 +283,8 @@
prepareRecording(size, videoFramerate, captureRate);
- // prepare preview surface: preview size is same as video size.
- updatePreviewSurface(size);
+ // prepare preview surface by using video size.
+ updatePreviewSurfaceWithVideoSize(size);
// Start recording
startSlowMotionRecording(/*useMediaRecorder*/true, videoFramerate, captureRate,
@@ -409,8 +409,8 @@
prepareRecordingWithProfile(profile);
- // prepare preview surface: preview size is same as video size.
- updatePreviewSurface(videoSz);
+ // prepare preview surface by using video size.
+ updatePreviewSurfaceWithVideoSize(videoSz);
// Start recording
startRecording(/* useMediaRecorder */true);
@@ -450,8 +450,8 @@
// Use AVC and AAC a/v compression format.
prepareRecording(sz, VIDEO_FRAME_RATE, VIDEO_FRAME_RATE);
- // prepare preview surface: preview size is same as video size.
- updatePreviewSurface(sz);
+ // prepare preview surface by using video size.
+ updatePreviewSurfaceWithVideoSize(sz);
// Start recording
startRecording(/* useMediaRecorder */true);
@@ -550,9 +550,19 @@
" must be one of the camera device supported video size!",
mSupportedVideoSizes.contains(videoSz));
- Size videoSnapshotSz = mStaticInfo.isHardwareLevelFull() ?
- mOrderedStillSizes.get(0) : // Full device tests largest jpeg size
- videoSz; // Non-full device tests video size
+ Size maxPreviewSize = mOrderedPreviewSizes.get(0);
+ Size videoSnapshotSz = videoSz;
+ /**
+ * Only test full res snapshot when below conditions are all true.
+ * 1. Camera is a FULL device
+ * 2. video size is up to max preview size, which will be bounded by 1080p.
+ */
+ if (mStaticInfo.isHardwareLevelFull() &&
+ videoSz.getWidth() <= maxPreviewSize.getWidth() &&
+ videoSz.getHeight() <= maxPreviewSize.getHeight()) {
+ videoSnapshotSz = mOrderedStillSizes.get(0);
+ }
+
createImageReader(
videoSnapshotSz, ImageFormat.JPEG,
MAX_VIDEO_SNAPSHOT_IMAGES, /*listener*/null);
@@ -576,8 +586,8 @@
CaptureRequest.Builder videoSnapshotRequestBuilder =
mCamera.createCaptureRequest(CameraDevice.TEMPLATE_VIDEO_SNAPSHOT);
- // prepare preview surface: preview size is same as video size.
- updatePreviewSurface(videoSz);
+ // prepare preview surface by using video size.
+ updatePreviewSurfaceWithVideoSize(videoSz);
prepareVideoSnapshot(videoSnapshotRequestBuilder, imageListener);
@@ -650,6 +660,29 @@
}
/**
+ * Update preview size with video size.
+ *
+ * <p>Preview size will be capped with max preview size.</p>
+ *
+ * @param videoSize The video size used for preview.
+ */
+ private void updatePreviewSurfaceWithVideoSize(Size videoSize) {
+ if (mOrderedPreviewSizes == null) {
+ throw new IllegalStateException("supported preview size list is not initialized yet");
+ }
+ Size maxPreviewSize = mOrderedPreviewSizes.get(0);
+ Size previewSize = videoSize;
+ if (videoSize.getWidth() > maxPreviewSize.getWidth() ||
+ videoSize.getHeight() > maxPreviewSize.getHeight()) {
+ Log.w(TAG, "Overwrite preview size from " + videoSize.toString() +
+ " to " + maxPreviewSize.toString());
+ previewSize = maxPreviewSize;
+ }
+
+ updatePreviewSurface(previewSize);
+ }
+
+ /**
* Configure MediaRecorder recording session with CamcorderProfile, prepare
* the recording surface.
*/
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/StaticMetadataTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/StaticMetadataTest.java
index cbd51f5..2f2f513 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/StaticMetadataTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/StaticMetadataTest.java
@@ -123,6 +123,7 @@
boolean isCapabilityAvailable = availableCaps.contains(capability);
validateCapability(capability, isCapabilityAvailable);
}
+ // Note: Static metadata for capabilities is tested in ExtendedCameraCharacteristicsTest
}
}
@@ -210,9 +211,11 @@
break;
case REQUEST_AVAILABLE_CAPABILITIES_RAW:
capabilityName = "REQUEST_AVAILABLE_CAPABILITIES_RAW";
- mCollector.expectGreater(
- "REQUEST_AVAILABLE_CAPABILITIES_RAW should support RAW_SENSOR output",
- /*expected*/0, mStaticInfo.getRawOutputSizesChecked().length);
+ if (isCapabilityAvailable) {
+ mCollector.expectGreater(
+ "REQUEST_AVAILABLE_CAPABILITIES_RAW should support RAW_SENSOR output",
+ /*expected*/0, mStaticInfo.getRawOutputSizesChecked().length);
+ }
requestKeys.add(CaptureRequest.HOT_PIXEL_MODE);
requestKeys.add(CaptureRequest.STATISTICS_HOT_PIXEL_MAP_MODE);
break;
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/StillCaptureTest.java b/tests/tests/hardware/src/android/hardware/camera2/cts/StillCaptureTest.java
index 73e6066..5c6328d 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/StillCaptureTest.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/StillCaptureTest.java
@@ -17,8 +17,10 @@
package android.hardware.camera2.cts;
import static android.hardware.camera2.cts.CameraTestUtils.*;
+import static junit.framework.Assert.assertNotNull;
import android.graphics.ImageFormat;
+import android.graphics.Point;
import android.graphics.Rect;
import android.hardware.camera2.CameraCharacteristics;
import android.hardware.camera2.CameraDevice;
@@ -28,6 +30,7 @@
import android.location.LocationManager;
import android.hardware.camera2.DngCreator;
import android.media.ImageReader;
+import android.util.Pair;
import android.util.Size;
import android.hardware.camera2.cts.CameraTestUtils.SimpleCaptureListener;
import android.hardware.camera2.cts.CameraTestUtils.SimpleImageReaderListener;
@@ -177,6 +180,13 @@
Log.i(TAG, "Testing raw capture for Camera " + mCameraIds[i]);
openDevice(mCameraIds[i]);
+ if (!mStaticInfo.isCapabilitySupported(
+ CameraCharacteristics.REQUEST_AVAILABLE_CAPABILITIES_RAW)) {
+ Log.i(TAG, "RAW capability is not supported in camera " + mCameraIds[i] +
+ ". Skip the test.");
+ continue;
+ }
+
rawCaptureTestByCamera();
} finally {
closeDevice();
@@ -661,7 +671,8 @@
dumpFile(rawFileName, rawBuffer);
}
- verifyRawCaptureResult(rawRequest, resultListener);
+ verifyRawCaptureResult(rawRequest, resultListener.getCaptureResultForRequest(rawRequest,
+ NUM_RESULTS_WAIT_TIMEOUT));
stopPreview();
}
}
@@ -732,6 +743,7 @@
basicValidateJpegImage(jpegImage, maxStillSz);
Image rawImage = rawListener.getImage(CAPTURE_IMAGE_TIMEOUT_MS);
validateRaw16Image(rawImage, size);
+ verifyRawCaptureResult(multiRequest, result);
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
@@ -766,9 +778,89 @@
}
}
- private void verifyRawCaptureResult(CaptureRequest rawRequest,
- SimpleCaptureListener resultListener) {
- // TODO: validate DNG metadata tags.
+ /**
+ * Validate that raw {@link CaptureResult}.
+ *
+ * @param rawRequest a {@link CaptureRequest} use to capture a RAW16 image.
+ * @param rawResult the {@link CaptureResult} corresponding to the given request.
+ */
+ private void verifyRawCaptureResult(CaptureRequest rawRequest, CaptureResult rawResult) {
+ assertNotNull(rawRequest);
+ assertNotNull(rawResult);
+
+ Rational[] empty = new Rational[] { Rational.ZERO, Rational.ZERO, Rational.ZERO};
+ Rational[] neutralColorPoint = mCollector.expectKeyValueNotNull("NeutralColorPoint",
+ rawResult, CaptureResult.SENSOR_NEUTRAL_COLOR_POINT);
+ if (neutralColorPoint != null) {
+ mCollector.expectEquals("NeutralColorPoint length", empty.length,
+ neutralColorPoint.length);
+ mCollector.expectNotEquals("NeutralColorPoint cannot be all zeroes, ", empty,
+ neutralColorPoint);
+ mCollector.expectValuesInRange("NeutralColorPoint", neutralColorPoint,
+ Rational.ZERO, new Rational(1, 1));
+ }
+
+ mCollector.expectKeyValueGreaterOrEqual(rawResult, CaptureResult.SENSOR_GREEN_SPLIT, 0.0f);
+
+ Pair<Double, Double>[] noiseProfile = mCollector.expectKeyValueNotNull("NoiseProfile",
+ rawResult, CaptureResult.SENSOR_NOISE_PROFILE);
+ if (noiseProfile != null) {
+ mCollector.expectEquals("NoiseProfile length", noiseProfile.length,
+ /*Num CFA channels*/4);
+ for (Pair<Double, Double> p : noiseProfile) {
+ mCollector.expectTrue("NoiseProfile coefficients " + p +
+ " must have: S > 0, O >= 0", p.first > 0 && p.second >= 0);
+ }
+ }
+
+ Integer hotPixelMode = mCollector.expectKeyValueNotNull("HotPixelMode", rawResult,
+ CaptureResult.HOT_PIXEL_MODE);
+ Boolean hotPixelMapMode = mCollector.expectKeyValueNotNull("HotPixelMapMode", rawResult,
+ CaptureResult.STATISTICS_HOT_PIXEL_MAP_MODE);
+ Point[] hotPixelMap = rawResult.get(CaptureResult.STATISTICS_HOT_PIXEL_MAP);
+
+ Size pixelArraySize = mStaticInfo.getPixelArraySizeChecked();
+ boolean[] availableHotPixelMapModes = mStaticInfo.getValueFromKeyNonNull(
+ CameraCharacteristics.STATISTICS_INFO_AVAILABLE_HOT_PIXEL_MAP_MODES);
+
+ if (hotPixelMode != null) {
+ Integer requestMode = mCollector.expectKeyValueNotNull(rawRequest,
+ CaptureRequest.HOT_PIXEL_MODE);
+ if (requestMode != null) {
+ mCollector.expectKeyValueEquals(rawResult, CaptureResult.HOT_PIXEL_MODE,
+ requestMode);
+ }
+ }
+
+ if (hotPixelMapMode != null) {
+ Boolean requestMapMode = mCollector.expectKeyValueNotNull(rawRequest,
+ CaptureRequest.STATISTICS_HOT_PIXEL_MAP_MODE);
+ if (requestMapMode != null) {
+ mCollector.expectKeyValueEquals(rawResult,
+ CaptureResult.STATISTICS_HOT_PIXEL_MAP_MODE, requestMapMode);
+ }
+
+ if (!hotPixelMapMode) {
+ mCollector.expectTrue("HotPixelMap must be empty", hotPixelMap == null ||
+ hotPixelMap.length == 0);
+ } else {
+ mCollector.expectTrue("HotPixelMap must not be empty", hotPixelMap != null);
+ mCollector.expectNotNull("AvailableHotPixelMapModes must not be null",
+ availableHotPixelMapModes);
+ if (availableHotPixelMapModes != null) {
+ mCollector.expectContains("HotPixelMapMode", availableHotPixelMapModes, true);
+ }
+
+ int height = pixelArraySize.getHeight();
+ int width = pixelArraySize.getWidth();
+ for (Point p : hotPixelMap) {
+ mCollector.expectTrue("Hotpixel " + p + " must be in pixelArray " +
+ pixelArraySize, p.x >= 0 && p.x < width && p.y >= 0 && p.y < height);
+ }
+ }
+ }
+ // TODO: profileHueSatMap, and profileToneCurve aren't supported yet.
+
}
private static boolean areGpsFieldsEqual(Location a, Location b) {
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/CameraErrorCollector.java b/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/CameraErrorCollector.java
index 700abb0..22b4db5 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/CameraErrorCollector.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/CameraErrorCollector.java
@@ -29,6 +29,7 @@
import org.hamcrest.Matcher;
import org.junit.rules.ErrorCollector;
+import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
@@ -144,11 +145,24 @@
}
if (!Objects.equals(expected, actual)) {
- if (actual == null) {
- addMessage(msg + ", actual value is null");
- return false;
- }
+ addMessage(String.format("%s (expected = %s, actual = %s) ", msg, expected,
+ actual));
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Check if the two values are not equal.
+ *
+ * @param msg Message to be logged when check fails.
+ * @param expected Expected value to be checked against.
+ * @param actual Actual value to be checked.
+ * @return {@code true} if the two values are not equal, {@code false} otherwise.
+ */
+ public <T> boolean expectNotEquals(String msg, T expected, T actual) {
+ if (Objects.equals(expected, actual)) {
addMessage(String.format("%s (expected = %s, actual = %s) ", msg, expected,
actual));
return false;
@@ -173,11 +187,31 @@
}
if (!Arrays.deepEquals(expected, actual)) {
- if (actual == null) {
- addMessage(msg + ", actual value is null");
- return false;
- }
+ addMessage(String.format("%s (expected = %s, actual = %s) ", msg,
+ Arrays.deepToString(expected), Arrays.deepToString(actual)));
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Check if the two arrays of values are not deeply equal.
+ *
+ * @param msg Message to be logged when check fails.
+ * @param expected Expected array of values to be checked against.
+ * @param actual Actual array of values to be checked.
+ * @return {@code true} if the two arrays of values are not deeply equal, {@code false}
+ * otherwise.
+ *
+ * @throws IllegalArgumentException if {@code expected} was {@code null}
+ */
+ public <T> boolean expectNotEquals(String msg, T[] expected, T[] actual) {
+ if (expected == null) {
+ throw new IllegalArgumentException("expected value shouldn't be null");
+ }
+
+ if (Arrays.deepEquals(expected, actual)) {
addMessage(String.format("%s (expected = %s, actual = %s) ", msg,
Arrays.deepToString(expected), Arrays.deepToString(actual)));
return false;
@@ -320,6 +354,22 @@
}
/**
+ * Expect the array of values are in the range.
+ *
+ * @param msg Message to be logged
+ * @param array The array of values to be checked
+ * @param min The min value of the range
+ * @param max The max value of the range
+ */
+ public void expectValuesInRange(String msg, int[] array, int min, int max) {
+ ArrayList<Integer> l = new ArrayList<>(array.length);
+ for (int i : array) {
+ l.add(i);
+ }
+ expectValuesInRange(msg, l, min, max);
+ }
+
+ /**
* Expect the value is in the range.
*
* @param msg Message to be logged
@@ -374,7 +424,7 @@
if (!expectEquals(differentSizesMsg, expected.length, actual.length)) return false;
- boolean succ = true;;
+ boolean succ = true;
for (int i = 0; i < expected.length; ++i) {
if (i < actual.length) {
// Avoid printing multiple errors for the same rectangle
@@ -512,7 +562,7 @@
/**
* Check if the key value is not null and return the value.
*
- * @param request The {@link CameraCharacteristics} to get the key from.
+ * @param characteristics The {@link CameraCharacteristics} to get the key from.
* @param key The {@link CameraCharacteristics} key to be checked.
*
* @return The value of the key.
@@ -531,6 +581,25 @@
/**
* Check if the key value is not null and return the value.
*
+ * @param request The {@link CaptureRequest} to get the key from.
+ * @param key The {@link CaptureRequest} key to be checked.
+ *
+ * @return The value of the key.
+ */
+ public <T> T expectKeyValueNotNull(CaptureRequest request,
+ CaptureRequest.Key<T> key) {
+
+ T value = request.get(key);
+ if (value == null) {
+ addMessage("Key " + key.getName() + " shouldn't be null");
+ }
+
+ return value;
+ }
+
+ /**
+ * Check if the key value is not null and return the value.
+ *
* @param request The {@link CaptureRequest#Builder} to get the key from.
* @param key The {@link CaptureRequest} key to be checked.
* @return The value of the key.
@@ -666,6 +735,229 @@
}
/**
+ * Check if the key is non-null, and the key value is greater than the expected value.
+ *
+ * @param result {@link CaptureResult} to check.
+ * @param key The {@link CaptureResult} key to be checked.
+ * @param expected The expected to be compared to the value for the given key.
+ */
+ public <T extends Comparable<? super T>> void expectKeyValueGreaterOrEqual(
+ CaptureResult result, CaptureResult.Key<T> key, T expected) {
+ T value;
+ if ((value = expectKeyValueNotNull(result, key)) == null) {
+ return;
+ }
+
+ expectGreaterOrEqual(key.getName(), expected, value);
+ }
+
+ /**
+ * Check if the key is non-null, and the key value is greater than the expected value.
+ *
+ * @param characteristics {@link CameraCharacteristics} to check.
+ * @param key The {@link CameraCharacteristics} key to be checked.
+ * @param expected The expected to be compared to the value for the given key.
+ */
+ public <T extends Comparable<? super T>> void expectKeyValueGreaterThan(
+ CameraCharacteristics characteristics, CameraCharacteristics.Key<T> key, T expected) {
+ T value;
+ if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
+ return;
+ }
+
+ expectGreater(key.getName(), expected, value);
+ }
+
+ /**
+ * Check if the key is non-null, and the key value is in the expected range.
+ *
+ * @param characteristics {@link CameraCharacteristics} to check.
+ * @param key The {@link CameraCharacteristics} key to be checked.
+ * @param min The min value of the range
+ * @param max The max value of the range
+ */
+ public <T extends Comparable<? super T>> void expectKeyValueInRange(
+ CameraCharacteristics characteristics, CameraCharacteristics.Key<T> key, T min, T max) {
+ T value;
+ if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
+ return;
+ }
+ expectInRange(key.getName(), value, min, max);
+ }
+
+ /**
+ * Check if the key is non-null, and the key value is one of the expected values.
+ *
+ * @param characteristics {@link CameraCharacteristics} to check.
+ * @param key The {@link CameraCharacteristics} key to be checked.
+ * @param expected The expected values for the given key.
+ */
+ public <T> void expectKeyValueIsIn(CameraCharacteristics characteristics,
+ CameraCharacteristics.Key<T> key, T... expected) {
+ T value;
+ if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
+ return;
+ }
+ String reason = "Key " + key.getName() + " value " + value
+ + " isn't one of the expected values " + Arrays.deepToString(expected);
+ expectContains(reason, expected, value);
+ }
+
+ /**
+ * Check if the key is non-null, and the key value contains the expected element.
+ *
+ * @param characteristics {@link CameraCharacteristics} to check.
+ * @param key The {@link CameraCharacteristics} key to be checked.
+ * @param expected The expected element to be contained in the value for the given key.
+ */
+ public <T> void expectKeyValueContains(CameraCharacteristics characteristics,
+ CameraCharacteristics.Key<T[]> key, T expected) {
+ T[] value;
+ if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
+ return;
+ }
+ String reason = "Key " + key.getName() + " value " + value
+ + " doesn't contain the expected value " + expected;
+ expectContains(reason, value, expected);
+ }
+
+ /**
+ * Check if the key is non-null, and the key value contains the expected element.
+ *
+ * @param characteristics {@link CameraCharacteristics} to check.
+ * @param key The {@link CameraCharacteristics} key to be checked.
+ * @param expected The expected element to be contained in the value for the given key.
+ */
+ public void expectKeyValueContains(CameraCharacteristics characteristics,
+ CameraCharacteristics.Key<int[]> key, int expected) {
+ int[] value;
+ if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
+ return;
+ }
+ String reason = "Key " + key.getName() + " value " + value
+ + " doesn't contain the expected value " + expected;
+ expectContains(reason, value, expected);
+ }
+
+ /**
+ * Check if the key is non-null, and the key value contains the expected element.
+ *
+ * @param characteristics {@link CameraCharacteristics} to check.
+ * @param key The {@link CameraCharacteristics} key to be checked.
+ * @param expected The expected element to be contained in the value for the given key.
+ */
+ public void expectKeyValueContains(CameraCharacteristics characteristics,
+ CameraCharacteristics.Key<boolean[]> key, boolean expected) {
+ boolean[] value;
+ if ((value = expectKeyValueNotNull(characteristics, key)) == null) {
+ return;
+ }
+ String reason = "Key " + key.getName() + " value " + value
+ + " doesn't contain the expected value " + expected;
+ expectContains(reason, value, expected);
+ }
+
+ /**
+ * Check if the {@code values} array contains the expected element.
+ *
+ * @param reason reason to print for failure.
+ * @param values array to check for membership in.
+ * @param expected the value to check.
+ */
+ public <T> void expectContains(String reason, T[] values, T expected) {
+ if (values == null) {
+ throw new NullPointerException();
+ }
+ checkThat(reason, expected, InMatcher.in(values));
+ }
+
+ public <T> void expectContains(T[] values, T expected) {
+ String reason = "Expected value " + expected
+ + " is not contained in the given values " + values;
+ expectContains(reason, values, expected);
+ }
+
+ /**
+ * Specialize {@link InMatcher} class for integer primitive array.
+ */
+ private static class IntInMatcher extends InMatcher<Integer> {
+ public IntInMatcher(int[] values) {
+ Preconditions.checkNotNull("values", values);
+ mValues = new ArrayList<>(values.length);
+ for (int i : values) {
+ mValues.add(i);
+ }
+ }
+ }
+
+ /**
+ * Check if the {@code values} array contains the expected element.
+ *
+ * <p>Specialized for primitive int arrays</p>
+ *
+ * @param reason reason to print for failure.
+ * @param values array to check for membership in.
+ * @param expected the value to check.
+ */
+ public void expectContains(String reason, int[] values, int expected) {
+ if (values == null) {
+ throw new NullPointerException();
+ }
+
+ checkThat(reason, expected, new IntInMatcher(values));
+ }
+
+ public void expectContains(int[] values, int expected) {
+ String reason = "Expected value " + expected
+ + " is not contained in the given values " + values;
+ expectContains(reason, values, expected);
+ }
+
+ /**
+ * Specialize {@link BooleanInMatcher} class for boolean primitive array.
+ */
+ private static class BooleanInMatcher extends InMatcher<Boolean> {
+ public BooleanInMatcher(boolean[] values) {
+ Preconditions.checkNotNull("values", values);
+ mValues = new ArrayList<>(values.length);
+ for (boolean i : values) {
+ mValues.add(i);
+ }
+ }
+ }
+
+ /**
+ * Check if the {@code values} array contains the expected element.
+ *
+ * <p>Specialized for primitive boolean arrays</p>
+ *
+ * @param reason reason to print for failure.
+ * @param values array to check for membership in.
+ * @param expected the value to check.
+ */
+ public void expectContains(String reason, boolean[] values, boolean expected) {
+ if (values == null) {
+ throw new NullPointerException();
+ }
+
+ checkThat(reason, expected, new BooleanInMatcher(values));
+ }
+
+ /**
+ * Check if the {@code values} array contains the expected element.
+ *
+ * <p>Specialized for primitive boolean arrays</p>
+ *
+ * @param values array to check for membership in.
+ * @param expected the value to check.
+ */
+ public void expectContains(boolean[] values, boolean expected) {
+ String reason = "Expected value " + expected
+ + " is not contained in the given values " + values;
+ expectContains(reason, values, expected);
+ }
+
+ /**
* Check if the element inside of the list are unique.
*
* @param msg The message to be logged
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/InMatcher.java b/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/InMatcher.java
new file mode 100644
index 0000000..aae4ac3
--- /dev/null
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/InMatcher.java
@@ -0,0 +1,70 @@
+/*
+ * Copyright 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package android.hardware.camera2.cts.helpers;
+
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Factory;
+import org.hamcrest.Matcher;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Objects;
+
+/**
+ * A {@link Matcher} class for checking if value contained in a {@link Collection} or array.
+ */
+public class InMatcher<T> extends BaseMatcher<T> {
+
+ protected Collection<T> mValues;
+
+ public InMatcher(Collection<T> values) {
+ Preconditions.checkNotNull("values", values);
+ mValues = values;
+ }
+
+ public InMatcher(T... values) {
+ Preconditions.checkNotNull(values);
+ mValues = Arrays.asList(values);
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public boolean matches(Object o) {
+ T obj = (T) o;
+ for (T elem : mValues) {
+ if (Objects.equals(o, elem)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("in(").appendValue(mValues).appendText(")");
+ }
+
+ @Factory
+ public static <T> Matcher<T> in(T... operand) {
+ return new InMatcher<T>(operand);
+ }
+
+ @Factory
+ public static <T> Matcher<T> in(Collection<T> operand) {
+ return new InMatcher<T>(operand);
+ }
+}
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/StaticMetadata.java b/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/StaticMetadata.java
index 4a51221..578d03e 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/StaticMetadata.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/helpers/StaticMetadata.java
@@ -567,7 +567,7 @@
*
* @return the available hot pixel map modes
*/
- public int[] getAvailableHotPixelMapModesChecked() {
+ public int[] getAvailableHotPixelModesChecked() {
Key<int[]> key = CameraCharacteristics.HOT_PIXEL_AVAILABLE_HOT_PIXEL_MODES;
int[] modes = getValueFromKeyNonNull(key);
diff --git a/tests/tests/hardware/src/android/hardware/camera2/cts/testcases/Camera2SurfaceViewTestCase.java b/tests/tests/hardware/src/android/hardware/camera2/cts/testcases/Camera2SurfaceViewTestCase.java
index 6e8ddef..9232151 100644
--- a/tests/tests/hardware/src/android/hardware/camera2/cts/testcases/Camera2SurfaceViewTestCase.java
+++ b/tests/tests/hardware/src/android/hardware/camera2/cts/testcases/Camera2SurfaceViewTestCase.java
@@ -584,6 +584,11 @@
}
}
+ /**
+ * Update the preview surface size.
+ *
+ * @param size The preview size to be updated.
+ */
protected void updatePreviewSurface(Size size) {
if (size.equals(mPreviewSize) && mPreviewSurface != null) {
Log.w(TAG, "Skipping update preview surface size...");
diff --git a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
index 61998e7..c31c484 100755
--- a/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
+++ b/tests/tests/permission/src/android/permission/cts/FileSystemPermissionTest.java
@@ -31,7 +31,9 @@
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.FileReader;
+import java.io.InputStream;
import java.io.IOException;
+import java.io.OutputStream;
import java.util.concurrent.Callable;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Executors;
@@ -249,6 +251,18 @@
assertFileOwnedByGroup(f, "root");
}
+ @MediumTest
+ public void testIdletimerDirectoryExistsAndSane() throws Exception {
+ File dir = new File("/sys/class/xt_idletimer");
+ assertTrue(dir.isDirectory());
+ assertTrue(dir.canRead());
+ assertFalse(dir.canWrite());
+ assertTrue(dir.canExecute());
+
+ assertFileOwnedBy(dir, "root");
+ assertFileOwnedByGroup(dir, "root");
+ }
+
/**
* Assert that a file is owned by a specific owner. This is a noop if the
* file does not exist.
@@ -815,19 +829,29 @@
}
public void testDevRandomWorldReadableAndWritable() throws Exception {
+ File f = new File("/dev/random");
+
+ assertTrue(f + " cannot be opened for reading", canOpenForReading(f));
+ assertTrue(f + " cannot be opened for writing", canOpenForWriting(f));
+
FileUtils.FileStatus status = new FileUtils.FileStatus();
- assertTrue(FileUtils.getFileStatus("/dev/random", status, false));
+ assertTrue(FileUtils.getFileStatus(f.getPath(), status, false));
assertTrue(
- "/dev/random not world-readable/writable. Actual mode: 0"
+ f + " not world-readable/writable. Actual mode: 0"
+ Integer.toString(status.mode, 8),
(status.mode & 0666) == 0666);
}
public void testDevUrandomWorldReadableAndWritable() throws Exception {
+ File f = new File("/dev/urandom");
+
+ assertTrue(f + " cannot be opened for reading", canOpenForReading(f));
+ assertTrue(f + " cannot be opened for writing", canOpenForWriting(f));
+
FileUtils.FileStatus status = new FileUtils.FileStatus();
- assertTrue(FileUtils.getFileStatus("/dev/urandom", status, false));
+ assertTrue(FileUtils.getFileStatus(f.getPath(), status, false));
assertTrue(
- "/dev/urandom not world-readable/writable. Actual mode: 0"
+ f + " not world-readable/writable. Actual mode: 0"
+ Integer.toString(status.mode, 8),
(status.mode & 0666) == 0666);
}
@@ -839,15 +863,28 @@
return;
}
- FileUtils.FileStatus status = new FileUtils.FileStatus();
- assertTrue(FileUtils.getFileStatus(f.getCanonicalPath(), status, false));
- assertTrue(
- f + " has wrong file mode: 0"
- + Integer.toOctalString(status.mode),
- (status.mode & 0777) == 0440);
+ assertFalse(f + " can be opened for reading", canOpenForReading(f));
+ assertFalse(f + " can be opened for writing", canOpenForWriting(f));
- assertFileOwnedBy(f, "root");
- assertFileOwnedByGroup(f, "system");
+ FileUtils.FileStatus status = new FileUtils.FileStatus();
+ assertFalse("stat permitted on " + f,
+ FileUtils.getFileStatus(f.getPath(), status, false));
+ }
+
+ private static boolean canOpenForReading(File f) {
+ try (InputStream in = new FileInputStream(f)) {
+ return true;
+ } catch (IOException expected) {
+ return false;
+ }
+ }
+
+ private static boolean canOpenForWriting(File f) {
+ try (OutputStream out = new FileOutputStream(f)) {
+ return true;
+ } catch (IOException expected) {
+ return false;
+ }
}
public void testFileHasOnlyCapsThrowsOnInvalidCaps() throws Exception {
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java b/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
index 74c34e3..217e7c6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/CoreMathVerifier.java
@@ -221,133 +221,435 @@
static native float convertDoubleToFloat(double x);
static native double convertDoubleToDouble(double x);
- // Returns the distance between two points in n-dimensional space.
- static private Floaty distance(float[] point1, float[] point2, int ulpFactor, int ulpRelaxedFactor) {
- Floaty sum = new Floaty(0f, ulpFactor, ulpRelaxedFactor);
- for (int i = 0; i < point1.length; i++) {
- Floaty diff = Floaty.subtract(new Floaty(point1[i], ulpFactor, ulpRelaxedFactor),
- new Floaty(point2[i], ulpFactor, ulpRelaxedFactor));
- sum.add(Floaty.multiply(diff, diff));
+ static private Target.Floaty pi32(Target t) {
+ return t.new32((float) Math.PI);
+ }
+
+ static private Target.Floaty any32(Target t) {
+ return t.new32(Float.NEGATIVE_INFINITY, Float.NaN, Float.POSITIVE_INFINITY);
+ }
+
+ static private Target.Floaty acos(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ acos(in.mid32()),
+ acos(in.min32()),
+ acos(in.max32()));
+ }
+
+ static private Target.Floaty acosh(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ acosh(in.mid32()),
+ acosh(in.min32()),
+ acosh(in.max32()));
+ }
+
+ static private Target.Floaty acospi(float f, Target t) {
+ return t.divide(acos(f, t), pi32(t));
+ }
+
+ static private Target.Floaty asin(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ asin(in.mid32()),
+ asin(in.min32()),
+ asin(in.max32()));
+ }
+
+ static private Target.Floaty asinh(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ asinh(in.mid32()),
+ asinh(in.min32()),
+ asinh(in.max32()));
+ }
+
+ static private Target.Floaty asinpi(float f, Target t) {
+ return t.divide(asin(f, t), pi32(t));
+ }
+
+ static private Target.Floaty atan(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ atan(in.mid32()),
+ atan(in.min32()),
+ atan(in.max32()));
+ }
+
+ static private Target.Floaty atanh(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ atanh(in.mid32()),
+ atanh(in.min32()),
+ atanh(in.max32()));
+ }
+
+ static private Target.Floaty atanpi(float f, Target t) {
+ return t.divide(atan(f, t), pi32(t));
+ }
+
+ static private Target.Floaty atan2(float y, float x, Target t) {
+ Target.Floaty inY = t.new32(y);
+ Target.Floaty inX = t.new32(x);
+ return t.new32(
+ atan2(inY.mid32(), inX.mid32()),
+ atan2(inY.min32(), inX.min32()),
+ atan2(inY.min32(), inX.max32()),
+ atan2(inY.max32(), inX.min32()),
+ atan2(inY.max32(), inX.max32()));
+ }
+
+ static private Target.Floaty atan2pi(float y, float x, Target t) {
+ return t.divide(atan2(y, x, t), pi32(t));
+ }
+
+ static private Target.Floaty cbrt(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ cbrt(in.mid32()),
+ cbrt(in.min32()),
+ cbrt(in.max32()));
+ }
+
+ static private Target.Floaty cos(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ cos(in.mid32()),
+ cos(in.min32()),
+ cos(in.max32()));
+ }
+
+ static private Target.Floaty cosh(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ cosh(in.mid32()),
+ cosh(in.min32()),
+ cosh(in.max32()));
+ }
+
+ static private Target.Floaty cospi(float f, Target t) {
+ Target.Floaty in = t.multiply(t.new32(f), pi32(t));
+ return t.new32(
+ cos(in.mid32()),
+ cos(in.min32()),
+ cos(in.max32()));
+ }
+
+ // Computes the cross product of two 3D vectors.
+ static private void cross(float[] v1, float[] v2, Target.Floaty[] out, Target t) {
+ Target.Floaty a12 = t.multiply(t.new32(v1[1]), t.new32(v2[2]));
+ Target.Floaty a21 = t.multiply(t.new32(v1[2]), t.new32(v2[1]));
+ out[0] = t.subtract(a12, a21);
+ Target.Floaty a02 = t.multiply(t.new32(v1[0]), t.new32(v2[2]));
+ Target.Floaty a20 = t.multiply(t.new32(v1[2]), t.new32(v2[0]));
+ out[1] = t.subtract(a20, a02);
+ Target.Floaty a01 = t.multiply(t.new32(v1[0]), t.new32(v2[1]));
+ Target.Floaty a10 = t.multiply(t.new32(v1[1]), t.new32(v2[0]));
+ out[2] = t.subtract(a01, a10);
+ if (out.length == 4) {
+ out[3] = t.new32(0.f);
}
- Floaty d = Floaty.sqrt(sum);
- d.setMinimumError(ulpFactor, ulpRelaxedFactor);
+ }
+
+ // Returns the distance between two points in n-dimensional space.
+ static private Target.Floaty distance(float[] point1, float[] point2, Target t) {
+ Target.Floaty sum = t.new32(0.f);
+ for (int i = 0; i < point1.length; i++) {
+ Target.Floaty diff = t.subtract(t.new32(point1[i]), t.new32(point2[i]));
+ sum = t.add(sum, t.multiply(diff, diff));
+ }
+ Target.Floaty d = t.sqrt(sum);
return d;
}
+ static private Target.Floaty exp(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ exp(in.mid32()),
+ exp(in.min32()),
+ exp(in.max32()));
+ }
+
+ static private Target.Floaty exp10(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ exp10(in.mid32()),
+ exp10(in.min32()),
+ exp10(in.max32()));
+ }
+
+ static private Target.Floaty exp2(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ exp2(in.mid32()),
+ exp2(in.min32()),
+ exp2(in.max32()));
+ }
+
+ static private Target.Floaty expm1(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ expm1(in.mid32()),
+ expm1(in.min32()),
+ expm1(in.max32()));
+ }
+
+ static private Target.Floaty hypot(float x, float y, Target t) {
+ Target.Floaty inX = t.new32(x);
+ Target.Floaty inY = t.new32(y);
+ return t.new32(
+ hypot(inX.mid32(), inY.mid32()),
+ hypot(inX.min32(), inY.min32()),
+ hypot(inX.min32(), inY.max32()),
+ hypot(inX.max32(), inY.min32()),
+ hypot(inX.max32(), inY.max32()));
+ }
+
// Returns the length of the n-dimensional vector.
- static private Floaty length(float[] array, int ulpFactor, int ulpRelaxedFactor) {
- Floaty sum = new Floaty(0f, ulpFactor, ulpRelaxedFactor);
+ static private Target.Floaty length(float[] array, Target t) {
+ Target.Floaty sum = t.new32(0.f);
for (int i = 0; i < array.length; i++) {
- Floaty f = new Floaty(array[i], ulpFactor, ulpRelaxedFactor);
- sum.add(Floaty.multiply(f, f));
+ Target.Floaty f = t.new32(array[i]);
+ sum = t.add(sum, t.multiply(f, f));
}
- Floaty l = Floaty.sqrt(sum);
- l.setMinimumError(ulpFactor, ulpRelaxedFactor);
+ Target.Floaty l = t.sqrt(sum);
return l;
}
+ static private Target.Floaty log(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ log(in.mid32()),
+ log(in.min32()),
+ log(in.max32()));
+ }
+
+ static private Target.Floaty log10(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ log10(in.mid32()),
+ log10(in.min32()),
+ log10(in.max32()));
+ }
+
+ static private Target.Floaty log1p(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ log1p(in.mid32()),
+ log1p(in.min32()),
+ log1p(in.max32()));
+ }
+
+ static private Target.Floaty log2(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ log2(in.mid32()),
+ log2(in.min32()),
+ log2(in.max32()));
+ }
+
// Normalizes the n-dimensional vector, i.e. makes it length 1.
- static private void normalize(float[] in, Floaty[] out, int ulpFactor, int ulpRelaxedFactor) {
- Floaty l = length(in, ulpFactor, ulpRelaxedFactor);
- boolean isZero = l.getFloatValue() == 0f;
+ static private void normalize(float[] in, Target.Floaty[] out, Target t) {
+ Target.Floaty l = length(in, t);
+ boolean isZero = l.get32() == 0.f;
for (int i = 0; i < in.length; i++) {
- out[i] = new Floaty(in[i], ulpFactor, ulpRelaxedFactor);
+ out[i] = t.new32(in[i]);
if (!isZero) {
- out[i].divide(l);
+ out[i] = t.divide(out[i], l);
}
}
}
- // Computes the cross product of two 3D vectors.
- static private void cross(float[] v1, float[] v2, Floaty[] out, int ulpFactor,
- int ulpRelaxedFactor) {
- Floaty a12 = Floaty.multiply(new Floaty(v1[1]), new Floaty(v2[2]));
- Floaty a21 = Floaty.multiply(new Floaty(v1[2]), new Floaty(v2[1]));
- out[0] = Floaty.subtract(a12, a21);
- Floaty a02 = Floaty.multiply(new Floaty(v1[0]), new Floaty(v2[2]));
- Floaty a20 = Floaty.multiply(new Floaty(v1[2]), new Floaty(v2[0]));
- out[1] = Floaty.subtract(a20, a02);
- Floaty a01 = Floaty.multiply(new Floaty(v1[0]), new Floaty(v2[1]));
- Floaty a10 = Floaty.multiply(new Floaty(v1[1]), new Floaty(v2[0]));
- out[2] = Floaty.subtract(a01, a10);
- if (out.length == 4) {
- out[3] = new Floaty(0f);
- }
- setMinimumError(out, ulpFactor, ulpRelaxedFactor);
+ static private Target.Floaty powr(float x, float y, Target t) {
+ Target.Floaty inX = t.new32(x);
+ Target.Floaty inY = t.new32(y);
+ return t.new32(
+ pow(inX.mid32(), inY.mid32()),
+ pow(inX.min32(), inY.min32()),
+ pow(inX.min32(), inY.max32()),
+ pow(inX.max32(), inY.min32()),
+ pow(inX.max32(), inY.max32()));
}
- // Set a minimum error for every entry of out.
- static void setMinimumError(Floaty[] out, int ulpFactor, int ulpRelaxedFactor) {
- for (int i = 0; i < out.length; i++) {
- out[i].setMinimumError(ulpFactor, ulpRelaxedFactor);
+ static private Target.Floaty recip(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.divide(t.new32(1.f), in);
+ }
+
+ static private Target.Floaty rootn(float inV, int inN, Target t) {
+ /* Rootn of a negative number should be possible only if the number
+ * is odd. In cases where the int is very large, our approach will
+ * lose whether the int is odd, and we'll get a NaN for weird cases
+ * like rootn(-3.95, 818181881), which should return 1. We handle the
+ * case by handling the sign ourselves. We use copysign to handle the
+ * negative zero case.
+ */
+ float value;
+ if ((inN & 0x1) == 0x1) {
+ value = Math.copySign(pow(Math.abs(inV), 1.f / inN),
+ inV);
+ } else {
+ value = pow(inV, 1.f / inN);
+ }
+ if (inN == 0) {
+ return t.new32(value, Float.NaN);
+ } else {
+ return t.new32(value);
+ }
+ }
+
+ static private Target.Floaty rsqrt(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.divide(t.new32(1.f), t.sqrt(in));
+ }
+
+ static private Target.Floaty sin(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ sin(in.mid32()),
+ sin(in.min32()),
+ sin(in.max32()));
+ }
+
+ static private Target.Floaty sinh(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ sinh(in.mid32()),
+ sinh(in.min32()),
+ sinh(in.max32()));
+ }
+
+ static private Target.Floaty sinpi(float f, Target t) {
+ Target.Floaty in = t.multiply(t.new32(f), pi32(t));
+ return t.new32(
+ sin(in.mid32()),
+ sin(in.min32()),
+ sin(in.max32()));
+ }
+
+ static private Target.Floaty sqrt(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.sqrt(in);
+ }
+
+ static private Target.Floaty tan(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ float min = tan(in.min32());
+ float max = tan(in.max32());
+ /* If the tan of the min is greater than that of the max,
+ * we spanned a discontinuity.
+ */
+ if (min > max) {
+ return any32(t);
+ } else {
+ return t.new32(tan(f), min, max);
+ }
+ }
+
+ static private Target.Floaty tanh(float f, Target t) {
+ Target.Floaty in = t.new32(f);
+ return t.new32(
+ tanh(in.mid32()),
+ tanh(in.min32()),
+ tanh(in.max32()));
+ }
+
+ static private Target.Floaty tanpi(float f, Target t) {
+ Target.Floaty in = t.multiply(t.new32(f), pi32(t));
+ float min = tan(in.min32());
+ float max = tan(in.max32());
+ /* If the tan of the min is greater than that of the max,
+ * we spanned a discontinuity.
+ */
+ if (min > max) {
+ return any32(t);
+ } else {
+ return t.new32(tan(in.mid32()), min, max);
}
}
static public void computeAbs(TestAbs.ArgumentsCharUchar args) {
- args.out = (byte) Math.abs(args.inValue);
+ args.out = (byte)Math.abs(args.inValue);
}
static public void computeAbs(TestAbs.ArgumentsShortUshort args) {
- args.out = (short) Math.abs(args.inValue);
+ args.out = (short)Math.abs(args.inValue);
}
static public void computeAbs(TestAbs.ArgumentsIntUint args) {
args.out = Math.abs(args.inValue);
}
- static public void computeAcos(TestAcos.ArgumentsFloatFloat args) {
- args.out = new Floaty(acos(args.inV), 4, 128);
+ static public void computeAcos(TestAcos.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = acos(args.inV, t);
}
- static public void computeAcosh(TestAcosh.ArgumentsFloatFloat args) {
- args.out = new Floaty(acosh(args.in), 4, 128);
+ static public void computeAcosh(TestAcosh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = acosh(args.in, t);
}
- static public void computeAcospi(TestAcospi.ArgumentsFloatFloat args) {
- args.out = new Floaty(acos(args.inV) / (float) Math.PI, 5, 128);
+ static public void computeAcospi(TestAcospi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(5, 128, false);
+ args.out = acospi(args.inV, t);
}
- static public void computeAsin(TestAsin.ArgumentsFloatFloat args) {
- args.out = new Floaty(asin(args.inV), 4, 128);
+ static public void computeAsin(TestAsin.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = asin(args.inV, t);
}
- static public void computeAsinh(TestAsinh.ArgumentsFloatFloat args) {
- args.out = new Floaty(asinh(args.in), 4, 128);
+ static public void computeAsinh(TestAsinh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = asinh(args.in, t);
}
- static public void computeAsinpi(TestAsinpi.ArgumentsFloatFloat args) {
- args.out = new Floaty(asin(args.inV) / (float) Math.PI, 5, 128);
+ static public void computeAsinpi(TestAsinpi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(5, 128, false);
+ args.out = asinpi(args.inV, t);
}
- static public void computeAtan(TestAtan.ArgumentsFloatFloat args) {
- args.out = new Floaty(atan(args.inV), 5, 128);
+ static public void computeAtan(TestAtan.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(5, 128, false);
+ args.out = atan(args.inV, t);
}
- static public void computeAtanh(TestAtanh.ArgumentsFloatFloat args) {
- args.out = new Floaty(atanh(args.in), 5, 128);
+ static public void computeAtanh(TestAtanh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(5, 128, false);
+ args.out = atanh(args.inV, t);
}
- static public void computeAtanpi(TestAtanpi.ArgumentsFloatFloat args) {
- args.out = new Floaty(atan(args.inV) / (float) Math.PI, 5, 128);
+ static public void computeAtanpi(TestAtanpi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(5, 128, false);
+ args.out = atanpi(args.inV, t);
}
- static public void computeAtan2(TestAtan2.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(atan2(args.inY, args.inX), 6, 128);
+ static public void computeAtan2(TestAtan2.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(6, 128, false);
+ args.out = atan2(args.inY, args.inX, t);
}
- static public void computeAtan2pi(TestAtan2pi.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(atan2(args.inY, args.inX) / (float) Math.PI, 6, 128);
+ static public void computeAtan2pi(TestAtan2pi.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(6, 128, false);
+ args.out = atan2pi(args.inY, args.inX, t);
}
- static public void computeCbrt(TestCbrt.ArgumentsFloatFloat args) {
- args.out = new Floaty(cbrt(args.in), 2, 128);
+ static public void computeCbrt(TestCbrt.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(2, 128, false);
+ args.out = cbrt(args.in, t);
}
- static public void computeCeil(TestCeil.ArgumentsFloatFloat args) {
- args.out = new Floaty(ceil(args.in), 0, 1);
+ static public void computeCeil(TestCeil.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(0, 1, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ ceil(in.mid32()),
+ ceil(in.min32()),
+ ceil(in.max32()));
}
- // TODO all clamp
static public void computeClamp(TestClamp.ArgumentsCharCharCharChar args) {
args.out = minI8(args.inMaxValue, maxI8(args.inValue, args.inMinValue));
}
@@ -372,9 +674,10 @@
args.out = minU32(args.inMaxValue, maxU32(args.inValue, args.inMinValue));
}
- static public void computeClamp(TestClamp.ArgumentsFloatFloatFloatFloat args) {
- args.out = new Floaty(Math.min(args.inMaxValue,
- Math.max(args.inValue, args.inMinValue)), 0, 0);
+ static public void computeClamp(TestClamp.ArgumentsFloatFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(Math.min(args.inMaxValue,
+ Math.max(args.inValue, args.inMinValue)));
}
static public void computeClamp(TestClamp.ArgumentsLongLongLongLong args) {
@@ -436,11 +739,13 @@
static public void computeConvert(TestConvert.ArgumentsCharUlong args) {
args.out = convertCharToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsCharFloat args) {
- args.out = new Floaty(convertCharToFloat(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsCharFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(convertCharToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsCharDouble args) {
- args.out = new Floaty(convertCharToDouble(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsCharDouble args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new64(convertCharToDouble(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsUcharChar args) {
@@ -467,11 +772,13 @@
static public void computeConvert(TestConvert.ArgumentsUcharUlong args) {
args.out = convertUcharToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsUcharFloat args) {
- args.out = new Floaty(convertUcharToFloat(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsUcharFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(convertUcharToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsUcharDouble args) {
- args.out = new Floaty(convertUcharToDouble(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsUcharDouble args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new64(convertUcharToDouble(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsShortChar args) {
@@ -498,11 +805,13 @@
static public void computeConvert(TestConvert.ArgumentsShortUlong args) {
args.out = convertShortToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsShortFloat args) {
- args.out = new Floaty(convertShortToFloat(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsShortFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(convertShortToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsShortDouble args) {
- args.out = new Floaty(convertShortToDouble(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsShortDouble args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new64(convertShortToDouble(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsUshortChar args) {
@@ -529,11 +838,13 @@
static public void computeConvert(TestConvert.ArgumentsUshortUlong args) {
args.out = convertUshortToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsUshortFloat args) {
- args.out = new Floaty(convertUshortToFloat(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsUshortFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(convertUshortToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsUshortDouble args) {
- args.out = new Floaty(convertUshortToDouble(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsUshortDouble args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new64(convertUshortToDouble(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsIntChar args) {
@@ -560,11 +871,13 @@
static public void computeConvert(TestConvert.ArgumentsIntUlong args) {
args.out = convertIntToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsIntFloat args) {
- args.out = new Floaty(convertIntToFloat(args.inV), 1, 1);
+ static public void computeConvert(TestConvert.ArgumentsIntFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = t.new32(convertIntToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsIntDouble args) {
- args.out = new Floaty(convertIntToDouble(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsIntDouble args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new64(convertIntToDouble(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsUintChar args) {
@@ -591,11 +904,13 @@
static public void computeConvert(TestConvert.ArgumentsUintUlong args) {
args.out = convertUintToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsUintFloat args) {
- args.out = new Floaty(convertUintToFloat(args.inV), 1, 1);
+ static public void computeConvert(TestConvert.ArgumentsUintFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = t.new32(convertUintToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsUintDouble args) {
- args.out = new Floaty(convertUintToDouble(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsUintDouble args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new64(convertUintToDouble(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsLongChar args) {
@@ -622,11 +937,13 @@
static public void computeConvert(TestConvert.ArgumentsLongUlong args) {
args.out = convertLongToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsLongFloat args) {
- args.out = new Floaty(convertLongToFloat(args.inV), 1, 1);
+ static public void computeConvert(TestConvert.ArgumentsLongFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = t.new32(convertLongToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsLongDouble args) {
- args.out = new Floaty(convertLongToDouble(args.inV), 1, 1);
+ static public void computeConvert(TestConvert.ArgumentsLongDouble args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = t.new64(convertLongToDouble(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsUlongChar args) {
@@ -653,11 +970,13 @@
static public void computeConvert(TestConvert.ArgumentsUlongUlong args) {
args.out = convertUlongToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsUlongFloat args) {
- args.out = new Floaty(convertUlongToFloat(args.inV), 1, 1);
+ static public void computeConvert(TestConvert.ArgumentsUlongFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = t.new32(convertUlongToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsUlongDouble args) {
- args.out = new Floaty(convertUlongToDouble(args.inV), 1, 1);
+ static public void computeConvert(TestConvert.ArgumentsUlongDouble args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = t.new64(convertUlongToDouble(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsFloatChar args) {
@@ -684,11 +1003,13 @@
static public void computeConvert(TestConvert.ArgumentsFloatUlong args) {
args.out = convertFloatToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsFloatFloat args) {
- args.out = new Floaty(convertFloatToFloat(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(convertFloatToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsFloatDouble args) {
- args.out = new Floaty(convertFloatToDouble(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsFloatDouble args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new64(convertFloatToDouble(args.inV));
}
static public void computeConvert(TestConvert.ArgumentsDoubleChar args) {
@@ -715,188 +1036,261 @@
static public void computeConvert(TestConvert.ArgumentsDoubleUlong args) {
args.out = convertDoubleToUlong(args.inV);
}
- static public void computeConvert(TestConvert.ArgumentsDoubleFloat args) {
- args.out = new Floaty(convertDoubleToFloat(args.inV), 1, 1);
+ static public void computeConvert(TestConvert.ArgumentsDoubleFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = t.new32(convertDoubleToFloat(args.inV));
}
- static public void computeConvert(TestConvert.ArgumentsDoubleDouble args) {
- args.out = new Floaty(convertDoubleToDouble(args.inV), 0, 0);
+ static public void computeConvert(TestConvert.ArgumentsDoubleDouble args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new64(convertDoubleToDouble(args.inV));
}
- static public void computeCopysign(TestCopysign.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(Math.copySign(args.inX, args.inY), 0, 0);
+ static public void computeCopysign(TestCopysign.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(Math.copySign(args.inX, args.inY));
}
- static public void computeCos(TestCos.ArgumentsFloatFloat args) {
- args.out = new Floaty(cos(args.in), 4, 128);
+ static public void computeCos(TestCos.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = cos(args.in, t);
}
- static public void computeCosh(TestCosh.ArgumentsFloatFloat args) {
- args.out = new Floaty(cosh(args.in), 4, 128);
+ static public void computeCosh(TestCosh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = cosh(args.in, t);
}
- static public void computeCospi(TestCospi.ArgumentsFloatFloat args) {
- Floaty ip = new Floaty((float) ((double)args.in * Math.PI), 1, 1);
- args.out = Floaty.FloatyFromRange(
- (float) Math.cos(ip.getDoubleMin()),
- (float) Math.cos(ip.getDoubleMax()), 4, 128);
+ static public void computeCospi(TestCospi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = cospi(args.in, t);
}
- static public void computeCross(TestCross.ArgumentsFloatNFloatNFloatN args) {
- cross(args.inLhs, args.inRhs, args.out, 1, 4);
+ static public void computeCross(TestCross.ArgumentsFloatNFloatNFloatN args, Target t) {
+ t.setPrecision(1, 4, false);
+ cross(args.inLhs, args.inRhs, args.out, t);
}
- static public void computeDegrees(TestDegrees.ArgumentsFloatFloat args) {
- args.out = new Floaty(args.inValue * (float)(180.0 / Math.PI), 3, 3);
+ static public void computeDegrees(TestDegrees.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 3, false);
+ Target.Floaty in = t.new32(args.inValue);
+ Target.Floaty k = t.new32((float)(180.0 / Math.PI));
+ args.out = t.multiply(in, k);
}
- static public void computeDistance(TestDistance.ArgumentsFloatFloatFloat args) {
- args.out = distance(new float[] {args.inLhs}, new float[] {args.inRhs}, 1, 1);
+ static public void computeDistance(TestDistance.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = distance(new float[] {args.inLhs}, new float[] {args.inRhs}, t);
}
- static public void computeDistance(TestDistance.ArgumentsFloatNFloatNFloat args) {
- args.out = distance(args.inLhs, args.inRhs, 1, 1);
+ static public void computeDistance(TestDistance.ArgumentsFloatNFloatNFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = distance(args.inLhs, args.inRhs, t);
}
- static public void computeDot(TestDot.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(args.inLhs * args.inRhs);
- args.out.setMinimumError(1, 4);
+ static public void computeDot(TestDot.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(1, 4, false);
+ Target.Floaty a = t.new32(args.inLhs);
+ Target.Floaty b = t.new32(args.inRhs);
+ args.out = t.multiply(a, b);
}
- static public void computeDot(TestDot.ArgumentsFloatNFloatNFloat args) {
- Floaty sum = new Floaty(0.0f);
+ static public void computeDot(TestDot.ArgumentsFloatNFloatNFloat args, Target t) {
+ t.setPrecision(1, 4, false);
+ Target.Floaty sum = t.new32(0.f);
for (int i = 0; i < args.inLhs.length; i++) {
- Floaty a = new Floaty(args.inLhs[i]);
- Floaty b = new Floaty(args.inRhs[i]);
- sum.add(Floaty.multiply(a, b));
+ Target.Floaty a = t.new32(args.inLhs[i]);
+ Target.Floaty b = t.new32(args.inRhs[i]);
+ sum = t.add(sum, t.multiply(a, b));
}
args.out = sum;
- args.out.setMinimumError(1, 4);
}
- static public void computeErf(TestErf.ArgumentsFloatFloat args) {
- args.out = new Floaty(erf(args.in), 16, 128);
+ static public void computeErf(TestErf.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(16, 128, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ erf(args.in),
+ erf(in.min32()),
+ erf(in.max32()));
}
- static public void computeErfc(TestErfc.ArgumentsFloatFloat args) {
- args.out = new Floaty(erfc(args.in), 16, 128);
+ static public void computeErfc(TestErfc.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(16, 128, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ erfc(args.in),
+ erfc(in.min32()),
+ erfc(in.max32()));
}
- static public void computeExp(TestExp.ArgumentsFloatFloat args) {
- // TODO Should the relaxed ulp be 128?
- args.out = new Floaty(exp(args.in), 3, 16);
+ static public void computeExp(TestExp.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 16, false);
+ args.out = exp(args.in, t);
}
- static public void computeExp10(TestExp10.ArgumentsFloatFloat args) {
- // TODO OpenCL says 3, we needed 32 in both to pass.
- args.out = new Floaty(exp10(args.in), 32, 32);
+ static public void computeExp10(TestExp10.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 32, false);
+ args.out = exp10(args.in, t);
}
- static public void computeExp2(TestExp2.ArgumentsFloatFloat args) {
- args.out = new Floaty(exp2(args.in), 3, 16);
+ static public void computeExp2(TestExp2.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 16, false);
+ args.out = exp2(args.in, t);
}
- static public void computeExpm1(TestExpm1.ArgumentsFloatFloat args) {
- args.out = new Floaty(expm1(args.in), 3, 16);
+ static public void computeExpm1(TestExpm1.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 16, false);
+ args.out = expm1(args.in, t);
}
- static public void computeFabs(TestFabs.ArgumentsFloatFloat args) {
- args.out = new Floaty(Math.abs(args.in), 0, 0);
+ static public void computeFabs(TestFabs.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ Math.abs(args.in),
+ Math.abs(in.min32()),
+ Math.abs(in.max32()));
}
- static public void computeFastDistance(TestFastDistance.ArgumentsFloatFloatFloat args) {
- args.out = distance(new float[] {args.inLhs}, new float[] {args.inRhs},
- FAST_PRECISION, FAST_PRECISION);
+ static public void computeFastDistance(TestFastDistance.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ args.out = distance(new float[] {args.inLhs}, new float[] {args.inRhs}, t);
}
- static public void computeFastDistance(TestFastDistance.ArgumentsFloatNFloatNFloat args) {
- args.out = distance(args.inLhs, args.inRhs, FAST_PRECISION, FAST_PRECISION);
+ static public void computeFastDistance(TestFastDistance.ArgumentsFloatNFloatNFloat args, Target t) {
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ args.out = distance(args.inLhs, args.inRhs, t);
}
- static public void computeFastLength(TestFastLength.ArgumentsFloatFloat args) {
- args.out = length(new float[] {args.inV}, FAST_PRECISION, FAST_PRECISION);
+ static public void computeFastLength(TestFastLength.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ args.out = length(new float[] {args.inV}, t);
}
- static public void computeFastLength(TestFastLength.ArgumentsFloatNFloat args) {
- args.out = length(args.inV, FAST_PRECISION, FAST_PRECISION);
+ static public void computeFastLength(TestFastLength.ArgumentsFloatNFloat args, Target t) {
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ args.out = length(args.inV, t);
}
- static public void computeFastNormalize(TestFastNormalize.ArgumentsFloatFloat args) {
- Floaty[] out = new Floaty[1];
- normalize(new float[] {args.inV}, out, FAST_PRECISION, FAST_PRECISION);
+ static public void computeFastNormalize(TestFastNormalize.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ Target.Floaty[] out = new Target.Floaty[1];
+ normalize(new float[] {args.inV}, out, t);
args.out = out[0];
}
- static public void computeFastNormalize(TestFastNormalize.ArgumentsFloatNFloatN args) {
- normalize(args.inV, args.out, FAST_PRECISION, FAST_PRECISION);
+ static public void computeFastNormalize(TestFastNormalize.ArgumentsFloatNFloatN args, Target t) {
+ t.setPrecision(FAST_PRECISION, FAST_PRECISION, false);
+ normalize(args.inV, args.out, t);
}
- static public void computeFdim(TestFdim.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(Math.max(0f, args.inA - args.inB), 0, 1);
+ static public void computeFdim(TestFdim.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ Target.Floaty inA = t.new32(args.inA);
+ Target.Floaty inB = t.new32(args.inB);
+ Target.Floaty r = t.subtract(inA, inB);
+ args.out = t.new32(
+ Math.max(0.f, r.mid32()),
+ Math.max(0.f, r.min32()),
+ Math.max(0.f, r.max32()));
}
- static public void computeFloor(TestFloor.ArgumentsFloatFloat args) {
- args.out = new Floaty(floor(args.in), 0, 0);
+ static public void computeFloor(TestFloor.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ floor(args.in),
+ floor(in.min32()),
+ floor(in.max32()));
}
- static public void computeFma(TestFma.ArgumentsFloatFloatFloatFloat args) {
- Floaty ab = Floaty.multiply(new Floaty(args.inA), new Floaty(args.inB));
- ab.add(new Floaty(args.inC));
- args.out = ab;
+ static public void computeFma(TestFma.ArgumentsFloatFloatFloatFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ Target.Floaty ab = t.multiply(t.new32(args.inA), t.new32(args.inB));
+ args.out = t.add(ab, t.new32(args.inC));
}
- static public void computeFmax(TestFmax.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(Math.max(args.inX, args.inY), 0, 0);
+ static public void computeFmax(TestFmax.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ Target.Floaty inX = t.new32(args.inX);
+ Target.Floaty inY = t.new32(args.inY);
+ args.out = t.new32(
+ Math.max(args.inX, args.inY),
+ Math.max(inX.min32(), inY.min32()),
+ Math.max(inX.min32(), inY.max32()),
+ Math.max(inX.max32(), inY.min32()),
+ Math.max(inX.max32(), inY.max32()));
}
- static public void computeFmin(TestFmin.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(Math.min(args.inX, args.inY), 0, 0);
+ static public void computeFmin(TestFmin.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ Target.Floaty inX = t.new32(args.inX);
+ Target.Floaty inY = t.new32(args.inY);
+ args.out = t.new32(
+ Math.min(args.inX, args.inY),
+ Math.min(inX.min32(), inY.min32()),
+ Math.min(inX.min32(), inY.max32()),
+ Math.min(inX.max32(), inY.min32()),
+ Math.min(inX.max32(), inY.max32()));
}
- static public void computeFmod(TestFmod.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(args.inX % args.inY, 0, 0);
+ static public void computeFmod(TestFmod.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ Target.Floaty inX = t.new32(args.inX);
+ Target.Floaty inY = t.new32(args.inY);
+ args.out = t.new32(
+ args.inX % args.inY,
+ inX.min32() % inY.min32(),
+ inX.min32() % inY.max32(),
+ inX.max32() % inY.min32(),
+ inX.max32() % inY.max32());
}
- static public void computeFract(TestFract.ArgumentsFloatFloatFloat args) {
+ static public void computeFract(TestFract.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(1, 1, false);
float floor = floor(args.inV);
- args.outFloor = new Floaty(floor);
+ args.outFloor = t.new32(floor);
// 0x1.fffffep-1f is 0.999999...
- args.out = new Floaty(Math.min(args.inV - floor, 0x1.fffffep-1f), 0, 1);
+ args.out = t.new32(Math.min(args.inV - floor, 0x1.fffffep-1f));
}
- static public void computeFract(TestFract.ArgumentsFloatFloat args) {
+ static public void computeFract(TestFract.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(1, 1, false);
float floor = floor(args.inV);
// 0x1.fffffep-1f is 0.999999...
- args.out = new Floaty(Math.min(args.inV - floor, 0x1.fffffep-1f), 0, 1);
+ args.out = t.new32(Math.min(args.inV - floor, 0x1.fffffep-1f));
}
- static public void computeFrexp(TestFrexp.ArgumentsFloatIntFloat args) {
+ static public void computeFrexp(TestFrexp.ArgumentsFloatIntFloat args, Target t) {
+ t.setPrecision(0, 0, false);
FrexpResult result = frexp(args.inV);
- args.out = new Floaty(result.significand, 0, 0);
+ args.out = t.new32(result.significand);
args.outIptr = result.exponent;
}
- static public void computeHalfRecip(TestHalfRecip.ArgumentsFloatFloat args) {
- // TODO we would like to use HALF_PRECISION, HALF_PRECISION
- args.out = new Floaty(1.0f / args.inV, 64000, 64000);
+ static public void computeHalfRecip(TestHalfRecip.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(HALF_PRECISION, HALF_PRECISION, false);
+ args.out = recip(args.inV, t);
}
- static public void computeHalfRsqrt(TestHalfRsqrt.ArgumentsFloatFloat args) {
- // TODO we would like to use HALF_PRECISION, HALF_PRECISION
- args.out = new Floaty(1.0f / sqrt(args.inV), HALF_PRECISION, 45000);
+ static public void computeHalfRsqrt(TestHalfRsqrt.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(HALF_PRECISION, HALF_PRECISION, false);
+ args.out = rsqrt(args.inV, t);
}
- static public void computeHalfSqrt(TestHalfSqrt.ArgumentsFloatFloat args) {
- // TODO we would like to use HALF_PRECISION, HALF_PRECISION
- args.out = new Floaty(sqrt(args.inV), HALF_PRECISION, 80000);
+ static public void computeHalfSqrt(TestHalfSqrt.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(HALF_PRECISION, HALF_PRECISION, false);
+ args.out = sqrt(args.inV, t);
}
- static public void computeHypot(TestHypot.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(hypot(args.inX, args.inY), 4, 4);
+ static public void computeHypot(TestHypot.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(4, 4, false);
+ args.out = hypot(args.inX, args.inY, t);
}
- static public String verifyIlogb(TestIlogb.ArgumentsFloatInt args, boolean relaxed) {
+ static public String verifyIlogb(TestIlogb.ArgumentsFloatInt args) {
// Special case when the input is 0. We accept two different answers.
- if (args.in == 0.0f) {
+ if (args.in == 0.f) {
if (args.out != -Integer.MAX_VALUE && args.out != Integer.MIN_VALUE) {
return "Expected " + Integer.toString(-Integer.MAX_VALUE) + " or " +
Integer.toString(Integer.MIN_VALUE);
@@ -910,53 +1304,79 @@
return null;
}
- static public void computeLdexp(TestLdexp.ArgumentsFloatIntFloat args) {
- args.out = new Floaty(ldexp(args.inX, args.inY), 0, 1);
+ static public void computeLdexp(TestLdexp.ArgumentsFloatIntFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ Target.Floaty inX = t.new32(args.inX);
+ args.out = t.new32(
+ ldexp(inX.mid32(), args.inY),
+ ldexp(inX.min32(), args.inY),
+ ldexp(inX.max32(), args.inY));
}
- static public void computeLength(TestLength.ArgumentsFloatFloat args) {
- args.out = length(new float[] {args.inV}, 1, 1);
+ static public void computeLength(TestLength.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = length(new float[]{args.inV}, t);
}
- static public void computeLength(TestLength.ArgumentsFloatNFloat args) {
- args.out = length(args.inV, 1, 1);
+ static public void computeLength(TestLength.ArgumentsFloatNFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ args.out = length(args.inV, t);
}
- static public void computeLgamma(TestLgamma.ArgumentsFloatFloat args) {
- args.out = new Floaty(lgamma(args.in), 16, 128);
+ static public void computeLgamma(TestLgamma.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(16, 128, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ lgamma(in.mid32()),
+ lgamma(in.min32()),
+ lgamma(in.max32()));
}
- static public void computeLgamma(TestLgamma.ArgumentsFloatIntFloat args) {
- LgammaResult result = lgamma2(args.inX);
- args.out = new Floaty(result.lgamma, 16, 128);
+ static public void computeLgamma(TestLgamma.ArgumentsFloatIntFloat args, Target t) {
+ t.setPrecision(16, 128, false);
+ Target.Floaty in = t.new32(args.inX);
+ LgammaResult result = lgamma2(in.mid32());
+ LgammaResult resultMin = lgamma2(in.min32());
+ LgammaResult resultMax = lgamma2(in.max32());
+ args.out = t.new32(result.lgamma, resultMin.lgamma, resultMax.lgamma);
args.outY = result.gammaSign;
}
// TODO The relaxed ulf for the various log are taken from the old tests.
// They are not consistent.
- static public void computeLog(TestLog.ArgumentsFloatFloat args) {
- args.out = new Floaty(log(args.in), 3, 16);
+ static public void computeLog(TestLog.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 16, false);
+ args.out = log(args.in, t);
}
- static public void computeLog10(TestLog10.ArgumentsFloatFloat args) {
- args.out = new Floaty(log10(args.in), 3, 16);
+ static public void computeLog10(TestLog10.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 16, false);
+ args.out = log10(args.in, t);
}
- static public void computeLog1p(TestLog1p.ArgumentsFloatFloat args) {
- args.out = new Floaty(log1p(args.in), 2, 16);
+ static public void computeLog1p(TestLog1p.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(2, 16, false);
+ args.out = log1p(args.in, t);
}
- static public void computeLog2(TestLog2.ArgumentsFloatFloat args) {
- args.out = new Floaty(log2(args.in), 3, 128);
+ static public void computeLog2(TestLog2.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 128, false);
+ args.out = log2(args.in, t);
}
- static public void computeLogb(TestLogb.ArgumentsFloatFloat args) {
- args.out = new Floaty(logb(args.in), 0, 0);
+ static public void computeLogb(TestLogb.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ logb(in.mid32()),
+ logb(in.min32()),
+ logb(in.max32()));
}
- static public void computeMad(TestMad.ArgumentsFloatFloatFloatFloat args) {
- args.out = Floaty.add(new Floaty(args.inA * args.inB), new Floaty(args.inC));
- args.out.setMinimumError(1, 4);
+ static public void computeMad(TestMad.ArgumentsFloatFloatFloatFloat args, Target t) {
+ t.setPrecision(1, 4, false);
+ Target.Floaty ab = t.multiply(t.new32(args.inA), t.new32(args.inB));
+ args.out = t.add(ab, t.new32(args.inC));
}
static public void computeMax(TestMax.ArgumentsCharCharChar args) {
@@ -991,8 +1411,16 @@
args.out = maxU64(args.inV1, args.inV2);
}
- static public void computeMax(TestMax.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(Math.max(args.in, args.in1), 0, 0);
+ static public void computeMax(TestMax.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ Target.Floaty in = t.new32(args.in);
+ Target.Floaty in1 = t.new32(args.in1);
+ args.out = t.new32(
+ Math.max(in.mid32(), in1.mid32()),
+ Math.max(in.min32(), in1.min32()),
+ Math.max(in.min32(), in1.max32()),
+ Math.max(in.max32(), in1.min32()),
+ Math.max(in.max32(), in1.max32()));
}
static public void computeMin(TestMin.ArgumentsCharCharChar args) {
@@ -1027,345 +1455,449 @@
args.out = minU64(args.inV1, args.inV2);
}
- static public void computeMin(TestMin.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(Math.min(args.in, args.in1), 0, 0);
+ static public void computeMin(TestMin.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(Math.min(args.in, args.in1));
}
- static public void computeMix(TestMix.ArgumentsFloatFloatFloatFloat args) {
- Floaty start = new Floaty(args.inStart);
- Floaty stop = new Floaty(args.inStop);
- Floaty diff = Floaty.subtract(stop, start);
- args.out = Floaty.add(start, Floaty.multiply(diff, new Floaty(args.inAmount)));
- args.out.setMinimumError(1, 4);
+ static public void computeMix(TestMix.ArgumentsFloatFloatFloatFloat args, Target t) {
+ t.setPrecision(1, 4, false);
+ Target.Floaty start = t.new32(args.inStart);
+ Target.Floaty stop = t.new32(args.inStop);
+ Target.Floaty diff = t.subtract(stop, start);
+ args.out = t.add(start, t.multiply(diff, t.new32(args.inAmount)));
}
- static public void computeModf(TestModf.ArgumentsFloatFloatFloat args) {
+ static public void computeModf(TestModf.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
float ret = (float)(int)args.inX;
- args.outIret = new Floaty(ret);
- args.out = new Floaty(args.inX - ret, 0, 0);
+ args.outIret = t.new32(ret);
+ args.out = t.new32(args.inX - ret);
}
- static public void computeNan(TestNan.ArgumentsUintFloat args) {
- // TODO Should we use the input arg?
- args.out = new Floaty(Float.NaN, 0, 0);
+ static public void computeNan(TestNan.ArgumentsUintFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(Float.NaN);
}
- static public void computeNativeAcos(TestNativeAcos.ArgumentsFloatFloat args) {
- args.out = new Floaty(acos(args.inV), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAcos(TestNativeAcos.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = acos(args.inV, t);
}
- static public void computeNativeAcosh(TestNativeAcosh.ArgumentsFloatFloat args) {
- args.out = new Floaty(acosh(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAcosh(TestNativeAcosh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = acosh(args.in, t);
}
- static public void computeNativeAcospi(TestNativeAcospi.ArgumentsFloatFloat args) {
- args.out = new Floaty(acos(args.inV) / (float) Math.PI, NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAcospi(TestNativeAcospi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = acospi(args.inV, t);
}
- static public void computeNativeAsin(TestNativeAsin.ArgumentsFloatFloat args) {
- args.out = new Floaty(asin(args.inV), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAsin(TestNativeAsin.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = asin(args.inV, t);
}
- static public void computeNativeAsinh(TestNativeAsinh.ArgumentsFloatFloat args) {
- args.out = new Floaty(asinh(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAsinh(TestNativeAsinh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = asinh(args.in, t);
}
- static public void computeNativeAsinpi(TestNativeAsinpi.ArgumentsFloatFloat args) {
- args.out = new Floaty(asin(args.inV) / (float) Math.PI, NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAsinpi(TestNativeAsinpi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = asinpi(args.inV, t);
}
- static public void computeNativeAtan(TestNativeAtan.ArgumentsFloatFloat args) {
- args.out = new Floaty(atan(args.inV), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAtan(TestNativeAtan.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = atan(args.inV, t);
}
- static public void computeNativeAtanh(TestNativeAtanh.ArgumentsFloatFloat args) {
- args.out = new Floaty(atanh(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAtanh(TestNativeAtanh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = atanh(args.inIn, t);
}
- static public void computeNativeAtanpi(TestNativeAtanpi.ArgumentsFloatFloat args) {
- args.out = new Floaty(atan(args.inV) / (float) Math.PI, NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAtanpi(TestNativeAtanpi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = atanpi(args.inV, t);
}
- static public void computeNativeAtan2(TestNativeAtan2.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(atan2(args.inY, args.inX), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeAtan2(TestNativeAtan2.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = atan2(args.inY, args.inX, t);
}
- static public void computeNativeAtan2pi(TestNativeAtan2pi.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(atan2(args.inY, args.inX) / (float)Math.PI, NATIVE_PRECISION,
- NATIVE_PRECISION);
+ static public void computeNativeAtan2pi(TestNativeAtan2pi.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = atan2pi(args.inY, args.inX, t);
}
- static public void computeNativeCbrt(TestNativeCbrt.ArgumentsFloatFloat args) {
- args.out = new Floaty(cbrt(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeCbrt(TestNativeCbrt.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = cbrt(args.in, t);
}
- static public void computeNativeCos(TestNativeCos.ArgumentsFloatFloat args) {
- args.out = new Floaty(cos(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeCos(TestNativeCos.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = cos(args.in, t);
}
- static public void computeNativeCosh(TestNativeCosh.ArgumentsFloatFloat args) {
- args.out = new Floaty(cosh(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeCosh(TestNativeCosh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = cosh(args.in, t);
}
- static public void computeNativeCospi(TestNativeCospi.ArgumentsFloatFloat args) {
- Floaty ip = new Floaty((float) ((double)args.in * Math.PI), 1, 1);
- args.out = Floaty.FloatyFromRange(
- (float) Math.cos(ip.getDoubleMin()),
- (float) Math.cos(ip.getDoubleMax()), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeCospi(TestNativeCospi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = cospi(args.in, t);
}
- static public void computeNativeDistance(TestNativeDistance.ArgumentsFloatFloatFloat args) {
- args.out = distance(new float[]{args.inLhs}, new float[]{args.inRhs}, NATIVE_PRECISION,
- NATIVE_PRECISION);
+ static public void computeNativeDistance(TestNativeDistance.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = distance(new float[]{args.inLhs}, new float[]{args.inRhs}, t);
}
- static public void computeNativeDistance(TestNativeDistance.ArgumentsFloatNFloatNFloat args) {
- args.out = distance(args.inLhs, args.inRhs, NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeDistance(TestNativeDistance.ArgumentsFloatNFloatNFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = distance(args.inLhs, args.inRhs, t);
}
- static public void computeNativeDivide(TestNativeDivide.ArgumentsFloatFloatFloat args) {
- args.out = Floaty.divide(new Floaty(args.inLhs), new Floaty(args.inRhs));
- args.out.setMinimumError(NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeDivide(TestNativeDivide.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = t.divide(t.new32(args.inLhs), t.new32(args.inRhs));
}
- static public void computeNativeExp(TestNativeExp.ArgumentsFloatFloat args) {
+ static public void computeNativeExp(TestNativeExp.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = exp(args.inV, t);
+ }
+
+ static public void computeNativeExp10(TestNativeExp10.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = exp10(args.inV, t);
+ }
+
+ static public void computeNativeExp2(TestNativeExp2.ArgumentsFloatFloat args, Target t) {
// TODO we would like to use NATIVE_PRECISION, NATIVE_PRECISION
- args.out = new Floaty(exp(args.inV), 9500, 9500);
+ t.setPrecision(13000, 13000, true);
+ args.out = exp2(args.inV, t);
}
- static public void computeNativeExp10(TestNativeExp10.ArgumentsFloatFloat args) {
- // TODO we would like to use NATIVE_PRECISION, NATIVE_PRECISION
- args.out = new Floaty(exp10(args.inV), 13000, 13000);
+ static public void computeNativeExpm1(TestNativeExpm1.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = expm1(args.in, t);
}
- static public void computeNativeExp2(TestNativeExp2.ArgumentsFloatFloat args) {
- // TODO we would like to use NATIVE_PRECISION, NATIVE_PRECISION
- args.out = new Floaty(exp2(args.inV), 13000, 13000);
+ static public void computeNativeHypot(TestNativeHypot.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = hypot(args.inX, args.inY, t);
}
- static public void computeNativeExpm1(TestNativeExpm1.ArgumentsFloatFloat args) {
- args.out = new Floaty(expm1(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeLength(TestNativeLength.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = length(new float[] {args.inV}, t);
}
- static public void computeNativeHypot(TestNativeHypot.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(hypot(args.inX, args.inY), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeLength(TestNativeLength.ArgumentsFloatNFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = length(args.inV, t);
}
- static public void computeNativeLog(TestNativeLog.ArgumentsFloatFloat args) {
- args.out = new Floaty(log(args.inV), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeLog(TestNativeLog.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ // For very small values, allow anything.
+ if (Math.abs(args.inV) < 1.e-20) {
+ args.out = any32(t);
+ } else {
+ args.out = log(args.inV, t);
+ }
}
- static public void computeNativeLog10(TestNativeLog10.ArgumentsFloatFloat args) {
- args.out = new Floaty(log10(args.inV), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeLog10(TestNativeLog10.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ // For very small values, allow anything.
+ if (Math.abs(args.inV) < 1.e-20) {
+ args.out = any32(t);
+ } else {
+ args.out = log10(args.inV, t);
+ }
}
- static public void computeNativeLog1p(TestNativeLog1p.ArgumentsFloatFloat args) {
- args.out = new Floaty(log1p(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeLog1p(TestNativeLog1p.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = log1p(args.in, t);
}
- static public void computeNativeLog2(TestNativeLog2.ArgumentsFloatFloat args) {
- args.out = new Floaty(log2(args.inV), NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeLog2(TestNativeLog2.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ // For very small values, allow anything.
+ if (Math.abs(args.inV) < 1.e-20) {
+ args.out = any32(t);
+ } else {
+ args.out = log2(args.inV, t);
+ }
}
- static public void computeNativeLength(TestNativeLength.ArgumentsFloatFloat args) {
- args.out = length(new float[] {args.inV}, NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeLength(TestNativeLength.ArgumentsFloatNFloat args) {
- args.out = length(args.inV, NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeNormalize(TestNativeNormalize.ArgumentsFloatFloat args) {
- Floaty[] out = new Floaty[1];
- normalize(new float[] {args.inV}, out, NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeNormalize(TestNativeNormalize.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ Target.Floaty[] out = new Target.Floaty[1];
+ normalize(new float[] {args.inV}, out, t);
args.out = out[0];
}
- static public void computeNativeNormalize(TestNativeNormalize.ArgumentsFloatNFloatN args) {
- normalize(args.inV, args.out, NATIVE_PRECISION, NATIVE_PRECISION);
+ static public void computeNativeNormalize(TestNativeNormalize.ArgumentsFloatNFloatN args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ normalize(args.inV, args.out, t);
}
- /* TODO enable once fixed handling of v = 0
- static public void computeNativePowr(TestNativePowr.ArgumentsFloatFloatFloat args) {
+ static public void computeNativePowr(TestNativePowr.ArgumentsFloatFloatFloat args, Target t) {
// TODO we would like to use NATIVE_PRECISION, NATIVE_PRECISION
- args.out = new Floaty(pow(args.inV, args.inY), 32000, 32000);
- }
- */
-
- static public void computeNativeRecip(TestNativeRecip.ArgumentsFloatFloat args) {
- args.out = new Floaty(1.0f / args.inV, NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeRsqrt(TestNativeRsqrt.ArgumentsFloatFloat args) {
- args.out = new Floaty(1f / sqrt(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeSin(TestNativeSin.ArgumentsFloatFloat args) {
- args.out = new Floaty(sin(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeSincos(TestNativeSincos.ArgumentsFloatFloatFloat args) {
- args.outCosptr = new Floaty(cos(args.inV), NATIVE_PRECISION, NATIVE_PRECISION);
- args.out = new Floaty(sin(args.inV), NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeSinh(TestNativeSinh.ArgumentsFloatFloat args) {
- args.out = new Floaty(sinh(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeSinpi(TestNativeSinpi.ArgumentsFloatFloat args) {
- Floaty ip = new Floaty((float) ((double)args.in * Math.PI), 1, 1);
- args.out = Floaty.FloatyFromRange(
- (float) Math.sin(ip.getDoubleMin()),
- (float) Math.sin(ip.getDoubleMax()), NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeSqrt(TestNativeSqrt.ArgumentsFloatFloat args) {
- args.out = new Floaty(sqrt(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeTan(TestNativeTan.ArgumentsFloatFloat args) {
- args.out = new Floaty(tan(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeTanh(TestNativeTanh.ArgumentsFloatFloat args) {
- args.out = new Floaty(tanh(args.in), NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNativeTanpi(TestNativeTanpi.ArgumentsFloatFloat args) {
- Floaty ip = new Floaty((float) ((double)args.in * Math.PI), 1, 1);
- args.out = Floaty.FloatyFromRange(
- (float) Math.tan(ip.getDoubleMin()),
- (float) Math.tan(ip.getDoubleMax()), NATIVE_PRECISION, NATIVE_PRECISION);
- }
-
- static public void computeNextafter(TestNextafter.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(Math.nextAfter(args.inX, args.inY), 0, 0);
- }
-
- static public void computeNormalize(TestNormalize.ArgumentsFloatFloat args) {
- Floaty[] out = new Floaty[1];
- normalize(new float[] {args.inV}, out, 1, 1);
- args.out = new Floaty(out[0]);
- }
-
- static public void computeNormalize(TestNormalize.ArgumentsFloatNFloatN args) {
- normalize(args.inV, args.out, 1, 1);
- }
-
- static public void computePow(TestPow.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(pow(args.inX, args.inY), 16, 128);
- }
-
- static public void computePown(TestPown.ArgumentsFloatIntFloat args) {
- args.out = new Floaty((float) Math.pow(args.inX, (double) args.inY), 16, 128);
- }
-
- static public void computePowr(TestPowr.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(pow(args.inX, args.inY), 16, 128);
- }
-
- static public void computeRadians(TestRadians.ArgumentsFloatFloat args) {
- args.out = new Floaty(args.inValue * (float)(Math.PI / 180.0));
- }
-
- static public void computeRemainder(TestRemainder.ArgumentsFloatFloatFloat args) {
- RemquoResult result = remquo(args.inX, args.inY);
- args.out = new Floaty(result.remainder, 0, 0);
- }
-
- static public void computeRemquo(TestRemquo.ArgumentsFloatFloatIntFloat args) {
- RemquoResult result = remquo(args.inB, args.inC);
- args.out = new Floaty(result.remainder, 0, 0);
- args.outD = result.quotient;
- }
-
- static public void computeRint(TestRint.ArgumentsFloatFloat args) {
- args.out = new Floaty(rint(args.in), 0, 0);
- }
-
- /* TODO re-enable once zero issues resolved
- static public void computeRootn(TestRootn.ArgumentsFloatIntFloat args) {
- (* Rootn of a negative number should be possible only if the number
- * is odd. In cases where the int is very large, our approach will
- * lose whether the int is odd, and we'll get a NaN for weird cases
- * like rootn(-3.95, 818181881), which should return 1. We handle the
- * case by handling the sign ourselves. We use copysign to handle the
- * negative zero case.
- *)
- float value;
- if ((args.inN & 0x1) == 0x1) {
- value = Math.copySign(pow(Math.abs(args.inV), 1.0f / args.inN),
- args.inV);
+ t.setPrecision(32000, 32000, true);
+ // For very small values, allow anything.
+ if (Math.abs(args.inV) < 1.e-20) {
+ args.out = any32(t);
} else {
- value = pow(args.inV, 1.0f / args.inN);
+ args.out = powr(args.inV, args.inY, t);
}
- args.out = new Floaty(value, 16, 16);
- // args.out = new Floaty(Math.pow(args.inV, 1.0 / (double)args.inN), 16, 16);
- }
- */
-
-
- static public void computeRound(TestRound.ArgumentsFloatFloat args) {
- args.out = new Floaty(round(args.in), 0, 0);
}
- static public void computeRsqrt(TestRsqrt.ArgumentsFloatFloat args) {
- args.out = new Floaty(1f / sqrt(args.in), 2, 2);
+ static public void computeNativeRecip(TestNativeRecip.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = recip(args.inV, t);
}
- static public void computeSign(TestSign.ArgumentsFloatFloat args) {
- args.out = new Floaty(Math.signum(args.inV), 0, 0);
+ static public void computeNativeRootn(TestNativeRootn.ArgumentsFloatIntFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ // Allow anything for zero.
+ if (args.inN == 0) {
+ args.out = any32(t);
+ } else {
+ args.out = rootn(args.inV, args.inN, t);
+ }
}
- static public void computeSin(TestSin.ArgumentsFloatFloat args) {
- args.out = new Floaty(sin(args.in), 4, 128);
+ static public void computeNativeRsqrt(TestNativeRsqrt.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = rsqrt(args.in, t);
}
- static public void computeSincos(TestSincos.ArgumentsFloatFloatFloat args) {
- args.outCosptr = new Floaty(cos(args.inV), 4, 128);
- args.out = new Floaty(sin(args.inV), 4, 128);
+ static public void computeNativeSin(TestNativeSin.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = sin(args.in, t);
}
- static public void computeSinh(TestSinh.ArgumentsFloatFloat args) {
- args.out = new Floaty(sinh(args.in), 4, 128);
+ static public void computeNativeSincos(TestNativeSincos.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.outCosptr = cos(args.inV, t);
+ args.out = sin(args.inV, t);
}
- static public void computeSinpi(TestSinpi.ArgumentsFloatFloat args) {
- Floaty ip = new Floaty((float) ((double)args.in * Math.PI), 1, 1);
- args.out = Floaty.FloatyFromRange(
- (float) Math.sin(ip.getDoubleMin()),
- (float) Math.sin(ip.getDoubleMax()), 4, 128);
+ static public void computeNativeSinh(TestNativeSinh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = sinh(args.in, t);
}
- static public void computeSqrt(TestSqrt.ArgumentsFloatFloat args) {
- args.out = new Floaty(sqrt(args.in), 3, 3);
+ static public void computeNativeSinpi(TestNativeSinpi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = sinpi(args.in, t);
}
- static public void computeStep(TestStep.ArgumentsFloatFloatFloat args) {
- args.out = new Floaty(args.inV < args.inEdge ? 0f : 1f, 0, 0);
+ static public void computeNativeSqrt(TestNativeSqrt.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = sqrt(args.in, t);
}
- static public void computeTan(TestTan.ArgumentsFloatFloat args) {
- args.out = new Floaty(tan(args.in), 5, 128);
+ static public void computeNativeTan(TestNativeTan.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = tan(args.in, t);
}
- static public void computeTanh(TestTanh.ArgumentsFloatFloat args) {
- args.out = new Floaty(tanh(args.in), 5, 128);
+ static public void computeNativeTanh(TestNativeTanh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = tanh(args.in, t);
}
- static public void computeTanpi(TestTanpi.ArgumentsFloatFloat args) {
- Floaty ip = new Floaty((float) ((double)args.in * Math.PI), 1, 1);
- args.out = Floaty.FloatyFromRange(
- (float) Math.tan(ip.getDoubleMin()),
- (float) Math.tan(ip.getDoubleMax()), 4, 128);
+ static public void computeNativeTanpi(TestNativeTanpi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(NATIVE_PRECISION, NATIVE_PRECISION, true);
+ args.out = tanpi(args.in, t);
}
- static public void computeTgamma(TestTgamma.ArgumentsFloatFloat args) {
- args.out = new Floaty(tgamma(args.in), 16, 128);
+ static public void computeNextafter(TestNextafter.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(Math.nextAfter(args.inX, args.inY));
}
- static public void computeTrunc(TestTrunc.ArgumentsFloatFloat args) {
- args.out = new Floaty(trunc(args.in), 0, 0);
+ static public void computeNormalize(TestNormalize.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(1, 1, false);
+ Target.Floaty[] out = new Target.Floaty[1];
+ normalize(new float[] {args.inV}, out, t);
+ args.out = out[0];
+ }
+
+ static public void computeNormalize(TestNormalize.ArgumentsFloatNFloatN args, Target t) {
+ t.setPrecision(1, 1, false);
+ normalize(args.inV, args.out, t);
+ }
+
+ static public void computePow(TestPow.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(16, 128, false);
+ Target.Floaty inX = t.new32(args.inX);
+ Target.Floaty inY = t.new32(args.inY);
+ args.out = t.new32(
+ pow(inX.mid32(), inY.mid32()),
+ pow(inX.min32(), inY.min32()),
+ pow(inX.min32(), inY.max32()),
+ pow(inX.max32(), inY.min32()),
+ pow(inX.max32(), inY.max32()));
+ }
+
+ static public void computePown(TestPown.ArgumentsFloatIntFloat args, Target t) {
+ t.setPrecision(16, 128, false);
+ Target.Floaty in = t.new32(args.inX);
+ // We use double for the calculations because floats does not have enough
+ // mantissa bits. Knowing if an int is odd or even will matter for negative
+ // numbers. Using a float loses the lowest bit.
+ final double y = (double) args.inY;
+ args.out = t.new32(
+ (float) Math.pow(in.mid32(), y),
+ (float) Math.pow(in.min32(), y),
+ (float) Math.pow(in.max32(), y));
+ }
+
+ static public void computePowr(TestPowr.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(16, 128, false);
+ args.out = powr(args.inX, args.inY, t);
+ }
+
+ static public void computeRadians(TestRadians.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 3, false);
+ Target.Floaty in = t.new32(args.inValue);
+ Target.Floaty k = t.new32((float)(Math.PI / 180.0));
+ args.out = t.multiply(in, k);
+ }
+
+ static public void computeRemainder(TestRemainder.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ RemquoResult result = remquo(args.inX, args.inY);
+ args.out = t.new32(result.remainder);
+ }
+
+ static public String verifyRemquo(TestRemquo.ArgumentsFloatFloatIntFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ RemquoResult result = remquo(args.inB, args.inC);
+ // If the remainder is NaN, we don't validate the quotient. It's because of a division
+ // by zero.
+ if (args.out != args.out && result.remainder != result.remainder) {
+ return null;
+ }
+ Target.Floaty remainder = t.new32(result.remainder);
+ // The quotient should have the same sign and the same lowest three bits.
+ if (Integer.signum(args.outD) == Integer.signum(result.quotient) &&
+ (args.outD & 0x07) == (result.quotient & 0x07) &&
+ remainder.couldBe(args.out)) {
+ return null;
+ }
+ return "Expected quotient similar to " + Integer.toString(args.outD) + " and " +
+ remainder.toString();
+ }
+
+ static public void computeRint(TestRint.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ rint(in.mid32()),
+ rint(in.min32()),
+ rint(in.max32()));
+ }
+
+ static public void computeRootn(TestRootn.ArgumentsFloatIntFloat args, Target t) {
+ t.setPrecision(16, 16, false);
+ args.out = rootn(args.inV, args.inN, t);
+ }
+
+ static public void computeRound(TestRound.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ round(in.mid32()),
+ round(in.min32()),
+ round(in.max32()));
+ }
+
+ static public void computeRsqrt(TestRsqrt.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(2, 2, false);
+ args.out = rsqrt(args.in, t);
+ }
+
+ static public void computeSign(TestSign.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(Math.signum(args.inV));
+ }
+
+ static public void computeSin(TestSin.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = sin(args.in, t);
+ }
+
+ static public void computeSincos(TestSincos.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.outCosptr = cos(args.inV,t );
+ args.out = sin(args.inV, t);
+ }
+
+ static public void computeSinh(TestSinh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = sinh(args.in, t);
+ }
+
+ static public void computeSinpi(TestSinpi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = sinpi(args.in, t);
+ }
+
+ static public void computeSqrt(TestSqrt.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(3, 3, false);
+ args.out = sqrt(args.in, t);
+ }
+
+ static public void computeStep(TestStep.ArgumentsFloatFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ args.out = t.new32(args.inV < args.inEdge ? 0.f : 1.f);
+ }
+
+ static public void computeTan(TestTan.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(5, 128, false);
+ args.out = tan(args.in, t);
+ }
+
+ static public void computeTanh(TestTanh.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(5, 128, false);
+ args.out = tanh(args.in, t);
+ }
+
+ static public void computeTanpi(TestTanpi.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(4, 128, false);
+ args.out = tanpi(args.in, t);
+ }
+
+ static public void computeTgamma(TestTgamma.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(16, 128, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ tgamma(in.mid32()),
+ tgamma(in.min32()),
+ tgamma(in.max32()));
+ }
+
+ static public void computeTrunc(TestTrunc.ArgumentsFloatFloat args, Target t) {
+ t.setPrecision(0, 0, false);
+ Target.Floaty in = t.new32(args.in);
+ args.out = t.new32(
+ trunc(in.mid32()),
+ trunc(in.min32()),
+ trunc(in.max32()));
}
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/Floaty.java b/tests/tests/renderscript/src/android/renderscript/cts/Floaty.java
deleted file mode 100644
index 85b00ce..0000000
--- a/tests/tests/renderscript/src/android/renderscript/cts/Floaty.java
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Copyright (C) 2014 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package android.renderscript.cts;
-
-import android.util.Log;
-
-/**
- * This class keeps track of a floating point value and the computation error that has accumulated
- * in creating this number. We also provide the four basic arithmetic operators and sqrt that
- * compute the correct error of the result.
- */
-public class Floaty {
- // The value this instance represents.
- private double mValue;
- /* The real value should be between mValue - mError and mValue + mError.
- * mError should be positive.
- */
- private double mError;
- /* The number of bits the value should have, either 32 or 64. It would have been nice to
- * use generics, e.g. Floaty<float> and Floaty<double> but Java does not support generics
- * of float and double. Also, Java does not have a f16 type. This can simulate it, although
- * more work will be needed.
- */
- private int mNumberOfBits;
-
- static private boolean relaxed; // Whether we are doing relaxed precision computations.
-
- static public void setRelaxed(boolean value) {
- relaxed = value;
- }
-
- public Floaty(Floaty a) {
- mValue = a.mValue;
- mError = a.mError;
- mNumberOfBits = a.mNumberOfBits;
- }
-
- public Floaty(float a) {
- mValue = a;
- mNumberOfBits = 32;
- setErrorFromValue(1, 1);
- }
-
- public Floaty(double a) {
- mValue = a;
- mNumberOfBits = 64;
- setErrorFromValue(1, 1);
- }
-
- /** Creates a Floaty for which any value between a and b are legal, expanded by the specified factor. */
- public static Floaty FloatyFromRange(float a, float b, float ulpFactor, float ulpRelaxedFactor) {
- // Order the edges of the range.
- float min, max;
- if (a < b) {
- min = a;
- max = b;
- } else {
- min = b;
- max = a;
- }
- // Expand the edges by the specified factor.
- float factor = relaxed ? ulpRelaxedFactor : ulpFactor;
- min = min + (Math.nextAfter(min, -Float.MAX_VALUE) - min) * factor;
- max = max + (Math.nextAfter(max, Float.MAX_VALUE) - max) * factor;
-
- // Convert a [range] to a (mid +- error)
- float delta = Math.abs(a - b);
- float mid = (min + max) / 2.f;
- Floaty fl = new Floaty(mid);
- fl.mError = Math.max(mid - min, max - mid);
- return fl;
- }
-
- /** Sets the value and the error based on whether we're doing relaxed computations or not. */
- public Floaty(float v, int ulpFactor, int ulpRelaxedFactor) {
- mValue = v;
- mNumberOfBits = 32;
- setErrorFromValue(ulpFactor, ulpRelaxedFactor);
- }
-
- public Floaty(double v, int ulpFactor, int ulpRelaxedFactor) {
- mValue = v;
- mNumberOfBits = 64;
- setErrorFromValue(ulpFactor, ulpRelaxedFactor);
- }
-
- public float getFloatValue() { return (float) mValue; }
- public double getDoubleValue() { return mValue; }
-
- public float getFloatError() { return (float) mError; }
- public double getDoubleError() { return mError; }
-
- public double getDoubleMin() { return mValue - mError; }
- public double getDoubleMax() { return mValue + mError; }
-
- /** Returns the number we would need to multiply the ulp to get the current error. */
- public int getUlf() {
- return (int) (mError / getUlp() + 0.5);
- }
-
- /** Returns the unit of least precision for the number we handle. This is
- * always a positive number.
- */
- private double getUlp() {
- if (mNumberOfBits == 64) {
- return Math.ulp(mValue);
- } else {
- return Math.ulp((float) mValue);
- }
- }
-
- /**
- * Set mError to be the appropriate factor multiplied by the Unit of Least Precision (ulp)
- * of the current value.
- */
- private void setErrorFromValue(int ulpFactor, int ulpRelaxedFactor) {
- int factor = relaxed ? ulpRelaxedFactor : ulpFactor;
- mError = getUlp() * factor;
- }
-
- /**
- * Creates a new Floaty as the result of a computation. The precision factor are those
- * associated with the operation just completed.
- */
- private Floaty(double actual, double valueMinusError, double valuePlusError, int ulpFactor,
- int ulpRelaxedFactor, int numberOfBits) {
- mValue = actual;
- mError = 0f;
- expandError(valueMinusError);
- expandError(valuePlusError);
- mError *= relaxed ? ulpRelaxedFactor : ulpFactor;
- mNumberOfBits = numberOfBits;
- }
-
- /** If needed, increases the error so that the provided value is covered by the error range. */
- private void expandError(double valueWithError) {
- // We disregard NaN values that can be produced when testing close to a cliff.
- if (valueWithError != valueWithError) {
- return;
- }
- double delta = Math.abs(valueWithError - mValue);
- if (delta > mError) {
- mError = delta;
- }
- }
-
- /** Makes sure the allowed error is at least ulp{Relaxed}Factor. */
- public void setMinimumError(int ulpFactor, int ulpRelaxedFactor) {
- double minError = getUlp() * (relaxed ? ulpRelaxedFactor : ulpFactor);
- if (mError < minError) {
- mError = minError;
- }
- }
-
- /** Returns true if the number passed is within mError of our value. */
- public boolean couldBe(double a) {
- return couldBe(a, 0.0);
- }
-
- /**
- * Returns true if the number passed is within mError of our value, or if it's whithin
- * minimumError of the value.
- */
- public boolean couldBe(double a, double minimumError) {
- if (a != a && mValue != mValue) {
- return true; // Both are NaN
- }
- /* Handle the simple case. This may not be covered by the next test if mError is NaN.
- */
- if (a == mValue) {
- return true;
- }
- double error = Math.max(mError, minimumError);
- boolean inRange = mValue - error <= a && a <= mValue + error;
-
- /* For relaxed precision, some implementations don't return denormalized values for very
- * subnormal values. Two examples:
- * a) nextafter(0.0, 1.0): When denormalized are allowed, 1.40129846e-45 (0x00000001) is
- * expected. If only normalized values are returned, 1.1754944e-38 (0x00800000) is
- * expected.
- * b) powr(1600.4, -11.9): With denormalized, 7.4076481e-39 is returned. For normalized,
- * 0.0 can be returned.
- */
- if (!inRange && relaxed) {
- boolean isSubnormal = false;
- double normalized = 0.0;
- // Check if we have a subnormal value.
- if (mNumberOfBits == 32 && Math.abs(mValue) < Float.MIN_NORMAL) {
- isSubnormal = true;
- normalized = Math.copySign(Float.MIN_NORMAL, (float) mValue);
- } else if (Math.abs(mValue) < Double.MIN_NORMAL) {
- isSubnormal = true;
- normalized = Math.copySign(Double.MIN_NORMAL, mValue);
- }
- if (isSubnormal) {
- // First try replacing the expected value with the larger MIN_NORMAL
- inRange = (normalized - error) <= a && a <= (normalized + error);
- // Second try replacing the expected value with 0.
- if (!inRange) {
- inRange = -error <= a && a <= error;
- }
- }
- }
-
- /* This is useful for debugging:
- if (!inRange) {
- int ulfNeeded = (int) Math.abs(Math.round((a - mValue) / getUlp()));
- Log.e("Floaty.couldBe", "Comparing " + Double.toString(a) +
- " against " + Double.toString(mValue) + " +- " + Double.toString(error) +
- " relaxed " + Boolean.toString(relaxed) +
- " ulfNeeded " + Integer.toString(ulfNeeded) +
- ", off by " + Integer.toString(ulfNeeded - getUlf()));
- }
- */
- return inRange;
- }
-
- public String toString() {
- return String.format("%24.9g (%16x) +- %24.9g ulf %d (%d bits)", mValue,
- Double.doubleToRawLongBits(mValue), mError, getUlf(), mNumberOfBits);
- }
-
- public boolean isNaN() {
- return mValue == Float.NaN;
- }
-
- public Floaty add(Floaty a) {
- mValue += a.mValue;
- mError += a.mError;
- return this;
- }
-
- public Floaty subtract(Floaty a) {
- mValue -= a.mValue;
- mError += a.mError;
- return this;
- }
-
- public Floaty multiply(Floaty a) {
- /* Theoretically, it should be also + a.mError * mError but that should be too small
- * to matter.
- */
- mError = Math.abs(mValue) * a.mError + Math.abs(a.mValue) * mError;
- mValue *= a.mValue;
- return this;
- }
-
- public Floaty divide(Floaty a) {
- double num = Math.abs(mValue);
- double den = Math.abs(a.mValue);
- mError = (num * a.mError + den * mError) / (den * (den - a.mError));
- mValue /= a.mValue;
- return this;
- }
-
- static public Floaty add(Floaty a, Floaty b) {
- return new Floaty(a).add(b);
- }
-
- static public Floaty subtract(Floaty a, Floaty b) {
- return new Floaty(a).subtract(b);
- }
-
- static public Floaty multiply(Floaty a, Floaty b) {
- return new Floaty(a).multiply(b);
- }
-
- static public Floaty divide(Floaty a, Floaty b) {
- return new Floaty(a).divide(b);
- }
-
- static public Floaty abs(Floaty a) {
- Floaty c = new Floaty(Math.abs(a.mValue));
- c.mError = a.mError;
- return c;
- }
-
- static public Floaty sqrt(Floaty a) {
- Floaty f = new Floaty(
- Math.sqrt(a.mValue),
- Math.sqrt(a.mValue - a.mError),
- Math.sqrt(a.mValue + a.mError),
- 3, 10, a.mNumberOfBits);
- return f;
- }
-}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/IntrinsicBase.java b/tests/tests/renderscript/src/android/renderscript/cts/IntrinsicBase.java
index bd02d7e..6a1c944 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/IntrinsicBase.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/IntrinsicBase.java
@@ -124,8 +124,8 @@
if (mAllocDst != null) {
mAllocDst.destroy();
}
- mAllocRef = Allocation.createTyped(mRS, mAllocSrc.getType());
- mAllocDst = Allocation.createTyped(mRS, mAllocSrc.getType());
+ mAllocRef = makeAllocation(w, h, e);
+ mAllocDst = makeAllocation(w, h, e);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/RSUtils.java b/tests/tests/renderscript/src/android/renderscript/cts/RSUtils.java
index acb8b1d..a47af15 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/RSUtils.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/RSUtils.java
@@ -17,11 +17,12 @@
package android.renderscript.cts;
import android.content.res.Resources;
-import java.util.Random;
import android.renderscript.Allocation;
import android.renderscript.RSRuntimeException;
import com.android.cts.stub.R;
+import java.util.Random;
+
/**
* This class supplies some utils for renderscript tests
*/
@@ -31,8 +32,8 @@
1.0,
Math.E,
Math.PI,
- Math.PI / 2f,
- Math.PI * 2f,
+ Math.PI / 2.0,
+ Math.PI * 2.0,
-0.0,
-1.0,
-Math.E,
@@ -48,8 +49,27 @@
public static void genRandomDoubles(long seed, double min, double max, double array[],
boolean includeExtremes) {
Random r = new Random(seed);
- for (int i = 0; i < array.length; i++) {
- array[i] = min + r.nextDouble() * (max - min);
+ int minExponent = Math.min(Math.getExponent(min), 0);
+ int maxExponent = Math.max(Math.getExponent(max), 0);
+ if (minExponent < -6 || maxExponent > 6) {
+ // Use an exponential distribution
+ int exponentDiff = maxExponent - minExponent;
+ for (int i = 0; i < array.length; i++) {
+ double mantissa = r.nextDouble();
+ int exponent = minExponent + r.nextInt(maxExponent - minExponent);
+ int sign = (min >= 0) ? 1 : 1 - r.nextInt(2) * 2; // -1 or 1
+ double rand = sign * mantissa * Math.pow(2.0, exponent);
+ if (rand < min || rand > max) {
+ continue;
+ }
+ array[i] = rand;
+ }
+ } else {
+ // Use a linear distribution
+ for (int i = 0; i < array.length; i++) {
+ double rand = r.nextDouble();
+ array[i] = min + rand * (max - min);
+ }
}
// Seed a few special numbers we want to be sure to test.
for (int i = 0; i < sInterestingDoubles.length; i++) {
@@ -67,6 +87,9 @@
array[r.nextInt(array.length)] = Double.MIN_VALUE;
array[r.nextInt(array.length)] = Double.MIN_NORMAL;
array[r.nextInt(array.length)] = Double.MAX_VALUE;
+ array[r.nextInt(array.length)] = -Double.MIN_VALUE;
+ array[r.nextInt(array.length)] = -Double.MIN_NORMAL;
+ array[r.nextInt(array.length)] = -Double.MAX_VALUE;
}
}
@@ -77,8 +100,27 @@
public static void genRandomFloats(long seed, float min, float max, float array[],
boolean includeExtremes) {
Random r = new Random(seed);
- for (int i = 0; i < array.length; i++) {
- array[i] = min + r.nextFloat() * (max - min);
+ int minExponent = Math.min(Math.getExponent(min), 0);
+ int maxExponent = Math.max(Math.getExponent(max), 0);
+ if (minExponent < -6 || maxExponent > 6) {
+ // Use an exponential distribution
+ int exponentDiff = maxExponent - minExponent;
+ for (int i = 0; i < array.length; i++) {
+ float mantissa = r.nextFloat();
+ int exponent = minExponent + r.nextInt(maxExponent - minExponent);
+ int sign = (min >= 0) ? 1 : 1 - r.nextInt(2) * 2; // -1 or 1
+ float rand = sign * mantissa * (float) Math.pow(2.0, exponent);
+ if (rand < min || rand > max) {
+ continue;
+ }
+ array[i] = rand;
+ }
+ } else {
+ // Use a linear distribution
+ for (int i = 0; i < array.length; i++) {
+ float rand = r.nextFloat();
+ array[i] = min + rand * (max - min);
+ }
}
// Seed a few special numbers we want to be sure to test.
for (int i = 0; i < sInterestingDoubles.length; i++) {
@@ -96,6 +138,9 @@
array[r.nextInt(array.length)] = Float.MIN_VALUE;
array[r.nextInt(array.length)] = Float.MIN_NORMAL;
array[r.nextInt(array.length)] = Float.MAX_VALUE;
+ array[r.nextInt(array.length)] = -Float.MIN_VALUE;
+ array[r.nextInt(array.length)] = -Float.MIN_NORMAL;
+ array[r.nextInt(array.length)] = -Float.MAX_VALUE;
}
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/Target.java b/tests/tests/renderscript/src/android/renderscript/cts/Target.java
new file mode 100644
index 0000000..c423792
--- /dev/null
+++ b/tests/tests/renderscript/src/android/renderscript/cts/Target.java
@@ -0,0 +1,532 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.renderscript.cts;
+
+import android.util.Log;
+import java.util.Arrays;
+import junit.framework.Assert;
+
+/**
+ * This class and the enclosed Floaty class are used to validate the precision of the floating
+ * point operations of the various drivers. Instances of Target contains information about the
+ * expectations we have for the functions being tested. There's an instance of Floaty for each
+ * floating value being verified.
+ */
+public class Target {
+ /**
+ * In relaxed precision mode, we allow:
+ * - less precision in the computation
+ * - using only normalized values
+ * - reordering of the operations
+ * - different rounding mode
+ */
+ private boolean mIsRelaxedPrecision;
+
+ /*
+ * The following two fields are set just before the expected values are computed for a specific
+ * RenderScript function. Hence, we can't use one instance of this class to test two APIs
+ * in parallel. The generated Test*.java code uses one instance of Target per test, so we're
+ * safe.
+ */
+
+ /**
+ * For native, we allow the same things as relaxed precision, plus:
+ * - operations don't have to return +/- infinity
+ */
+ private boolean mIsNative;
+
+ /**
+ * How much we'll allow the values tested to diverge from the values
+ * we compute. This can be very large for native_* and half_* tests.
+ */
+ private int mUlpFactor;
+
+ Target(boolean relaxed) {
+ mIsRelaxedPrecision = relaxed;
+ }
+
+ /**
+ * Sets whether we are testing a native_* function and how many ulp we allow
+ * for full and relaxed precision.
+ */
+ void setPrecision(int fullUlpFactor, int relaxedUlpFactor, boolean isNative) {
+ mIsNative = isNative;
+ mUlpFactor = mIsRelaxedPrecision ? relaxedUlpFactor : fullUlpFactor;
+ }
+
+ /**
+ * Helper functions to create a new 32 bit Floaty with the current expected level of precision.
+ * We have variations that expect one to five arguments. Any of the passed arguments are considered
+ * valid values for that Floaty.
+ */
+ Floaty new32(float a) {
+ return new Floaty(32, new double [] { a });
+ }
+
+ Floaty new32(float a, float b) {
+ return new Floaty(32, new double [] { a, b });
+ }
+
+ Floaty new32(float a, float b, float c) {
+ return new Floaty(32, new double [] { a, b, c });
+ }
+
+ Floaty new32(float a, float b, float c, float d) {
+ return new Floaty(32, new double [] { a, b, c, d });
+ }
+
+ Floaty new32(float a, float b, float c, float d, float e) {
+ return new Floaty(32, new double [] { a, b, c, d, e });
+ }
+
+ /**
+ * Helper functions to create a new 64 bit Floaty with the current expected level of precision.
+ * We have variations that expect one to five arguments. Any of the passed arguments are considered
+ * valid values for that Floaty.
+ */
+ Floaty new64(double a) {
+ return new Floaty(64, new double [] { a });
+ }
+
+ Floaty new64(double a, double b) {
+ return new Floaty(64, new double [] { a, b });
+ }
+
+ Floaty new64(double a, double b, double c) {
+ return new Floaty(64, new double [] { a, b, c });
+ }
+
+ Floaty new64(double a, double b, double c, double d) {
+ return new Floaty(64, new double [] { a, b, c, d });
+ }
+
+ Floaty new64(double a, double b, double c, double d, double e) {
+ return new Floaty(64, new double [] { a, b, c, d, e });
+ }
+
+ /**
+ * Returns a Floaty that contain a NaN for the specified size.
+ */
+ Floaty newNan(int numberOfBits) {
+ return new Floaty(numberOfBits, new double [] { Double.NaN });
+ }
+
+ Floaty add(Floaty a, Floaty b) {
+ //Log.w("Target.add", "a: " + a.toString());
+ //Log.w("Target.add", "b: " + b.toString());
+ assert(a.mNumberOfBits == b.mNumberOfBits);
+ if (!a.mHasRange || !b.mHasRange) {
+ return newNan(a.mNumberOfBits);
+ }
+ return new Floaty(a.mNumberOfBits, new double[] { a.mValue + b.mValue,
+ a.mMinValue + b.mMinValue,
+ a.mMaxValue + b.mMaxValue });
+ }
+
+ Floaty subtract(Floaty a, Floaty b) {
+ //Log.w("Target.subtract", "a: " + a.toString());
+ //Log.w("Target.subtract", "b: " + b.toString());
+ assert(a.mNumberOfBits == b.mNumberOfBits);
+ if (!a.mHasRange || !b.mHasRange) {
+ return newNan(a.mNumberOfBits);
+ }
+ return new Floaty(a.mNumberOfBits, new double[] { a.mValue - b.mValue,
+ a.mMinValue - b.mMaxValue,
+ a.mMaxValue - b.mMinValue });
+ }
+
+ Floaty multiply(Floaty a, Floaty b) {
+ //Log.w("Target.multiply", "a: " + a.toString());
+ //Log.w("Target.multiply", "b: " + b.toString());
+ assert(a.mNumberOfBits == b.mNumberOfBits);
+ if (!a.mHasRange || !b.mHasRange) {
+ return newNan(a.mNumberOfBits);
+ }
+ return new Floaty(a.mNumberOfBits, new double[] { a.mValue * b.mValue,
+ a.mMinValue * b.mMinValue,
+ a.mMinValue * b.mMaxValue,
+ a.mMaxValue * b.mMinValue,
+ a.mMaxValue * b.mMaxValue});
+ }
+
+ Floaty divide(Floaty a, Floaty b) {
+ //Log.w("Target.divide", "a: " + a.toString());
+ //Log.w("Target.divide", "b: " + b.toString());
+ assert(a.mNumberOfBits == b.mNumberOfBits);
+ if (!a.mHasRange || !b.mHasRange) {
+ return newNan(a.mNumberOfBits);
+ }
+ return new Floaty(a.mNumberOfBits, new double[] { a.mValue / b.mValue,
+ a.mMinValue / b.mMinValue,
+ a.mMinValue / b.mMaxValue,
+ a.mMaxValue / b.mMinValue,
+ a.mMaxValue / b.mMaxValue});
+ }
+
+ /** Returns the absolute value of a Floaty. */
+ Floaty abs(Floaty a) {
+ if (!a.mHasRange) {
+ return newNan(a.mNumberOfBits);
+ }
+ if (a.mMinValue >= 0 && a.mMaxValue >= 0) {
+ // Two non-negatives, no change
+ return a;
+ }
+ Floaty f = new Floaty(a);
+ f.mValue = Math.abs(a.mValue);
+ if (a.mMinValue < 0 && a.mMaxValue < 0) {
+ // Two negatives, we invert
+ f.mMinValue = -a.mMaxValue;
+ f.mMaxValue = -a.mMinValue;
+ } else {
+ // We have one negative, one positive.
+ f.mMinValue = 0.f;
+ f.mMaxValue = Math.max(-a.mMinValue, a.mMaxValue);
+ }
+ return f;
+ }
+
+ /** Returns the square root of a Floaty. */
+ Floaty sqrt(Floaty a) {
+ //Log.w("Target.sqrt", "a: " + a.toString());
+ if (!a.mHasRange) {
+ return newNan(a.mNumberOfBits);
+ }
+ double f = Math.sqrt(a.mValue);
+ double min = Math.sqrt(a.mMinValue);
+ double max = Math.sqrt(a.mMaxValue);
+ double[] values;
+ /* If the range of inputs covers 0, make sure we have it as one of
+ * the answers, to set the correct lowest bound, as the square root
+ * of the negative inputs will yield a NaN flag and won't affect the
+ * range.
+ */
+ if (a.mMinValue < 0 && a.mMaxValue > 0) {
+ values = new double[]{f, 0., min, max};
+ } else {
+ values = new double[]{f, min, max};
+ }
+ Floaty answer = new Floaty(a.mNumberOfBits, values);
+ // Allow a little more imprecision for a square root operation.
+ answer.ExpandRangeByUlpFactor();
+ return answer;
+ }
+
+ /**
+ * This class represents the range of floating point values we accept as the result of a
+ * computation performed by a runtime driver.
+ */
+ class Floaty {
+ /**
+ * The number of bits the value should have, either 32 or 64. It would have been nice to
+ * use generics, e.g. Floaty<double> and Floaty<double> but Java does not support generics
+ * of float and double. Also, Java does not have an f16 type. This can simulate it,
+ * although more work will be needed.
+ */
+ private int mNumberOfBits;
+ /** True if NaN is an acceptable value. */
+ private boolean mCanBeNan;
+ /**
+ * True if mValue, mMinValue, mMaxValue have been set. This should be the case if mCanBeNan is false.
+ * It's possible for both mCanBeNan and mHasRange to be true at the same time.
+ */
+ private boolean mHasRange;
+ /**
+ * The typical value we would expect. We don't just keep track of the min and max
+ * of the ranges of values allowed because some functions we are evaluating are
+ * discontinuous, e.g. sqrt around 0, lgamma around -1, -2, -3 and tan around pi/2.
+ * By keeping track of the middle value, we're more likely to handle this discontinuity
+ * correctly.
+ */
+ private double mValue;
+ /** The minimum value we would expect. */
+ private double mMinValue;
+ /** The maximum value we would expect. */
+ private double mMaxValue;
+
+ Floaty(Floaty a) {
+ mNumberOfBits = a.mNumberOfBits;
+ mCanBeNan = a.mCanBeNan;
+ mHasRange = a.mHasRange;
+ mValue = a.mValue;
+ mMinValue = a.mMinValue;
+ mMaxValue = a.mMaxValue;
+ }
+
+ /**
+ * Creates a Floaty and initializes it so that the values passed could be represented by it.
+ * We also expand what's allowed by +/- mUlpFactor to allow for the various rounding modes.
+ * values[0] is treated as the representative case, otherwise the order of values does not matter.
+ */
+ Floaty(int numberOfBits, double values[]) {
+ //Log.w("Floaty(double[], ulp)", "input: " + Arrays.toString(values) + ", ulp " + Integer.toString(mUlpFactor));
+ mNumberOfBits = numberOfBits;
+ mCanBeNan = false;
+ mHasRange = false;
+ mValue = values[0];
+ for (double f: values) {
+ if (f != f) {
+ mCanBeNan = true;
+ continue;
+ }
+ updateMinAndMax(f);
+ // For relaxed mode, we don't require support of subnormal values.
+ // If we have a subnormal value, we'll allow both the normalized value and zero,
+ // to cover the two ways this small value might be handled.
+ if (mIsRelaxedPrecision || mIsNative) {
+ if (IsSubnormal(f)) {
+ updateMinAndMax(0.f);
+ updateMinAndMax(smallestNormal(f));
+ }
+ }
+ }
+ // Expand the range by one ulp factor to cover for the different rounding modes.
+ ExpandRangeByUlpFactor();
+ //Log.w("Floaty(double[], ulp)", "output: " + toString());
+ }
+
+ /** Modify the mMinValue and mMaxValue so that f is contained within the range. */
+ private void updateMinAndMax(double f) {
+ if (mHasRange) {
+ if (f < mMinValue) {
+ mMinValue = f;
+ }
+ if (f > mMaxValue) {
+ mMaxValue = f;
+ }
+ } else {
+ mHasRange = true;
+ mMinValue = f;
+ mMaxValue = f;
+ }
+ }
+
+ /** Modify mMinValue and mMaxValue to allow one extra ulp factor of error on each side. */
+ void ExpandRangeByUlpFactor() {
+ if (mHasRange && mUlpFactor > 0) {
+ // Expand the edges by the specified factor.
+ ExpandMin(mUlpFactor);
+ ExpandMax(mUlpFactor);
+ }
+ }
+
+ /** Expand the mMinValue by the number of ulp specified. */
+ private void ExpandMin(int ulpFactor) {
+ //Log.w("ExpandMin", java.lang.Double.toString(mMinValue) + " by " + Integer.toString(ulpFactor));
+ if (!mHasRange) {
+ return;
+ }
+ if (mMinValue == Double.NEGATIVE_INFINITY ||
+ mMinValue == Double.POSITIVE_INFINITY) {
+ // Can't get any larger
+ //Log.w("ExpandMin", "infinity");
+ return;
+ }
+ double ulp = NegativeUlp();
+ double delta = ulp * ulpFactor;
+ double newValue = mMinValue + delta;
+ /*
+ * Reduce mMinValue but don't go negative if it's positive because the rounding error
+ * we're simulating won't change the sign.
+ */
+ if (newValue < 0 && mMinValue > 0.f) {
+ mMinValue = 0.f;
+ } else {
+ mMinValue = newValue;
+ }
+ // If subnormal, also allow the normalized value if it's smaller.
+ if ((mIsRelaxedPrecision || mIsNative) && IsSubnormal(mMinValue)) {
+ if (mMinValue < 0) {
+ mMinValue = smallestNormal(-1.0f);
+ } else {
+ mMinValue = 0.f;
+ }
+ }
+ //Log.w("ExpandMin", "ulp " + java.lang.Double.toString(ulp) + ", delta " + java.lang.Double.toString(delta) + " for " + java.lang.Double.toString(mMinValue));
+ }
+
+ /** Expand the mMaxValue by the number of ulp specified. */
+ private void ExpandMax(int ulpFactor) {
+ //Log.w("ExpandMax", java.lang.Double.toString(mMaxValue) + " by " + Integer.toString(ulpFactor));
+ if (!mHasRange) {
+ return;
+ }
+ if (mMaxValue == Double.NEGATIVE_INFINITY ||
+ mMaxValue == Double.POSITIVE_INFINITY) {
+ // Can't get any larger
+ //Log.w("ExpandMax", "infinity");
+ return;
+ }
+ double ulp = Ulp();
+ double delta = ulp * ulpFactor;
+ double newValue = mMaxValue + delta;
+ /*
+ * Increase mMaxValue but don't go positive if it's negative because the rounding error
+ * we're simulating won't change the sign.
+ */
+ if (newValue > 0 && mMaxValue < 0.f) {
+ mMaxValue = 0.f;
+ } else {
+ mMaxValue = newValue;
+ }
+ // If subnormal, also allow the normalized value if it's smaller.
+ if ((mIsRelaxedPrecision || mIsNative) && IsSubnormal(mMaxValue)) {
+ if (mMaxValue > 0) {
+ mMaxValue = smallestNormal(1.0f);
+ } else {
+ mMaxValue = 0.f;
+ }
+ }
+ //Log.w("ExpandMax", "ulp " + java.lang.Double.toString(ulp) + ", delta " + java.lang.Double.toString(delta) + " for " + java.lang.Double.toString(mMaxValue));
+ }
+
+ /**
+ * Returns true if f is smaller than the smallest normalized number that can be represented
+ * by the number of bits we have.
+ */
+ private boolean IsSubnormal(double f) {
+ double af = Math.abs(f);
+ return 0 < af && af < smallestNormal(1.0f);
+ }
+
+ /**
+ * Returns the smallest normal representable by the number of bits we have, of the same
+ * sign as f.
+ */
+ private double smallestNormal(double f) {
+ double answer = (mNumberOfBits == 32) ? Float.MIN_NORMAL : Double.MIN_NORMAL;
+ if (f < 0) {
+ answer = -answer;
+ }
+ return answer;
+ }
+
+ /** Returns the unit of least precision for the maximum value allowed. */
+ private double Ulp() {
+ double u;
+ if (mNumberOfBits == 32) {
+ u = Math.ulp((float)mMaxValue);
+ } else {
+ u = Math.ulp(mMaxValue);
+ }
+ if (mIsRelaxedPrecision || mIsNative) {
+ u = Math.max(u, smallestNormal(1.f));
+ }
+ return u;
+ }
+
+ /** Returns the negative of the unit of least precision for the minimum value allowed. */
+ private double NegativeUlp() {
+ double u;
+ if (mNumberOfBits == 32) {
+ u = -Math.ulp((float)mMinValue);
+ } else {
+ u = -Math.ulp(mMinValue);
+ }
+ if (mIsRelaxedPrecision || mIsNative) {
+ u = Math.min(u, smallestNormal(-1.f));
+ }
+ return u;
+ }
+
+ /** Returns true if the number passed is among the values that are represented by this Floaty. */
+ public boolean couldBe(double a) {
+ return couldBe(a, 0.0);
+ }
+
+ /**
+ * Returns true if the number passed is among the values that are represented by this Floaty.
+ * An extra amount of allowed error can be specified.
+ */
+ public boolean couldBe(double a, double extraAllowedError) {
+ //Log.w("Floaty.couldBe", "Can " + Double.toString(a) + " be " + toString() + "? ");
+ // Handle the input being a NaN.
+ if (a != a) {
+ //Log.w("couldBe", "true because is Naan");
+ return mCanBeNan;
+ }
+ // If the input is not a NaN, we better have a range.
+ if (!mHasRange) {
+ return false;
+ }
+ // Handle the simple case.
+ if ((mMinValue - extraAllowedError) <= a && a <= (mMaxValue + extraAllowedError)) {
+ return true;
+ }
+ // For native, we don't require returning +/- infinity. If that's what we expect,
+ // allow all answers.
+ if (mIsNative) {
+ if (mMinValue == Double.NEGATIVE_INFINITY &&
+ mMaxValue == Double.NEGATIVE_INFINITY) {
+ return true;
+ }
+ if (mMinValue == Double.POSITIVE_INFINITY &&
+ mMaxValue == Double.POSITIVE_INFINITY) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+ public double get64() { return mValue; }
+ public double min64() { return mMinValue; }
+ public double max64() { return mMaxValue; }
+ /**
+ * Returns mValue unless zero could be a legal value. In that case, return it.
+ * This is useful for testing functions where the behavior at zero is unusual,
+ * e.g. reciprocals. If mValue is already +0.0 or -0.0, don't change it, to
+ * preserve the sign.
+ */
+ public double mid64() {
+ if (mMinValue < 0.0 && mMaxValue > 0.0 && mValue != 0.0) {
+ return 0.0;
+ }
+ return mValue;
+ }
+
+ public float get32() { return (float) mValue; }
+ public float min32() { return (float) mMinValue; }
+ public float max32() { return (float) mMaxValue; }
+ public float mid32() { return (float) mid64(); }
+
+ public String toString() {
+ String s = String.format("[f%d: ", mNumberOfBits);
+ if (mCanBeNan) {
+ s += "NaN, ";
+ }
+ if (mHasRange) {
+ if (mNumberOfBits == 32) {
+ float min = (float)mMinValue;
+ float mid = (float)mValue;
+ float max = (float)mMaxValue;
+ s += String.format("%11.9g {%08x} to %11.9g {%08x} to %11.9g {%08x}", min,
+ Float.floatToRawIntBits(min), mid,
+ Float.floatToRawIntBits(mid), max,
+ Float.floatToRawIntBits(max));
+ } else {
+ s += String.format("%24.9g {%16x} to %24.9g {%16x} to %24.9g {%16x}", mMinValue,
+ Double.doubleToRawLongBits(mMinValue), mValue,
+ Double.doubleToRawLongBits(mValue), mMaxValue,
+ Double.doubleToRawLongBits(mMaxValue));
+ }
+ }
+ s += "]";
+ return s;
+ }
+ }
+}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.java
index 3547d9c..6b3914c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAbs.java
@@ -68,7 +68,6 @@
ArgumentsCharUchar args = new ArgumentsCharUchar();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -125,7 +124,6 @@
ArgumentsCharUchar args = new ArgumentsCharUchar();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -182,7 +180,6 @@
ArgumentsCharUchar args = new ArgumentsCharUchar();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -239,7 +236,6 @@
ArgumentsCharUchar args = new ArgumentsCharUchar();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -301,7 +297,6 @@
ArgumentsShortUshort args = new ArgumentsShortUshort();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -358,7 +353,6 @@
ArgumentsShortUshort args = new ArgumentsShortUshort();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -415,7 +409,6 @@
ArgumentsShortUshort args = new ArgumentsShortUshort();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -472,7 +465,6 @@
ArgumentsShortUshort args = new ArgumentsShortUshort();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -534,7 +526,6 @@
ArgumentsIntUint args = new ArgumentsIntUint();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -591,7 +582,6 @@
ArgumentsIntUint args = new ArgumentsIntUint();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -648,7 +638,6 @@
ArgumentsIntUint args = new ArgumentsIntUint();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
@@ -705,7 +694,6 @@
ArgumentsIntUint args = new ArgumentsIntUint();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeAbs(args);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAcos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAcos.java
index d93ac1c..999fd1b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAcos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAcos.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAcosFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.java
index de18d7e..1412c2e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAcosh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAcoshFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAcospi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAcospi.java
index 2c342a2..7669fea 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAcospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAcospi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAcospiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAcospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAsin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAsin.java
index 847bbea..ce728e7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAsin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAsin.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAsinFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.java
index 8bc74fe..90c26a0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAsinh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAsinhFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAsinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAsinpi.java
index 8219acb..50bc387 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAsinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAsinpi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAsinpiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAsinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan.java
index 07bbe10..1d7055c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAtanFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.java
index 203db81..10b862d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inY;
public float inX;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAtan2FloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inY = arrayInY[i];
args.inX = arrayInX[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inY = arrayInY[i * 2 + j];
args.inX = arrayInX[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inY = arrayInY[i * 4 + j];
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inY = arrayInY[i * 4 + j];
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.java
index 8d9f5fc..8837003 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAtan2pi.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inY;
public float inX;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAtan2piFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inY = arrayInY[i];
args.inX = arrayInX[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan2pi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inY = arrayInY[i * 2 + j];
args.inX = arrayInX[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan2pi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inY = arrayInY[i * 4 + j];
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan2pi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inY = arrayInY[i * 4 + j];
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtan2pi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAtanh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAtanh.java
index 2c7797f..a07c171 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAtanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAtanh.java
@@ -35,41 +35,41 @@
}
public class ArgumentsFloatFloat {
- public float in;
- public Floaty out;
+ public float inV;
+ public Target.Floaty out;
}
private void checkAtanhFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe67990a4b91d5f55l, false);
+ Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xb66b4bab17ef039dl, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testAtanhFloatFloat(in, out);
- verifyResultsAtanhFloatFloat(in, out, false);
+ script.forEach_testAtanhFloatFloat(inV, out);
+ verifyResultsAtanhFloatFloat(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtanhFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testAtanhFloatFloat(in, out);
- verifyResultsAtanhFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testAtanhFloatFloat(inV, out);
+ verifyResultsAtanhFloatFloat(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtanhFloatFloat: " + e.toString());
}
}
- private void verifyResultsAtanhFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsAtanhFloatFloat(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -77,15 +77,15 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -99,36 +99,36 @@
}
private void checkAtanhFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xa404d7b8b65e0809l, false);
+ Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x8cd03c06a1cb59d9l, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testAtanhFloat2Float2(in, out);
- verifyResultsAtanhFloat2Float2(in, out, false);
+ script.forEach_testAtanhFloat2Float2(inV, out);
+ verifyResultsAtanhFloat2Float2(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtanhFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testAtanhFloat2Float2(in, out);
- verifyResultsAtanhFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testAtanhFloat2Float2(inV, out);
+ verifyResultsAtanhFloat2Float2(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtanhFloat2Float2: " + e.toString());
}
}
- private void verifyResultsAtanhFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsAtanhFloat2Float2(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -136,15 +136,15 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -158,36 +158,36 @@
}
private void checkAtanhFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xa404e25a15649da3l, false);
+ Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x8cd2052197e67ab7l, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testAtanhFloat3Float3(in, out);
- verifyResultsAtanhFloat3Float3(in, out, false);
+ script.forEach_testAtanhFloat3Float3(inV, out);
+ verifyResultsAtanhFloat3Float3(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtanhFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testAtanhFloat3Float3(in, out);
- verifyResultsAtanhFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testAtanhFloat3Float3(inV, out);
+ verifyResultsAtanhFloat3Float3(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtanhFloat3Float3: " + e.toString());
}
}
- private void verifyResultsAtanhFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsAtanhFloat3Float3(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -195,15 +195,15 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -217,36 +217,36 @@
}
private void checkAtanhFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xa404ecfb746b333dl, false);
+ Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x8cd3ce3c8e019b95l, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testAtanhFloat4Float4(in, out);
- verifyResultsAtanhFloat4Float4(in, out, false);
+ script.forEach_testAtanhFloat4Float4(inV, out);
+ verifyResultsAtanhFloat4Float4(inV, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtanhFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testAtanhFloat4Float4(in, out);
- verifyResultsAtanhFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testAtanhFloat4Float4(inV, out);
+ verifyResultsAtanhFloat4Float4(inV, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testAtanhFloat4Float4: " + e.toString());
}
}
- private void verifyResultsAtanhFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsAtanhFloat4Float4(Allocation inV, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -254,15 +254,15 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestAtanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestAtanpi.java
index 956fed8..34c4e32 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestAtanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestAtanpi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkAtanpiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeAtanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.java
index 91e9a14..c6e6bd3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCbrt.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkCbrtFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCbrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCbrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCbrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCbrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.java
index 7a8222a..80121a8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCeil.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkCeilFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCeil(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCeil(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCeil(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCeil(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCeil(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCeil(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCeil(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCeil(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestClamp.java b/tests/tests/renderscript/src/android/renderscript/cts/TestClamp.java
index 04cf924..44f60d6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestClamp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestClamp.java
@@ -38,7 +38,7 @@
public float inValue;
public float inMinValue;
public float inMaxValue;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkClampFloatFloatFloatFloat() {
@@ -83,8 +83,8 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeClamp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -93,22 +93,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Input inMinValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMinValue, Float.floatToRawIntBits(args.inMinValue), args.inMinValue));
message.append("\n");
message.append("Input inMaxValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMaxValue, Float.floatToRawIntBits(args.inMaxValue), args.inMaxValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -163,8 +163,8 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeClamp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -173,22 +173,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Input inMinValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMinValue, Float.floatToRawIntBits(args.inMinValue), args.inMinValue));
message.append("\n");
message.append("Input inMaxValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMaxValue, Float.floatToRawIntBits(args.inMaxValue), args.inMaxValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -243,8 +243,8 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeClamp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -253,22 +253,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Input inMinValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMinValue, Float.floatToRawIntBits(args.inMinValue), args.inMinValue));
message.append("\n");
message.append("Input inMaxValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMaxValue, Float.floatToRawIntBits(args.inMaxValue), args.inMaxValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -323,8 +323,8 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeClamp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -333,22 +333,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Input inMinValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMinValue, Float.floatToRawIntBits(args.inMinValue), args.inMinValue));
message.append("\n");
message.append("Input inMaxValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMaxValue, Float.floatToRawIntBits(args.inMaxValue), args.inMaxValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -403,8 +403,8 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeClamp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -413,22 +413,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Input inMinValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMinValue, Float.floatToRawIntBits(args.inMinValue), args.inMinValue));
message.append("\n");
message.append("Input inMaxValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMaxValue, Float.floatToRawIntBits(args.inMaxValue), args.inMaxValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -483,8 +483,8 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeClamp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -493,22 +493,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Input inMinValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMinValue, Float.floatToRawIntBits(args.inMinValue), args.inMinValue));
message.append("\n");
message.append("Input inMaxValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMaxValue, Float.floatToRawIntBits(args.inMaxValue), args.inMaxValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -563,8 +563,8 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeClamp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeClamp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -573,22 +573,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Input inMinValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMinValue, Float.floatToRawIntBits(args.inMinValue), args.inMinValue));
message.append("\n");
message.append("Input inMaxValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inMaxValue, Float.floatToRawIntBits(args.inMaxValue), args.inMaxValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -650,7 +650,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -726,7 +725,6 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -802,7 +800,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -878,7 +875,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -961,7 +957,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1037,7 +1032,6 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1113,7 +1107,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1189,7 +1182,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1272,7 +1264,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1348,7 +1339,6 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1424,7 +1414,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1500,7 +1489,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1583,7 +1571,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1659,7 +1646,6 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1735,7 +1721,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1811,7 +1796,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1894,7 +1878,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -1970,7 +1953,6 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2046,7 +2028,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2122,7 +2103,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2205,7 +2185,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2281,7 +2260,6 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2357,7 +2335,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2433,7 +2410,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2516,7 +2492,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2592,7 +2567,6 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2668,7 +2642,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2744,7 +2717,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2827,7 +2799,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2903,7 +2874,6 @@
args.inMinValue = arrayInMinValue[i * 2 + j];
args.inMaxValue = arrayInMaxValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -2979,7 +2949,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3055,7 +3024,6 @@
args.inMinValue = arrayInMinValue[i * 4 + j];
args.inMaxValue = arrayInMaxValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3131,7 +3099,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3207,7 +3174,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3283,7 +3249,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3359,7 +3324,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3435,7 +3399,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3511,7 +3474,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3587,7 +3549,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3663,7 +3624,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3739,7 +3699,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3815,7 +3774,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3891,7 +3849,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -3967,7 +3924,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4043,7 +3999,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4119,7 +4074,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4195,7 +4149,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4271,7 +4224,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4347,7 +4299,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4423,7 +4374,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4499,7 +4449,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4575,7 +4524,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4651,7 +4599,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4727,7 +4674,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4803,7 +4749,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
@@ -4879,7 +4824,6 @@
args.inMinValue = arrayInMinValue[i];
args.inMaxValue = arrayInMaxValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClamp(args);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestClz.java b/tests/tests/renderscript/src/android/renderscript/cts/TestClz.java
index 36606a1..51241aa 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestClz.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestClz.java
@@ -68,7 +68,6 @@
ArgumentsCharChar args = new ArgumentsCharChar();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -125,7 +124,6 @@
ArgumentsCharChar args = new ArgumentsCharChar();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -182,7 +180,6 @@
ArgumentsCharChar args = new ArgumentsCharChar();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -239,7 +236,6 @@
ArgumentsCharChar args = new ArgumentsCharChar();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -301,7 +297,6 @@
ArgumentsUcharUchar args = new ArgumentsUcharUchar();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -358,7 +353,6 @@
ArgumentsUcharUchar args = new ArgumentsUcharUchar();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -415,7 +409,6 @@
ArgumentsUcharUchar args = new ArgumentsUcharUchar();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -472,7 +465,6 @@
ArgumentsUcharUchar args = new ArgumentsUcharUchar();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -534,7 +526,6 @@
ArgumentsShortShort args = new ArgumentsShortShort();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -591,7 +582,6 @@
ArgumentsShortShort args = new ArgumentsShortShort();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -648,7 +638,6 @@
ArgumentsShortShort args = new ArgumentsShortShort();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -705,7 +694,6 @@
ArgumentsShortShort args = new ArgumentsShortShort();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -767,7 +755,6 @@
ArgumentsUshortUshort args = new ArgumentsUshortUshort();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -824,7 +811,6 @@
ArgumentsUshortUshort args = new ArgumentsUshortUshort();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -881,7 +867,6 @@
ArgumentsUshortUshort args = new ArgumentsUshortUshort();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -938,7 +923,6 @@
ArgumentsUshortUshort args = new ArgumentsUshortUshort();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -1000,7 +984,6 @@
ArgumentsIntInt args = new ArgumentsIntInt();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -1057,7 +1040,6 @@
ArgumentsIntInt args = new ArgumentsIntInt();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -1114,7 +1096,6 @@
ArgumentsIntInt args = new ArgumentsIntInt();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -1171,7 +1152,6 @@
ArgumentsIntInt args = new ArgumentsIntInt();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -1233,7 +1213,6 @@
ArgumentsUintUint args = new ArgumentsUintUint();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -1290,7 +1269,6 @@
ArgumentsUintUint args = new ArgumentsUintUint();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -1347,7 +1325,6 @@
ArgumentsUintUint args = new ArgumentsUintUint();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
@@ -1404,7 +1381,6 @@
ArgumentsUintUint args = new ArgumentsUintUint();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeClz(args);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestConvert.java b/tests/tests/renderscript/src/android/renderscript/cts/TestConvert.java
index 3945f84..fc56b26 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestConvert.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestConvert.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertFloat2Float2() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -218,7 +218,7 @@
public class ArgumentsCharFloat {
public byte inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertChar2Float2() {
@@ -250,8 +250,8 @@
ArgumentsCharFloat args = new ArgumentsCharFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -266,7 +266,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -308,8 +308,8 @@
ArgumentsCharFloat args = new ArgumentsCharFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -324,7 +324,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -366,8 +366,8 @@
ArgumentsCharFloat args = new ArgumentsCharFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -382,7 +382,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -397,7 +397,7 @@
public class ArgumentsUcharFloat {
public byte inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertUchar2Float2() {
@@ -429,8 +429,8 @@
ArgumentsUcharFloat args = new ArgumentsUcharFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -445,7 +445,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -487,8 +487,8 @@
ArgumentsUcharFloat args = new ArgumentsUcharFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -503,7 +503,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -545,8 +545,8 @@
ArgumentsUcharFloat args = new ArgumentsUcharFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -561,7 +561,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -576,7 +576,7 @@
public class ArgumentsShortFloat {
public short inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertShort2Float2() {
@@ -608,8 +608,8 @@
ArgumentsShortFloat args = new ArgumentsShortFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -624,7 +624,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -666,8 +666,8 @@
ArgumentsShortFloat args = new ArgumentsShortFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -682,7 +682,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -724,8 +724,8 @@
ArgumentsShortFloat args = new ArgumentsShortFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -740,7 +740,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -755,7 +755,7 @@
public class ArgumentsUshortFloat {
public short inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertUshort2Float2() {
@@ -787,8 +787,8 @@
ArgumentsUshortFloat args = new ArgumentsUshortFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -803,7 +803,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -845,8 +845,8 @@
ArgumentsUshortFloat args = new ArgumentsUshortFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -861,7 +861,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -903,8 +903,8 @@
ArgumentsUshortFloat args = new ArgumentsUshortFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -919,7 +919,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -934,7 +934,7 @@
public class ArgumentsIntFloat {
public int inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertInt2Float2() {
@@ -966,8 +966,8 @@
ArgumentsIntFloat args = new ArgumentsIntFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -982,7 +982,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -1024,8 +1024,8 @@
ArgumentsIntFloat args = new ArgumentsIntFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -1040,7 +1040,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -1082,8 +1082,8 @@
ArgumentsIntFloat args = new ArgumentsIntFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -1098,7 +1098,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -1113,7 +1113,7 @@
public class ArgumentsUintFloat {
public int inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertUint2Float2() {
@@ -1145,8 +1145,8 @@
ArgumentsUintFloat args = new ArgumentsUintFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -1161,7 +1161,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -1203,8 +1203,8 @@
ArgumentsUintFloat args = new ArgumentsUintFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -1219,7 +1219,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -1261,8 +1261,8 @@
ArgumentsUintFloat args = new ArgumentsUintFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -1277,7 +1277,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -1324,7 +1324,6 @@
ArgumentsFloatChar args = new ArgumentsFloatChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1334,7 +1333,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -1382,7 +1381,6 @@
ArgumentsFloatChar args = new ArgumentsFloatChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1392,7 +1390,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -1440,7 +1438,6 @@
ArgumentsFloatChar args = new ArgumentsFloatChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1450,7 +1447,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -1503,7 +1500,6 @@
ArgumentsCharChar args = new ArgumentsCharChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1560,7 +1556,6 @@
ArgumentsCharChar args = new ArgumentsCharChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1617,7 +1612,6 @@
ArgumentsCharChar args = new ArgumentsCharChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1679,7 +1673,6 @@
ArgumentsUcharChar args = new ArgumentsUcharChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1736,7 +1729,6 @@
ArgumentsUcharChar args = new ArgumentsUcharChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1793,7 +1785,6 @@
ArgumentsUcharChar args = new ArgumentsUcharChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1855,7 +1846,6 @@
ArgumentsShortChar args = new ArgumentsShortChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1912,7 +1902,6 @@
ArgumentsShortChar args = new ArgumentsShortChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -1969,7 +1958,6 @@
ArgumentsShortChar args = new ArgumentsShortChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2031,7 +2019,6 @@
ArgumentsUshortChar args = new ArgumentsUshortChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2088,7 +2075,6 @@
ArgumentsUshortChar args = new ArgumentsUshortChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2145,7 +2131,6 @@
ArgumentsUshortChar args = new ArgumentsUshortChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2207,7 +2192,6 @@
ArgumentsIntChar args = new ArgumentsIntChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2264,7 +2248,6 @@
ArgumentsIntChar args = new ArgumentsIntChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2321,7 +2304,6 @@
ArgumentsIntChar args = new ArgumentsIntChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2383,7 +2365,6 @@
ArgumentsUintChar args = new ArgumentsUintChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2440,7 +2421,6 @@
ArgumentsUintChar args = new ArgumentsUintChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2497,7 +2477,6 @@
ArgumentsUintChar args = new ArgumentsUintChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2559,7 +2538,6 @@
ArgumentsFloatUchar args = new ArgumentsFloatUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2569,7 +2547,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -2617,7 +2595,6 @@
ArgumentsFloatUchar args = new ArgumentsFloatUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2627,7 +2604,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -2675,7 +2652,6 @@
ArgumentsFloatUchar args = new ArgumentsFloatUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2685,7 +2661,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -2738,7 +2714,6 @@
ArgumentsCharUchar args = new ArgumentsCharUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2795,7 +2770,6 @@
ArgumentsCharUchar args = new ArgumentsCharUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2852,7 +2826,6 @@
ArgumentsCharUchar args = new ArgumentsCharUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2914,7 +2887,6 @@
ArgumentsUcharUchar args = new ArgumentsUcharUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -2971,7 +2943,6 @@
ArgumentsUcharUchar args = new ArgumentsUcharUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3028,7 +2999,6 @@
ArgumentsUcharUchar args = new ArgumentsUcharUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3090,7 +3060,6 @@
ArgumentsShortUchar args = new ArgumentsShortUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3147,7 +3116,6 @@
ArgumentsShortUchar args = new ArgumentsShortUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3204,7 +3172,6 @@
ArgumentsShortUchar args = new ArgumentsShortUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3266,7 +3233,6 @@
ArgumentsUshortUchar args = new ArgumentsUshortUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3323,7 +3289,6 @@
ArgumentsUshortUchar args = new ArgumentsUshortUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3380,7 +3345,6 @@
ArgumentsUshortUchar args = new ArgumentsUshortUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3442,7 +3406,6 @@
ArgumentsIntUchar args = new ArgumentsIntUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3499,7 +3462,6 @@
ArgumentsIntUchar args = new ArgumentsIntUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3556,7 +3518,6 @@
ArgumentsIntUchar args = new ArgumentsIntUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3618,7 +3579,6 @@
ArgumentsUintUchar args = new ArgumentsUintUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3675,7 +3635,6 @@
ArgumentsUintUchar args = new ArgumentsUintUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3732,7 +3691,6 @@
ArgumentsUintUchar args = new ArgumentsUintUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3794,7 +3752,6 @@
ArgumentsFloatShort args = new ArgumentsFloatShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3804,7 +3761,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -3852,7 +3809,6 @@
ArgumentsFloatShort args = new ArgumentsFloatShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3862,7 +3818,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -3910,7 +3866,6 @@
ArgumentsFloatShort args = new ArgumentsFloatShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -3920,7 +3875,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -3973,7 +3928,6 @@
ArgumentsCharShort args = new ArgumentsCharShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4030,7 +3984,6 @@
ArgumentsCharShort args = new ArgumentsCharShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4087,7 +4040,6 @@
ArgumentsCharShort args = new ArgumentsCharShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4149,7 +4101,6 @@
ArgumentsUcharShort args = new ArgumentsUcharShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4206,7 +4157,6 @@
ArgumentsUcharShort args = new ArgumentsUcharShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4263,7 +4213,6 @@
ArgumentsUcharShort args = new ArgumentsUcharShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4325,7 +4274,6 @@
ArgumentsShortShort args = new ArgumentsShortShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4382,7 +4330,6 @@
ArgumentsShortShort args = new ArgumentsShortShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4439,7 +4386,6 @@
ArgumentsShortShort args = new ArgumentsShortShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4501,7 +4447,6 @@
ArgumentsUshortShort args = new ArgumentsUshortShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4558,7 +4503,6 @@
ArgumentsUshortShort args = new ArgumentsUshortShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4615,7 +4559,6 @@
ArgumentsUshortShort args = new ArgumentsUshortShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4677,7 +4620,6 @@
ArgumentsIntShort args = new ArgumentsIntShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4734,7 +4676,6 @@
ArgumentsIntShort args = new ArgumentsIntShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4791,7 +4732,6 @@
ArgumentsIntShort args = new ArgumentsIntShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4853,7 +4793,6 @@
ArgumentsUintShort args = new ArgumentsUintShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4910,7 +4849,6 @@
ArgumentsUintShort args = new ArgumentsUintShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -4967,7 +4905,6 @@
ArgumentsUintShort args = new ArgumentsUintShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5029,7 +4966,6 @@
ArgumentsFloatUshort args = new ArgumentsFloatUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5039,7 +4975,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -5087,7 +5023,6 @@
ArgumentsFloatUshort args = new ArgumentsFloatUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5097,7 +5032,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -5145,7 +5080,6 @@
ArgumentsFloatUshort args = new ArgumentsFloatUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5155,7 +5089,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -5208,7 +5142,6 @@
ArgumentsCharUshort args = new ArgumentsCharUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5265,7 +5198,6 @@
ArgumentsCharUshort args = new ArgumentsCharUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5322,7 +5254,6 @@
ArgumentsCharUshort args = new ArgumentsCharUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5384,7 +5315,6 @@
ArgumentsUcharUshort args = new ArgumentsUcharUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5441,7 +5371,6 @@
ArgumentsUcharUshort args = new ArgumentsUcharUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5498,7 +5427,6 @@
ArgumentsUcharUshort args = new ArgumentsUcharUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5560,7 +5488,6 @@
ArgumentsShortUshort args = new ArgumentsShortUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5617,7 +5544,6 @@
ArgumentsShortUshort args = new ArgumentsShortUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5674,7 +5600,6 @@
ArgumentsShortUshort args = new ArgumentsShortUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5736,7 +5661,6 @@
ArgumentsUshortUshort args = new ArgumentsUshortUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5793,7 +5717,6 @@
ArgumentsUshortUshort args = new ArgumentsUshortUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5850,7 +5773,6 @@
ArgumentsUshortUshort args = new ArgumentsUshortUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5912,7 +5834,6 @@
ArgumentsIntUshort args = new ArgumentsIntUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -5969,7 +5890,6 @@
ArgumentsIntUshort args = new ArgumentsIntUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6026,7 +5946,6 @@
ArgumentsIntUshort args = new ArgumentsIntUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6088,7 +6007,6 @@
ArgumentsUintUshort args = new ArgumentsUintUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6145,7 +6063,6 @@
ArgumentsUintUshort args = new ArgumentsUintUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6202,7 +6119,6 @@
ArgumentsUintUshort args = new ArgumentsUintUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6264,7 +6180,6 @@
ArgumentsFloatInt args = new ArgumentsFloatInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6274,7 +6189,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -6322,7 +6237,6 @@
ArgumentsFloatInt args = new ArgumentsFloatInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6332,7 +6246,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -6380,7 +6294,6 @@
ArgumentsFloatInt args = new ArgumentsFloatInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6390,7 +6303,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -6443,7 +6356,6 @@
ArgumentsCharInt args = new ArgumentsCharInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6500,7 +6412,6 @@
ArgumentsCharInt args = new ArgumentsCharInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6557,7 +6468,6 @@
ArgumentsCharInt args = new ArgumentsCharInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6619,7 +6529,6 @@
ArgumentsUcharInt args = new ArgumentsUcharInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6676,7 +6585,6 @@
ArgumentsUcharInt args = new ArgumentsUcharInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6733,7 +6641,6 @@
ArgumentsUcharInt args = new ArgumentsUcharInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6795,7 +6702,6 @@
ArgumentsShortInt args = new ArgumentsShortInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6852,7 +6758,6 @@
ArgumentsShortInt args = new ArgumentsShortInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6909,7 +6814,6 @@
ArgumentsShortInt args = new ArgumentsShortInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -6971,7 +6875,6 @@
ArgumentsUshortInt args = new ArgumentsUshortInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7028,7 +6931,6 @@
ArgumentsUshortInt args = new ArgumentsUshortInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7085,7 +6987,6 @@
ArgumentsUshortInt args = new ArgumentsUshortInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7147,7 +7048,6 @@
ArgumentsIntInt args = new ArgumentsIntInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7204,7 +7104,6 @@
ArgumentsIntInt args = new ArgumentsIntInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7261,7 +7160,6 @@
ArgumentsIntInt args = new ArgumentsIntInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7323,7 +7221,6 @@
ArgumentsUintInt args = new ArgumentsUintInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7380,7 +7277,6 @@
ArgumentsUintInt args = new ArgumentsUintInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7437,7 +7333,6 @@
ArgumentsUintInt args = new ArgumentsUintInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7499,7 +7394,6 @@
ArgumentsFloatUint args = new ArgumentsFloatUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7509,7 +7403,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -7557,7 +7451,6 @@
ArgumentsFloatUint args = new ArgumentsFloatUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7567,7 +7460,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -7615,7 +7508,6 @@
ArgumentsFloatUint args = new ArgumentsFloatUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7625,7 +7517,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -7678,7 +7570,6 @@
ArgumentsCharUint args = new ArgumentsCharUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7735,7 +7626,6 @@
ArgumentsCharUint args = new ArgumentsCharUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7792,7 +7682,6 @@
ArgumentsCharUint args = new ArgumentsCharUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7854,7 +7743,6 @@
ArgumentsUcharUint args = new ArgumentsUcharUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7911,7 +7799,6 @@
ArgumentsUcharUint args = new ArgumentsUcharUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -7968,7 +7855,6 @@
ArgumentsUcharUint args = new ArgumentsUcharUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8030,7 +7916,6 @@
ArgumentsShortUint args = new ArgumentsShortUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8087,7 +7972,6 @@
ArgumentsShortUint args = new ArgumentsShortUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8144,7 +8028,6 @@
ArgumentsShortUint args = new ArgumentsShortUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8206,7 +8089,6 @@
ArgumentsUshortUint args = new ArgumentsUshortUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8263,7 +8145,6 @@
ArgumentsUshortUint args = new ArgumentsUshortUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8320,7 +8201,6 @@
ArgumentsUshortUint args = new ArgumentsUshortUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8382,7 +8262,6 @@
ArgumentsIntUint args = new ArgumentsIntUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8439,7 +8318,6 @@
ArgumentsIntUint args = new ArgumentsIntUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8496,7 +8374,6 @@
ArgumentsIntUint args = new ArgumentsIntUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8558,7 +8435,6 @@
ArgumentsUintUint args = new ArgumentsUintUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8615,7 +8491,6 @@
ArgumentsUintUint args = new ArgumentsUintUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8672,7 +8547,6 @@
ArgumentsUintUint args = new ArgumentsUintUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -8702,7 +8576,7 @@
public class ArgumentsDoubleDouble {
public double inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertDouble2Double2() {
@@ -8734,8 +8608,8 @@
ArgumentsDoubleDouble args = new ArgumentsDoubleDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -8744,14 +8618,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -8793,8 +8667,8 @@
ArgumentsDoubleDouble args = new ArgumentsDoubleDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -8803,14 +8677,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -8852,8 +8726,8 @@
ArgumentsDoubleDouble args = new ArgumentsDoubleDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -8862,14 +8736,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -8884,7 +8758,7 @@
public class ArgumentsLongDouble {
public long inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertLong2Double2() {
@@ -8916,8 +8790,8 @@
ArgumentsLongDouble args = new ArgumentsLongDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -8932,7 +8806,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -8974,8 +8848,8 @@
ArgumentsLongDouble args = new ArgumentsLongDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -8990,7 +8864,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -9032,8 +8906,8 @@
ArgumentsLongDouble args = new ArgumentsLongDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -9048,7 +8922,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -9063,7 +8937,7 @@
public class ArgumentsUlongDouble {
public long inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertUlong2Double2() {
@@ -9095,8 +8969,8 @@
ArgumentsUlongDouble args = new ArgumentsUlongDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -9111,7 +8985,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -9153,8 +9027,8 @@
ArgumentsUlongDouble args = new ArgumentsUlongDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -9169,7 +9043,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -9211,8 +9085,8 @@
ArgumentsUlongDouble args = new ArgumentsUlongDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -9227,7 +9101,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -9274,7 +9148,6 @@
ArgumentsDoubleLong args = new ArgumentsDoubleLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9284,7 +9157,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -9332,7 +9205,6 @@
ArgumentsDoubleLong args = new ArgumentsDoubleLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9342,7 +9214,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -9390,7 +9262,6 @@
ArgumentsDoubleLong args = new ArgumentsDoubleLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9400,7 +9271,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -9453,7 +9324,6 @@
ArgumentsLongLong args = new ArgumentsLongLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9510,7 +9380,6 @@
ArgumentsLongLong args = new ArgumentsLongLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9567,7 +9436,6 @@
ArgumentsLongLong args = new ArgumentsLongLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9629,7 +9497,6 @@
ArgumentsUlongLong args = new ArgumentsUlongLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9686,7 +9553,6 @@
ArgumentsUlongLong args = new ArgumentsUlongLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9743,7 +9609,6 @@
ArgumentsUlongLong args = new ArgumentsUlongLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9805,7 +9670,6 @@
ArgumentsDoubleUlong args = new ArgumentsDoubleUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9815,7 +9679,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -9863,7 +9727,6 @@
ArgumentsDoubleUlong args = new ArgumentsDoubleUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9873,7 +9736,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -9921,7 +9784,6 @@
ArgumentsDoubleUlong args = new ArgumentsDoubleUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -9931,7 +9793,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -9984,7 +9846,6 @@
ArgumentsLongUlong args = new ArgumentsLongUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -10041,7 +9902,6 @@
ArgumentsLongUlong args = new ArgumentsLongUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -10098,7 +9958,6 @@
ArgumentsLongUlong args = new ArgumentsLongUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -10160,7 +10019,6 @@
ArgumentsUlongUlong args = new ArgumentsUlongUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -10217,7 +10075,6 @@
ArgumentsUlongUlong args = new ArgumentsUlongUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -10274,7 +10131,6 @@
ArgumentsUlongUlong args = new ArgumentsUlongUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -10304,7 +10160,7 @@
public class ArgumentsDoubleFloat {
public double inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertDouble2Float2() {
@@ -10336,8 +10192,8 @@
ArgumentsDoubleFloat args = new ArgumentsDoubleFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -10346,14 +10202,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -10395,8 +10251,8 @@
ArgumentsDoubleFloat args = new ArgumentsDoubleFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -10405,14 +10261,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -10454,8 +10310,8 @@
ArgumentsDoubleFloat args = new ArgumentsDoubleFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -10464,14 +10320,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -10486,7 +10342,7 @@
public class ArgumentsLongFloat {
public long inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertLong2Float2() {
@@ -10518,8 +10374,8 @@
ArgumentsLongFloat args = new ArgumentsLongFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -10534,7 +10390,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -10576,8 +10432,8 @@
ArgumentsLongFloat args = new ArgumentsLongFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -10592,7 +10448,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -10634,8 +10490,8 @@
ArgumentsLongFloat args = new ArgumentsLongFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -10650,7 +10506,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -10665,7 +10521,7 @@
public class ArgumentsUlongFloat {
public long inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertUlong2Float2() {
@@ -10697,8 +10553,8 @@
ArgumentsUlongFloat args = new ArgumentsUlongFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -10713,7 +10569,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -10755,8 +10611,8 @@
ArgumentsUlongFloat args = new ArgumentsUlongFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -10771,7 +10627,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -10813,8 +10669,8 @@
ArgumentsUlongFloat args = new ArgumentsUlongFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -10829,7 +10685,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -10876,7 +10732,6 @@
ArgumentsDoubleChar args = new ArgumentsDoubleChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -10886,7 +10741,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -10934,7 +10789,6 @@
ArgumentsDoubleChar args = new ArgumentsDoubleChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -10944,7 +10798,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -10992,7 +10846,6 @@
ArgumentsDoubleChar args = new ArgumentsDoubleChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11002,7 +10855,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -11055,7 +10908,6 @@
ArgumentsLongChar args = new ArgumentsLongChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11112,7 +10964,6 @@
ArgumentsLongChar args = new ArgumentsLongChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11169,7 +11020,6 @@
ArgumentsLongChar args = new ArgumentsLongChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11231,7 +11081,6 @@
ArgumentsUlongChar args = new ArgumentsUlongChar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11288,7 +11137,6 @@
ArgumentsUlongChar args = new ArgumentsUlongChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11345,7 +11193,6 @@
ArgumentsUlongChar args = new ArgumentsUlongChar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11407,7 +11254,6 @@
ArgumentsDoubleUchar args = new ArgumentsDoubleUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11417,7 +11263,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -11465,7 +11311,6 @@
ArgumentsDoubleUchar args = new ArgumentsDoubleUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11475,7 +11320,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -11523,7 +11368,6 @@
ArgumentsDoubleUchar args = new ArgumentsDoubleUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11533,7 +11377,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -11586,7 +11430,6 @@
ArgumentsLongUchar args = new ArgumentsLongUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11643,7 +11486,6 @@
ArgumentsLongUchar args = new ArgumentsLongUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11700,7 +11542,6 @@
ArgumentsLongUchar args = new ArgumentsLongUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11762,7 +11603,6 @@
ArgumentsUlongUchar args = new ArgumentsUlongUchar();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11819,7 +11659,6 @@
ArgumentsUlongUchar args = new ArgumentsUlongUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11876,7 +11715,6 @@
ArgumentsUlongUchar args = new ArgumentsUlongUchar();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11938,7 +11776,6 @@
ArgumentsDoubleShort args = new ArgumentsDoubleShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -11948,7 +11785,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -11996,7 +11833,6 @@
ArgumentsDoubleShort args = new ArgumentsDoubleShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12006,7 +11842,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -12054,7 +11890,6 @@
ArgumentsDoubleShort args = new ArgumentsDoubleShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12064,7 +11899,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -12117,7 +11952,6 @@
ArgumentsLongShort args = new ArgumentsLongShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12174,7 +12008,6 @@
ArgumentsLongShort args = new ArgumentsLongShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12231,7 +12064,6 @@
ArgumentsLongShort args = new ArgumentsLongShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12293,7 +12125,6 @@
ArgumentsUlongShort args = new ArgumentsUlongShort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12350,7 +12181,6 @@
ArgumentsUlongShort args = new ArgumentsUlongShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12407,7 +12237,6 @@
ArgumentsUlongShort args = new ArgumentsUlongShort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12469,7 +12298,6 @@
ArgumentsDoubleUshort args = new ArgumentsDoubleUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12479,7 +12307,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -12527,7 +12355,6 @@
ArgumentsDoubleUshort args = new ArgumentsDoubleUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12537,7 +12364,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -12585,7 +12412,6 @@
ArgumentsDoubleUshort args = new ArgumentsDoubleUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12595,7 +12421,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -12648,7 +12474,6 @@
ArgumentsLongUshort args = new ArgumentsLongUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12705,7 +12530,6 @@
ArgumentsLongUshort args = new ArgumentsLongUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12762,7 +12586,6 @@
ArgumentsLongUshort args = new ArgumentsLongUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12824,7 +12647,6 @@
ArgumentsUlongUshort args = new ArgumentsUlongUshort();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12881,7 +12703,6 @@
ArgumentsUlongUshort args = new ArgumentsUlongUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -12938,7 +12759,6 @@
ArgumentsUlongUshort args = new ArgumentsUlongUshort();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13000,7 +12820,6 @@
ArgumentsDoubleInt args = new ArgumentsDoubleInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13010,7 +12829,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -13058,7 +12877,6 @@
ArgumentsDoubleInt args = new ArgumentsDoubleInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13068,7 +12886,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -13116,7 +12934,6 @@
ArgumentsDoubleInt args = new ArgumentsDoubleInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13126,7 +12943,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -13179,7 +12996,6 @@
ArgumentsLongInt args = new ArgumentsLongInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13236,7 +13052,6 @@
ArgumentsLongInt args = new ArgumentsLongInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13293,7 +13108,6 @@
ArgumentsLongInt args = new ArgumentsLongInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13355,7 +13169,6 @@
ArgumentsUlongInt args = new ArgumentsUlongInt();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13412,7 +13225,6 @@
ArgumentsUlongInt args = new ArgumentsUlongInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13469,7 +13281,6 @@
ArgumentsUlongInt args = new ArgumentsUlongInt();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13531,7 +13342,6 @@
ArgumentsDoubleUint args = new ArgumentsDoubleUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13541,7 +13351,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -13589,7 +13399,6 @@
ArgumentsDoubleUint args = new ArgumentsDoubleUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13599,7 +13408,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -13647,7 +13456,6 @@
ArgumentsDoubleUint args = new ArgumentsDoubleUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13657,7 +13465,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
args.inV, Double.doubleToRawLongBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -13710,7 +13518,6 @@
ArgumentsLongUint args = new ArgumentsLongUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13767,7 +13574,6 @@
ArgumentsLongUint args = new ArgumentsLongUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13824,7 +13630,6 @@
ArgumentsLongUint args = new ArgumentsLongUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13886,7 +13691,6 @@
ArgumentsUlongUint args = new ArgumentsUlongUint();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -13943,7 +13747,6 @@
ArgumentsUlongUint args = new ArgumentsUlongUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -14000,7 +13803,6 @@
ArgumentsUlongUint args = new ArgumentsUlongUint();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -14030,7 +13832,7 @@
public class ArgumentsFloatDouble {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertFloat2Double2() {
@@ -14062,8 +13864,8 @@
ArgumentsFloatDouble args = new ArgumentsFloatDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -14072,14 +13874,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -14121,8 +13923,8 @@
ArgumentsFloatDouble args = new ArgumentsFloatDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14131,14 +13933,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14180,8 +13982,8 @@
ArgumentsFloatDouble args = new ArgumentsFloatDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14190,14 +13992,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14212,7 +14014,7 @@
public class ArgumentsCharDouble {
public byte inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertChar2Double2() {
@@ -14244,8 +14046,8 @@
ArgumentsCharDouble args = new ArgumentsCharDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -14260,7 +14062,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -14302,8 +14104,8 @@
ArgumentsCharDouble args = new ArgumentsCharDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14318,7 +14120,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14360,8 +14162,8 @@
ArgumentsCharDouble args = new ArgumentsCharDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14376,7 +14178,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14391,7 +14193,7 @@
public class ArgumentsUcharDouble {
public byte inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertUchar2Double2() {
@@ -14423,8 +14225,8 @@
ArgumentsUcharDouble args = new ArgumentsUcharDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -14439,7 +14241,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -14481,8 +14283,8 @@
ArgumentsUcharDouble args = new ArgumentsUcharDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14497,7 +14299,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14539,8 +14341,8 @@
ArgumentsUcharDouble args = new ArgumentsUcharDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14555,7 +14357,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14570,7 +14372,7 @@
public class ArgumentsShortDouble {
public short inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertShort2Double2() {
@@ -14602,8 +14404,8 @@
ArgumentsShortDouble args = new ArgumentsShortDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -14618,7 +14420,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -14660,8 +14462,8 @@
ArgumentsShortDouble args = new ArgumentsShortDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14676,7 +14478,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14718,8 +14520,8 @@
ArgumentsShortDouble args = new ArgumentsShortDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14734,7 +14536,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14749,7 +14551,7 @@
public class ArgumentsUshortDouble {
public short inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertUshort2Double2() {
@@ -14781,8 +14583,8 @@
ArgumentsUshortDouble args = new ArgumentsUshortDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -14797,7 +14599,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -14839,8 +14641,8 @@
ArgumentsUshortDouble args = new ArgumentsUshortDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14855,7 +14657,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14897,8 +14699,8 @@
ArgumentsUshortDouble args = new ArgumentsUshortDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -14913,7 +14715,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -14928,7 +14730,7 @@
public class ArgumentsIntDouble {
public int inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertInt2Double2() {
@@ -14960,8 +14762,8 @@
ArgumentsIntDouble args = new ArgumentsIntDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -14976,7 +14778,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -15018,8 +14820,8 @@
ArgumentsIntDouble args = new ArgumentsIntDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -15034,7 +14836,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -15076,8 +14878,8 @@
ArgumentsIntDouble args = new ArgumentsIntDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -15092,7 +14894,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -15107,7 +14909,7 @@
public class ArgumentsUintDouble {
public int inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkConvertUint2Double2() {
@@ -15139,8 +14941,8 @@
ArgumentsUintDouble args = new ArgumentsUintDouble();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -15155,7 +14957,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 2 + j], Double.doubleToRawLongBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -15197,8 +14999,8 @@
ArgumentsUintDouble args = new ArgumentsUintDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -15213,7 +15015,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -15255,8 +15057,8 @@
ArgumentsUintDouble args = new ArgumentsUintDouble();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeConvert(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeConvert(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -15271,7 +15073,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%24.8g %16x %31a",
+ message.append(String.format("%24.8g {%16x} %31a",
arrayOut[i * 4 + j], Double.doubleToRawLongBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -15318,7 +15120,6 @@
ArgumentsFloatLong args = new ArgumentsFloatLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15328,7 +15129,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -15376,7 +15177,6 @@
ArgumentsFloatLong args = new ArgumentsFloatLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15386,7 +15186,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -15434,7 +15234,6 @@
ArgumentsFloatLong args = new ArgumentsFloatLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15444,7 +15243,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -15497,7 +15296,6 @@
ArgumentsCharLong args = new ArgumentsCharLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15554,7 +15352,6 @@
ArgumentsCharLong args = new ArgumentsCharLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15611,7 +15408,6 @@
ArgumentsCharLong args = new ArgumentsCharLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15673,7 +15469,6 @@
ArgumentsUcharLong args = new ArgumentsUcharLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15730,7 +15525,6 @@
ArgumentsUcharLong args = new ArgumentsUcharLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15787,7 +15581,6 @@
ArgumentsUcharLong args = new ArgumentsUcharLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15849,7 +15642,6 @@
ArgumentsShortLong args = new ArgumentsShortLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15906,7 +15698,6 @@
ArgumentsShortLong args = new ArgumentsShortLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -15963,7 +15754,6 @@
ArgumentsShortLong args = new ArgumentsShortLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16025,7 +15815,6 @@
ArgumentsUshortLong args = new ArgumentsUshortLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16082,7 +15871,6 @@
ArgumentsUshortLong args = new ArgumentsUshortLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16139,7 +15927,6 @@
ArgumentsUshortLong args = new ArgumentsUshortLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16201,7 +15988,6 @@
ArgumentsIntLong args = new ArgumentsIntLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16258,7 +16044,6 @@
ArgumentsIntLong args = new ArgumentsIntLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16315,7 +16100,6 @@
ArgumentsIntLong args = new ArgumentsIntLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16377,7 +16161,6 @@
ArgumentsUintLong args = new ArgumentsUintLong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16434,7 +16217,6 @@
ArgumentsUintLong args = new ArgumentsUintLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16491,7 +16273,6 @@
ArgumentsUintLong args = new ArgumentsUintLong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16553,7 +16334,6 @@
ArgumentsFloatUlong args = new ArgumentsFloatUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16563,7 +16343,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -16611,7 +16391,6 @@
ArgumentsFloatUlong args = new ArgumentsFloatUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16621,7 +16400,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -16669,7 +16448,6 @@
ArgumentsFloatUlong args = new ArgumentsFloatUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16679,7 +16457,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
@@ -16732,7 +16510,6 @@
ArgumentsCharUlong args = new ArgumentsCharUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16789,7 +16566,6 @@
ArgumentsCharUlong args = new ArgumentsCharUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16846,7 +16622,6 @@
ArgumentsCharUlong args = new ArgumentsCharUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16908,7 +16683,6 @@
ArgumentsUcharUlong args = new ArgumentsUcharUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -16965,7 +16739,6 @@
ArgumentsUcharUlong args = new ArgumentsUcharUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17022,7 +16795,6 @@
ArgumentsUcharUlong args = new ArgumentsUcharUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17084,7 +16856,6 @@
ArgumentsShortUlong args = new ArgumentsShortUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17141,7 +16912,6 @@
ArgumentsShortUlong args = new ArgumentsShortUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17198,7 +16968,6 @@
ArgumentsShortUlong args = new ArgumentsShortUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17260,7 +17029,6 @@
ArgumentsUshortUlong args = new ArgumentsUshortUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17317,7 +17085,6 @@
ArgumentsUshortUlong args = new ArgumentsUshortUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17374,7 +17141,6 @@
ArgumentsUshortUlong args = new ArgumentsUshortUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17436,7 +17202,6 @@
ArgumentsIntUlong args = new ArgumentsIntUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17493,7 +17258,6 @@
ArgumentsIntUlong args = new ArgumentsIntUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17550,7 +17314,6 @@
ArgumentsIntUlong args = new ArgumentsIntUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17612,7 +17375,6 @@
ArgumentsUintUlong args = new ArgumentsUintUlong();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17669,7 +17431,6 @@
ArgumentsUintUlong args = new ArgumentsUintUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
@@ -17726,7 +17487,6 @@
ArgumentsUintUlong args = new ArgumentsUintUlong();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeConvert(args);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.java
index 0f792bb..cb8794a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCopysign.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkCopysignFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCopysign(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCopysign(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCopysign(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCopysign(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCopysign(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCopysign(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCopysign(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCopysign(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCos.java
index 07da8f7..c3aaf28 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCos.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkCosFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.java
index 6b2388b..c1f6bf3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCosh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkCoshFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.java
index bec65c5..2d18af9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCospi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkCospiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestCross.java b/tests/tests/renderscript/src/android/renderscript/cts/TestCross.java
index b972906..c5dc979 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestCross.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestCross.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatNFloatNFloatN {
public float[] inLhs;
public float[] inRhs;
- public Floaty[] out;
+ public Target.Floaty[] out;
}
private void checkCrossFloat3Float3Float3() {
@@ -73,7 +73,7 @@
// Create the appropriate sized arrays in args
args.inLhs = new float[3];
args.inRhs = new float[3];
- args.out = new Floaty[3];
+ args.out = new Target.Floaty[3];
// Fill args with the input values
for (int j = 0; j < 3 ; j++) {
args.inLhs[j] = arrayInLhs[i * 4 + j];
@@ -81,8 +81,8 @@
for (int j = 0; j < 3 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCross(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCross(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -95,13 +95,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -110,7 +110,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out[j].couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -156,7 +156,7 @@
// Create the appropriate sized arrays in args
args.inLhs = new float[4];
args.inRhs = new float[4];
- args.out = new Floaty[4];
+ args.out = new Target.Floaty[4];
// Fill args with the input values
for (int j = 0; j < 4 ; j++) {
args.inLhs[j] = arrayInLhs[i * 4 + j];
@@ -164,8 +164,8 @@
for (int j = 0; j < 4 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeCross(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeCross(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -178,13 +178,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -193,7 +193,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out[j].couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.java b/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.java
index ecbbdd4..b956dbd 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestDegrees.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inValue;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkDegreesFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDegrees(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDegrees(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDegrees(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDegrees(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDegrees(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDegrees(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDegrees(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDegrees(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.java b/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.java
index 7dc5b47..091c12c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestDistance.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inLhs;
public float inRhs;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkDistanceFloatFloatFloat() {
@@ -74,8 +74,8 @@
// Fill args with the input values
args.inLhs = arrayInLhs[i];
args.inRhs = arrayInRhs[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i], Float.floatToRawIntBits(arrayInLhs[i]), arrayInLhs[i]));
message.append("\n");
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i], Float.floatToRawIntBits(arrayInRhs[i]), arrayInRhs[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -111,7 +111,7 @@
public class ArgumentsFloatNFloatNFloat {
public float[] inLhs;
public float[] inRhs;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkDistanceFloat2Float2Float() {
@@ -154,8 +154,8 @@
for (int j = 0; j < 2 ; j++) {
args.inRhs[j] = arrayInRhs[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -166,13 +166,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 2 + j], Float.floatToRawIntBits(arrayInLhs[i * 2 + j]), arrayInLhs[i * 2 + j]));
message.append("\n");
}
for (int j = 0; j < 2 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 2 + j], Float.floatToRawIntBits(arrayInRhs[i * 2 + j]), arrayInRhs[i * 2 + j]));
message.append("\n");
}
@@ -180,7 +180,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -232,8 +232,8 @@
for (int j = 0; j < 3 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -244,13 +244,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -258,7 +258,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -310,8 +310,8 @@
for (int j = 0; j < 4 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -322,13 +322,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -336,7 +336,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestDot.java b/tests/tests/renderscript/src/android/renderscript/cts/TestDot.java
index 9b72b9d..666906b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestDot.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestDot.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inLhs;
public float inRhs;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkDotFloatFloatFloat() {
@@ -74,8 +74,8 @@
// Fill args with the input values
args.inLhs = arrayInLhs[i];
args.inRhs = arrayInRhs[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDot(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i], Float.floatToRawIntBits(arrayInLhs[i]), arrayInLhs[i]));
message.append("\n");
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i], Float.floatToRawIntBits(arrayInRhs[i]), arrayInRhs[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -111,7 +111,7 @@
public class ArgumentsFloatNFloatNFloat {
public float[] inLhs;
public float[] inRhs;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkDotFloat2Float2Float() {
@@ -154,8 +154,8 @@
for (int j = 0; j < 2 ; j++) {
args.inRhs[j] = arrayInRhs[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDot(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -166,13 +166,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 2 + j], Float.floatToRawIntBits(arrayInLhs[i * 2 + j]), arrayInLhs[i * 2 + j]));
message.append("\n");
}
for (int j = 0; j < 2 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 2 + j], Float.floatToRawIntBits(arrayInRhs[i * 2 + j]), arrayInRhs[i * 2 + j]));
message.append("\n");
}
@@ -180,7 +180,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -232,8 +232,8 @@
for (int j = 0; j < 3 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDot(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -244,13 +244,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -258,7 +258,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -310,8 +310,8 @@
for (int j = 0; j < 4 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeDot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeDot(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -322,13 +322,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -336,7 +336,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestErf.java b/tests/tests/renderscript/src/android/renderscript/cts/TestErf.java
index 06b77fc..6c73bf1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestErf.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestErf.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkErfFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeErf(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeErf(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeErf(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeErf(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeErf(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeErf(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeErf(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeErf(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.java b/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.java
index 25332aa..86c2aa1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestErfc.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkErfcFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeErfc(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeErfc(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeErfc(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeErfc(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeErfc(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeErfc(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeErfc(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeErfc(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExp.java b/tests/tests/renderscript/src/android/renderscript/cts/TestExp.java
index e46dab1..224a64c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExp.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkExpFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.java b/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.java
index eb6c3b5..874d17b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExp10.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkExp10FloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.java
index 18bd20a..bbb9c68 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExp2.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkExp2FloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExp2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExp2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.java b/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.java
index b0d288d..c922e49 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestExpm1.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkExpm1FloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExpm1(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExpm1(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExpm1(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeExpm1(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.java
index e74eaf8..29cdd86 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFabs.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFabsFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFabs(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFabs(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFabs(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFabs(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFabs(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFabs(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFabs(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFabs(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.java
index 2caa182..8091015 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFastDistance.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inLhs;
public float inRhs;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFastDistanceFloatFloatFloat() {
@@ -74,8 +74,8 @@
// Fill args with the input values
args.inLhs = arrayInLhs[i];
args.inRhs = arrayInRhs[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i], Float.floatToRawIntBits(arrayInLhs[i]), arrayInLhs[i]));
message.append("\n");
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i], Float.floatToRawIntBits(arrayInRhs[i]), arrayInRhs[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -111,7 +111,7 @@
public class ArgumentsFloatNFloatNFloat {
public float[] inLhs;
public float[] inRhs;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFastDistanceFloat2Float2Float() {
@@ -154,8 +154,8 @@
for (int j = 0; j < 2 ; j++) {
args.inRhs[j] = arrayInRhs[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -166,13 +166,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 2 + j], Float.floatToRawIntBits(arrayInLhs[i * 2 + j]), arrayInLhs[i * 2 + j]));
message.append("\n");
}
for (int j = 0; j < 2 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 2 + j], Float.floatToRawIntBits(arrayInRhs[i * 2 + j]), arrayInRhs[i * 2 + j]));
message.append("\n");
}
@@ -180,7 +180,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -232,8 +232,8 @@
for (int j = 0; j < 3 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -244,13 +244,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -258,7 +258,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -310,8 +310,8 @@
for (int j = 0; j < 4 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -322,13 +322,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -336,7 +336,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFastLength.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFastLength.java
index 12d4f65..e990d15 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFastLength.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFastLength.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFastLengthFloatFloat() {
@@ -67,8 +67,8 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i], Float.floatToRawIntBits(arrayInV[i]), arrayInV[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -99,7 +99,7 @@
public class ArgumentsFloatNFloat {
public float[] inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFastLengthFloat2Float() {
@@ -133,8 +133,8 @@
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -145,7 +145,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 2 + j], Float.floatToRawIntBits(arrayInV[i * 2 + j]), arrayInV[i * 2 + j]));
message.append("\n");
}
@@ -153,7 +153,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -196,8 +196,8 @@
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -208,7 +208,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -216,7 +216,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -259,8 +259,8 @@
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -271,7 +271,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -279,7 +279,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFastNormalize.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFastNormalize.java
index 2b03bd9..4e42575 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFastNormalize.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFastNormalize.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFastNormalizeFloatFloat() {
@@ -67,8 +67,8 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i], Float.floatToRawIntBits(arrayInV[i]), arrayInV[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -99,7 +99,7 @@
public class ArgumentsFloatNFloatN {
public float[] inV;
- public Floaty[] out;
+ public Target.Floaty[] out;
}
private void checkFastNormalizeFloat2Float2() {
@@ -129,13 +129,13 @@
ArgumentsFloatNFloatN args = new ArgumentsFloatNFloatN();
// Create the appropriate sized arrays in args
args.inV = new float[2];
- args.out = new Floaty[2];
+ args.out = new Target.Floaty[2];
// Fill args with the input values
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -148,7 +148,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 2 + j], Float.floatToRawIntBits(arrayInV[i * 2 + j]), arrayInV[i * 2 + j]));
message.append("\n");
}
@@ -157,7 +157,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out[j].couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -197,13 +197,13 @@
ArgumentsFloatNFloatN args = new ArgumentsFloatNFloatN();
// Create the appropriate sized arrays in args
args.inV = new float[3];
- args.out = new Floaty[3];
+ args.out = new Target.Floaty[3];
// Fill args with the input values
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -216,7 +216,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -225,7 +225,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out[j].couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -265,13 +265,13 @@
ArgumentsFloatNFloatN args = new ArgumentsFloatNFloatN();
// Create the appropriate sized arrays in args
args.inV = new float[4];
- args.out = new Floaty[4];
+ args.out = new Target.Floaty[4];
// Fill args with the input values
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFastNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFastNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -284,7 +284,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -293,7 +293,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out[j].couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFdim.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFdim.java
index 13ca2c8..bbe1e7a 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFdim.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFdim.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inA;
public float inB;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFdimFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inA = arrayInA[i];
args.inB = arrayInB[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFdim(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFdim(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inA = arrayInA[i * 2 + j];
args.inB = arrayInB[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFdim(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFdim(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFdim(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFdim(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inA = arrayInA[i * 4 + j];
args.inB = arrayInB[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFdim(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFdim(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.java
index 07d4409..39ec8bd 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFloor.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFloorFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFloor(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFloor(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFloor(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFloor(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFloor(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFloor(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFloor(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFloor(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFma.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFma.java
index 93ac196..fcb7c5f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFma.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFma.java
@@ -38,7 +38,7 @@
public float inA;
public float inB;
public float inC;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFmaFloatFloatFloatFloat() {
@@ -82,8 +82,8 @@
args.inB = arrayInB[i];
args.inC = arrayInC[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -92,22 +92,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -161,8 +161,8 @@
args.inB = arrayInB[i * 2 + j];
args.inC = arrayInC[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -171,22 +171,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -240,8 +240,8 @@
args.inB = arrayInB[i * 4 + j];
args.inC = arrayInC[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -250,22 +250,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -319,8 +319,8 @@
args.inB = arrayInB[i * 4 + j];
args.inC = arrayInC[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -329,22 +329,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.java
index 83fc48d..7d4e633 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFmax.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFmaxFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -351,8 +351,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -361,18 +361,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -420,8 +420,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -430,18 +430,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -489,8 +489,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -499,18 +499,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.java
index 0c8b7a0..f206a74 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFmin.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFminFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -351,8 +351,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -361,18 +361,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -420,8 +420,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -430,18 +430,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -489,8 +489,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -499,18 +499,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.java
index a211530..7bd59ef 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFmod.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFmodFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmod(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmod(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmod(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmod(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmod(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmod(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFmod(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFmod(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFract.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFract.java
index 78f497c..891ad96 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFract.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFract.java
@@ -36,8 +36,8 @@
public class ArgumentsFloatFloatFloat {
public float inV;
- public Floaty outFloor;
- public Floaty out;
+ public Target.Floaty outFloor;
+ public Target.Floaty out;
}
private void checkFractFloatFloatFloat() {
@@ -75,8 +75,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFract(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outFloor.couldBe(arrayOutFloor[i * 1 + j])) {
@@ -88,14 +88,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outFloor: ");
message.append(args.outFloor.toString());
message.append("\n");
message.append("Actual output outFloor: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutFloor[i * 1 + j], Float.floatToRawIntBits(arrayOutFloor[i * 1 + j]), arrayOutFloor[i * 1 + j]));
if (!args.outFloor.couldBe(arrayOutFloor[i * 1 + j])) {
message.append(" FAIL");
@@ -105,7 +105,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -153,8 +153,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFract(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outFloor.couldBe(arrayOutFloor[i * 2 + j])) {
@@ -166,14 +166,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outFloor: ");
message.append(args.outFloor.toString());
message.append("\n");
message.append("Actual output outFloor: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutFloor[i * 2 + j], Float.floatToRawIntBits(arrayOutFloor[i * 2 + j]), arrayOutFloor[i * 2 + j]));
if (!args.outFloor.couldBe(arrayOutFloor[i * 2 + j])) {
message.append(" FAIL");
@@ -183,7 +183,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -231,8 +231,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFract(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outFloor.couldBe(arrayOutFloor[i * 4 + j])) {
@@ -244,14 +244,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outFloor: ");
message.append(args.outFloor.toString());
message.append("\n");
message.append("Actual output outFloor: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutFloor[i * 4 + j], Float.floatToRawIntBits(arrayOutFloor[i * 4 + j]), arrayOutFloor[i * 4 + j]));
if (!args.outFloor.couldBe(arrayOutFloor[i * 4 + j])) {
message.append(" FAIL");
@@ -261,7 +261,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -309,8 +309,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFract(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outFloor.couldBe(arrayOutFloor[i * 4 + j])) {
@@ -322,14 +322,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outFloor: ");
message.append(args.outFloor.toString());
message.append("\n");
message.append("Actual output outFloor: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutFloor[i * 4 + j], Float.floatToRawIntBits(arrayOutFloor[i * 4 + j]), arrayOutFloor[i * 4 + j]));
if (!args.outFloor.couldBe(arrayOutFloor[i * 4 + j])) {
message.append(" FAIL");
@@ -339,7 +339,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -354,7 +354,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFractFloatFloat() {
@@ -386,8 +386,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFract(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -396,14 +396,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -445,8 +445,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFract(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -455,14 +455,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -504,8 +504,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFract(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -514,14 +514,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -563,8 +563,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFract(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFract(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -573,14 +573,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.java b/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.java
index 0ed1bd8..7258d3c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestFrexp.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatIntFloat {
public float inV;
public int outIptr;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkFrexpFloatIntFloat() {
@@ -75,8 +75,8 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFrexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
if (args.outIptr != arrayOutIptr[i * 1 + j]) {
@@ -88,7 +88,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outIptr: ");
@@ -104,7 +104,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -152,8 +152,8 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFrexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
if (args.outIptr != arrayOutIptr[i * 2 + j]) {
@@ -165,7 +165,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outIptr: ");
@@ -181,7 +181,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -229,8 +229,8 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFrexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
if (args.outIptr != arrayOutIptr[i * 4 + j]) {
@@ -242,7 +242,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outIptr: ");
@@ -258,7 +258,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -306,8 +306,8 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeFrexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeFrexp(args, target);
// Validate the outputs.
boolean valid = true;
if (args.outIptr != arrayOutIptr[i * 4 + j]) {
@@ -319,7 +319,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outIptr: ");
@@ -335,7 +335,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestHalfRecip.java b/tests/tests/renderscript/src/android/renderscript/cts/TestHalfRecip.java
index 1697e95..8d4f1b7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestHalfRecip.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestHalfRecip.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkHalfRecipFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfRecip(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfRecip(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfRecip(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfRecip(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfRecip(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfRecip(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfRecip(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfRecip(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestHalfRsqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestHalfRsqrt.java
index cdd67a3..5cd4e90 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestHalfRsqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestHalfRsqrt.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkHalfRsqrtFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestHalfSqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestHalfSqrt.java
index 3cac0d2..b57291d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestHalfSqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestHalfSqrt.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkHalfSqrtFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHalfSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHalfSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.java b/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.java
index 040418d..8aecdcd 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestHypot.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkHypotFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHypot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHypot(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHypot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHypot(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHypot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHypot(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeHypot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeHypot(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.java b/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.java
index d86d749..9bac16f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestIlogb.java
@@ -70,13 +70,12 @@
// Extract the outputs.
args.out = arrayOut[i * 1 + j];
// Ask the CoreMathVerifier to validate.
- Floaty.setRelaxed(relaxed);
- String errorMessage = CoreMathVerifier.verifyIlogb(args, relaxed);
+ String errorMessage = CoreMathVerifier.verifyIlogb(args);
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Output out: ");
@@ -121,13 +120,12 @@
// Extract the outputs.
args.out = arrayOut[i * 2 + j];
// Ask the CoreMathVerifier to validate.
- Floaty.setRelaxed(relaxed);
- String errorMessage = CoreMathVerifier.verifyIlogb(args, relaxed);
+ String errorMessage = CoreMathVerifier.verifyIlogb(args);
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Output out: ");
@@ -172,13 +170,12 @@
// Extract the outputs.
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
- Floaty.setRelaxed(relaxed);
- String errorMessage = CoreMathVerifier.verifyIlogb(args, relaxed);
+ String errorMessage = CoreMathVerifier.verifyIlogb(args);
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Output out: ");
@@ -223,13 +220,12 @@
// Extract the outputs.
args.out = arrayOut[i * 4 + j];
// Ask the CoreMathVerifier to validate.
- Floaty.setRelaxed(relaxed);
- String errorMessage = CoreMathVerifier.verifyIlogb(args, relaxed);
+ String errorMessage = CoreMathVerifier.verifyIlogb(args);
boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Output out: ");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.java
index 7c54ab1..3f3aee9 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLdexp.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatIntFloat {
public float inX;
public int inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLdexpFloatIntFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLdexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,7 +85,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -95,7 +95,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -143,8 +143,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLdexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -153,7 +153,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -163,7 +163,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -211,8 +211,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLdexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -221,7 +221,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -231,7 +231,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -279,8 +279,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLdexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -289,7 +289,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -299,7 +299,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -347,8 +347,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLdexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -357,7 +357,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -367,7 +367,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -415,8 +415,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLdexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -425,7 +425,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -435,7 +435,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -483,8 +483,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLdexp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLdexp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -493,7 +493,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -503,7 +503,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLength.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLength.java
index d509e9a..2d89536 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLength.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLength.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLengthFloatFloat() {
@@ -67,8 +67,8 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i], Float.floatToRawIntBits(arrayInV[i]), arrayInV[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -99,7 +99,7 @@
public class ArgumentsFloatNFloat {
public float[] inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLengthFloat2Float() {
@@ -133,8 +133,8 @@
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -145,7 +145,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 2 + j], Float.floatToRawIntBits(arrayInV[i * 2 + j]), arrayInV[i * 2 + j]));
message.append("\n");
}
@@ -153,7 +153,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -196,8 +196,8 @@
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -208,7 +208,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -216,7 +216,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -259,8 +259,8 @@
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -271,7 +271,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -279,7 +279,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.java
index a6581f1..8ec06e7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLgamma.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLgammaFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -278,7 +278,7 @@
public class ArgumentsFloatIntFloat {
public float inX;
public int outY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLgammaFloatIntFloat() {
@@ -316,8 +316,8 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inX = arrayInX[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (args.outY != arrayOutY[i * 1 + j]) {
@@ -329,7 +329,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output outY: ");
@@ -345,7 +345,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -393,8 +393,8 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inX = arrayInX[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (args.outY != arrayOutY[i * 2 + j]) {
@@ -406,7 +406,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output outY: ");
@@ -422,7 +422,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -470,8 +470,8 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (args.outY != arrayOutY[i * 4 + j]) {
@@ -483,7 +483,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output outY: ");
@@ -499,7 +499,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -547,8 +547,8 @@
ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (args.outY != arrayOutY[i * 4 + j]) {
@@ -560,7 +560,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output outY: ");
@@ -576,7 +576,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLog.java
index 9728636..8b4717c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLogFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.java
index 847cea3..5928090 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog10.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLog10FloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.java
index fadc9d1..019cffb 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog1p.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLog1pFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog1p(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog1p(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog1p(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog1p(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.java
index 61ea10f..92a4985 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLog2.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLog2FloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLog2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLog2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.java b/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.java
index 41e6f21..8679aa0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestLogb.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkLogbFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLogb(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLogb(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLogb(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLogb(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLogb(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLogb(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeLogb(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeLogb(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMad.java b/tests/tests/renderscript/src/android/renderscript/cts/TestMad.java
index 11ef35a..0ac029c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMad.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMad.java
@@ -38,7 +38,7 @@
public float inA;
public float inB;
public float inC;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkMadFloatFloatFloatFloat() {
@@ -82,8 +82,8 @@
args.inB = arrayInB[i];
args.inC = arrayInC[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMad(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMad(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -92,22 +92,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -161,8 +161,8 @@
args.inB = arrayInB[i * 2 + j];
args.inC = arrayInC[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMad(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMad(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -171,22 +171,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -240,8 +240,8 @@
args.inB = arrayInB[i * 4 + j];
args.inC = arrayInC[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMad(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMad(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -250,22 +250,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -319,8 +319,8 @@
args.inB = arrayInB[i * 4 + j];
args.inC = arrayInC[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMad(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMad(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -329,22 +329,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inA: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inA, Float.floatToRawIntBits(args.inA), args.inA));
message.append("\n");
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMax.java b/tests/tests/renderscript/src/android/renderscript/cts/TestMax.java
index 3ef9aeb..e52ef48 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMax.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMax.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float in;
public float in1;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkMaxFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.in = arrayIn[i];
args.in1 = arrayIn1[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Input in1: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in1, Float.floatToRawIntBits(args.in1), args.in1));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.in = arrayIn[i * 2 + j];
args.in1 = arrayIn1[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Input in1: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in1, Float.floatToRawIntBits(args.in1), args.in1));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.in = arrayIn[i * 4 + j];
args.in1 = arrayIn1[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Input in1: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in1, Float.floatToRawIntBits(args.in1), args.in1));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.in = arrayIn[i * 4 + j];
args.in1 = arrayIn1[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMax(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMax(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Input in1: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in1, Float.floatToRawIntBits(args.in1), args.in1));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -357,7 +357,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -423,7 +422,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -489,7 +487,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -555,7 +552,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -627,7 +623,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -693,7 +688,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -759,7 +753,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -825,7 +818,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -897,7 +889,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -963,7 +954,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1029,7 +1019,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1095,7 +1084,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1167,7 +1155,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1233,7 +1220,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1299,7 +1285,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1365,7 +1350,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1437,7 +1421,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1503,7 +1486,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1569,7 +1551,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1635,7 +1616,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1707,7 +1687,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1773,7 +1752,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1839,7 +1817,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1905,7 +1882,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -1977,7 +1953,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -2043,7 +2018,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -2109,7 +2083,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -2175,7 +2148,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -2247,7 +2219,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -2313,7 +2284,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -2379,7 +2349,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
@@ -2445,7 +2414,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMax(args);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestMin.java
index 6765c20..a04ef55 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMin.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float in;
public float in1;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkMinFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.in = arrayIn[i];
args.in1 = arrayIn1[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Input in1: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in1, Float.floatToRawIntBits(args.in1), args.in1));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.in = arrayIn[i * 2 + j];
args.in1 = arrayIn1[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Input in1: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in1, Float.floatToRawIntBits(args.in1), args.in1));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.in = arrayIn[i * 4 + j];
args.in1 = arrayIn1[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Input in1: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in1, Float.floatToRawIntBits(args.in1), args.in1));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.in = arrayIn[i * 4 + j];
args.in1 = arrayIn1[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Input in1: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in1, Float.floatToRawIntBits(args.in1), args.in1));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -357,7 +357,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -423,7 +422,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -489,7 +487,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -555,7 +552,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -627,7 +623,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -693,7 +688,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -759,7 +753,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -825,7 +818,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -897,7 +889,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -963,7 +954,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1029,7 +1019,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1095,7 +1084,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1167,7 +1155,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1233,7 +1220,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1299,7 +1285,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1365,7 +1350,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1437,7 +1421,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1503,7 +1486,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1569,7 +1551,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1635,7 +1616,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1707,7 +1687,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1773,7 +1752,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1839,7 +1817,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1905,7 +1882,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -1977,7 +1953,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -2043,7 +2018,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -2109,7 +2083,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -2175,7 +2148,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -2247,7 +2219,6 @@
args.inV1 = arrayInV1[i];
args.inV2 = arrayInV2[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -2313,7 +2284,6 @@
args.inV1 = arrayInV1[i * 2 + j];
args.inV2 = arrayInV2[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -2379,7 +2349,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
@@ -2445,7 +2414,6 @@
args.inV1 = arrayInV1[i * 4 + j];
args.inV2 = arrayInV2[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
CoreMathVerifier.computeMin(args);
// Validate the outputs.
boolean valid = true;
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestMix.java b/tests/tests/renderscript/src/android/renderscript/cts/TestMix.java
index adcea66..3500e41 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestMix.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestMix.java
@@ -38,7 +38,7 @@
public float inStart;
public float inStop;
public float inAmount;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkMixFloatFloatFloatFloat() {
@@ -82,8 +82,8 @@
args.inStop = arrayInStop[i];
args.inAmount = arrayInAmount[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMix(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -92,22 +92,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inStart: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStart, Float.floatToRawIntBits(args.inStart), args.inStart));
message.append("\n");
message.append("Input inStop: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
message.append("Input inAmount: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -161,8 +161,8 @@
args.inStop = arrayInStop[i * 2 + j];
args.inAmount = arrayInAmount[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMix(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -171,22 +171,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inStart: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStart, Float.floatToRawIntBits(args.inStart), args.inStart));
message.append("\n");
message.append("Input inStop: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
message.append("Input inAmount: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -240,8 +240,8 @@
args.inStop = arrayInStop[i * 4 + j];
args.inAmount = arrayInAmount[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMix(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -250,22 +250,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inStart: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStart, Float.floatToRawIntBits(args.inStart), args.inStart));
message.append("\n");
message.append("Input inStop: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
message.append("Input inAmount: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -319,8 +319,8 @@
args.inStop = arrayInStop[i * 4 + j];
args.inAmount = arrayInAmount[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMix(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -329,22 +329,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inStart: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStart, Float.floatToRawIntBits(args.inStart), args.inStart));
message.append("\n");
message.append("Input inStop: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
message.append("Input inAmount: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -398,8 +398,8 @@
args.inStop = arrayInStop[i * 2 + j];
args.inAmount = arrayInAmount[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMix(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -408,22 +408,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inStart: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStart, Float.floatToRawIntBits(args.inStart), args.inStart));
message.append("\n");
message.append("Input inStop: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
message.append("Input inAmount: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -477,8 +477,8 @@
args.inStop = arrayInStop[i * 4 + j];
args.inAmount = arrayInAmount[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMix(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -487,22 +487,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inStart: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStart, Float.floatToRawIntBits(args.inStart), args.inStart));
message.append("\n");
message.append("Input inStop: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
message.append("Input inAmount: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -556,8 +556,8 @@
args.inStop = arrayInStop[i * 4 + j];
args.inAmount = arrayInAmount[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeMix(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeMix(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -566,22 +566,22 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inStart: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStart, Float.floatToRawIntBits(args.inStart), args.inStart));
message.append("\n");
message.append("Input inStop: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inStop, Float.floatToRawIntBits(args.inStop), args.inStop));
message.append("\n");
message.append("Input inAmount: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inAmount, Float.floatToRawIntBits(args.inAmount), args.inAmount));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestModf.java b/tests/tests/renderscript/src/android/renderscript/cts/TestModf.java
index bffe9b9..25d7765 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestModf.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestModf.java
@@ -36,8 +36,8 @@
public class ArgumentsFloatFloatFloat {
public float inX;
- public Floaty outIret;
- public Floaty out;
+ public Target.Floaty outIret;
+ public Target.Floaty out;
}
private void checkModfFloatFloatFloat() {
@@ -75,8 +75,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inX = arrayInX[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeModf(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outIret.couldBe(arrayOutIret[i * 1 + j])) {
@@ -88,14 +88,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output outIret: ");
message.append(args.outIret.toString());
message.append("\n");
message.append("Actual output outIret: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutIret[i * 1 + j], Float.floatToRawIntBits(arrayOutIret[i * 1 + j]), arrayOutIret[i * 1 + j]));
if (!args.outIret.couldBe(arrayOutIret[i * 1 + j])) {
message.append(" FAIL");
@@ -105,7 +105,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -153,8 +153,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inX = arrayInX[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeModf(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outIret.couldBe(arrayOutIret[i * 2 + j])) {
@@ -166,14 +166,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output outIret: ");
message.append(args.outIret.toString());
message.append("\n");
message.append("Actual output outIret: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutIret[i * 2 + j], Float.floatToRawIntBits(arrayOutIret[i * 2 + j]), arrayOutIret[i * 2 + j]));
if (!args.outIret.couldBe(arrayOutIret[i * 2 + j])) {
message.append(" FAIL");
@@ -183,7 +183,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -231,8 +231,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeModf(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outIret.couldBe(arrayOutIret[i * 4 + j])) {
@@ -244,14 +244,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output outIret: ");
message.append(args.outIret.toString());
message.append("\n");
message.append("Actual output outIret: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutIret[i * 4 + j], Float.floatToRawIntBits(arrayOutIret[i * 4 + j]), arrayOutIret[i * 4 + j]));
if (!args.outIret.couldBe(arrayOutIret[i * 4 + j])) {
message.append(" FAIL");
@@ -261,7 +261,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -309,8 +309,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeModf(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeModf(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outIret.couldBe(arrayOutIret[i * 4 + j])) {
@@ -322,14 +322,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output outIret: ");
message.append(args.outIret.toString());
message.append("\n");
message.append("Actual output outIret: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutIret[i * 4 + j], Float.floatToRawIntBits(arrayOutIret[i * 4 + j]), arrayOutIret[i * 4 + j]));
if (!args.outIret.couldBe(arrayOutIret[i * 4 + j])) {
message.append(" FAIL");
@@ -339,7 +339,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNan.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNan.java
index f00b951..1be946d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNan.java
@@ -36,7 +36,7 @@
public class ArgumentsUintFloat {
public int in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNanUintFloat() {
@@ -68,8 +68,8 @@
ArgumentsUintFloat args = new ArgumentsUintFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -84,7 +84,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcos.java
index 793f609..bda06c7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcos.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAcosFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.java
index ae56fcf..7e84c96 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcosh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAcoshFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcospi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcospi.java
index b8adf58..75a29ae 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAcospi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAcospiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAcospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAcospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsin.java
index 95a4980..30bab7e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsin.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAsinFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.java
index 830140e..8edf947 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAsinhFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinpi.java
index 04824d8..08eb07d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAsinpi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAsinpiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAsinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAsinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan.java
index c60520c..316eb6d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAtanFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.java
index 6d3fca7..5ca8f05 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inY;
public float inX;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAtan2FloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inY = arrayInY[i];
args.inX = arrayInX[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inY = arrayInY[i * 2 + j];
args.inX = arrayInX[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inY = arrayInY[i * 4 + j];
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inY = arrayInY[i * 4 + j];
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.java
index 1cb13e7..f05d924 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtan2pi.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inY;
public float inX;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAtan2piFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inY = arrayInY[i];
args.inX = arrayInX[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan2pi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inY = arrayInY[i * 2 + j];
args.inX = arrayInX[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan2pi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inY = arrayInY[i * 4 + j];
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan2pi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inY = arrayInY[i * 4 + j];
args.inX = arrayInX[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtan2pi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtan2pi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.java
index b6a6f4e..95f4704 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanh.java
@@ -35,41 +35,41 @@
}
public class ArgumentsFloatFloat {
- public float in;
- public Floaty out;
+ public float inIn;
+ public Target.Floaty out;
}
private void checkNativeAtanhFloatFloat() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x66daa6c24cd0610al, false);
+ Allocation inIn = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0xe13e715ccd0cedebl, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- script.forEach_testNativeAtanhFloatFloat(in, out);
- verifyResultsNativeAtanhFloatFloat(in, out, false);
+ script.forEach_testNativeAtanhFloatFloat(inIn, out);
+ verifyResultsNativeAtanhFloatFloat(inIn, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloatFloat: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAtanhFloatFloat(in, out);
- verifyResultsNativeAtanhFloatFloat(in, out, true);
+ scriptRelaxed.forEach_testNativeAtanhFloatFloat(inIn, out);
+ verifyResultsNativeAtanhFloatFloat(inIn, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloatFloat: " + e.toString());
}
}
- private void verifyResultsNativeAtanhFloatFloat(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 1];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAtanhFloatFloat(Allocation inIn, Allocation out, boolean relaxed) {
+ float[] arrayInIn = new float[INPUTSIZE * 1];
+ inIn.copyTo(arrayInIn);
float[] arrayOut = new float[INPUTSIZE * 1];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 1 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i];
+ args.inIn = arrayInIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -77,15 +77,15 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ message.append("Input inIn: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inIn, Float.floatToRawIntBits(args.inIn), args.inIn));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -99,36 +99,36 @@
}
private void checkNativeAtanhFloat2Float2() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xe13d93587e455c56l, false);
+ Allocation inIn = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xd5bd3a2802f7f5d7l, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- script.forEach_testNativeAtanhFloat2Float2(in, out);
- verifyResultsNativeAtanhFloat2Float2(in, out, false);
+ script.forEach_testNativeAtanhFloat2Float2(inIn, out);
+ verifyResultsNativeAtanhFloat2Float2(inIn, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat2Float2: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAtanhFloat2Float2(in, out);
- verifyResultsNativeAtanhFloat2Float2(in, out, true);
+ scriptRelaxed.forEach_testNativeAtanhFloat2Float2(inIn, out);
+ verifyResultsNativeAtanhFloat2Float2(inIn, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat2Float2: " + e.toString());
}
}
- private void verifyResultsNativeAtanhFloat2Float2(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 2];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAtanhFloat2Float2(Allocation inIn, Allocation out, boolean relaxed) {
+ float[] arrayInIn = new float[INPUTSIZE * 2];
+ inIn.copyTo(arrayInIn);
float[] arrayOut = new float[INPUTSIZE * 2];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 2 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 2 + j];
+ args.inIn = arrayInIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -136,15 +136,15 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ message.append("Input inIn: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inIn, Float.floatToRawIntBits(args.inIn), args.inIn));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -158,36 +158,36 @@
}
private void checkNativeAtanhFloat3Float3() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xe13d9df9dd4bf1f0l, false);
+ Allocation inIn = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0xd60a01af59867b21l, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- script.forEach_testNativeAtanhFloat3Float3(in, out);
- verifyResultsNativeAtanhFloat3Float3(in, out, false);
+ script.forEach_testNativeAtanhFloat3Float3(inIn, out);
+ verifyResultsNativeAtanhFloat3Float3(inIn, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat3Float3: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAtanhFloat3Float3(in, out);
- verifyResultsNativeAtanhFloat3Float3(in, out, true);
+ scriptRelaxed.forEach_testNativeAtanhFloat3Float3(inIn, out);
+ verifyResultsNativeAtanhFloat3Float3(inIn, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat3Float3: " + e.toString());
}
}
- private void verifyResultsNativeAtanhFloat3Float3(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAtanhFloat3Float3(Allocation inIn, Allocation out, boolean relaxed) {
+ float[] arrayInIn = new float[INPUTSIZE * 4];
+ inIn.copyTo(arrayInIn);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 3 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inIn = arrayInIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -195,15 +195,15 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ message.append("Input inIn: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inIn, Float.floatToRawIntBits(args.inIn), args.inIn));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -217,36 +217,36 @@
}
private void checkNativeAtanhFloat4Float4() {
- Allocation in = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xe13da89b3c52878al, false);
+ Allocation inIn = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0xd656c936b015006bl, -1, 1);
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- script.forEach_testNativeAtanhFloat4Float4(in, out);
- verifyResultsNativeAtanhFloat4Float4(in, out, false);
+ script.forEach_testNativeAtanhFloat4Float4(inIn, out);
+ verifyResultsNativeAtanhFloat4Float4(inIn, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat4Float4: " + e.toString());
}
try {
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
- scriptRelaxed.forEach_testNativeAtanhFloat4Float4(in, out);
- verifyResultsNativeAtanhFloat4Float4(in, out, true);
+ scriptRelaxed.forEach_testNativeAtanhFloat4Float4(inIn, out);
+ verifyResultsNativeAtanhFloat4Float4(inIn, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeAtanhFloat4Float4: " + e.toString());
}
}
- private void verifyResultsNativeAtanhFloat4Float4(Allocation in, Allocation out, boolean relaxed) {
- float[] arrayIn = new float[INPUTSIZE * 4];
- in.copyTo(arrayIn);
+ private void verifyResultsNativeAtanhFloat4Float4(Allocation inIn, Allocation out, boolean relaxed) {
+ float[] arrayInIn = new float[INPUTSIZE * 4];
+ inIn.copyTo(arrayInIn);
float[] arrayOut = new float[INPUTSIZE * 4];
out.copyTo(arrayOut);
for (int i = 0; i < INPUTSIZE; i++) {
for (int j = 0; j < 4 ; j++) {
// Extract the inputs.
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
- args.in = arrayIn[i * 4 + j];
+ args.inIn = arrayInIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -254,15 +254,15 @@
}
if (!valid) {
StringBuilder message = new StringBuilder();
- message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
- args.in, Float.floatToRawIntBits(args.in), args.in));
+ message.append("Input inIn: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inIn, Float.floatToRawIntBits(args.inIn), args.inIn));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanpi.java
index 0a17823..bd07ad8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeAtanpi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeAtanpiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeAtanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeAtanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.java
index 2f11069..cd6a030 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCbrt.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeCbrtFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCbrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCbrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCbrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCbrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCbrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.java
index 347f96a..d7c9ebf 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCos.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeCosFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.java
index a3ba2df..4e841c6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCosh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeCoshFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCosh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCosh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.java
index 0136d45..ab5065b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeCospi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeCospiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeCospi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeCospi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.java
index 975910e..360da34 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDistance.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inLhs;
public float inRhs;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeDistanceFloatFloatFloat() {
@@ -74,8 +74,8 @@
// Fill args with the input values
args.inLhs = arrayInLhs[i];
args.inRhs = arrayInRhs[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i], Float.floatToRawIntBits(arrayInLhs[i]), arrayInLhs[i]));
message.append("\n");
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i], Float.floatToRawIntBits(arrayInRhs[i]), arrayInRhs[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -111,7 +111,7 @@
public class ArgumentsFloatNFloatNFloat {
public float[] inLhs;
public float[] inRhs;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeDistanceFloat2Float2Float() {
@@ -154,8 +154,8 @@
for (int j = 0; j < 2 ; j++) {
args.inRhs[j] = arrayInRhs[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -166,13 +166,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 2 + j], Float.floatToRawIntBits(arrayInLhs[i * 2 + j]), arrayInLhs[i * 2 + j]));
message.append("\n");
}
for (int j = 0; j < 2 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 2 + j], Float.floatToRawIntBits(arrayInRhs[i * 2 + j]), arrayInRhs[i * 2 + j]));
message.append("\n");
}
@@ -180,7 +180,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -232,8 +232,8 @@
for (int j = 0; j < 3 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -244,13 +244,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 3 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -258,7 +258,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -310,8 +310,8 @@
for (int j = 0; j < 4 ; j++) {
args.inRhs[j] = arrayInRhs[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeDistance(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeDistance(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -322,13 +322,13 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInLhs[i * 4 + j], Float.floatToRawIntBits(arrayInLhs[i * 4 + j]), arrayInLhs[i * 4 + j]));
message.append("\n");
}
for (int j = 0; j < 4 ; j++) {
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInRhs[i * 4 + j], Float.floatToRawIntBits(arrayInRhs[i * 4 + j]), arrayInRhs[i * 4 + j]));
message.append("\n");
}
@@ -336,7 +336,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.java
index e77a9cf..c546724 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeDivide.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inLhs;
public float inRhs;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeDivideFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inLhs = arrayInLhs[i];
args.inRhs = arrayInRhs[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeDivide(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeDivide(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inLhs, Float.floatToRawIntBits(args.inLhs), args.inLhs));
message.append("\n");
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inRhs, Float.floatToRawIntBits(args.inRhs), args.inRhs));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inLhs = arrayInLhs[i * 2 + j];
args.inRhs = arrayInRhs[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeDivide(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeDivide(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inLhs, Float.floatToRawIntBits(args.inLhs), args.inLhs));
message.append("\n");
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inRhs, Float.floatToRawIntBits(args.inRhs), args.inRhs));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inLhs = arrayInLhs[i * 4 + j];
args.inRhs = arrayInRhs[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeDivide(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeDivide(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inLhs, Float.floatToRawIntBits(args.inLhs), args.inLhs));
message.append("\n");
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inRhs, Float.floatToRawIntBits(args.inRhs), args.inRhs));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inLhs = arrayInLhs[i * 4 + j];
args.inRhs = arrayInRhs[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeDivide(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeDivide(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inLhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inLhs, Float.floatToRawIntBits(args.inLhs), args.inLhs));
message.append("\n");
message.append("Input inRhs: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inRhs, Float.floatToRawIntBits(args.inRhs), args.inRhs));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp.java
index 4f20a41..3c9a847 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeExpFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp10.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp10.java
index b6443c0..75eb8df 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp10.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeExp10FloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp10(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp2.java
index f1939ee..bb0e9b3 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExp2.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeExp2FloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExp2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExp2(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.java
index 4b8b102..3eecc32 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeExpm1.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeExpm1FloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExpm1(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExpm1(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExpm1(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeExpm1(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeExpm1(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.java
index b3538d5..0a50675 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeHypot.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeHypotFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeHypot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeHypot(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeHypot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeHypot(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeHypot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeHypot(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeHypot(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeHypot(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLength.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLength.java
index fcba1bc..b3a5df6 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLength.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLength.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeLengthFloatFloat() {
@@ -67,8 +67,8 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i], Float.floatToRawIntBits(arrayInV[i]), arrayInV[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -99,7 +99,7 @@
public class ArgumentsFloatNFloat {
public float[] inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeLengthFloat2Float() {
@@ -133,8 +133,8 @@
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -145,7 +145,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 2 + j], Float.floatToRawIntBits(arrayInV[i * 2 + j]), arrayInV[i * 2 + j]));
message.append("\n");
}
@@ -153,7 +153,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -196,8 +196,8 @@
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -208,7 +208,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -216,7 +216,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -259,8 +259,8 @@
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLength(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLength(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -271,7 +271,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -279,7 +279,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog.java
index 3cbd176..4116cba 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeLogFloatFloat() {
@@ -68,26 +68,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 1 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
- if (!args.out.couldBe(arrayOut[i * 1 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -127,26 +127,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 2 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
- if (!args.out.couldBe(arrayOut[i * 2 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -186,26 +186,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -245,26 +245,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog10.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog10.java
index 33bf7a6..9a64239 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog10.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog10.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeLog10FloatFloat() {
@@ -68,26 +68,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog10(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 1 + j], 0.00005)) {
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
- if (!args.out.couldBe(arrayOut[i * 1 + j], 0.00005)) {
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -127,26 +127,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog10(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 2 + j], 0.00005)) {
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
- if (!args.out.couldBe(arrayOut[i * 2 + j], 0.00005)) {
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -186,26 +186,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog10(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.00005)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.00005)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -245,26 +245,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog10(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog10(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.00005)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.00005)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.java
index 60cb122..0d88a75 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog1p.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeLog1pFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog1p(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog1p(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog1p(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog1p(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog1p(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog2.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog2.java
index 5e85550..674abb7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog2.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeLog2.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeLog2FloatFloat() {
@@ -68,26 +68,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog2(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 1 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
- if (!args.out.couldBe(arrayOut[i * 1 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -127,26 +127,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog2(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 2 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
- if (!args.out.couldBe(arrayOut[i * 2 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -186,26 +186,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog2(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
@@ -245,26 +245,26 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeLog2(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeLog2(args, target);
// Validate the outputs.
boolean valid = true;
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
valid = false;
}
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
- if (!args.out.couldBe(arrayOut[i * 4 + j], 0.0002)) {
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
}
message.append("\n");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeNormalize.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeNormalize.java
index 2873998..42f4553 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeNormalize.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeNormalize.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeNormalizeFloatFloat() {
@@ -67,8 +67,8 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i], Float.floatToRawIntBits(arrayInV[i]), arrayInV[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -99,7 +99,7 @@
public class ArgumentsFloatNFloatN {
public float[] inV;
- public Floaty[] out;
+ public Target.Floaty[] out;
}
private void checkNativeNormalizeFloat2Float2() {
@@ -129,13 +129,13 @@
ArgumentsFloatNFloatN args = new ArgumentsFloatNFloatN();
// Create the appropriate sized arrays in args
args.inV = new float[2];
- args.out = new Floaty[2];
+ args.out = new Target.Floaty[2];
// Fill args with the input values
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -148,7 +148,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 2 + j], Float.floatToRawIntBits(arrayInV[i * 2 + j]), arrayInV[i * 2 + j]));
message.append("\n");
}
@@ -157,7 +157,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out[j].couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -197,13 +197,13 @@
ArgumentsFloatNFloatN args = new ArgumentsFloatNFloatN();
// Create the appropriate sized arrays in args
args.inV = new float[3];
- args.out = new Floaty[3];
+ args.out = new Target.Floaty[3];
// Fill args with the input values
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -216,7 +216,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -225,7 +225,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out[j].couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -265,13 +265,13 @@
ArgumentsFloatNFloatN args = new ArgumentsFloatNFloatN();
// Create the appropriate sized arrays in args
args.inV = new float[4];
- args.out = new Floaty[4];
+ args.out = new Target.Floaty[4];
// Fill args with the input values
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -284,7 +284,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -293,7 +293,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out[j].couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.java
index 640f1af..f19d80c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativePowr.java
@@ -34,6 +34,12 @@
scriptRelaxed = new ScriptC_TestNativePowrRelaxed(mRS);
}
+ public class ArgumentsFloatFloatFloat {
+ public float inV;
+ public float inY;
+ public Target.Floaty out;
+ }
+
private void checkNativePowrFloatFloatFloat() {
Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3c3550bdff7a10c2l, 0, 256);
Allocation inY = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x3c3550bdff7a10c5l, -15, 15);
@@ -41,6 +47,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
script.set_gAllocInY(inY);
script.forEach_testNativePowrFloatFloatFloat(inV, out);
+ verifyResultsNativePowrFloatFloatFloat(inV, inY, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloatFloatFloat: " + e.toString());
}
@@ -48,11 +55,60 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
scriptRelaxed.set_gAllocInY(inY);
scriptRelaxed.forEach_testNativePowrFloatFloatFloat(inV, out);
+ verifyResultsNativePowrFloatFloatFloat(inV, inY, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloatFloatFloat: " + e.toString());
}
}
+ private void verifyResultsNativePowrFloatFloatFloat(Allocation inV, Allocation inY, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
+ float[] arrayInY = new float[INPUTSIZE * 1];
+ inY.copyTo(arrayInY);
+ float[] arrayOut = new float[INPUTSIZE * 1];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 1 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
+ args.inV = arrayInV[i];
+ args.inY = arrayInY[i];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativePowr(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inY: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkNativePowrFloatFloatFloat" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
private void checkNativePowrFloat2Float2Float2() {
Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdbc56fbe7733c926l, 0, 256);
Allocation inY = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 2, 0xdbc56fbe7733c929l, -15, 15);
@@ -60,6 +116,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
script.set_gAllocInY(inY);
script.forEach_testNativePowrFloat2Float2Float2(inV, out);
+ verifyResultsNativePowrFloat2Float2Float2(inV, inY, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat2Float2Float2: " + e.toString());
}
@@ -67,11 +124,60 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
scriptRelaxed.set_gAllocInY(inY);
scriptRelaxed.forEach_testNativePowrFloat2Float2Float2(inV, out);
+ verifyResultsNativePowrFloat2Float2Float2(inV, inY, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat2Float2Float2: " + e.toString());
}
}
+ private void verifyResultsNativePowrFloat2Float2Float2(Allocation inV, Allocation inY, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
+ float[] arrayInY = new float[INPUTSIZE * 2];
+ inY.copyTo(arrayInY);
+ float[] arrayOut = new float[INPUTSIZE * 2];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 2 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
+ args.inV = arrayInV[i * 2 + j];
+ args.inY = arrayInY[i * 2 + j];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativePowr(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inY: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkNativePowrFloat2Float2Float2" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
private void checkNativePowrFloat3Float3Float3() {
Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x302a4dde7911cac7l, 0, 256);
Allocation inY = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x302a4dde7911cacal, -15, 15);
@@ -79,6 +185,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
script.set_gAllocInY(inY);
script.forEach_testNativePowrFloat3Float3Float3(inV, out);
+ verifyResultsNativePowrFloat3Float3Float3(inV, inY, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat3Float3Float3: " + e.toString());
}
@@ -86,11 +193,60 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
scriptRelaxed.set_gAllocInY(inY);
scriptRelaxed.forEach_testNativePowrFloat3Float3Float3(inV, out);
+ verifyResultsNativePowrFloat3Float3Float3(inV, inY, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat3Float3Float3: " + e.toString());
}
}
+ private void verifyResultsNativePowrFloat3Float3Float3(Allocation inV, Allocation inY, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ float[] arrayInY = new float[INPUTSIZE * 4];
+ inY.copyTo(arrayInY);
+ float[] arrayOut = new float[INPUTSIZE * 4];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 3 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
+ args.inV = arrayInV[i * 4 + j];
+ args.inY = arrayInY[i * 4 + j];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativePowr(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inY: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkNativePowrFloat3Float3Float3" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
private void checkNativePowrFloat4Float4Float4() {
Allocation inV = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x848f2bfe7aefcc68l, 0, 256);
Allocation inY = createRandomFloatAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x848f2bfe7aefcc6bl, -15, 15);
@@ -98,6 +254,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
script.set_gAllocInY(inY);
script.forEach_testNativePowrFloat4Float4Float4(inV, out);
+ verifyResultsNativePowrFloat4Float4Float4(inV, inY, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat4Float4Float4: " + e.toString());
}
@@ -105,11 +262,60 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
scriptRelaxed.set_gAllocInY(inY);
scriptRelaxed.forEach_testNativePowrFloat4Float4Float4(inV, out);
+ verifyResultsNativePowrFloat4Float4Float4(inV, inY, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativePowrFloat4Float4Float4: " + e.toString());
}
}
+ private void verifyResultsNativePowrFloat4Float4Float4(Allocation inV, Allocation inY, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ float[] arrayInY = new float[INPUTSIZE * 4];
+ inY.copyTo(arrayInY);
+ float[] arrayOut = new float[INPUTSIZE * 4];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 4 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
+ args.inV = arrayInV[i * 4 + j];
+ args.inY = arrayInY[i * 4 + j];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativePowr(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inY: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inY, Float.floatToRawIntBits(args.inY), args.inY));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkNativePowrFloat4Float4Float4" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
public void testNativePowr() {
checkNativePowrFloatFloatFloat();
checkNativePowrFloat2Float2Float2();
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRecip.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRecip.java
index bef9efe..976526b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRecip.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRecip.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeRecipFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeRecip(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRecip(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeRecip(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRecip(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeRecip(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRecip(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeRecip(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRecip(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRootn.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRootn.java
index 3d0320e..d125e3b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRootn.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRootn.java
@@ -34,6 +34,12 @@
scriptRelaxed = new ScriptC_TestNativeRootnRelaxed(mRS);
}
+ public class ArgumentsFloatIntFloat {
+ public float inV;
+ public int inN;
+ public Target.Floaty out;
+ }
+
private void checkNativeRootnFloatIntFloat() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x6693fe5c237ac0f1l, false);
Allocation inN = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x6693fe5c237ac0e9l, false);
@@ -41,6 +47,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
script.set_gAllocInN(inN);
script.forEach_testNativeRootnFloatIntFloat(inV, out);
+ verifyResultsNativeRootnFloatIntFloat(inV, inN, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRootnFloatIntFloat: " + e.toString());
}
@@ -48,11 +55,59 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
scriptRelaxed.set_gAllocInN(inN);
scriptRelaxed.forEach_testNativeRootnFloatIntFloat(inV, out);
+ verifyResultsNativeRootnFloatIntFloat(inV, inN, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRootnFloatIntFloat: " + e.toString());
}
}
+ private void verifyResultsNativeRootnFloatIntFloat(Allocation inV, Allocation inN, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
+ int[] arrayInN = new int[INPUTSIZE * 1];
+ inN.copyTo(arrayInN);
+ float[] arrayOut = new float[INPUTSIZE * 1];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 1 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
+ args.inV = arrayInV[i];
+ args.inN = arrayInN[i];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRootn(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inN: ");
+ message.append(String.format("%d", args.inN));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkNativeRootnFloatIntFloat" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
private void checkNativeRootnFloat2Int2Float2() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x5363e8c04afd5bcdl, false);
Allocation inN = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x5363e8c04afd5bc5l, false);
@@ -60,6 +115,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
script.set_gAllocInN(inN);
script.forEach_testNativeRootnFloat2Int2Float2(inV, out);
+ verifyResultsNativeRootnFloat2Int2Float2(inV, inN, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRootnFloat2Int2Float2: " + e.toString());
}
@@ -67,11 +123,59 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
scriptRelaxed.set_gAllocInN(inN);
scriptRelaxed.forEach_testNativeRootnFloat2Int2Float2(inV, out);
+ verifyResultsNativeRootnFloat2Int2Float2(inV, inN, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRootnFloat2Int2Float2: " + e.toString());
}
}
+ private void verifyResultsNativeRootnFloat2Int2Float2(Allocation inV, Allocation inN, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
+ int[] arrayInN = new int[INPUTSIZE * 2];
+ inN.copyTo(arrayInN);
+ float[] arrayOut = new float[INPUTSIZE * 2];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 2 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
+ args.inV = arrayInV[i * 2 + j];
+ args.inN = arrayInN[i * 2 + j];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRootn(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inN: ");
+ message.append(String.format("%d", args.inN));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkNativeRootnFloat2Int2Float2" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
private void checkNativeRootnFloat3Int3Float3() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x791a272340afc886l, false);
Allocation inN = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0x791a272340afc87el, false);
@@ -79,6 +183,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
script.set_gAllocInN(inN);
script.forEach_testNativeRootnFloat3Int3Float3(inV, out);
+ verifyResultsNativeRootnFloat3Int3Float3(inV, inN, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRootnFloat3Int3Float3: " + e.toString());
}
@@ -86,11 +191,59 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
scriptRelaxed.set_gAllocInN(inN);
scriptRelaxed.forEach_testNativeRootnFloat3Int3Float3(inV, out);
+ verifyResultsNativeRootnFloat3Int3Float3(inV, inN, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRootnFloat3Int3Float3: " + e.toString());
}
}
+ private void verifyResultsNativeRootnFloat3Int3Float3(Allocation inV, Allocation inN, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ int[] arrayInN = new int[INPUTSIZE * 4];
+ inN.copyTo(arrayInN);
+ float[] arrayOut = new float[INPUTSIZE * 4];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 3 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
+ args.inV = arrayInV[i * 4 + j];
+ args.inN = arrayInN[i * 4 + j];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRootn(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inN: ");
+ message.append(String.format("%d", args.inN));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkNativeRootnFloat3Int3Float3" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
private void checkNativeRootnFloat4Int4Float4() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x9ed065863662353fl, false);
Allocation inN = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x9ed0658636623537l, false);
@@ -98,6 +251,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
script.set_gAllocInN(inN);
script.forEach_testNativeRootnFloat4Int4Float4(inV, out);
+ verifyResultsNativeRootnFloat4Int4Float4(inV, inN, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRootnFloat4Int4Float4: " + e.toString());
}
@@ -105,11 +259,59 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
scriptRelaxed.set_gAllocInN(inN);
scriptRelaxed.forEach_testNativeRootnFloat4Int4Float4(inV, out);
+ verifyResultsNativeRootnFloat4Int4Float4(inV, inN, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testNativeRootnFloat4Int4Float4: " + e.toString());
}
}
+ private void verifyResultsNativeRootnFloat4Int4Float4(Allocation inV, Allocation inN, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ int[] arrayInN = new int[INPUTSIZE * 4];
+ inN.copyTo(arrayInN);
+ float[] arrayOut = new float[INPUTSIZE * 4];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 4 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
+ args.inV = arrayInV[i * 4 + j];
+ args.inN = arrayInN[i * 4 + j];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRootn(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inN: ");
+ message.append(String.format("%d", args.inN));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkNativeRootnFloat4Int4Float4" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
public void testNativeRootn() {
checkNativeRootnFloatIntFloat();
checkNativeRootnFloat2Int2Float2();
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.java
index 99c30ff..fc2549d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeRsqrt.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeRsqrtFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.java
index 1399f7e..1637326 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSin.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeSinFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.java
index 7cb57cb..c497ed0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSincos.java
@@ -36,8 +36,8 @@
public class ArgumentsFloatFloatFloat {
public float inV;
- public Floaty outCosptr;
- public Floaty out;
+ public Target.Floaty outCosptr;
+ public Target.Floaty out;
}
private void checkNativeSincosFloatFloatFloat() {
@@ -75,8 +75,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSincos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 1 + j])) {
@@ -88,14 +88,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outCosptr: ");
message.append(args.outCosptr.toString());
message.append("\n");
message.append("Actual output outCosptr: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutCosptr[i * 1 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 1 + j]), arrayOutCosptr[i * 1 + j]));
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 1 + j])) {
message.append(" FAIL");
@@ -105,7 +105,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -153,8 +153,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSincos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 2 + j])) {
@@ -166,14 +166,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outCosptr: ");
message.append(args.outCosptr.toString());
message.append("\n");
message.append("Actual output outCosptr: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutCosptr[i * 2 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 2 + j]), arrayOutCosptr[i * 2 + j]));
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 2 + j])) {
message.append(" FAIL");
@@ -183,7 +183,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -231,8 +231,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSincos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
@@ -244,14 +244,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outCosptr: ");
message.append(args.outCosptr.toString());
message.append("\n");
message.append("Actual output outCosptr: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutCosptr[i * 4 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 4 + j]), arrayOutCosptr[i * 4 + j]));
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
message.append(" FAIL");
@@ -261,7 +261,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -309,8 +309,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSincos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSincos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
@@ -322,14 +322,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outCosptr: ");
message.append(args.outCosptr.toString());
message.append("\n");
message.append("Actual output outCosptr: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutCosptr[i * 4 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 4 + j]), arrayOutCosptr[i * 4 + j]));
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
message.append(" FAIL");
@@ -339,7 +339,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.java
index e94b6a0..9c2edc7 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeSinhFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.java
index 61e550f..2f67e8e 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSinpi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeSinpiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.java
index a16ea4e..edb07bc 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeSqrt.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeSqrtFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.java
index 084bfeb..cd51a53 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTan.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeTanFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.java
index 4b335d3..0b69e5f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeTanhFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.java
index 00b9ca1..1d9b538 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNativeTanpi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNativeTanpiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNativeTanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNativeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.java
index 00381cf..df69e42 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNextafter.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNextafterFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNextafter(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNextafter(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNextafter(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNextafter(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNextafter(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNextafter(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNextafter(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNextafter(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestNormalize.java b/tests/tests/renderscript/src/android/renderscript/cts/TestNormalize.java
index 137d807..0d71ec5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestNormalize.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestNormalize.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkNormalizeFloatFloat() {
@@ -67,8 +67,8 @@
// Create the appropriate sized arrays in args
// Fill args with the input values
args.inV = arrayInV[i];
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i], Float.floatToRawIntBits(arrayInV[i]), arrayInV[i]));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i], Float.floatToRawIntBits(arrayOut[i]), arrayOut[i]));
if (!args.out.couldBe(arrayOut[i])) {
message.append(" FAIL");
@@ -99,7 +99,7 @@
public class ArgumentsFloatNFloatN {
public float[] inV;
- public Floaty[] out;
+ public Target.Floaty[] out;
}
private void checkNormalizeFloat2Float2() {
@@ -129,13 +129,13 @@
ArgumentsFloatNFloatN args = new ArgumentsFloatNFloatN();
// Create the appropriate sized arrays in args
args.inV = new float[2];
- args.out = new Floaty[2];
+ args.out = new Target.Floaty[2];
// Fill args with the input values
for (int j = 0; j < 2 ; j++) {
args.inV[j] = arrayInV[i * 2 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -148,7 +148,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 2 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 2 + j], Float.floatToRawIntBits(arrayInV[i * 2 + j]), arrayInV[i * 2 + j]));
message.append("\n");
}
@@ -157,7 +157,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out[j].couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -197,13 +197,13 @@
ArgumentsFloatNFloatN args = new ArgumentsFloatNFloatN();
// Create the appropriate sized arrays in args
args.inV = new float[3];
- args.out = new Floaty[3];
+ args.out = new Target.Floaty[3];
// Fill args with the input values
for (int j = 0; j < 3 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -216,7 +216,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 3 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -225,7 +225,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out[j].couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -265,13 +265,13 @@
ArgumentsFloatNFloatN args = new ArgumentsFloatNFloatN();
// Create the appropriate sized arrays in args
args.inV = new float[4];
- args.out = new Floaty[4];
+ args.out = new Target.Floaty[4];
// Fill args with the input values
for (int j = 0; j < 4 ; j++) {
args.inV[j] = arrayInV[i * 4 + j];
}
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeNormalize(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeNormalize(args, target);
// Compare the expected outputs to the actual values returned by RS.
boolean valid = true;
@@ -284,7 +284,7 @@
StringBuilder message = new StringBuilder();
for (int j = 0; j < 4 ; j++) {
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayInV[i * 4 + j], Float.floatToRawIntBits(arrayInV[i * 4 + j]), arrayInV[i * 4 + j]));
message.append("\n");
}
@@ -293,7 +293,7 @@
message.append(args.out[j].toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out[j].couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestPow.java b/tests/tests/renderscript/src/android/renderscript/cts/TestPow.java
index 46cb0ca..39369c4 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestPow.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestPow.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkPowFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePow(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePow(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePow(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePow(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePow(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePow(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePow(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePow(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestPown.java b/tests/tests/renderscript/src/android/renderscript/cts/TestPown.java
index bf74366..14a09e1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestPown.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestPown.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatIntFloat {
public float inX;
public int inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkPownFloatIntFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePown(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePown(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,7 +85,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -95,7 +95,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -143,8 +143,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePown(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePown(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -153,7 +153,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -163,7 +163,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -211,8 +211,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePown(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePown(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -221,7 +221,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -231,7 +231,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -279,8 +279,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePown(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePown(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -289,7 +289,7 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
@@ -299,7 +299,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.java b/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.java
index bdb375a..b1f281b 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestPowr.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkPowrFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePowr(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePowr(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePowr(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePowr(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePowr(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePowr(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computePowr(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computePowr(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.java
index 8081ca1..2707ac2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRadians.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inValue;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkRadiansFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inValue = arrayInValue[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRadians(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRadians(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inValue = arrayInValue[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRadians(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRadians(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRadians(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRadians(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inValue = arrayInValue[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRadians(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRadians(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inValue: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inValue, Float.floatToRawIntBits(args.inValue), args.inValue));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.java
index 1e692b9..8208d23 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRemainder.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inX;
public float inY;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkRemainderFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inX = arrayInX[i];
args.inY = arrayInY[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRemainder(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRemainder(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inX = arrayInX[i * 2 + j];
args.inY = arrayInY[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRemainder(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRemainder(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRemainder(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRemainder(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inX = arrayInX[i * 4 + j];
args.inY = arrayInY[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRemainder(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRemainder(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inX: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inX, Float.floatToRawIntBits(args.inX), args.inX));
message.append("\n");
message.append("Input inY: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inY, Float.floatToRawIntBits(args.inY), args.inY));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.java
index e3f11ce..7052dd1 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRemquo.java
@@ -38,7 +38,7 @@
public float inB;
public float inC;
public int outD;
- public Floaty out;
+ public float out;
}
private void checkRemquoFloatFloatIntFloat() {
@@ -81,46 +81,30 @@
ArgumentsFloatFloatIntFloat args = new ArgumentsFloatFloatIntFloat();
args.inB = arrayInB[i];
args.inC = arrayInC[i];
- // Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRemquo(args);
- // Validate the outputs.
- boolean valid = true;
- if (args.outD != arrayOutD[i * 1 + j] && args.out.isNaN()) {
- valid = false;
- }
- if (!args.out.couldBe(arrayOut[i * 1 + j])) {
- valid = false;
- }
+ // Extract the outputs.
+ args.outD = arrayOutD[i * 1 + j];
+ args.out = arrayOut[i * 1 + j];
+ // Ask the CoreMathVerifier to validate.
+ Target target = new Target(relaxed);
+ String errorMessage = CoreMathVerifier.verifyRemquo(args, target);
+ boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
- message.append("Expected output outD: ");
+ message.append("Output outD: ");
message.append(String.format("%d", args.outD));
message.append("\n");
- message.append("Actual output outD: ");
- message.append(String.format("%d", arrayOutD[i * 1 + j]));
- if (args.outD != arrayOutD[i * 1 + j] && args.out.isNaN()) {
- message.append(" FAIL");
- }
+ message.append("Output out: ");
+ message.append(Float.toString(args.out));
message.append("\n");
- message.append("Expected output out: ");
- message.append(args.out.toString());
- message.append("\n");
- message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
- arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
- if (!args.out.couldBe(arrayOut[i * 1 + j])) {
- message.append(" FAIL");
- }
- message.append("\n");
+ message.append(errorMessage);
assertTrue("Incorrect output for checkRemquoFloatFloatIntFloat" +
(relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
}
@@ -168,46 +152,30 @@
ArgumentsFloatFloatIntFloat args = new ArgumentsFloatFloatIntFloat();
args.inB = arrayInB[i * 2 + j];
args.inC = arrayInC[i * 2 + j];
- // Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRemquo(args);
- // Validate the outputs.
- boolean valid = true;
- if (args.outD != arrayOutD[i * 2 + j] && args.out.isNaN()) {
- valid = false;
- }
- if (!args.out.couldBe(arrayOut[i * 2 + j])) {
- valid = false;
- }
+ // Extract the outputs.
+ args.outD = arrayOutD[i * 2 + j];
+ args.out = arrayOut[i * 2 + j];
+ // Ask the CoreMathVerifier to validate.
+ Target target = new Target(relaxed);
+ String errorMessage = CoreMathVerifier.verifyRemquo(args, target);
+ boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
- message.append("Expected output outD: ");
+ message.append("Output outD: ");
message.append(String.format("%d", args.outD));
message.append("\n");
- message.append("Actual output outD: ");
- message.append(String.format("%d", arrayOutD[i * 2 + j]));
- if (args.outD != arrayOutD[i * 2 + j] && args.out.isNaN()) {
- message.append(" FAIL");
- }
+ message.append("Output out: ");
+ message.append(Float.toString(args.out));
message.append("\n");
- message.append("Expected output out: ");
- message.append(args.out.toString());
- message.append("\n");
- message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
- arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
- if (!args.out.couldBe(arrayOut[i * 2 + j])) {
- message.append(" FAIL");
- }
- message.append("\n");
+ message.append(errorMessage);
assertTrue("Incorrect output for checkRemquoFloat2Float2Int2Float2" +
(relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
}
@@ -255,46 +223,30 @@
ArgumentsFloatFloatIntFloat args = new ArgumentsFloatFloatIntFloat();
args.inB = arrayInB[i * 4 + j];
args.inC = arrayInC[i * 4 + j];
- // Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRemquo(args);
- // Validate the outputs.
- boolean valid = true;
- if (args.outD != arrayOutD[i * 4 + j] && args.out.isNaN()) {
- valid = false;
- }
- if (!args.out.couldBe(arrayOut[i * 4 + j])) {
- valid = false;
- }
+ // Extract the outputs.
+ args.outD = arrayOutD[i * 4 + j];
+ args.out = arrayOut[i * 4 + j];
+ // Ask the CoreMathVerifier to validate.
+ Target target = new Target(relaxed);
+ String errorMessage = CoreMathVerifier.verifyRemquo(args, target);
+ boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
- message.append("Expected output outD: ");
+ message.append("Output outD: ");
message.append(String.format("%d", args.outD));
message.append("\n");
- message.append("Actual output outD: ");
- message.append(String.format("%d", arrayOutD[i * 4 + j]));
- if (args.outD != arrayOutD[i * 4 + j] && args.out.isNaN()) {
- message.append(" FAIL");
- }
+ message.append("Output out: ");
+ message.append(Float.toString(args.out));
message.append("\n");
- message.append("Expected output out: ");
- message.append(args.out.toString());
- message.append("\n");
- message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
- arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
- if (!args.out.couldBe(arrayOut[i * 4 + j])) {
- message.append(" FAIL");
- }
- message.append("\n");
+ message.append(errorMessage);
assertTrue("Incorrect output for checkRemquoFloat3Float3Int3Float3" +
(relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
}
@@ -342,46 +294,30 @@
ArgumentsFloatFloatIntFloat args = new ArgumentsFloatFloatIntFloat();
args.inB = arrayInB[i * 4 + j];
args.inC = arrayInC[i * 4 + j];
- // Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRemquo(args);
- // Validate the outputs.
- boolean valid = true;
- if (args.outD != arrayOutD[i * 4 + j] && args.out.isNaN()) {
- valid = false;
- }
- if (!args.out.couldBe(arrayOut[i * 4 + j])) {
- valid = false;
- }
+ // Extract the outputs.
+ args.outD = arrayOutD[i * 4 + j];
+ args.out = arrayOut[i * 4 + j];
+ // Ask the CoreMathVerifier to validate.
+ Target target = new Target(relaxed);
+ String errorMessage = CoreMathVerifier.verifyRemquo(args, target);
+ boolean valid = errorMessage == null;
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inB: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inB, Float.floatToRawIntBits(args.inB), args.inB));
message.append("\n");
message.append("Input inC: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inC, Float.floatToRawIntBits(args.inC), args.inC));
message.append("\n");
- message.append("Expected output outD: ");
+ message.append("Output outD: ");
message.append(String.format("%d", args.outD));
message.append("\n");
- message.append("Actual output outD: ");
- message.append(String.format("%d", arrayOutD[i * 4 + j]));
- if (args.outD != arrayOutD[i * 4 + j] && args.out.isNaN()) {
- message.append(" FAIL");
- }
+ message.append("Output out: ");
+ message.append(Float.toString(args.out));
message.append("\n");
- message.append("Expected output out: ");
- message.append(args.out.toString());
- message.append("\n");
- message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
- arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
- if (!args.out.couldBe(arrayOut[i * 4 + j])) {
- message.append(" FAIL");
- }
- message.append("\n");
+ message.append(errorMessage);
assertTrue("Incorrect output for checkRemquoFloat4Float4Int4Float4" +
(relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
}
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRint.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRint.java
index bc21130..6d42aeb 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRint.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRint.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkRintFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRint(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRint(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRint(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRint(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRint(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRint(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRint(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRint(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRootn.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRootn.java
index c138404..b9562e4 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRootn.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRootn.java
@@ -34,6 +34,12 @@
scriptRelaxed = new ScriptC_TestRootnRelaxed(mRS);
}
+ public class ArgumentsFloatIntFloat {
+ public float inV;
+ public int inN;
+ public Target.Floaty out;
+ }
+
private void checkRootnFloatIntFloat() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 1, 0x37d0d9514daae0ccl, false);
Allocation inN = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 1, 0x37d0d9514daae0c4l, false);
@@ -41,6 +47,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
script.set_gAllocInN(inN);
script.forEach_testRootnFloatIntFloat(inV, out);
+ verifyResultsRootnFloatIntFloat(inV, inN, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRootnFloatIntFloat: " + e.toString());
}
@@ -48,11 +55,59 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 1), INPUTSIZE);
scriptRelaxed.set_gAllocInN(inN);
scriptRelaxed.forEach_testRootnFloatIntFloat(inV, out);
+ verifyResultsRootnFloatIntFloat(inV, inN, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRootnFloatIntFloat: " + e.toString());
}
}
+ private void verifyResultsRootnFloatIntFloat(Allocation inV, Allocation inN, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 1];
+ inV.copyTo(arrayInV);
+ int[] arrayInN = new int[INPUTSIZE * 1];
+ inN.copyTo(arrayInN);
+ float[] arrayOut = new float[INPUTSIZE * 1];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 1 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
+ args.inV = arrayInV[i];
+ args.inN = arrayInN[i];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRootn(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inN: ");
+ message.append(String.format("%d", args.inN));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
+ if (!args.out.couldBe(arrayOut[i * 1 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkRootnFloatIntFloat" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
private void checkRootnFloat2Int2Float2() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 2, 0x2a7a849dcb32d88el, false);
Allocation inN = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 2, 0x2a7a849dcb32d886l, false);
@@ -60,6 +115,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
script.set_gAllocInN(inN);
script.forEach_testRootnFloat2Int2Float2(inV, out);
+ verifyResultsRootnFloat2Int2Float2(inV, inN, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRootnFloat2Int2Float2: " + e.toString());
}
@@ -67,11 +123,59 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 2), INPUTSIZE);
scriptRelaxed.set_gAllocInN(inN);
scriptRelaxed.forEach_testRootnFloat2Int2Float2(inV, out);
+ verifyResultsRootnFloat2Int2Float2(inV, inN, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRootnFloat2Int2Float2: " + e.toString());
}
}
+ private void verifyResultsRootnFloat2Int2Float2(Allocation inV, Allocation inN, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 2];
+ inV.copyTo(arrayInV);
+ int[] arrayInN = new int[INPUTSIZE * 2];
+ inN.copyTo(arrayInN);
+ float[] arrayOut = new float[INPUTSIZE * 2];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 2 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
+ args.inV = arrayInV[i * 2 + j];
+ args.inN = arrayInN[i * 2 + j];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRootn(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inN: ");
+ message.append(String.format("%d", args.inN));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
+ if (!args.out.couldBe(arrayOut[i * 2 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkRootnFloat2Int2Float2" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
private void checkRootnFloat3Int3Float3() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 3, 0x5030c300c0e54547l, false);
Allocation inN = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 3, 0x5030c300c0e5453fl, false);
@@ -79,6 +183,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
script.set_gAllocInN(inN);
script.forEach_testRootnFloat3Int3Float3(inV, out);
+ verifyResultsRootnFloat3Int3Float3(inV, inN, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRootnFloat3Int3Float3: " + e.toString());
}
@@ -86,11 +191,59 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 3), INPUTSIZE);
scriptRelaxed.set_gAllocInN(inN);
scriptRelaxed.forEach_testRootnFloat3Int3Float3(inV, out);
+ verifyResultsRootnFloat3Int3Float3(inV, inN, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRootnFloat3Int3Float3: " + e.toString());
}
}
+ private void verifyResultsRootnFloat3Int3Float3(Allocation inV, Allocation inN, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ int[] arrayInN = new int[INPUTSIZE * 4];
+ inN.copyTo(arrayInN);
+ float[] arrayOut = new float[INPUTSIZE * 4];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 3 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
+ args.inV = arrayInV[i * 4 + j];
+ args.inN = arrayInN[i * 4 + j];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRootn(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inN: ");
+ message.append(String.format("%d", args.inN));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkRootnFloat3Int3Float3" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
private void checkRootnFloat4Int4Float4() {
Allocation inV = createRandomAllocation(mRS, Element.DataType.FLOAT_32, 4, 0x75e70163b697b200l, false);
Allocation inN = createRandomAllocation(mRS, Element.DataType.SIGNED_32, 4, 0x75e70163b697b1f8l, false);
@@ -98,6 +251,7 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
script.set_gAllocInN(inN);
script.forEach_testRootnFloat4Int4Float4(inV, out);
+ verifyResultsRootnFloat4Int4Float4(inV, inN, out, false);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRootnFloat4Int4Float4: " + e.toString());
}
@@ -105,11 +259,59 @@
Allocation out = Allocation.createSized(mRS, getElement(mRS, Element.DataType.FLOAT_32, 4), INPUTSIZE);
scriptRelaxed.set_gAllocInN(inN);
scriptRelaxed.forEach_testRootnFloat4Int4Float4(inV, out);
+ verifyResultsRootnFloat4Int4Float4(inV, inN, out, true);
} catch (Exception e) {
throw new RSRuntimeException("RenderScript. Can't invoke forEach_testRootnFloat4Int4Float4: " + e.toString());
}
}
+ private void verifyResultsRootnFloat4Int4Float4(Allocation inV, Allocation inN, Allocation out, boolean relaxed) {
+ float[] arrayInV = new float[INPUTSIZE * 4];
+ inV.copyTo(arrayInV);
+ int[] arrayInN = new int[INPUTSIZE * 4];
+ inN.copyTo(arrayInN);
+ float[] arrayOut = new float[INPUTSIZE * 4];
+ out.copyTo(arrayOut);
+ for (int i = 0; i < INPUTSIZE; i++) {
+ for (int j = 0; j < 4 ; j++) {
+ // Extract the inputs.
+ ArgumentsFloatIntFloat args = new ArgumentsFloatIntFloat();
+ args.inV = arrayInV[i * 4 + j];
+ args.inN = arrayInN[i * 4 + j];
+ // Figure out what the outputs should have been.
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRootn(args, target);
+ // Validate the outputs.
+ boolean valid = true;
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ valid = false;
+ }
+ if (!valid) {
+ StringBuilder message = new StringBuilder();
+ message.append("Input inV: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ args.inV, Float.floatToRawIntBits(args.inV), args.inV));
+ message.append("\n");
+ message.append("Input inN: ");
+ message.append(String.format("%d", args.inN));
+ message.append("\n");
+ message.append("Expected output out: ");
+ message.append(args.out.toString());
+ message.append("\n");
+ message.append("Actual output out: ");
+ message.append(String.format("%14.8g {%8x} %15a",
+ arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
+ if (!args.out.couldBe(arrayOut[i * 4 + j])) {
+ message.append(" FAIL");
+ }
+ message.append("\n");
+ assertTrue("Incorrect output for checkRootnFloat4Int4Float4" +
+ (relaxed ? "_relaxed" : "") + ":\n" + message.toString(), valid);
+ }
+ }
+ }
+ }
+
public void testRootn() {
checkRootnFloatIntFloat();
checkRootnFloat2Int2Float2();
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRound.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRound.java
index 63e4769..f9c9a9d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRound.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRound.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkRoundFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRound(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRound(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRound(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRound(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRound(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRound(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRound(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRound(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.java
index f0a8c7a..7b57621 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestRsqrt.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkRsqrtFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeRsqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeRsqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSign.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSign.java
index d8c54a1..77c467c 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSign.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSign.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkSignFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSign(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSign(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSign(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSign(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSign(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSign(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSign(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSign(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSin.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSin.java
index 131b5d9..ae039e2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSin.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSin.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkSinFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSin(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSin(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.java
index 8f9b7d7..60c6ef0 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSincos.java
@@ -36,8 +36,8 @@
public class ArgumentsFloatFloatFloat {
public float inV;
- public Floaty outCosptr;
- public Floaty out;
+ public Target.Floaty outCosptr;
+ public Target.Floaty out;
}
private void checkSincosFloatFloatFloat() {
@@ -75,8 +75,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSincos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 1 + j])) {
@@ -88,14 +88,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outCosptr: ");
message.append(args.outCosptr.toString());
message.append("\n");
message.append("Actual output outCosptr: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutCosptr[i * 1 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 1 + j]), arrayOutCosptr[i * 1 + j]));
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 1 + j])) {
message.append(" FAIL");
@@ -105,7 +105,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -153,8 +153,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSincos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 2 + j])) {
@@ -166,14 +166,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outCosptr: ");
message.append(args.outCosptr.toString());
message.append("\n");
message.append("Actual output outCosptr: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutCosptr[i * 2 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 2 + j]), arrayOutCosptr[i * 2 + j]));
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 2 + j])) {
message.append(" FAIL");
@@ -183,7 +183,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -231,8 +231,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSincos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
@@ -244,14 +244,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outCosptr: ");
message.append(args.outCosptr.toString());
message.append("\n");
message.append("Actual output outCosptr: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutCosptr[i * 4 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 4 + j]), arrayOutCosptr[i * 4 + j]));
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
message.append(" FAIL");
@@ -261,7 +261,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -309,8 +309,8 @@
ArgumentsFloatFloatFloat args = new ArgumentsFloatFloatFloat();
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSincos(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSincos(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
@@ -322,14 +322,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output outCosptr: ");
message.append(args.outCosptr.toString());
message.append("\n");
message.append("Actual output outCosptr: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOutCosptr[i * 4 + j], Float.floatToRawIntBits(arrayOutCosptr[i * 4 + j]), arrayOutCosptr[i * 4 + j]));
if (!args.outCosptr.couldBe(arrayOutCosptr[i * 4 + j])) {
message.append(" FAIL");
@@ -339,7 +339,7 @@
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.java
index 39668be..1ebcba2 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSinh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkSinhFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSinh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSinh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.java
index 24f21cf..2df09b8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSinpi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkSinpiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSinpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSinpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.java b/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.java
index ca9638f..4537c3d 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestSqrt.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkSqrtFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeSqrt(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeSqrt(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestStep.java b/tests/tests/renderscript/src/android/renderscript/cts/TestStep.java
index 022208d..dabfd45 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestStep.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestStep.java
@@ -37,7 +37,7 @@
public class ArgumentsFloatFloatFloat {
public float inEdge;
public float inV;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkStepFloatFloatFloat() {
@@ -75,8 +75,8 @@
args.inEdge = arrayInEdge[i];
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -85,18 +85,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -144,8 +144,8 @@
args.inEdge = arrayInEdge[i * 2 + j];
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -154,18 +154,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -213,8 +213,8 @@
args.inEdge = arrayInEdge[i * 4 + j];
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -223,18 +223,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -282,8 +282,8 @@
args.inEdge = arrayInEdge[i * 4 + j];
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -292,18 +292,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -351,8 +351,8 @@
args.inEdge = arrayInEdge[i * 2 + j];
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -361,18 +361,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -420,8 +420,8 @@
args.inEdge = arrayInEdge[i * 4 + j];
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -430,18 +430,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -489,8 +489,8 @@
args.inEdge = arrayInEdge[i * 4 + j];
args.inV = arrayInV[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -499,18 +499,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -558,8 +558,8 @@
args.inEdge = arrayInEdge[i];
args.inV = arrayInV[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -568,18 +568,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -627,8 +627,8 @@
args.inEdge = arrayInEdge[i];
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -637,18 +637,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -696,8 +696,8 @@
args.inEdge = arrayInEdge[i];
args.inV = arrayInV[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeStep(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeStep(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -706,18 +706,18 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input inEdge: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inEdge, Float.floatToRawIntBits(args.inEdge), args.inEdge));
message.append("\n");
message.append("Input inV: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.inV, Float.floatToRawIntBits(args.inV), args.inV));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTan.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTan.java
index b4a9096..29dae6f 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTan.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTan.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkTanFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTan(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTan(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.java
index 1c6893c..e554ad8 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTanh.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkTanhFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTanh(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTanh(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.java
index f9e7ac2..5e45440 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTanpi.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkTanpiFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTanpi(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTanpi(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.java
index 04c4a7f..c7bb7b5 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTgamma.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkTgammaFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTgamma(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTgamma(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.java b/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.java
index 8a0105f..0657844 100644
--- a/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.java
+++ b/tests/tests/renderscript/src/android/renderscript/cts/TestTrunc.java
@@ -36,7 +36,7 @@
public class ArgumentsFloatFloat {
public float in;
- public Floaty out;
+ public Target.Floaty out;
}
private void checkTruncFloatFloat() {
@@ -68,8 +68,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTrunc(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTrunc(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
@@ -78,14 +78,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 1 + j], Float.floatToRawIntBits(arrayOut[i * 1 + j]), arrayOut[i * 1 + j]));
if (!args.out.couldBe(arrayOut[i * 1 + j])) {
message.append(" FAIL");
@@ -127,8 +127,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 2 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTrunc(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTrunc(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
@@ -137,14 +137,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 2 + j], Float.floatToRawIntBits(arrayOut[i * 2 + j]), arrayOut[i * 2 + j]));
if (!args.out.couldBe(arrayOut[i * 2 + j])) {
message.append(" FAIL");
@@ -186,8 +186,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTrunc(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTrunc(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -196,14 +196,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
@@ -245,8 +245,8 @@
ArgumentsFloatFloat args = new ArgumentsFloatFloat();
args.in = arrayIn[i * 4 + j];
// Figure out what the outputs should have been.
- Floaty.setRelaxed(relaxed);
- CoreMathVerifier.computeTrunc(args);
+ Target target = new Target(relaxed);
+ CoreMathVerifier.computeTrunc(args, target);
// Validate the outputs.
boolean valid = true;
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
@@ -255,14 +255,14 @@
if (!valid) {
StringBuilder message = new StringBuilder();
message.append("Input in: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
args.in, Float.floatToRawIntBits(args.in), args.in));
message.append("\n");
message.append("Expected output out: ");
message.append(args.out.toString());
message.append("\n");
message.append("Actual output out: ");
- message.append(String.format("%14.8g %8x %15a",
+ message.append(String.format("%14.8g {%8x} %15a",
arrayOut[i * 4 + j], Float.floatToRawIntBits(arrayOut[i * 4 + j]), arrayOut[i * 4 + j]));
if (!args.out.couldBe(arrayOut[i * 4 + j])) {
message.append(" FAIL");
diff --git a/tests/tests/telecomm/Android.mk b/tests/tests/telecomm/Android.mk
new file mode 100644
index 0000000..70ed780
--- /dev/null
+++ b/tests/tests/telecomm/Android.mk
@@ -0,0 +1,39 @@
+# Copyright (C) 2014 The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+LOCAL_PATH:= $(call my-dir)
+
+include $(CLEAR_VARS)
+
+# don't include this package in any target
+LOCAL_MODULE_TAGS := optional
+# and when built explicitly put it in the data partition
+LOCAL_MODULE_PATH := $(TARGET_OUT_DATA_APPS)
+
+#LOCAL_JAVA_LIBRARIES := Telecomm
+
+LOCAL_STATIC_JAVA_LIBRARIES := ctstestrunner
+
+LOCAL_SRC_FILES := $(call all-java-files-under, src)
+
+LOCAL_PACKAGE_NAME := CtsTelecommTestCases
+
+LOCAL_INSTRUMENTATION_FOR := CtsTestStubs
+
+# uncomment when b/13250611 is fixed
+#LOCAL_SDK_VERSION := current
+LOCAL_JAVA_LIBRARIES += android.test.runner
+
+include $(BUILD_CTS_PACKAGE)
diff --git a/tests/tests/telecomm/AndroidManifest.xml b/tests/tests/telecomm/AndroidManifest.xml
new file mode 100644
index 0000000..9f7b307
--- /dev/null
+++ b/tests/tests/telecomm/AndroidManifest.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- Copyright (C) 2007 The Android Open Source Project
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="com.android.cts.telecomm">
+
+ <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
+ <!-- We won't be granted this, but we should at least ask for it (to make sure we don't get it). -->
+ <uses-permission android:name="com.android.telecomm.permission.REGISTER_PROVIDER_OR_SUBSCRIPTION" />
+ <application>
+ <uses-library android:name="android.test.runner" />
+ </application>
+
+ <instrumentation android:name="android.support.test.runner.AndroidJUnitRunner"
+ android:targetPackage="com.android.cts.stub"
+ android:label="CTS tests of android.telecomm">
+ <meta-data android:name="listener"
+ android:value="com.android.cts.runner.CtsTestRunListener" />
+ </instrumentation>
+
+</manifest>
+
diff --git a/tests/tests/telecomm/src/android/telecomm/cts/ConnectionTest.java b/tests/tests/telecomm/src/android/telecomm/cts/ConnectionTest.java
new file mode 100644
index 0000000..0883cff
--- /dev/null
+++ b/tests/tests/telecomm/src/android/telecomm/cts/ConnectionTest.java
@@ -0,0 +1,110 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telecomm.cts;
+
+import android.telecomm.Connection;
+import android.telephony.DisconnectCause;
+import android.test.AndroidTestCase;
+
+import java.util.concurrent.Semaphore;
+import java.util.concurrent.TimeUnit;
+
+public class ConnectionTest extends AndroidTestCase {
+ public void testStateCallbacks() {
+ final Semaphore lock = new Semaphore(0);
+ Connection connection = createConnection(lock);
+
+ waitForStateChange(lock);
+ assertEquals(Connection.STATE_NEW, connection.getState());
+
+ connection.setInitializing();
+ waitForStateChange(lock);
+ assertEquals(Connection.STATE_INITIALIZING, connection.getState());
+
+ connection.setInitialized();
+ waitForStateChange(lock);
+ assertEquals(Connection.STATE_NEW, connection.getState());
+
+ connection.setRinging();
+ waitForStateChange(lock);
+ assertEquals(Connection.STATE_RINGING, connection.getState());
+
+ connection.setDialing();
+ waitForStateChange(lock);
+ assertEquals(Connection.STATE_DIALING, connection.getState());
+
+ connection.setActive();
+ waitForStateChange(lock);
+ assertEquals(Connection.STATE_ACTIVE, connection.getState());
+
+ connection.setOnHold();
+ waitForStateChange(lock);
+ assertEquals(Connection.STATE_HOLDING, connection.getState());
+
+ connection.setDisconnected(DisconnectCause.LOCAL, "Test call");
+ waitForStateChange(lock);
+ assertEquals(Connection.STATE_DISCONNECTED, connection.getState());
+
+ connection.setRinging();
+ waitForStateChange(lock);
+ assertEquals("Connection should not move out of STATE_DISCONNECTED.",
+ Connection.STATE_DISCONNECTED, connection.getState());
+ }
+
+ public void testFailedState() {
+ Connection connection =
+ Connection.createFailedConnection(DisconnectCause.LOCAL, "Test call");
+ assertEquals(Connection.STATE_DISCONNECTED, connection.getState());
+
+ connection.setRinging();
+ assertEquals("Connection should not move out of STATE_DISCONNECTED.",
+ Connection.STATE_DISCONNECTED, connection.getState());
+ }
+
+ public void testCanceledState() {
+ Connection connection = Connection.createCanceledConnection();
+ assertEquals(Connection.STATE_DISCONNECTED, connection.getState());
+
+ connection.setDialing();
+ assertEquals("Connection should not move out of STATE_DISCONNECTED",
+ Connection.STATE_DISCONNECTED, connection.getState());
+ }
+
+ private static Connection createConnection(final Semaphore lock) {
+ Connection.Listener listener = new Connection.Listener() {
+ @Override
+ public void onStateChanged(Connection c, int state) {
+ lock.release();
+ }
+ };
+
+ Connection connection = new BasicConnection();
+ connection.addConnectionListener(listener);
+ return connection;
+ }
+
+ private static void waitForStateChange(Semaphore lock) {
+ try {
+ lock.tryAcquire(1000, TimeUnit.MILLISECONDS);
+ } catch (InterruptedException e) {
+ fail("State transition timed out");
+ }
+ }
+
+ private static final class BasicConnection extends Connection {
+ }
+}
diff --git a/tests/tests/telecomm/src/android/telecomm/cts/TelecommManagerTest.java b/tests/tests/telecomm/src/android/telecomm/cts/TelecommManagerTest.java
new file mode 100644
index 0000000..7f8e991
--- /dev/null
+++ b/tests/tests/telecomm/src/android/telecomm/cts/TelecommManagerTest.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.telecomm.cts;
+
+import android.content.ComponentName;
+import android.net.Uri;
+import android.telecomm.PhoneAccount;
+import android.telecomm.PhoneAccountHandle;
+import android.telecomm.PhoneCapabilities;
+import android.telecomm.TelecommManager;
+import android.test.AndroidTestCase;
+
+import java.util.List;
+
+public class TelecommManagerTest extends AndroidTestCase {
+ public void testRegisterAccountsBlocked() {
+ PhoneAccount phoneAccount = PhoneAccount.builder()
+ .withAccountHandle(new PhoneAccountHandle(
+ new ComponentName(getContext(), TelecommManagerTest.class),
+ "testRegisterAccountsBlocked"))
+ .withHandle(Uri.parse("tel:6502637643"))
+ .withSubscriptionNumber("650-263-7643")
+ .withCapabilities(PhoneCapabilities.ALL)
+ .withIconResId(0)
+ .withLabel("Mock PhoneAccount")
+ .withShortDescription("PhoneAccount used in TelecommManagerTest")
+ .build();
+
+ TelecommManager tm = TelecommManager.from(getContext());
+ List<PhoneAccountHandle> handles = tm.getEnabledPhoneAccounts();
+
+ try {
+ tm.registerPhoneAccount(phoneAccount);
+ fail("This should have failed (CTS can't get the permission)");
+ } catch (SecurityException e) {
+ assertEquals(handles, tm.getEnabledPhoneAccounts());
+ }
+ }
+}
diff --git a/tests/tests/text/src/android/text/cts/BoringLayoutTest.java b/tests/tests/text/src/android/text/cts/BoringLayoutTest.java
index b7e2215..8a60a5b 100644
--- a/tests/tests/text/src/android/text/cts/BoringLayoutTest.java
+++ b/tests/tests/text/src/android/text/cts/BoringLayoutTest.java
@@ -79,69 +79,29 @@
DEFAULT_OUTER_WIDTH);
}
- public void testScale() {
+ private void verifyMultAddScale(float spacingMult, float spacingAdd) {
final int metricsBottomToTop = METRICS_BOTTOM - METRICS_TOP;
- //no scale
- BoringLayout boringLayout = makeBoringLayout(SPACING_MULT_NO_SCALE, SPACING_ADD_NO_SCALE);
-
+ BoringLayout boringLayout = makeBoringLayout(spacingMult, spacingAdd);
assertEquals(metricsBottomToTop, boringLayout.getHeight());
assertEquals(boringLayout.getHeight() + METRICS_TOP, boringLayout.getLineDescent(0));
+ }
- // scale two times
- float spacingMult = 2.0f;
- boringLayout = makeBoringLayout(spacingMult, SPACING_ADD_NO_SCALE);
+ public void testScale() {
+ // no scale
+ verifyMultAddScale(1.0f, 0.0f);
- assertEquals(metricsBottomToTop * spacingMult, (float) boringLayout.getHeight());
- assertEquals(boringLayout.getHeight() + METRICS_TOP, boringLayout.getLineDescent(0));
+ // test line spacing multiplier
+ verifyMultAddScale(2.0f, 0.0f);
+ verifyMultAddScale(0.5f, 0.0f);
- // scale 0.5 times
- spacingMult = 0.5f;
- boringLayout = makeBoringLayout(spacingMult, SPACING_ADD_NO_SCALE);
- assertEquals(metricsBottomToTop * spacingMult, (float) boringLayout.getHeight());
- assertEquals(boringLayout.getHeight() + METRICS_TOP, boringLayout.getLineDescent(0));
-
- // add 1.5f
- float spacingAdd = 1.5f;
- float roundOff = 2.0f;
- boringLayout = makeBoringLayout(SPACING_MULT_NO_SCALE, spacingAdd);
- assertEquals(metricsBottomToTop + roundOff, (float) boringLayout.getHeight());
- assertEquals(boringLayout.getHeight() + METRICS_TOP, boringLayout.getLineDescent(0));
-
- // minus 1.6f
- float spacingMinus = -1.6f;
- roundOff = -2.0f;
- boringLayout = makeBoringLayout(SPACING_MULT_NO_SCALE, spacingMinus);
- assertEquals(metricsBottomToTop + roundOff, (float) boringLayout.getHeight());
- assertEquals(boringLayout.getHeight() + METRICS_TOP, boringLayout.getLineDescent(0));
-
- // add 1.4f
- spacingAdd = 1.4f;
- roundOff = 1.0f;
- boringLayout = makeBoringLayout(SPACING_MULT_NO_SCALE, spacingAdd);
- assertEquals(metricsBottomToTop + roundOff, (float) boringLayout.getHeight());
- assertEquals(boringLayout.getHeight() + METRICS_TOP, boringLayout.getLineDescent(0));
-
- // minus 1.4f
- spacingMinus = -1.4f;
- roundOff = -1.0f;
- boringLayout = makeBoringLayout(SPACING_MULT_NO_SCALE, spacingMinus);
- assertEquals(metricsBottomToTop + roundOff, (float) boringLayout.getHeight());
- assertEquals(boringLayout.getHeight() + METRICS_TOP, boringLayout.getLineDescent(0));
-
- // add 3.0f
- spacingAdd = 3.0f;
- roundOff = 3.0f;
- boringLayout = makeBoringLayout(SPACING_MULT_NO_SCALE, spacingAdd);
- assertEquals(metricsBottomToTop + roundOff, (float) boringLayout.getHeight());
- assertEquals(boringLayout.getHeight() + METRICS_TOP, boringLayout.getLineDescent(0));
-
- // minus 3.0f
- spacingMinus = -3.0f;
- roundOff = -3.0f;
- boringLayout = makeBoringLayout(SPACING_MULT_NO_SCALE, spacingMinus);
- assertEquals(metricsBottomToTop + roundOff, (float) boringLayout.getHeight());
- assertEquals(boringLayout.getHeight() + METRICS_TOP, boringLayout.getLineDescent(0));
+ // test line spacing add
+ verifyMultAddScale(1.0f, 1.5f);
+ verifyMultAddScale(1.0f, -1.6f);
+ verifyMultAddScale(1.0f, 1.4f);
+ verifyMultAddScale(1.0f, -1.4f);
+ verifyMultAddScale(1.0f, 3.0f);
+ verifyMultAddScale(1.0f, -3.0f);
}
public void testPreconditions() {
diff --git a/tests/tests/text/src/android/text/format/cts/TimeTest.java b/tests/tests/text/src/android/text/format/cts/TimeTest.java
index ad779e2..2d623e3 100644
--- a/tests/tests/text/src/android/text/format/cts/TimeTest.java
+++ b/tests/tests/text/src/android/text/format/cts/TimeTest.java
@@ -16,6 +16,8 @@
package android.text.format.cts;
+import android.content.res.Configuration;
+import android.content.res.Resources;
import android.test.AndroidTestCase;
import android.text.format.Time;
import android.util.Log;
@@ -43,7 +45,7 @@
@Override
public void tearDown() throws Exception {
// The Locale may be changed by tests. Revert to the original.
- Locale.setDefault(originalLocale);
+ changeJavaAndAndroidLocale(originalLocale);
super.tearDown();
}
@@ -769,7 +771,7 @@
}
public void testFormat_tokensUkLocale() throws Exception {
- Locale.setDefault(Locale.UK);
+ changeJavaAndAndroidLocale(Locale.UK);
Time t = new Time("Europe/London");
Fields.setDateTime(t, 2005, 5, 1, 12, 30, 15);
@@ -810,9 +812,9 @@
assertFormatEquals(t, "%r", "12:30:15 pm");
assertFormatEquals(t, "%S", "15");
// The original C implementation uses the (native) system default TZ, not the timezone of
- // the Time and is therefore not stable. The commented value below is the one using the
- // Time's timezone which is probably the expected answer.
- // assertFormatEquals(t, "%s", "1117625415");
+ // the Time to calculate this and was therefore not stable. This changed to use the Time's
+ // timezone when the Time class was re-written in Java.
+ assertFormatEquals(t, "%s", "1117625415");
assertFormatEquals(t, "%T", "12:30:15");
assertFormatEquals(t, "%t", "\t");
assertFormatEquals(t, "%U", "22");
@@ -861,7 +863,7 @@
}
public void testFormat_tokensUsLocale() throws Exception {
- Locale.setDefault(Locale.US);
+ changeJavaAndAndroidLocale(Locale.US);
Time t = new Time("America/New_York");
Fields.setDateTime(t, 2005, 5, 1, 12, 30, 15);
@@ -877,7 +879,7 @@
assertFormatEquals(t, "%B", "June");
assertFormatEquals(t, "%b", "Jun");
assertFormatEquals(t, "%C", "20");
- assertFormatEquals(t, "%c", "1 Jun 2005, 12:30:15");
+ assertFormatEquals(t, "%c", "Jun 1, 2005, 12:30:15 PM");
assertFormatEquals(t, "%D", "06/01/05");
assertFormatEquals(t, "%d", "01");
assertFormatEquals(t, "%E", "E");
@@ -902,9 +904,9 @@
assertFormatEquals(t, "%r", "12:30:15 PM");
assertFormatEquals(t, "%S", "15");
// The original C implementation uses the (native) system default TZ, not the timezone of
- // the Time and is therefore not stable. The commented value below is the one using the
- // Time's timezone which is probably the expected answer.
- // assertFormatEquals(t, "%s", "1117643415");
+ // the Time to calculate this and was therefore not stable. This changed to use the Time's
+ // timezone when the Time class was re-written in Java.
+ assertFormatEquals(t, "%s", "1117643415");
assertFormatEquals(t, "%T", "12:30:15");
assertFormatEquals(t, "%t", "\t");
assertFormatEquals(t, "%U", "22");
@@ -913,8 +915,8 @@
assertFormatEquals(t, "%v", " 1-Jun-2005");
assertFormatEquals(t, "%W", "22");
assertFormatEquals(t, "%w", "3");
- assertFormatEquals(t, "%X", "12:30:15");
- assertFormatEquals(t, "%x", "1 June 2005");
+ assertFormatEquals(t, "%X", "12:30:15 PM");
+ assertFormatEquals(t, "%x", "June 1, 2005");
assertFormatEquals(t, "%y", "05");
assertFormatEquals(t, "%Y", "2005");
assertFormatEquals(t, "%Z", "EDT");
@@ -953,7 +955,7 @@
}
public void testFormat_tokensFranceLocale() throws Exception {
- Locale.setDefault(Locale.FRANCE);
+ changeJavaAndAndroidLocale(Locale.FRANCE);
Time t = new Time("Europe/Paris");
Fields.setDateTime(t, 2005, 5, 1, 12, 30, 15);
@@ -969,7 +971,7 @@
assertFormatEquals(t, "%B", "juin");
assertFormatEquals(t, "%b", "juin");
assertFormatEquals(t, "%C", "20");
- assertFormatEquals(t, "%c", "1 juin 2005, 12:30:15");
+ assertFormatEquals(t, "%c", "1 juin 2005 à 12:30:15");
assertFormatEquals(t, "%D", "06/01/05");
assertFormatEquals(t, "%d", "01");
assertFormatEquals(t, "%E", "E");
@@ -994,9 +996,9 @@
assertFormatEquals(t, "%r", "12:30:15 PM");
assertFormatEquals(t, "%S", "15");
// The original C implementation uses the (native) system default TZ, not the timezone of
- // the Time and is therefore not stable. The commented value below is the one using the
- // Time's timezone which is probably the expected answer.
- // assertFormatEquals(t, "%s", "1117621815");
+ // the Time to calculate this and was therefore not stable. This changed to use the Time's
+ // timezone when the Time class was re-written in Java.
+ assertFormatEquals(t, "%s", "1117621815");
assertFormatEquals(t, "%T", "12:30:15");
assertFormatEquals(t, "%t", "\t");
assertFormatEquals(t, "%U", "22");
@@ -1009,9 +1011,9 @@
assertFormatEquals(t, "%x", "1 juin 2005");
assertFormatEquals(t, "%y", "05");
assertFormatEquals(t, "%Y", "2005");
- assertFormatEquals(t, "%Z", "GMT+01:00");
+ assertFormatEquals(t, "%Z", "GMT+02:00");
assertFormatEquals(t, "%z", "+0200");
- assertFormatEquals(t, "%+", "mer. juin 1 12:30:15 GMT+01:00 2005");
+ assertFormatEquals(t, "%+", "mer. juin 1 12:30:15 GMT+02:00 2005");
assertFormatEquals(t, "%%", "%");
// Modifiers
@@ -1019,11 +1021,11 @@
assertFormatEquals(t, "%EC", "20");
assertFormatEquals(t, "%OC", "20");
- assertFormatEquals(t, "%_+", "mer. juin 1 12:30:15 GMT+01:00 2005");
- assertFormatEquals(t, "%-+", "mer. juin 1 12:30:15 GMT+01:00 2005");
- assertFormatEquals(t, "%0+", "mer. juin 1 12:30:15 GMT+01:00 2005");
- assertFormatEquals(t, "%^+", "mer. juin 1 12:30:15 GMT+01:00 2005");
- assertFormatEquals(t, "%#+", "mer. juin 1 12:30:15 GMT+01:00 2005");
+ assertFormatEquals(t, "%_+", "mer. juin 1 12:30:15 GMT+02:00 2005");
+ assertFormatEquals(t, "%-+", "mer. juin 1 12:30:15 GMT+02:00 2005");
+ assertFormatEquals(t, "%0+", "mer. juin 1 12:30:15 GMT+02:00 2005");
+ assertFormatEquals(t, "%^+", "mer. juin 1 12:30:15 GMT+02:00 2005");
+ assertFormatEquals(t, "%#+", "mer. juin 1 12:30:15 GMT+02:00 2005");
assertFormatEquals(t, "%_A", "mercredi");
assertFormatEquals(t, "%-A", "mercredi");
@@ -1045,7 +1047,7 @@
}
public void testFormat_tokensJapanLocale() throws Exception {
- Locale.setDefault(Locale.JAPAN);
+ changeJavaAndAndroidLocale(Locale.JAPAN);
Time t = new Time("Asia/Tokyo");
Fields.setDateTime(t, 2005, 5, 1, 12, 30, 15);
@@ -1061,7 +1063,7 @@
assertFormatEquals(t, "%B", "6月");
assertFormatEquals(t, "%b", "6月");
assertFormatEquals(t, "%C", "20");
- assertFormatEquals(t, "%c", "1 6月 2005, 12:30:15");
+ assertFormatEquals(t, "%c", "2005/06/01 12:30:15");
assertFormatEquals(t, "%D", "06/01/05");
assertFormatEquals(t, "%d", "01");
assertFormatEquals(t, "%E", "E");
@@ -1085,9 +1087,9 @@
assertFormatEquals(t, "%r", "12:30:15 午後");
assertFormatEquals(t, "%S", "15");
// The original C implementation uses the (native) system default TZ, not the timezone of
- // the Time and is therefore not stable. The commented value below is the one using the
- // Time's timezone which is probably the expected answer.
- // assertFormatEquals(t, "%s", "1117596615");
+ // the Time to calculate this and was therefore not stable. This changed to use the Time's
+ // timezone when the Time class was re-written in Java.
+ assertFormatEquals(t, "%s", "1117596615");
assertFormatEquals(t, "%T", "12:30:15");
assertFormatEquals(t, "%t", "\t");
assertFormatEquals(t, "%U", "22");
@@ -1097,7 +1099,7 @@
assertFormatEquals(t, "%W", "22");
assertFormatEquals(t, "%w", "3");
assertFormatEquals(t, "%X", "12:30:15");
- assertFormatEquals(t, "%x", "1 6月 2005");
+ assertFormatEquals(t, "%x", "2005年6月1日");
assertFormatEquals(t, "%y", "05");
assertFormatEquals(t, "%Y", "2005");
assertFormatEquals(t, "%Z", "JST");
@@ -2840,4 +2842,27 @@
return getUtcOffsetSeconds(isDst) * 1000;
}
}
+
+ private static void changeJavaAndAndroidLocale(Locale locale) {
+ // The Time class uses the Android-managed locale for string resources containing format
+ // patterns and the Java-managed locale for other things (e.g. month names, week days names)
+ // that are placed into those patterns. For example the format "%c" expands to include
+ // a pattern that includes month names.
+ // Changing the Java-managed Locale does not affect the Android-managed locale.
+ // Changing the Android-managed locale does not affect the Java-managed locale.
+ //
+ // In order to ensure consistent behavior in the tests the device Locale must not be
+ // assumed. To simulate the most common behavior (i.e. when the Java and the Android-managed
+ // locales agree), when the Java-managed locale is changed during this test the locale in
+ // the runtime-local copy of the system resources is modified as well.
+
+ // Change the Java-managed locale.
+ Locale.setDefault(locale);
+
+ // Change the local copy of the Android system configuration: this simulates the device
+ // being set to the locale and forces a reload of the string resources.
+ Configuration configuration = Resources.getSystem().getConfiguration();
+ configuration.locale = locale;
+ Resources.getSystem().updateConfiguration(configuration, null);
+ }
}
diff --git a/tests/tests/text/src/android/text/util/cts/LinkifyTest.java b/tests/tests/text/src/android/text/util/cts/LinkifyTest.java
index 72cd139..e6b91eb 100644
--- a/tests/tests/text/src/android/text/util/cts/LinkifyTest.java
+++ b/tests/tests/text/src/android/text/util/cts/LinkifyTest.java
@@ -315,7 +315,7 @@
String numbersInvalid = "123456789 not a phone number";
String numbersUKLocal = "tel:(0812)1234560 (0812)1234561";
String numbersUSLocal = "tel:(812)1234562 (812)123.4563 "
- + " tel:(800)5551210 (800) 555-1211 555-1212";
+ + " tel:(800)5551210 (800)555-1211 555-1212";
String numbersIntl = "tel:+4408121234564 +44-0812-123-4565"
+ " tel:+18005551213 +1-800-555-1214";
SpannableString spannable = new SpannableString(
diff --git a/tests/tests/tv/src/android/media/tv/cts/BundledTvInputServiceTest.java b/tests/tests/tv/src/android/media/tv/cts/BundledTvInputServiceTest.java
new file mode 100644
index 0000000..53b53b4
--- /dev/null
+++ b/tests/tests/tv/src/android/media/tv/cts/BundledTvInputServiceTest.java
@@ -0,0 +1,174 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package android.media.tv.cts;
+
+import android.app.Activity;
+import android.app.Instrumentation;
+import android.content.Context;
+import android.cts.util.PollingCheck;
+import android.test.ActivityInstrumentationTestCase2;
+import android.media.tv.TvContract;
+import android.media.tv.TvInputInfo;
+import android.media.tv.TvInputManager;
+import android.media.tv.TvView;
+import android.media.tv.cts.Utils;
+import android.net.Uri;
+import android.util.ArrayMap;
+
+import com.android.cts.tv.R;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Random;
+
+/**
+ * Test {@link android.media.tv.TvView}.
+ */
+public class BundledTvInputServiceTest
+ extends ActivityInstrumentationTestCase2<TvViewStubActivity> {
+ private static final String TAG = BundledTvInputServiceTest.class.getSimpleName();
+ /** The maximum time to wait for an operation. */
+ private static final long TIME_OUT = 15000L;
+
+ private TvView mTvView;
+ private Activity mActivity;
+ private Instrumentation mInstrumentation;
+ private TvInputManager mManager;
+ private List<TvInputInfo> mPassthroughInputList = new ArrayList<>();
+ private final MockListener mListener = new MockListener();
+
+ private static class MockListener extends TvView.TvInputListener {
+ private final Map<String, Integer> mVideoUnavailableReasonMap = new ArrayMap<>();
+ private Object mLock = new Object();
+ private final int VIDEO_AVAILABLE = -1;
+
+ public Integer getVideoUnavailableReason(String inputId) {
+ return mVideoUnavailableReasonMap.get(inputId);
+ }
+
+ @Override
+ public void onVideoAvailable(String inputId) {
+ synchronized (mLock) {
+ mVideoUnavailableReasonMap.put(inputId, VIDEO_AVAILABLE);
+ }
+ }
+
+ @Override
+ public void onVideoUnavailable(String inputId, int reason) {
+ synchronized (mLock) {
+ mVideoUnavailableReasonMap.put(inputId, reason);
+ }
+ }
+ }
+
+ /**
+ * Instantiates a new TV view test.
+ */
+ public BundledTvInputServiceTest() {
+ super(TvViewStubActivity.class);
+ }
+
+ /**
+ * Find the TV view specified by id.
+ *
+ * @param id the id
+ * @return the TV view
+ */
+ private TvView findTvViewById(int id) {
+ return (TvView) mActivity.findViewById(id);
+ }
+
+ @Override
+ protected void setUp() throws Exception {
+ super.setUp();
+ mActivity = getActivity();
+ if (!Utils.hasTvInputFramework(getActivity())) {
+ return;
+ }
+ mInstrumentation = getInstrumentation();
+ mTvView = findTvViewById(R.id.tvview);
+ mManager = (TvInputManager) mActivity.getSystemService(Context.TV_INPUT_SERVICE);
+ for (TvInputInfo info : mManager.getTvInputList()) {
+ if (info.isPassthroughInput()) {
+ mPassthroughInputList.add(info);
+ }
+ }
+ mTvView.setTvInputListener(mListener);
+ }
+
+ @Override
+ protected void tearDown() throws Exception {
+ try {
+ runTestOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ mTvView.reset();
+ }
+ });
+ } catch (Throwable t) {
+ throw new RuntimeException(t);
+ }
+ mInstrumentation.waitForIdleSync();
+ super.tearDown();
+ }
+
+ public void testTune() throws Throwable {
+ if (!Utils.hasTvInputFramework(getActivity())) {
+ return;
+ }
+ for (final TvInputInfo info : mPassthroughInputList) {
+ mTvView.tune(info.getId(), TvContract.buildChannelUriForPassthroughInput(info.getId()));
+ mInstrumentation.waitForIdleSync();
+ new PollingCheck(TIME_OUT) {
+ @Override
+ protected boolean check() {
+ Integer reason = mListener.getVideoUnavailableReason(info.getId());
+ return reason != null
+ && reason != TvInputManager.VIDEO_UNAVAILABLE_REASON_TUNING
+ && reason != TvInputManager.VIDEO_UNAVAILABLE_REASON_BUFFERING;
+ }
+ }.run();
+ }
+ }
+
+ public void testTuneStress() throws Throwable {
+ if (!Utils.hasTvInputFramework(getActivity())) {
+ return;
+ }
+ final int STRESS_FACTOR = 100;
+ Random random = new Random();
+ for (int i = 0; i < mPassthroughInputList.size() * STRESS_FACTOR; ++i) {
+ final TvInputInfo info =
+ mPassthroughInputList.get(random.nextInt(mPassthroughInputList.size()));
+ mTvView.tune(info.getId(), TvContract.buildChannelUriForPassthroughInput(info.getId()));
+ mInstrumentation.waitForIdleSync();
+ if (random.nextBoolean()) {
+ new PollingCheck(TIME_OUT) {
+ @Override
+ protected boolean check() {
+ Integer reason = mListener.getVideoUnavailableReason(info.getId());
+ return reason != null
+ && reason != TvInputManager.VIDEO_UNAVAILABLE_REASON_TUNING
+ && reason != TvInputManager.VIDEO_UNAVAILABLE_REASON_BUFFERING;
+ }
+ }.run();
+ }
+ }
+ }
+}
diff --git a/tests/tests/tv/src/android/media/tv/cts/Utils.java b/tests/tests/tv/src/android/media/tv/cts/Utils.java
index 0eb28c3..91f49b1 100644
--- a/tests/tests/tv/src/android/media/tv/cts/Utils.java
+++ b/tests/tests/tv/src/android/media/tv/cts/Utils.java
@@ -7,6 +7,6 @@
private Utils() { }
public static boolean hasTvInputFramework(Context context) {
- return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LEANBACK);
+ return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_LIVE_TV);
}
}
diff --git a/tests/tests/uirendering/res/layout/simple_red_layout.xml b/tests/tests/uirendering/res/layout/simple_red_layout.xml
index a785552..1ae3e38 100644
--- a/tests/tests/uirendering/res/layout/simple_red_layout.xml
+++ b/tests/tests/uirendering/res/layout/simple_red_layout.xml
@@ -16,4 +16,4 @@
<View xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="#f00" />
+ android:background="#f00" />
diff --git a/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/RectVerifier.java b/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/RectVerifier.java
index bb4b07c..b28812c 100644
--- a/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/RectVerifier.java
+++ b/tests/tests/uirendering/src/android/uirendering/cts/bitmapverifiers/RectVerifier.java
@@ -26,7 +26,7 @@
private Rect mInnerRect;
public RectVerifier(int outerColor, int innerColor, Rect innerRect) {
- this(outerColor, innerColor, innerRect, 0);
+ this(outerColor, innerColor, innerRect, 10);
}
public RectVerifier(int outerColor, int innerColor, Rect innerRect, int tolerance) {
diff --git a/tests/tests/uirendering/src/android/uirendering/cts/testclasses/InfrastructureTests.java b/tests/tests/uirendering/src/android/uirendering/cts/testclasses/InfrastructureTests.java
index a77fa5f..6662226 100644
--- a/tests/tests/uirendering/src/android/uirendering/cts/testclasses/InfrastructureTests.java
+++ b/tests/tests/uirendering/src/android/uirendering/cts/testclasses/InfrastructureTests.java
@@ -36,7 +36,7 @@
@SmallTest
public void testScreenshot() {
- for (int i = 0 ; i < 1000 ; i ++) {
+ for (int i = 0 ; i < 500 ; i ++) {
takeScreenshot();
System.gc();
}
diff --git a/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/ActivityTestBase.java b/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/ActivityTestBase.java
index b6665b0..c096c5d 100644
--- a/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/ActivityTestBase.java
+++ b/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/ActivityTestBase.java
@@ -85,20 +85,22 @@
*/
@Override
public void tearDown() {
- List<TestCase> testCases = mTestCaseBuilder.getTestCases();
+ if (mTestCaseBuilder != null) {
+ List<TestCase> testCases = mTestCaseBuilder.getTestCases();
- if (testCases.size() == 0) {
- throw new IllegalStateException("Must have at least one test case");
- }
-
- for (TestCase testCase : testCases) {
- if (!testCase.wasTestRan) {
- Log.w(TAG_NAME, getName() + " not all of the tests were ran");
- break;
+ if (testCases.size() == 0) {
+ throw new IllegalStateException("Must have at least one test case");
}
- }
- mTestCaseBuilder = null;
+
+ for (TestCase testCase : testCases) {
+ if (!testCase.wasTestRan) {
+ Log.w(TAG_NAME, getName() + " not all of the tests were ran");
+ break;
+ }
+ }
+ mTestCaseBuilder = null;
+ }
Runnable finishRunnable = new Runnable() {
diff --git a/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java b/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java
index c2104fe..1515a8a 100644
--- a/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java
+++ b/tests/tests/webkit/src/android/webkit/cts/WebSettingsTest.java
@@ -18,15 +18,19 @@
import android.content.Context;
import android.cts.util.PollingCheck;
import android.graphics.Bitmap;
+import android.net.http.SslError;
import android.os.Build;
import android.test.ActivityInstrumentationTestCase2;
import android.util.Log;
import android.webkit.ConsoleMessage;
+import android.webkit.SslErrorHandler;
import android.webkit.WebIconDatabase;
import android.webkit.WebSettings;
import android.webkit.WebSettings.TextSize;
import android.webkit.WebStorage;
import android.webkit.WebView;
+import android.webkit.WebViewClient;
+import android.webkit.cts.WebViewOnUiThread.WaitForLoadedClient;
import android.webkit.cts.WebViewOnUiThread.WaitForProgressClient;
import java.io.FileOutputStream;
import java.util.Locale;
@@ -932,6 +936,71 @@
fos.close();
}
+ public void testAllowMixedMode() throws Throwable {
+ if (!NullWebViewUtils.isWebViewAvailable()) {
+ return;
+ }
+ final class SslWebViewClient extends WaitForLoadedClient {
+ public SslWebViewClient() {
+ super(mOnUiThread);
+ }
+ @Override
+ public void onReceivedSslError(WebView view,
+ SslErrorHandler handler, SslError error) {
+ handler.proceed();
+ }
+ }
+
+ mSettings.setJavaScriptEnabled(true);
+ TestWebServer httpsServer = null;
+ TestWebServer httpServer = null;
+ try {
+ httpsServer = new TestWebServer(true);
+ httpServer = new TestWebServer(false);
+ final String JS_URL = "/insecure.js";
+ final String IMG_URL = "/insecure.png";
+ final String SECURE_URL = "/secure.html";
+ final String JS_HTML = "<script src=\"" + httpServer.getResponseUrl(JS_URL) +
+ "\"></script>";
+ final String IMG_HTML = "<img src=\"" + httpServer.getResponseUrl(IMG_URL) + "\" />";
+ final String SECURE_HTML = "<body>" + IMG_HTML + " " + JS_HTML + "</body>";
+ httpServer.setResponse(JS_URL, "window.loaded_js = 42;", null);
+ httpServer.setResponseBase64(IMG_URL,
+ "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
+ null);
+ String secureUrl = httpsServer.setResponse(SECURE_URL, SECURE_HTML, null);
+
+ mOnUiThread.clearSslPreferences();
+
+ mOnUiThread.setWebViewClient(new SslWebViewClient());
+
+ mSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_NEVER_ALLOW);
+ mOnUiThread.loadUrlAndWaitForCompletion(secureUrl);
+ assertEquals(1, httpsServer.getRequestCount(SECURE_URL));
+ assertEquals(0, httpServer.getRequestCount(JS_URL));
+ assertEquals(0, httpServer.getRequestCount(IMG_URL));
+
+ mSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
+ mOnUiThread.loadUrlAndWaitForCompletion(secureUrl);
+ assertEquals(2, httpsServer.getRequestCount(SECURE_URL));
+ assertEquals(1, httpServer.getRequestCount(JS_URL));
+ assertEquals(1, httpServer.getRequestCount(IMG_URL));
+
+ mSettings.setMixedContentMode(WebSettings.MIXED_CONTENT_COMPATIBILITY_MODE);
+ mOnUiThread.loadUrlAndWaitForCompletion(secureUrl);
+ assertEquals(3, httpsServer.getRequestCount(SECURE_URL));
+ assertEquals(1, httpServer.getRequestCount(JS_URL));
+ assertEquals(2, httpServer.getRequestCount(IMG_URL));
+ } finally {
+ if (httpServer != null) {
+ httpServer.shutdown();
+ }
+ if (httpsServer != null) {
+ httpsServer.shutdown();
+ }
+ }
+ }
+
/**
* Starts the internal web server. The server will be shut down automatically
* during tearDown().
diff --git a/tools/vm-tests-tf/src/dot/junit/DxAbstractMain.java b/tools/vm-tests-tf/src/dot/junit/DxAbstractMain.java
index d40fb94..dac6dcf 100644
--- a/tools/vm-tests-tf/src/dot/junit/DxAbstractMain.java
+++ b/tools/vm-tests-tf/src/dot/junit/DxAbstractMain.java
@@ -17,15 +17,104 @@
package dot.junit;
public class DxAbstractMain {
-
+
+ /* NOTE: Because of how tests are generated, this is replicated between
+ * this class and DxTestCase.
+ */
+
+ private static void checkError(Class<?> expectedErrorClass, Throwable thrown,
+ boolean in_invocation_exc) {
+ if (expectedErrorClass != null && thrown == null) {
+ fail("Expected error of type " + expectedErrorClass);
+ } else if (expectedErrorClass == null && thrown != null) {
+ fail("Unexpected error " + thrown);
+ } else if (expectedErrorClass != null && thrown != null) {
+ if (in_invocation_exc) {
+ if (!(thrown instanceof java.lang.reflect.InvocationTargetException)) {
+ fail("Expected invocation target exception, but got " + thrown);
+ }
+ thrown = thrown.getCause();
+ }
+ if (!expectedErrorClass.equals(thrown.getClass())) {
+ thrown.printStackTrace(System.err);
+ fail("Expected error of type " + expectedErrorClass + ", but got " +
+ thrown.getClass());
+ }
+ }
+ }
+
+ /**
+ * Try to load the class with the given name, and check for the expected error.
+ */
+ public static Class<?> load(String className, Class<?> expectedErrorClass) {
+ try {
+ Class<?> c = Class.forName(className);
+ checkError(expectedErrorClass, null, false);
+ return c;
+ } catch (Throwable t) {
+ if (expectedErrorClass != null) {
+ checkError(expectedErrorClass, t, false);
+ } else {
+ t.printStackTrace(System.err);
+ fail("Could not load class " + className + ": " + t);
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Try to load the class with the given name, find the "run" method and run it.
+ * If expectedErrorClass is not null, check for an exception of that class.
+ */
+ public static void loadAndRun(String className, boolean isStatic, boolean wrapped,
+ Class<?> expectedErrorClass, Object... args) {
+ Class<?> c = load(className, null);
+
+ java.lang.reflect.Method method = null;
+ // We expect only ever one declared method named run, but don't know the arguments. So
+ // search for one.
+ for (java.lang.reflect.Method m : c.getDeclaredMethods()) {
+ if (m.getName().equals("run")) {
+ method = m;
+ break;
+ }
+ }
+ if (method == null) {
+ fail("Could not find method 'run'");
+ }
+
+ Object receiver = null;
+ if (!isStatic) {
+ try {
+ receiver = c.newInstance();
+ } catch (Exception exc) {
+ fail("Could not instantiate " + className + ": " + exc.getMessage());
+ }
+ }
+
+ try {
+ method.invoke(receiver, args);
+ checkError(expectedErrorClass, null, false);
+ } catch (Throwable t) {
+ checkError(expectedErrorClass, t, wrapped);
+ }
+ }
+
+ public static void loadAndRun(String className, Class<?> expectedErrorClass) {
+ loadAndRun(className, false, true, expectedErrorClass);
+ }
+
+ public static void loadAndRun(String className, Class<?> expectedErrorClass, Object... args) {
+ loadAndRun(className, false, true, expectedErrorClass, args);
+ }
+
static public void assertEquals(int expected, int actual) {
if (expected != actual) throw new RuntimeException("AssertionFailedError: not equals. Expected " + expected + " actual " + actual);
}
-
+
static public void assertEquals(String message, int expected, int actual) {
if (expected != actual) throw new RuntimeException("AssertionFailedError: not equals: " + message + " Expected " + expected + " actual " + actual);
}
-
static public void assertEquals(long expected, long actual) {
if (expected != actual) throw new RuntimeException("AssertionFailedError: not equals. Expected " + expected + " actual " + actual);
@@ -34,7 +123,7 @@
static public void assertEquals(double expected, double actual, double delta) {
if(!(Math.abs(expected-actual) <= delta)) throw new RuntimeException("AssertionFailedError: not within delta");
}
-
+
static public void assertEquals(Object expected, Object actual) {
if (expected == null && actual == null)
return;
@@ -42,26 +131,24 @@
return;
throw new RuntimeException("AssertionFailedError: not the same");
}
-
+
static public void assertTrue(boolean condition) {
if (!condition) throw new RuntimeException("AssertionFailedError: condition was false");
}
-
+
static public void assertFalse(boolean condition) {
if (condition) throw new RuntimeException("AssertionFailedError: condition was true");
}
-
+
static public void assertNotNull(Object object) {
if (object == null) throw new RuntimeException("AssertionFailedError: object was null");
}
-
+
static public void assertNull(Object object) {
if (object != null) throw new RuntimeException("AssertionFailedError: object was not null");
}
-
+
static public void fail(String message) {
throw new RuntimeException("AssertionFailedError msg:"+message);
}
-
-
}
diff --git a/tools/vm-tests-tf/src/dot/junit/DxTestCase.java b/tools/vm-tests-tf/src/dot/junit/DxTestCase.java
index 00eb6fe..20142e0 100644
--- a/tools/vm-tests-tf/src/dot/junit/DxTestCase.java
+++ b/tools/vm-tests-tf/src/dot/junit/DxTestCase.java
@@ -19,7 +19,91 @@
import junit.framework.TestCase;
public class DxTestCase extends TestCase {
-
+
+ private static void checkError(Class<?> expectedErrorClass, Throwable thrown,
+ boolean in_invocation_exc) {
+ if (expectedErrorClass != null && thrown == null) {
+ fail("Expected error of type " + expectedErrorClass);
+ } else if (expectedErrorClass == null && thrown != null) {
+ fail("Unexpected error " + thrown);
+ } else if (expectedErrorClass != null && thrown != null) {
+ if (in_invocation_exc) {
+ if (!(thrown instanceof java.lang.reflect.InvocationTargetException)) {
+ fail("Expected invocation target exception, but got " + thrown);
+ }
+ thrown = thrown.getCause();
+ }
+ if (!expectedErrorClass.equals(thrown.getClass())) {
+ fail("Expected error of type " + expectedErrorClass + ", but got " +
+ thrown.getClass());
+ }
+ }
+ }
+
+ /**
+ * Try to load the class with the given name, and check for the expected error.
+ */
+ public static Class<?> load(String className, Class<?> expectedErrorClass) {
+ try {
+ Class<?> c = Class.forName(className);
+ checkError(expectedErrorClass, null, false);
+ return c;
+ } catch (Throwable t) {
+ if (expectedErrorClass != null) {
+ checkError(expectedErrorClass, t, false);
+ } else {
+ fail("Could not load class " + className + ": " + t);
+ }
+ return null;
+ }
+ }
+
+ /**
+ * Try to load the class with the given name, find the "run" method and run it.
+ * If expectedErrorClass is not null, check for an exception of that class.
+ */
+ public static void loadAndRun(String className, boolean isStatic, boolean wrapped,
+ Class<?> expectedErrorClass, Object... args) {
+ Class<?> c = load(className, null);
+
+ java.lang.reflect.Method method = null;
+ // We expect only ever one declared method named run, but don't know the arguments. So
+ // search for one.
+ for (java.lang.reflect.Method m : c.getDeclaredMethods()) {
+ if (m.getName().equals("run")) {
+ method = m;
+ break;
+ }
+ }
+ if (method == null) {
+ fail("Could not find method 'run'");
+ }
+
+ Object receiver = null;
+ if (!isStatic) {
+ try {
+ receiver = c.newInstance();
+ } catch (Exception exc) {
+ fail("Could not instantiate " + className + ": " + exc.getMessage());
+ }
+ }
+
+ try {
+ method.invoke(receiver, args);
+ checkError(expectedErrorClass, null, false);
+ } catch (Throwable t) {
+ checkError(expectedErrorClass, t, wrapped);
+ }
+ }
+
+ public static void loadAndRun(String className, Class<?> expectedErrorClass) {
+ loadAndRun(className, false, true, expectedErrorClass);
+ }
+
+ public static void loadAndRun(String className, Class<?> expectedErrorClass, Object... args) {
+ loadAndRun(className, false, true, expectedErrorClass, args);
+ }
+
// omit the "extends TestCase" and uncomment the following methods if you would like to run the tests as rolled-out, separate tests.
/*
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/Test_add_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/Test_add_double.java
index cbae239..d18db90 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/Test_add_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double/Test_add_double.java
@@ -132,12 +132,7 @@
* @title types of arguments - float, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.add_double.d.T_add_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double.d.T_add_double_2", VerifyError.class);
}
@@ -146,12 +141,7 @@
* @title types of arguments - double, reference
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_double.d.T_add_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double.d.T_add_double_4", VerifyError.class);
}
/**
@@ -159,12 +149,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_double.d.T_add_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double.d.T_add_double_5", VerifyError.class);
}
/**
@@ -172,12 +157,7 @@
* @title types of arguments - int, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_double.d.T_add_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double.d.T_add_double_6", VerifyError.class);
}
/**
@@ -186,11 +166,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_double.d.T_add_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double.d.T_add_double_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/Test_add_double_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/Test_add_double_2addr.java
index cdcee13..6880719 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/Test_add_double_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_double_2addr/Test_add_double_2addr.java
@@ -129,12 +129,7 @@
* @title types of arguments - float, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_2", VerifyError.class);
}
/**
@@ -142,12 +137,7 @@
* @title types of arguments - double, reference
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_4", VerifyError.class);
}
/**
@@ -155,12 +145,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_6", VerifyError.class);
}
/**
@@ -168,12 +153,7 @@
* @title types of arguments - double, reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_4", VerifyError.class);
}
/**
@@ -182,11 +162,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_double_2addr.d.T_add_double_2addr_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_float/Test_add_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_float/Test_add_float.java
index 56288c2..74f1dfa 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_float/Test_add_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_float/Test_add_float.java
@@ -131,12 +131,7 @@
* @title types of arguments - float, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.add_float.d.T_add_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float.d.T_add_float_2", VerifyError.class);
}
/**
@@ -144,12 +139,7 @@
* @title types of arguments - long, float
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_float.d.T_add_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float.d.T_add_float_3", VerifyError.class);
}
/**
@@ -157,12 +147,7 @@
* @title types of arguments - float, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_float.d.T_add_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float.d.T_add_float_4", VerifyError.class);
}
/**
@@ -170,12 +155,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_float.d.T_add_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float.d.T_add_float_6", VerifyError.class);
}
/**
@@ -184,12 +164,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_float.d.T_add_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float.d.T_add_float_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_float_2addr/Test_add_float_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_float_2addr/Test_add_float_2addr.java
index a9b5aca..9d8a8ad 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_float_2addr/Test_add_float_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_float_2addr/Test_add_float_2addr.java
@@ -131,12 +131,7 @@
* @title types of arguments - float, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_2", VerifyError.class);
}
/**
@@ -144,12 +139,7 @@
* @title types of arguments - long, float
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_3", VerifyError.class);
}
/**
@@ -157,12 +147,7 @@
* @title types of arguments - float, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_4", VerifyError.class);
}
/**
@@ -170,12 +155,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_6", VerifyError.class);
}
/**
@@ -184,12 +164,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_float_2addr.d.T_add_float_2addr_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_int/Test_add_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_int/Test_add_int.java
index a6d619b..3f66616 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_int/Test_add_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_int/Test_add_int.java
@@ -127,12 +127,7 @@
* @title types of arguments - int, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.add_int.d.T_add_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int.d.T_add_int_2", VerifyError.class);
}
/**
@@ -140,12 +135,7 @@
* @title types of arguments - long, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_int.d.T_add_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int.d.T_add_int_3", VerifyError.class);
}
/**
@@ -153,12 +143,7 @@
* @title types of arguments - reference, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_int.d.T_add_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int.d.T_add_int_4", VerifyError.class);
}
/**
@@ -166,12 +151,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_int.d.T_add_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int.d.T_add_int_6", VerifyError.class);
}
/**
@@ -180,11 +160,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_int.d.T_add_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int.d.T_add_int_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_2addr/Test_add_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_2addr/Test_add_int_2addr.java
index 3253c9c..40ff8b9 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_2addr/Test_add_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_2addr/Test_add_int_2addr.java
@@ -126,12 +126,7 @@
* @title types of arguments - int, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_2", VerifyError.class);
}
/**
@@ -139,12 +134,7 @@
* @title types of arguments - long, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_3", VerifyError.class);
}
/**
@@ -152,12 +142,7 @@
* @title types of arguments - reference, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_4", VerifyError.class);
}
/**
@@ -165,12 +150,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_6", VerifyError.class);
}
/**
@@ -179,11 +159,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_2addr.d.T_add_int_2addr_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_lit16/Test_add_int_lit16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_lit16/Test_add_int_lit16.java
index b94058a..77e5660 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_lit16/Test_add_int_lit16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_lit16/Test_add_int_lit16.java
@@ -137,12 +137,7 @@
* @title types of arguments - int, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_13", VerifyError.class);
}
/**
@@ -150,12 +145,7 @@
* @title types of arguments - long, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_14", VerifyError.class);
}
/**
@@ -163,12 +153,7 @@
* @title types of arguments - reference, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_15", VerifyError.class);
}
/**
@@ -176,12 +161,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_17", VerifyError.class);
}
/**
@@ -190,11 +170,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit16.d.T_add_int_lit16_16", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_lit8/Test_add_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_lit8/Test_add_int_lit8.java
index b1fab12..6924a13 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_lit8/Test_add_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_int_lit8/Test_add_int_lit8.java
@@ -137,12 +137,7 @@
* @title types of arguments - int, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_13", VerifyError.class);
}
/**
@@ -150,12 +145,7 @@
* @title types of arguments - long, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_14", VerifyError.class);
}
/**
@@ -163,12 +153,7 @@
* @title types of arguments - reference, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_15", VerifyError.class);
}
/**
@@ -176,12 +161,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_17", VerifyError.class);
}
/**
@@ -190,11 +170,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_int_lit8.d.T_add_int_lit8_16", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/Test_add_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/Test_add_long.java
index 1d403b2..5f6e4f7 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/Test_add_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long/Test_add_long.java
@@ -118,12 +118,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.add_long.d.T_add_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long.d.T_add_long_2", VerifyError.class);
}
/**
@@ -131,12 +126,7 @@
* @title types of arguments - long / integer
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_long.d.T_add_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long.d.T_add_long_3", VerifyError.class);
}
/**
@@ -144,12 +134,7 @@
* @title types of arguments - long / float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_long.d.T_add_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long.d.T_add_long_4", VerifyError.class);
}
/**
@@ -157,12 +142,7 @@
* @title types of arguments - reference / long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_long.d.T_add_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long.d.T_add_long_5", VerifyError.class);
}
/**
@@ -171,11 +151,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_long.d.T_add_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long.d.T_add_long_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/Test_add_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/Test_add_long_2addr.java
index f801cf8..0fcbd17 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/Test_add_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/add_long_2addr/Test_add_long_2addr.java
@@ -118,12 +118,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_2", VerifyError.class);
}
/**
@@ -131,12 +126,7 @@
* @title types of arguments - long / integer
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_3", VerifyError.class);
}
/**
@@ -144,12 +134,7 @@
* @title types of arguments - long / float
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_4", VerifyError.class);
}
/**
@@ -157,12 +142,7 @@
* @title types of arguments - reference / long
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_5", VerifyError.class);
}
/**
@@ -171,11 +151,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.add_long_2addr.d.T_add_long_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aget/Test_aget.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aget/Test_aget.java
index da94745..3ac061d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aget/Test_aget.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aget/Test_aget.java
@@ -46,56 +46,31 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aget_1 t = new T_aget_1();
- int[] arr = new int[2];
- try {
- t.run(arr, 2);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget.d.T_aget_1", ArrayIndexOutOfBoundsException.class,
+ new int[2], 2);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aget_1 t = new T_aget_1();
- try {
- t.run(null, 2);
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget.d.T_aget_1", NullPointerException.class, null, 2);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aget_1 t = new T_aget_1();
- int[] arr = new int[2];
- try {
- t.run(arr, -1);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget.d.T_aget_1", ArrayIndexOutOfBoundsException.class,
+ new int[2], -1);
}
-
-
/**
* @constraint B1
* @title types of arguments - array, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aget.d.T_aget_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget.d.T_aget_2", VerifyError.class);
}
/**
@@ -103,12 +78,7 @@
* @title types of arguments - array, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aget.d.T_aget_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget.d.T_aget_3", VerifyError.class);
}
/**
@@ -116,12 +86,7 @@
* @title types of arguments - Object, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aget.d.T_aget_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget.d.T_aget_4", VerifyError.class);
}
/**
@@ -129,12 +94,7 @@
* @title types of arguments - double[], int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aget.d.T_aget_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget.d.T_aget_5", VerifyError.class);
}
/**
@@ -142,12 +102,7 @@
* @title types of arguments - long[], int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aget.d.T_aget_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget.d.T_aget_6", VerifyError.class);
}
/**
@@ -155,12 +110,7 @@
* @title types of arguments - array, reference
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aget.d.T_aget_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget.d.T_aget_7", VerifyError.class);
}
/**
@@ -168,12 +118,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aget.d.T_aget_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget.d.T_aget_9", VerifyError.class);
}
/**
@@ -182,12 +127,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aget.d.T_aget_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget.d.T_aget_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_boolean/Test_aget_boolean.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_boolean/Test_aget_boolean.java
index 2e2a3e8..3578f07 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_boolean/Test_aget_boolean.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_boolean/Test_aget_boolean.java
@@ -46,41 +46,24 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aget_boolean_1 t = new T_aget_boolean_1();
- boolean[] arr = new boolean[2];
- try {
- t.run(arr, 2);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_1",
+ ArrayIndexOutOfBoundsException.class, new boolean[2], 2);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aget_boolean_1 t = new T_aget_boolean_1();
- try {
- t.run(null, 2);
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_1", NullPointerException.class,
+ null, 2);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aget_boolean_1 t = new T_aget_boolean_1();
- boolean[] arr = new boolean[2];
- try {
- t.run(arr, -1);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_1",
+ ArrayIndexOutOfBoundsException.class, new boolean[2], -1);
}
@@ -90,12 +73,7 @@
* @title types of arguments - array, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_2", VerifyError.class);
}
/**
@@ -103,12 +81,7 @@
* @title types of arguments - array, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_3", VerifyError.class);
}
/**
@@ -116,12 +89,7 @@
* @title types of arguments - Object, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_4", VerifyError.class);
}
/**
@@ -129,12 +97,7 @@
* @title types of arguments - double[], int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_5", VerifyError.class);
}
/**
@@ -142,12 +105,7 @@
* @title types of arguments - long[], int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_6", VerifyError.class);
}
/**
@@ -155,12 +113,7 @@
* @title types of arguments - array, reference
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_7", VerifyError.class);
}
/**
@@ -168,12 +121,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_9", VerifyError.class);
}
/**
@@ -182,11 +130,6 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_boolean.d.T_aget_boolean_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_byte/Test_aget_byte.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_byte/Test_aget_byte.java
index 57ca7e4..f5b2b8a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_byte/Test_aget_byte.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_byte/Test_aget_byte.java
@@ -47,56 +47,32 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aget_byte_1 t = new T_aget_byte_1();
- byte[] arr = new byte[2];
- try {
- t.run(arr, 2);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_byte.d.T_aget_byte_1",
+ ArrayIndexOutOfBoundsException.class, new byte[2], 2);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aget_byte_1 t = new T_aget_byte_1();
- try {
- t.run(null, 2);
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_byte.d.T_aget_byte_1", NullPointerException.class, null,
+ 2);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aget_byte_1 t = new T_aget_byte_1();
- byte[] arr = new byte[2];
- try {
- t.run(arr, -1);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_byte.d.T_aget_byte_1",
+ ArrayIndexOutOfBoundsException.class, new byte[2], -1);
}
-
-
/**
* @constraint B1
* @title types of arguments - array, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aget_byte.d.T_aget_byte_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_byte.d.T_aget_byte_2", VerifyError.class);
}
/**
@@ -104,12 +80,7 @@
* @title types of arguments - array, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aget_byte.d.T_aget_byte_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_byte.d.T_aget_byte_3", VerifyError.class);
}
/**
@@ -117,12 +88,7 @@
* @title types of arguments - Object, short
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aget_byte.d.T_aget_byte_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_byte.d.T_aget_byte_4", VerifyError.class);
}
/**
@@ -130,12 +96,7 @@
* @title types of arguments - double[], int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aget_byte.d.T_aget_byte_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_byte.d.T_aget_byte_5", VerifyError.class);
}
/**
@@ -143,12 +104,7 @@
* @title types of arguments - int[], int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aget_byte.d.T_aget_byte_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_byte.d.T_aget_byte_6", VerifyError.class);
}
/**
@@ -156,12 +112,7 @@
* @title types of arguments - array, reference
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aget_byte.d.T_aget_byte_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_byte.d.T_aget_byte_7", VerifyError.class);
}
/**
@@ -169,12 +120,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aget_byte.d.T_aget_byte_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_byte.d.T_aget_byte_9", VerifyError.class);
}
/**
@@ -183,12 +129,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aget_byte.d.T_aget_byte_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_byte.d.T_aget_byte_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_char/Test_aget_char.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_char/Test_aget_char.java
index e9c8ca6..09dabc7 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_char/Test_aget_char.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_char/Test_aget_char.java
@@ -46,41 +46,24 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aget_char_1 t = new T_aget_char_1();
- char[] arr = new char[2];
- try {
- t.run(arr, 2);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_char.d.T_aget_char_1",
+ ArrayIndexOutOfBoundsException.class, new char[2], 2);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aget_char_1 t = new T_aget_char_1();
- try {
- t.run(null, 2);
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_char.d.T_aget_char_1",
+ NullPointerException.class, null, 2);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aget_char_1 t = new T_aget_char_1();
- char[] arr = new char[2];
- try {
- t.run(arr, -1);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_char.d.T_aget_char_1",
+ ArrayIndexOutOfBoundsException.class, new char[2], -1);
}
@@ -90,12 +73,7 @@
* @title types of arguments - array, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aget_char.d.T_aget_char_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_char.d.T_aget_char_2", VerifyError.class);
}
/**
@@ -103,12 +81,7 @@
* @title types of arguments - array, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aget_char.d.T_aget_char_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_char.d.T_aget_char_3", VerifyError.class);
}
/**
@@ -116,12 +89,7 @@
* @title types of arguments - Object, char
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aget_char.d.T_aget_char_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_char.d.T_aget_char_4", VerifyError.class);
}
/**
@@ -129,12 +97,7 @@
* @title types of arguments - double[], char
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aget_char.d.T_aget_char_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_char.d.T_aget_char_5", VerifyError.class);
}
/**
@@ -142,12 +105,7 @@
* @title types of arguments - int[], int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aget_char.d.T_aget_char_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_char.d.T_aget_char_6", VerifyError.class);
}
/**
@@ -155,12 +113,7 @@
* @title types of arguments - array, reference
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aget_char.d.T_aget_char_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_char.d.T_aget_char_7", VerifyError.class);
}
/**
@@ -168,12 +121,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aget_char.d.T_aget_char_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_char.d.T_aget_char_9", VerifyError.class);
}
/**
@@ -182,11 +130,6 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aget_char.d.T_aget_char_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_char.d.T_aget_char_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_object/Test_aget_object.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_object/Test_aget_object.java
index a99bae1..7afe803 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_object/Test_aget_object.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_object/Test_aget_object.java
@@ -45,42 +45,24 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aget_object_1 t = new T_aget_object_1();
- String[] arr = new String[] {"a", "b"};
- try {
- t.run(arr, 2);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aioobe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_object.d.T_aget_object_1",
+ ArrayIndexOutOfBoundsException.class, new String[2], 2);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE2() {
- T_aget_object_1 t = new T_aget_object_1();
- String[] arr = new String[] {"a", "b"};
- try {
- t.run(arr, -1);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aioobe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_object.d.T_aget_object_1",
+ ArrayIndexOutOfBoundsException.class, new String[2], -1);
}
/**
* @title expected NullPointerException
*/
public void testE3() {
- T_aget_object_1 t = new T_aget_object_1();
- String[] arr = null;
- try {
- t.run(arr, 0);
- fail("expected NullPointerException");
- } catch (NullPointerException npe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_object.d.T_aget_object_1", NullPointerException.class,
+ null, 0);
}
/**
@@ -88,12 +70,7 @@
* @title types of arguments - array, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aget_object.d.T_aget_object_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_object.d.T_aget_object_2", VerifyError.class);
}
/**
@@ -101,12 +78,7 @@
* @title types of arguments - array, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aget_object.d.T_aget_object_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_object.d.T_aget_object_3", VerifyError.class);
}
/**
@@ -114,12 +86,7 @@
* @title types of arguments - Object, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aget_object.d.T_aget_object_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_object.d.T_aget_object_4", VerifyError.class);
}
/**
@@ -127,12 +94,7 @@
* @title types of arguments - float[], int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aget_object.d.T_aget_object_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_object.d.T_aget_object_5", VerifyError.class);
}
/**
@@ -140,12 +102,7 @@
* @title types of arguments - long[], int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aget_object.d.T_aget_object_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_object.d.T_aget_object_6", VerifyError.class);
}
/**
@@ -153,12 +110,7 @@
* @title types of arguments - array, reference
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aget_object.d.T_aget_object_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_object.d.T_aget_object_7", VerifyError.class);
}
/**
@@ -166,12 +118,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aget_object.d.T_aget_object_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_object.d.T_aget_object_9", VerifyError.class);
}
/**
@@ -180,12 +127,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aget_object.d.T_aget_object_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_object.d.T_aget_object_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_short/Test_aget_short.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_short/Test_aget_short.java
index e5801ae..334f8c1 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_short/Test_aget_short.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_short/Test_aget_short.java
@@ -46,56 +46,32 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aget_short_1 t = new T_aget_short_1();
- short[] arr = new short[2];
- try {
- t.run(arr, 2);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_short.d.T_aget_short_1",
+ ArrayIndexOutOfBoundsException.class, new short[2], 2);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aget_short_1 t = new T_aget_short_1();
- try {
- t.run(null, 2);
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_short.d.T_aget_short_1", NullPointerException.class,
+ null, 2);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aget_short_1 t = new T_aget_short_1();
- short[] arr = new short[2];
- try {
- t.run(arr, -1);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_short.d.T_aget_short_1",
+ ArrayIndexOutOfBoundsException.class, new short[2], -1);
}
-
-
/**
* @constraint B1
* @title types of arguments - array, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aget_short.d.T_aget_short_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_short.d.T_aget_short_2", VerifyError.class);
}
/**
@@ -103,12 +79,7 @@
* @title types of arguments - array, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aget_short.d.T_aget_short_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_short.d.T_aget_short_3", VerifyError.class);
}
/**
@@ -116,12 +87,7 @@
* @title types of arguments - Object, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aget_short.d.T_aget_short_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_short.d.T_aget_short_4", VerifyError.class);
}
/**
@@ -129,12 +95,7 @@
* @title types of arguments - double[], int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aget_short.d.T_aget_short_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_short.d.T_aget_short_5", VerifyError.class);
}
/**
@@ -142,12 +103,7 @@
* @title types of arguments - int[], int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aget_short.d.T_aget_short_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_short.d.T_aget_short_6", VerifyError.class);
}
/**
@@ -155,12 +111,7 @@
* @title types of arguments - array, reference
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aget_short.d.T_aget_short_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_short.d.T_aget_short_7", VerifyError.class);
}
/**
@@ -168,12 +119,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aget_short.d.T_aget_short_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_short.d.T_aget_short_9", VerifyError.class);
}
/**
@@ -182,11 +128,6 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aget_short.d.T_aget_short_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_short.d.T_aget_short_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_wide/Test_aget_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_wide/Test_aget_wide.java
index fb9744d..fbbde61 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aget_wide/Test_aget_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aget_wide/Test_aget_wide.java
@@ -59,56 +59,32 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aget_wide_1 t = new T_aget_wide_1();
- long[] arr = new long[2];
- try {
- t.run(arr, 2);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_wide.d.T_aget_wide_1",
+ ArrayIndexOutOfBoundsException.class, new long[2], 2);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aget_wide_1 t = new T_aget_wide_1();
- try {
- t.run(null, 2);
- fail("expected NullPointerException");
- } catch (NullPointerException np) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_wide.d.T_aget_wide_1", NullPointerException.class,
+ null, 2);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aget_wide_1 t = new T_aget_wide_1();
- long[] arr = new long[2];
- try {
- t.run(arr, -1);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aget_wide.d.T_aget_wide_1",
+ ArrayIndexOutOfBoundsException.class, new long[2], -1);
}
-
-
/**
* @constraint B1
* @title types of arguments - array, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aget_wide.d.T_aget_wide_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_wide.d.T_aget_wide_3", VerifyError.class);
}
/**
@@ -116,12 +92,7 @@
* @title types of arguments - array, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aget_wide.d.T_aget_wide_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_wide.d.T_aget_wide_5", VerifyError.class);
}
/**
@@ -129,12 +100,7 @@
* @title types of arguments - Object, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aget_wide.d.T_aget_wide_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_wide.d.T_aget_wide_6", VerifyError.class);
}
/**
@@ -142,12 +108,7 @@
* @title types of arguments - int[], int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aget_wide.d.T_aget_wide_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_wide.d.T_aget_wide_7", VerifyError.class);
}
/**
@@ -155,12 +116,7 @@
* @title types of arguments - array, reference
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aget_wide.d.T_aget_wide_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_wide.d.T_aget_wide_8", VerifyError.class);
}
/**
@@ -168,12 +124,7 @@
* @title number of registers
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aget_wide.d.T_aget_wide_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_wide.d.T_aget_wide_9", VerifyError.class);
}
/**
@@ -181,12 +132,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aget_wide.d.T_aget_wide_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_wide.d.T_aget_wide_11", VerifyError.class);
}
/**
@@ -195,11 +141,6 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aget_wide.d.T_aget_wide_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aget_wide.d.T_aget_wide_10", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/and_int/Test_and_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/and_int/Test_and_int.java
index 0afc0bc..fa75935 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/and_int/Test_and_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/and_int/Test_and_int.java
@@ -71,12 +71,7 @@
* and floats are not used interchangeably.
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.and_int.d.T_and_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int.d.T_and_int_5", VerifyError.class);
}
/**
@@ -84,12 +79,7 @@
* @title types of arguments - double & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.and_int.d.T_and_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int.d.T_and_int_2", VerifyError.class);
}
/**
@@ -97,12 +87,7 @@
* @title types of arguments - long & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.and_int.d.T_and_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int.d.T_and_int_3", VerifyError.class);
}
/**
@@ -110,12 +95,7 @@
* @title types of arguments - int & reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.and_int.d.T_and_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int.d.T_and_int_4", VerifyError.class);
}
/**
@@ -123,11 +103,6 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.and_int.d.T_and_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int.d.T_and_int_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_2addr/Test_and_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_2addr/Test_and_int_2addr.java
index 7a13653..1ea0b9d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_2addr/Test_and_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_2addr/Test_and_int_2addr.java
@@ -70,12 +70,7 @@
* and floats are not used interchangeably.
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_5", VerifyError.class);
}
/**
@@ -83,12 +78,7 @@
* @title types of arguments - double & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_2", VerifyError.class);
}
/**
@@ -96,12 +86,7 @@
* @title types of arguments - long & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_3", VerifyError.class);
}
/**
@@ -109,12 +94,7 @@
* @title types of arguments - int & reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_4", VerifyError.class);
}
/**
@@ -122,11 +102,6 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_2addr.d.T_and_int_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_lit16/Test_and_int_lit16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_lit16/Test_and_int_lit16.java
index 2593da4..1a89ca1 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_lit16/Test_and_int_lit16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_lit16/Test_and_int_lit16.java
@@ -73,12 +73,7 @@
* @title types of arguments - double & int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_6", VerifyError.class);
}
/**
@@ -86,12 +81,7 @@
* @title types of arguments - long & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_7", VerifyError.class);
}
/**
@@ -99,12 +89,7 @@
* @title types of arguments - int & reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_8", VerifyError.class);
}
/**
@@ -112,12 +97,7 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_10", VerifyError.class);
}
/**
@@ -126,11 +106,6 @@
* and floats are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit16.d.T_and_int_lit16_9", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_lit8/Test_and_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_lit8/Test_and_int_lit8.java
index 578e857..343bb3a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_lit8/Test_and_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/and_int_lit8/Test_and_int_lit8.java
@@ -73,12 +73,7 @@
* @title types of arguments - double & int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_6", VerifyError.class);
}
/**
@@ -86,12 +81,7 @@
* @title types of arguments - long & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_7", VerifyError.class);
}
/**
@@ -99,12 +89,7 @@
* @title types of arguments - int & reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_8", VerifyError.class);
}
/**
@@ -112,12 +97,7 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_10", VerifyError.class);
}
/**
@@ -126,11 +106,6 @@
* and longs are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_int_lit8.d.T_and_int_lit8_9", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/and_long/Test_and_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/and_long/Test_and_long.java
index b0ba073..03e60ea 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/and_long/Test_and_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/and_long/Test_and_long.java
@@ -71,12 +71,7 @@
* @title types of arguments - float & long
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.and_long.d.T_and_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long.d.T_and_long_2", VerifyError.class);
}
/**
@@ -84,12 +79,7 @@
* @title types of arguments - int & long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.and_long.d.T_and_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long.d.T_and_long_3", VerifyError.class);
}
/**
@@ -97,12 +87,7 @@
* @title types of arguments - reference & long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.and_long.d.T_and_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long.d.T_and_long_4", VerifyError.class);
}
/**
@@ -110,12 +95,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.and_long.d.T_and_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long.d.T_and_long_5", VerifyError.class);
}
/**
@@ -124,11 +104,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.and_long.d.T_and_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long.d.T_and_long_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/and_long_2addr/Test_and_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/and_long_2addr/Test_and_long_2addr.java
index e3b8969..b791342 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/and_long_2addr/Test_and_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/and_long_2addr/Test_and_long_2addr.java
@@ -70,12 +70,7 @@
* @title types of arguments - float & long
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_2", VerifyError.class);
}
/**
@@ -83,12 +78,7 @@
* @title types of arguments - int & long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_3", VerifyError.class);
}
/**
@@ -96,12 +86,7 @@
* @title types of arguments - reference & long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_4", VerifyError.class);
}
/**
@@ -109,12 +94,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_5", VerifyError.class);
}
/**
@@ -123,11 +103,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.and_long_2addr.d.T_and_long_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aput/Test_aput.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aput/Test_aput.java
index a41dc58..3bf95c8 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aput/Test_aput.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aput/Test_aput.java
@@ -47,41 +47,24 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aput_1 t = new T_aput_1();
- int[] arr = new int[2];
- try {
- t.run(arr, 2, 100000000);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput.d.T_aput_1", ArrayIndexOutOfBoundsException.class,
+ new int[2], 2, 100000000);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aput_1 t = new T_aput_1();
- try {
- t.run(null, 2, 100000000);
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput.d.T_aput_1", NullPointerException.class,
+ null, 2, 100000000);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aput_1 t = new T_aput_1();
- int[] arr = new int[2];
- try {
- t.run(arr, -1, 100000000);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput.d.T_aput_1", ArrayIndexOutOfBoundsException.class,
+ new int[2], -1, 100000000);
}
@@ -91,12 +74,7 @@
* @title types of arguments - array, double, int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aput.d.T_aput_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput.d.T_aput_2", VerifyError.class);
}
/**
@@ -104,12 +82,7 @@
* @title types of arguments - array, int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aput.d.T_aput_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput.d.T_aput_3", VerifyError.class);
}
/**
@@ -117,12 +90,7 @@
* @title types of arguments - object, int, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aput.d.T_aput_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput.d.T_aput_4", VerifyError.class);
}
/**
@@ -130,12 +98,7 @@
* @title types of arguments - double[], int, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aput.d.T_aput_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput.d.T_aput_5", VerifyError.class);
}
/**
@@ -143,12 +106,7 @@
* @title types of arguments - long[], int, int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aput.d.T_aput_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput.d.T_aput_6", VerifyError.class);
}
/**
@@ -156,12 +114,7 @@
* @title types of arguments - array, reference, int
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aput.d.T_aput_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput.d.T_aput_7", VerifyError.class);
}
/**
@@ -169,12 +122,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aput.d.T_aput_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput.d.T_aput_9", VerifyError.class);
}
/**
@@ -183,11 +131,6 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aput.d.T_aput_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput.d.T_aput_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_boolean/Test_aput_boolean.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_boolean/Test_aput_boolean.java
index f4fe940..fb31499 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_boolean/Test_aput_boolean.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_boolean/Test_aput_boolean.java
@@ -46,56 +46,32 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aput_boolean_1 t = new T_aput_boolean_1();
- boolean[] arr = new boolean[2];
- try {
- t.run(arr, 2, true);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_1",
+ ArrayIndexOutOfBoundsException.class, new boolean[2], 2, true);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aput_boolean_1 t = new T_aput_boolean_1();
- try {
- t.run(null, 2, true);
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_1",
+ NullPointerException.class, null, 2, true);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aput_boolean_1 t = new T_aput_boolean_1();
- boolean[] arr = new boolean[2];
- try {
- t.run(arr, -1, true);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_1",
+ ArrayIndexOutOfBoundsException.class, new boolean[2], -1, true);
}
-
-
/**
* @constraint B1
* @title types of arguments - array, double, int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_2", VerifyError.class);
}
/**
@@ -103,12 +79,7 @@
* @title types of arguments - array, int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_3", VerifyError.class);
}
/**
@@ -116,12 +87,7 @@
* @title types of arguments - object, int, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_4", VerifyError.class);
}
/**
@@ -129,12 +95,7 @@
* @title types of arguments - double[], int, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_5", VerifyError.class);
}
/**
@@ -142,12 +103,7 @@
* @title types of arguments - long[], int, int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_6", VerifyError.class);
}
/**
@@ -155,12 +111,7 @@
* @title types of arguments - array, reference, int
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_7", VerifyError.class);
}
/**
@@ -168,12 +119,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_9", VerifyError.class);
}
/**
@@ -182,12 +128,7 @@
* and floats are not used interchangeably.
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_boolean.d.T_aput_boolean_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_byte/Test_aput_byte.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_byte/Test_aput_byte.java
index 396e5b7..60352c3 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_byte/Test_aput_byte.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_byte/Test_aput_byte.java
@@ -46,41 +46,24 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aput_byte_1 t = new T_aput_byte_1();
- byte[] arr = new byte[2];
- try {
- t.run(arr, 2, (byte) 100);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_byte.d.T_aput_byte_1",
+ ArrayIndexOutOfBoundsException.class, new byte[2], 2, (byte) 100);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aput_byte_1 t = new T_aput_byte_1();
- try {
- t.run(null, 2, (byte) 100);
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_byte.d.T_aput_byte_1",
+ NullPointerException.class, null, 2, (byte) 100);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aput_byte_1 t = new T_aput_byte_1();
- byte[] arr = new byte[2];
- try {
- t.run(arr, -1, (byte) 100);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_byte.d.T_aput_byte_1",
+ ArrayIndexOutOfBoundsException.class, new byte[2], -1, (byte) 100);
}
@@ -91,12 +74,7 @@
* @title types of arguments - array, double, short
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aput_byte.d.T_aput_byte_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_byte.d.T_aput_byte_2", VerifyError.class);
}
/**
@@ -104,12 +82,7 @@
* @title types of arguments - array, int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aput_byte.d.T_aput_byte_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_byte.d.T_aput_byte_3", VerifyError.class);
}
/**
@@ -117,12 +90,7 @@
* @title types of arguments - object, int, short
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aput_byte.d.T_aput_byte_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_byte.d.T_aput_byte_4", VerifyError.class);
}
/**
@@ -130,12 +98,7 @@
* @title types of arguments - double[], int, short
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aput_byte.d.T_aput_byte_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_byte.d.T_aput_byte_5", VerifyError.class);
}
/**
@@ -143,12 +106,7 @@
* @title types of arguments - long[], int, short
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aput_byte.d.T_aput_byte_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_byte.d.T_aput_byte_6", VerifyError.class);
}
/**
@@ -156,12 +114,7 @@
* @title types of arguments - array, reference, short
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aput_byte.d.T_aput_byte_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_byte.d.T_aput_byte_7", VerifyError.class);
}
/**
@@ -169,12 +122,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aput_byte.d.T_aput_byte_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_byte.d.T_aput_byte_9", VerifyError.class);
}
/**
@@ -183,12 +131,7 @@
* and floats are not used interchangeably.
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.aput_byte.d.T_aput_byte_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_byte.d.T_aput_byte_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_char/Test_aput_char.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_char/Test_aput_char.java
index 8698034..952f4dd 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_char/Test_aput_char.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_char/Test_aput_char.java
@@ -47,57 +47,32 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aput_char_1 t = new T_aput_char_1();
- char[] arr = new char[2];
- try {
- t.run(arr, 2, 'g');
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_char.d.T_aput_char_1",
+ ArrayIndexOutOfBoundsException.class, new char[2], 2, 'g');
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aput_char_1 t = new T_aput_char_1();
- try {
- t.run(null, 2, 'g');
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_char.d.T_aput_char_1", NullPointerException.class, null,
+ 0, 'g');
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aput_char_1 t = new T_aput_char_1();
- char[] arr = new char[2];
- try {
- t.run(arr, -1, 'g');
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_char.d.T_aput_char_1",
+ ArrayIndexOutOfBoundsException.class, new char[2], -1, 'g');
}
-
-
-
/**
* @constraint B1
* @title types of arguments - array, double, char
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aput_char.d.T_aput_char_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_char.d.T_aput_char_2", VerifyError.class);
}
/**
@@ -105,12 +80,7 @@
* @title types of arguments - array, int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aput_char.d.T_aput_char_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_char.d.T_aput_char_3", VerifyError.class);
}
/**
@@ -118,12 +88,7 @@
* @title types of arguments - object, int, char
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aput_char.d.T_aput_char_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_char.d.T_aput_char_4", VerifyError.class);
}
/**
@@ -131,12 +96,7 @@
* @title types of arguments - double[], int, char
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aput_char.d.T_aput_char_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_char.d.T_aput_char_5", VerifyError.class);
}
/**
@@ -144,12 +104,7 @@
* @title types of arguments - long[], int, char
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aput_char.d.T_aput_char_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_char.d.T_aput_char_6", VerifyError.class);
}
/**
@@ -157,12 +112,7 @@
* @title types of arguments - array, reference, char
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aput_char.d.T_aput_char_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_char.d.T_aput_char_7", VerifyError.class);
}
/**
@@ -170,12 +120,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aput_char.d.T_aput_char_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_char.d.T_aput_char_9", VerifyError.class);
}
/**
@@ -184,12 +129,6 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aput_char.d.T_aput_char_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_char.d.T_aput_char_8", VerifyError.class);
}
-
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_object/Test_aput_object.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_object/Test_aput_object.java
index 86c3159..4dce800 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_object/Test_aput_object.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_object/Test_aput_object.java
@@ -72,56 +72,33 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aput_object_1 t = new T_aput_object_1();
- String[] arr = new String[2];
- try {
- t.run(arr, arr.length, "abc");
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_object.d.T_aput_object_1",
+ ArrayIndexOutOfBoundsException.class, new String[2], 2, "abc");
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE2() {
- T_aput_object_1 t = new T_aput_object_1();
- String[] arr = new String[2];
- try {
- t.run(arr, -1, "abc");
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_object.d.T_aput_object_1",
+ ArrayIndexOutOfBoundsException.class, new String[2], -1, "abc");
+
}
/**
* @title expected NullPointerException
*/
public void testE3() {
- T_aput_object_1 t = new T_aput_object_1();
- String[] arr = null;
- try {
- t.run(arr, 0, "abc");
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_object.d.T_aput_object_1", NullPointerException.class,
+ null, 0, "abc");
}
/**
* @title expected ArrayStoreException
*/
public void testE4() {
- T_aput_object_4 t = new T_aput_object_4();
- String[] arr = new String[2];
- try {
- t.run(arr, 0, t);
- fail("expected ArrayStoreException");
- } catch (ArrayStoreException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_object.d.T_aput_object_4", ArrayStoreException.class,
+ new String[2], 0, new Integer(1));
}
@@ -130,12 +107,7 @@
* @title types of arguments - array, double, String
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aput_object.d.T_aput_object_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_object.d.T_aput_object_5", VerifyError.class);
}
/**
@@ -143,12 +115,7 @@
* @title types of arguments - array, int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aput_object.d.T_aput_object_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_object.d.T_aput_object_6", VerifyError.class);
}
/**
@@ -156,12 +123,7 @@
* @title types of arguments - object, int, String
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aput_object.d.T_aput_object_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_object.d.T_aput_object_7", VerifyError.class);
}
/**
@@ -169,12 +131,7 @@
* @title types of arguments - float[], int, String
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aput_object.d.T_aput_object_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_object.d.T_aput_object_8", VerifyError.class);
}
/**
@@ -182,12 +139,7 @@
* @title types of arguments - long[], int, String
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aput_object.d.T_aput_object_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_object.d.T_aput_object_9", VerifyError.class);
}
/**
@@ -195,12 +147,7 @@
* @title types of arguments - array, reference, String
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aput_object.d.T_aput_object_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_object.d.T_aput_object_10", VerifyError.class);
}
/**
@@ -208,12 +155,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aput_object.d.T_aput_object_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_object.d.T_aput_object_11", VerifyError.class);
}
/**
@@ -221,12 +163,7 @@
* @title put integer into array of references
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aput_object.d.T_aput_object_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_object.d.T_aput_object_13", VerifyError.class);
}
/**
@@ -235,11 +172,6 @@
* and floats are not used interchangeably.
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.aput_object.d.T_aput_object_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_object.d.T_aput_object_12", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_short/Test_aput_short.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_short/Test_aput_short.java
index a3dcf18..14a5eb4 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_short/Test_aput_short.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_short/Test_aput_short.java
@@ -46,56 +46,32 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aput_short_1 t = new T_aput_short_1();
- short[] arr = new short[2];
- try {
- t.run(arr, 2, (short) 10000);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_short.d.T_aput_short_1",
+ ArrayIndexOutOfBoundsException.class, new short[2], 2, (short) 10000);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aput_short_1 t = new T_aput_short_1();
- try {
- t.run(null, 2, (short) 10000);
- fail("expected NullPointerException");
- } catch (NullPointerException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_short.d.T_aput_short_1", NullPointerException.class,
+ null, 2, (short) 10000);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aput_short_1 t = new T_aput_short_1();
- short[] arr = new short[2];
- try {
- t.run(arr, -1, (short) 10000);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_short.d.T_aput_short_1",
+ ArrayIndexOutOfBoundsException.class, new short[2], -1, (short) 10000);
}
-
-
/**
* @constraint B1
* @title types of arguments - array, double, int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aput_short.d.T_aput_short_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_short.d.T_aput_short_2", VerifyError.class);
}
/**
@@ -103,12 +79,7 @@
* @title types of arguments - array, int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aput_short.d.T_aput_short_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_short.d.T_aput_short_3", VerifyError.class);
}
/**
@@ -116,12 +87,7 @@
* @title types of arguments - object, int, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aput_short.d.T_aput_short_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_short.d.T_aput_short_4", VerifyError.class);
}
/**
@@ -129,12 +95,7 @@
* @title types of arguments - double[], int, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aput_short.d.T_aput_short_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_short.d.T_aput_short_5", VerifyError.class);
}
/**
@@ -142,12 +103,7 @@
* @title types of arguments - long[], int, int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aput_short.d.T_aput_short_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_short.d.T_aput_short_6", VerifyError.class);
}
/**
@@ -155,12 +111,7 @@
* @title types of arguments - array, reference, int
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aput_short.d.T_aput_short_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_short.d.T_aput_short_7", VerifyError.class);
}
/**
@@ -168,12 +119,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aput_short.d.T_aput_short_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_short.d.T_aput_short_9", VerifyError.class);
}
/**
@@ -182,12 +128,7 @@
* and floats are not used interchangeably.
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.aput_short.d.T_aput_short_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_short.d.T_aput_short_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_wide/Test_aput_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_wide/Test_aput_wide.java
index 735b0e4..03da8ae 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/aput_wide/Test_aput_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/aput_wide/Test_aput_wide.java
@@ -59,41 +59,24 @@
* @title expected ArrayIndexOutOfBoundsException
*/
public void testE1() {
- T_aput_wide_1 t = new T_aput_wide_1();
- long[] arr = new long[2];
- try {
- t.run(arr, 2, 100000000000l);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_wide.d.T_aput_wide_1",
+ ArrayIndexOutOfBoundsException.class, new long[2], 2, 100000000000l);
}
/**
* @title expected NullPointerException
*/
public void testE2() {
- T_aput_wide_1 t = new T_aput_wide_1();
- try {
- t.run(null, 1, 100000000000l);
- fail("expected NullPointerException");
- } catch (NullPointerException np) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_wide.d.T_aput_wide_1", NullPointerException.class,
+ null, 2, 100000000000l);
}
/**
* @title expected ArrayIndexOutOfBoundsException (negative index)
*/
public void testE3() {
- T_aput_wide_1 t = new T_aput_wide_1();
- long[] arr = new long[2];
- try {
- t.run(arr, -1, 100000000000l);
- fail("expected ArrayIndexOutOfBoundsException");
- } catch (ArrayIndexOutOfBoundsException aie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.aput_wide.d.T_aput_wide_1",
+ ArrayIndexOutOfBoundsException.class, new long[2], -1, 100000000000l);
}
@@ -102,12 +85,7 @@
* @title types of arguments - array, double, long
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.aput_wide.d.T_aput_wide_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_wide.d.T_aput_wide_3", VerifyError.class);
}
/**
@@ -115,12 +93,7 @@
* @title types of arguments - array, int, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.aput_wide.d.T_aput_wide_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_wide.d.T_aput_wide_4", VerifyError.class);
}
/**
@@ -128,12 +101,7 @@
* @title types of arguments - object, int, long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.aput_wide.d.T_aput_wide_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_wide.d.T_aput_wide_5", VerifyError.class);
}
/**
@@ -142,12 +110,7 @@
* and floats are not used interchangeably.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.aput_wide.d.T_aput_wide_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_wide.d.T_aput_wide_9", VerifyError.class);
}
/**
@@ -155,12 +118,7 @@
* @title types of arguments - int[], int, long
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.aput_wide.d.T_aput_wide_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_wide.d.T_aput_wide_7", VerifyError.class);
}
/**
@@ -168,12 +126,7 @@
* @title types of arguments - array, reference, long
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.aput_wide.d.T_aput_wide_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_wide.d.T_aput_wide_8", VerifyError.class);
}
/**
@@ -181,12 +134,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.aput_wide.d.T_aput_wide_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_wide.d.T_aput_wide_10", VerifyError.class);
}
/**
@@ -195,11 +143,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.aput_wide.d.T_aput_wide_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.aput_wide.d.T_aput_wide_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/array_length/Test_array_length.java b/tools/vm-tests-tf/src/dot/junit/opcodes/array_length/Test_array_length.java
index f49cccb..e284880 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/array_length/Test_array_length.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/array_length/Test_array_length.java
@@ -45,28 +45,16 @@
* @title expected NullPointerException
*/
public void testNPE1() {
- T_array_length_1 t = new T_array_length_1();
- try {
- t.run(null);
- fail("NPE expected");
- } catch (NullPointerException npe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.array_length.d.T_array_length_1", NullPointerException.class,
+ new Object[] {null});
}
-
-
/**
* @constraint B1
* @title types of arguments - Object
*/
public void testVFE1() {
- try {
- Class.forName("dxc.junit.opcodes.array_length.jm.T_array_length_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.array_length.d.T_array_length_2", VerifyError.class);
}
/**
@@ -74,12 +62,7 @@
* @title types of arguments - int
*/
public void testVFE2() {
- try {
- Class.forName("dxc.junit.opcodes.array_length.jm.T_array_length_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.array_length.d.T_array_length_3", VerifyError.class);
}
/**
@@ -87,11 +70,6 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dxc.junit.opcodes.array_length.jm.T_array_length_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.array_length.d.T_array_length_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/check_cast/Test_check_cast.java b/tools/vm-tests-tf/src/dot/junit/opcodes/check_cast/Test_check_cast.java
index 78a0479..bbff2f2 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/check_cast/Test_check_cast.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/check_cast/Test_check_cast.java
@@ -56,13 +56,8 @@
* @title expected ClassCastException
*/
public void testE1() {
- T_check_cast_1 t = new T_check_cast_1();
- try {
- t.run(t);
- fail("expected ClassCastException");
- } catch (ClassCastException iae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.check_cast.d.T_check_cast_1", ClassCastException.class,
+ new Integer(1));
}
/**
@@ -70,12 +65,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.check_cast.d.T_check_cast_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.check_cast.d.T_check_cast_4", VerifyError.class);
}
/**
@@ -84,12 +74,7 @@
* @title type of argument - int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.check_cast.d.T_check_cast_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.check_cast.d.T_check_cast_5", VerifyError.class);
}
/**
@@ -98,12 +83,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.check_cast.d.T_check_cast_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.check_cast.d.T_check_cast_8", VerifyError.class);
}
/**
@@ -112,12 +92,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.check_cast.d.T_check_cast_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.check_cast.d.T_check_cast_6", VerifyError.class);
}
/**
@@ -126,14 +101,7 @@
*/
public void testVFE5() {
//@uses dot.junit.opcodes.check_cast.TestStubs
- //@uses dot.junit.opcodes.check_cast.d.T_check_cast_3
- T_check_cast_3 t = new T_check_cast_3();
- try {
- t.run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError iae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.check_cast.d.T_check_cast_3", IllegalAccessError.class);
}
/**
@@ -142,13 +110,7 @@
* first access
*/
public void testVFE6() {
- T_check_cast_7 t = new T_check_cast_7();
- try {
- t.run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError iae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.check_cast.d.T_check_cast_7", NoClassDefFoundError.class);
}
/**
@@ -156,12 +118,7 @@
* @title constant pool type
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.check_cast.d.T_check_cast_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.check_cast.d.T_check_cast_9", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/cmp_long/Test_cmp_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/cmp_long/Test_cmp_long.java
index 5edd117..aea844b 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/cmp_long/Test_cmp_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/cmp_long/Test_cmp_long.java
@@ -100,12 +100,7 @@
* @title types of arguments - float, long
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.cmp_long.d.T_cmp_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmp_long.d.T_cmp_long_3", VerifyError.class);
}
/**
@@ -113,12 +108,7 @@
* @title types of arguments - int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.cmp_long.d.T_cmp_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmp_long.d.T_cmp_long_4", VerifyError.class);
}
/**
@@ -126,12 +116,7 @@
* @title types of arguments - reference, long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.cmp_long.d.T_cmp_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmp_long.d.T_cmp_long_5", VerifyError.class);
}
/**
@@ -139,12 +124,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.cmp_long.d.T_cmp_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmp_long.d.T_cmp_long_6", VerifyError.class);
}
/**
@@ -153,11 +133,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.cmp_long.d.T_cmp_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmp_long.d.T_cmp_long_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/cmpg_double/Test_cmpg_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/cmpg_double/Test_cmpg_double.java
index 4afc0d2..c7f9946 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/cmpg_double/Test_cmpg_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/cmpg_double/Test_cmpg_double.java
@@ -94,12 +94,7 @@
* @title types of arguments - double, float
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_2", VerifyError.class);
}
/**
@@ -107,12 +102,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_5", VerifyError.class);
}
/**
@@ -120,12 +110,7 @@
* @title types of arguments - double, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_4", VerifyError.class);
}
/**
@@ -133,12 +118,7 @@
* @title types of arguments - int, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_6", VerifyError.class);
}
/**
@@ -147,12 +127,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_double.d.T_cmpg_double_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/cmpg_float/Test_cmpg_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/cmpg_float/Test_cmpg_float.java
index 3e5f4af..49f8fe3 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/cmpg_float/Test_cmpg_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/cmpg_float/Test_cmpg_float.java
@@ -95,12 +95,7 @@
* @title types of arguments - float, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_2", VerifyError.class);
}
/**
@@ -108,12 +103,7 @@
* @title types of arguments - long, float
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_3", VerifyError.class);
}
/**
@@ -121,12 +111,7 @@
* @title types of arguments - reference, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_4", VerifyError.class);
}
/**
@@ -134,12 +119,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_5", VerifyError.class);
}
/**
@@ -148,12 +128,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpg_float.d.T_cmpg_float_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/cmpl_double/Test_cmpl_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/cmpl_double/Test_cmpl_double.java
index efade2c..e3c9629 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/cmpl_double/Test_cmpl_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/cmpl_double/Test_cmpl_double.java
@@ -96,12 +96,7 @@
* @title types of arguments - double, float
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_2", VerifyError.class);
}
/**
@@ -109,12 +104,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_5", VerifyError.class);
}
/**
@@ -122,12 +112,7 @@
* @title types of arguments - double, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_4", VerifyError.class);
}
/**
@@ -135,12 +120,7 @@
* @title types of arguments - int, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_6", VerifyError.class);
}
/**
@@ -149,12 +129,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_double.d.T_cmpl_double_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/cmpl_float/Test_cmpl_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/cmpl_float/Test_cmpl_float.java
index 0ef9efc..364dd75 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/cmpl_float/Test_cmpl_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/cmpl_float/Test_cmpl_float.java
@@ -94,12 +94,7 @@
* @title types of arguments - float, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_2", VerifyError.class);
}
/**
@@ -107,12 +102,7 @@
* @title types of arguments - long, float
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_3", VerifyError.class);
}
/**
@@ -120,12 +110,7 @@
* @title types of arguments - reference, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_4", VerifyError.class);
}
/**
@@ -133,12 +118,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_5", VerifyError.class);
}
/**
@@ -147,12 +127,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.cmpl_float.d.T_cmpl_float_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_16/Test_const_16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_16/Test_const_16.java
index 00e6b78..3328118 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_16/Test_const_16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_16/Test_const_16.java
@@ -37,12 +37,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_16.d.T_const_16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_16.d.T_const_16_3", VerifyError.class);
}
/**
@@ -52,12 +47,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_16.d.T_const_16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_16.d.T_const_16_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_4/Test_const_4.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_4/Test_const_4.java
index d9bb26b..aad3a48 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_4/Test_const_4.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_4/Test_const_4.java
@@ -36,12 +36,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_4.d.T_const_4_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_4.d.T_const_4_3", VerifyError.class);
}
/**
@@ -51,11 +46,6 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_4.d.T_const_4_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_4.d.T_const_4_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_class/Test_const_class.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_class/Test_const_class.java
index 93f5ee4..20fa270 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_class/Test_const_class.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_class/Test_const_class.java
@@ -46,15 +46,7 @@
* @title Class definition not found
*/
public void testE1() {
- try {
- T_const_class_6 t = new T_const_class_6();
- t.run();
- fail("expected a verification exception");
- } catch (NoClassDefFoundError e) {
- // expected
- } catch(VerifyError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.const_class.d.T_const_class_6", NoClassDefFoundError.class);
}
/**
@@ -62,14 +54,7 @@
*/
public void testE2() {
//@uses dot.junit.opcodes.const_class.TestStubs
- //@uses dot.junit.opcodes.const_class.d.T_const_class_7
- try {
- T_const_class_7 t = new T_const_class_7();
- t.run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.const_class.d.T_const_class_7", IllegalAccessError.class);
}
/**
@@ -77,12 +62,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_class.d.T_const_class_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_class.d.T_const_class_3", VerifyError.class);
}
/**
@@ -92,12 +72,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_class.d.T_const_class_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_class.d.T_const_class_4", VerifyError.class);
}
/**
@@ -105,12 +80,7 @@
* @title constant pool index
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.const_class.d.T_const_class_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_class.d.T_const_class_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_high16/Test_const_high16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_high16/Test_const_high16.java
index 68340a8..642a8ef 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_high16/Test_const_high16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_high16/Test_const_high16.java
@@ -34,12 +34,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_high16.d.T_const_high16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_high16.d.T_const_high16_3", VerifyError.class);
}
/**
@@ -49,12 +44,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_high16.d.T_const_high16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_high16.d.T_const_high16_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_string/Test_const_string.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_string/Test_const_string.java
index b5c778d..5e76157 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_string/Test_const_string.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_string/Test_const_string.java
@@ -38,12 +38,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_string.d.T_const_string_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_string.d.T_const_string_3", VerifyError.class);
}
/**
@@ -53,12 +48,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_string.d.T_const_string_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_string.d.T_const_string_4", VerifyError.class);
}
/**
@@ -66,12 +56,7 @@
* @title constant pool index
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.const_string.d.T_const_string_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_string.d.T_const_string_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_string_jumbo/Test_const_string_jumbo.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_string_jumbo/Test_const_string_jumbo.java
index 6234730..93dd391 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_string_jumbo/Test_const_string_jumbo.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_string_jumbo/Test_const_string_jumbo.java
@@ -38,12 +38,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_string_jumbo.d.T_const_string_jumbo_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_string_jumbo.d.T_const_string_jumbo_3", VerifyError.class);
}
/**
@@ -53,12 +48,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_string_jumbo.d.T_const_string_jumbo_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_string_jumbo.d.T_const_string_jumbo_4", VerifyError.class);
}
/**
@@ -66,12 +56,7 @@
* @title constant pool index
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.const_string_jumbo.d.T_const_string_jumbo_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_string_jumbo.d.T_const_string_jumbo_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide/Test_const_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide/Test_const_wide.java
index 1ce3caa..f36a560 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide/Test_const_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide/Test_const_wide.java
@@ -47,12 +47,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_wide.d.T_const_wide_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_wide.d.T_const_wide_3", VerifyError.class);
}
/**
@@ -62,12 +57,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_wide.d.T_const_wide_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_wide.d.T_const_wide_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_16/Test_const_wide_16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_16/Test_const_wide_16.java
index 941b00d..dff7947 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_16/Test_const_wide_16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_16/Test_const_wide_16.java
@@ -37,12 +37,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_wide_16.d.T_const_wide_16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_wide_16.d.T_const_wide_16_3", VerifyError.class);
}
/**
@@ -52,12 +47,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_wide_16.d.T_const_wide_16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_wide_16.d.T_const_wide_16_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_32/Test_const_wide_32.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_32/Test_const_wide_32.java
index 0847b3b..0a93390 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_32/Test_const_wide_32.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_32/Test_const_wide_32.java
@@ -36,12 +36,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_wide_32.d.T_const_wide_32_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_wide_32.d.T_const_wide_32_3", VerifyError.class);
}
/**
@@ -51,12 +46,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_wide_32.d.T_const_wide_32_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_wide_32.d.T_const_wide_32_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_high16/Test_const_wide_high16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_high16/Test_const_wide_high16.java
index 2dd3e32..7ece9ae 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_high16/Test_const_wide_high16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/const_wide_high16/Test_const_wide_high16.java
@@ -34,12 +34,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.const_wide_high16.d.T_const_wide_high16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_wide_high16.d.T_const_wide_high16_3", VerifyError.class);
}
/**
@@ -49,12 +44,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.const_wide_high16.d.T_const_wide_high16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.const_wide_high16.d.T_const_wide_high16_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_double/Test_div_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_double/Test_div_double.java
index 1af5e66..090754a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_double/Test_div_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_double/Test_div_double.java
@@ -131,12 +131,7 @@
* @title types of arguments - float / double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_double.d.T_div_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double.d.T_div_double_2", VerifyError.class);
}
/**
@@ -144,12 +139,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_double.d.T_div_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double.d.T_div_double_5", VerifyError.class);
}
/**
@@ -157,12 +147,7 @@
* @title types of arguments - double / reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_double.d.T_div_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double.d.T_div_double_4", VerifyError.class);
}
/**
@@ -170,12 +155,7 @@
* @title types of arguments - int / int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_double.d.T_div_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double.d.T_div_double_6", VerifyError.class);
}
/**
@@ -184,12 +164,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_double.d.T_div_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double.d.T_div_double_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_double_2addr/Test_div_double_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_double_2addr/Test_div_double_2addr.java
index dfd238e..864969e 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_double_2addr/Test_div_double_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_double_2addr/Test_div_double_2addr.java
@@ -131,12 +131,7 @@
* @title types of arguments - float / double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_2", VerifyError.class);
}
/**
@@ -144,12 +139,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_5", VerifyError.class);
}
/**
@@ -157,12 +147,7 @@
* @title types of arguments - double / reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_4", VerifyError.class);
}
/**
@@ -170,12 +155,7 @@
* @title types of arguments - int / int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_6", VerifyError.class);
}
/**
@@ -184,12 +164,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_double_2addr.d.T_div_double_2addr_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_float/Test_div_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_float/Test_div_float.java
index f4672af..e3bb16e 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_float/Test_div_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_float/Test_div_float.java
@@ -129,12 +129,7 @@
* @title types of arguments - float / double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_float.d.T_div_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float.d.T_div_float_2", VerifyError.class);
}
/**
@@ -142,12 +137,7 @@
* @title types of arguments - long / float
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_float.d.T_div_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float.d.T_div_float_3", VerifyError.class);
}
/**
@@ -155,12 +145,7 @@
* @title types of arguments - reference / float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_float.d.T_div_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float.d.T_div_float_4", VerifyError.class);
}
/**
@@ -168,12 +153,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_float.d.T_div_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float.d.T_div_float_6", VerifyError.class);
}
/**
@@ -182,12 +162,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_float.d.T_div_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float.d.T_div_float_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_float_2addr/Test_div_float_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_float_2addr/Test_div_float_2addr.java
index f4c3c9c..3746d9d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_float_2addr/Test_div_float_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_float_2addr/Test_div_float_2addr.java
@@ -129,12 +129,7 @@
* @title types of arguments - float / double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_2", VerifyError.class);
}
/**
@@ -142,12 +137,7 @@
* @title types of arguments - long / float
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_3", VerifyError.class);
}
/**
@@ -155,12 +145,7 @@
* @title types of arguments - reference / float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_4", VerifyError.class);
}
/**
@@ -168,12 +153,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_6", VerifyError.class);
}
/**
@@ -182,12 +162,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_float_2addr.d.T_div_float_2addr_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_int/Test_div_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_int/Test_div_int.java
index 6fc8e05..ef375f5 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_int/Test_div_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_int/Test_div_int.java
@@ -125,28 +125,15 @@
* @title Divisor is 0
*/
public void testE1() {
- T_div_int_1 t = new T_div_int_1();
- try {
- t.run(1, 0);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.div_int.d.T_div_int_1", ArithmeticException.class, 1, 0);
}
-
-
/**
* @constraint B1
* @title types of arguments - int / double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_int.d.T_div_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int.d.T_div_int_2", VerifyError.class);
}
/**
@@ -154,12 +141,7 @@
* @title types of arguments - long / int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_int.d.T_div_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int.d.T_div_int_3", VerifyError.class);
}
/**
@@ -167,12 +149,7 @@
* @title types of arguments - reference / int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_int.d.T_div_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int.d.T_div_int_4", VerifyError.class);
}
/**
@@ -180,12 +157,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_int.d.T_div_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int.d.T_div_int_6", VerifyError.class);
}
/**
@@ -194,12 +166,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_int.d.T_div_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int.d.T_div_int_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_2addr/Test_div_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_2addr/Test_div_int_2addr.java
index d43aadd..6a27841 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_2addr/Test_div_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_2addr/Test_div_int_2addr.java
@@ -123,28 +123,16 @@
* @title Divisor is 0
*/
public void testE1() {
- T_div_int_2addr_1 t = new T_div_int_2addr_1();
- try {
- t.run(1, 0);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_1", ArithmeticException.class,
+ 1, 0);
}
-
-
/**
* @constraint B1
* @title types of arguments - int, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_2", VerifyError.class);
}
/**
@@ -152,12 +140,7 @@
* @title types of arguments - long, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_3", VerifyError.class);
}
/**
@@ -165,12 +148,7 @@
* @title types of arguments - reference, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_4", VerifyError.class);
}
/**
@@ -178,12 +156,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_6", VerifyError.class);
}
/**
@@ -192,11 +165,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_2addr.d.T_div_int_2addr_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_lit16/Test_div_int_lit16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_lit16/Test_div_int_lit16.java
index 0b03a93..75e0016 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_lit16/Test_div_int_lit16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_lit16/Test_div_int_lit16.java
@@ -136,28 +136,16 @@
* @title Divisor is 0
*/
public void testE1() {
- T_div_int_lit16_13 t = new T_div_int_lit16_13();
- try {
- t.run();
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_13",
+ ArithmeticException.class);
}
-
-
/**
* @constraint B1
* @title types of arguments - int / double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_14", VerifyError.class);
}
/**
@@ -165,12 +153,7 @@
* @title types of arguments - long / int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_15", VerifyError.class);
}
/**
@@ -178,12 +161,7 @@
* @title types of arguments - reference / int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_16", VerifyError.class);
}
/**
@@ -191,12 +169,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_18", VerifyError.class);
}
/**
@@ -205,11 +178,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit16.d.T_div_int_lit16_17", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_lit8/Test_div_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_lit8/Test_div_int_lit8.java
index e86ea75..14d4d4c 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_lit8/Test_div_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_int_lit8/Test_div_int_lit8.java
@@ -135,13 +135,7 @@
* @title Divisor is 0
*/
public void testE1() {
- T_div_int_lit8_13 t = new T_div_int_lit8_13();
- try {
- t.run();
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_13", ArithmeticException.class);
}
@@ -151,12 +145,7 @@
* @title types of arguments - int / double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_14", VerifyError.class);
}
/**
@@ -164,12 +153,7 @@
* @title types of arguments - long / int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_15", VerifyError.class);
}
/**
@@ -177,12 +161,7 @@
* @title types of arguments - reference / int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_16", VerifyError.class);
}
/**
@@ -190,12 +169,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_18", VerifyError.class);
}
/**
@@ -204,11 +178,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_int_lit8.d.T_div_int_lit8_17", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_long/Test_div_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_long/Test_div_long.java
index ce3713c..46c0c94 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_long/Test_div_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_long/Test_div_long.java
@@ -123,28 +123,16 @@
* @title Divisor is 0
*/
public void testE1() {
- T_div_long_1 t = new T_div_long_1();
- try {
- t.run(12345678912345l, 0);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.div_long.d.T_div_long_1", ArithmeticException.class,
+ 12345678912345l, 0);
}
-
-
/**
* @constraint A24
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_long.d.T_div_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long.d.T_div_long_6", VerifyError.class);
}
/**
@@ -152,12 +140,7 @@
* @title types of arguments - int / long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_long.d.T_div_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long.d.T_div_long_3", VerifyError.class);
}
/**
@@ -165,12 +148,7 @@
* @title types of arguments - float / long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_long.d.T_div_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long.d.T_div_long_4", VerifyError.class);
}
/**
@@ -178,12 +156,7 @@
* @title types of arguments - reference / long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_long.d.T_div_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long.d.T_div_long_5", VerifyError.class);
}
/**
@@ -192,12 +165,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_long.d.T_div_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long.d.T_div_long_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/div_long_2addr/Test_div_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/div_long_2addr/Test_div_long_2addr.java
index 4bc3cf1..ca446fd 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/div_long_2addr/Test_div_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/div_long_2addr/Test_div_long_2addr.java
@@ -122,13 +122,8 @@
* @title Divisor is 0
*/
public void testE1() {
- T_div_long_2addr_1 t = new T_div_long_2addr_1();
- try {
- t.run(12345678912345l, 0);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_1",
+ ArithmeticException.class, 12345678912345l, 0);
}
@@ -138,12 +133,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_6", VerifyError.class);
}
/**
@@ -151,12 +141,7 @@
* @title types of arguments - int / long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_3", VerifyError.class);
}
/**
@@ -164,12 +149,7 @@
* @title types of arguments - float / long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_4", VerifyError.class);
}
/**
@@ -177,12 +157,7 @@
* @title types of arguments - reference / long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_5", VerifyError.class);
}
/**
@@ -191,12 +166,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.div_long_2addr.d.T_div_long_2addr_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_float/Test_double_to_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_float/Test_double_to_float.java
index bcaa4c8..bf0c070 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_float/Test_double_to_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_float/Test_double_to_float.java
@@ -110,12 +110,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.double_to_float.d.T_double_to_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_float.d.T_double_to_float_3", VerifyError.class);
}
/**
@@ -123,12 +118,7 @@
* @title type of argument - float
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.double_to_float.d.T_double_to_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_float.d.T_double_to_float_2", VerifyError.class);
}
/**
@@ -137,12 +127,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.double_to_float.d.T_double_to_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_float.d.T_double_to_float_5", VerifyError.class);
}
/**
@@ -151,12 +136,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.double_to_float.d.T_double_to_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_float.d.T_double_to_float_4", VerifyError.class);
}
/**
@@ -165,12 +145,7 @@
* @title type of argument - int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.double_to_float.d.T_double_to_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_float.d.T_double_to_float_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_int/Test_double_to_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_int/Test_double_to_int.java
index ccd8618..cb0a5a6 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_int/Test_double_to_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_int/Test_double_to_int.java
@@ -102,12 +102,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.double_to_int.d.T_double_to_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_int.d.T_double_to_int_3", VerifyError.class);
}
/**
@@ -115,12 +110,7 @@
* @title type of argument - float
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.double_to_int.d.T_double_to_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_int.d.T_double_to_int_2", VerifyError.class);
}
/**
@@ -129,12 +119,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.double_to_int.d.T_double_to_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_int.d.T_double_to_int_5", VerifyError.class);
}
/**
@@ -143,12 +128,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.double_to_int.d.T_double_to_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_int.d.T_double_to_int_4", VerifyError.class);
}
/**
@@ -157,12 +137,7 @@
* @title type of argument - reference
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.double_to_int.d.T_double_to_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_int.d.T_double_to_int_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_long/Test_double_to_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_long/Test_double_to_long.java
index 0785280..5e98b03 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_long/Test_double_to_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/double_to_long/Test_double_to_long.java
@@ -99,12 +99,7 @@
* @title type of argument - float
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.double_to_long.d.T_double_to_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_long.d.T_double_to_long_2", VerifyError.class);
}
/**
@@ -113,12 +108,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.double_to_long.d.T_double_to_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_long.d.T_double_to_long_5", VerifyError.class);
}
/**
@@ -127,12 +117,7 @@
* @title type of argument - reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.double_to_long.d.T_double_to_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_long.d.T_double_to_long_4", VerifyError.class);
}
@@ -142,12 +127,7 @@
* @title type of argument - int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.double_to_long.d.T_double_to_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_long.d.T_double_to_long_6", VerifyError.class);
}
/**
@@ -156,11 +136,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.double_to_long.d.T_double_to_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.double_to_long.d.T_double_to_long_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/fill_array_data/Test_fill_array_data.java b/tools/vm-tests-tf/src/dot/junit/opcodes/fill_array_data/Test_fill_array_data.java
index 5bac3cd..7c22076 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/fill_array_data/Test_fill_array_data.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/fill_array_data/Test_fill_array_data.java
@@ -88,12 +88,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_3", VerifyError.class);
}
/**
@@ -101,12 +96,7 @@
* @title type of argument - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_4", VerifyError.class);
}
/**
@@ -114,12 +104,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_5", VerifyError.class);
}
/**
@@ -127,12 +112,7 @@
* @title type of argument - reference (not array)
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_6", VerifyError.class);
}
/**
@@ -140,12 +120,7 @@
* @title array of Objects
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_7", VerifyError.class);
}
/**
@@ -153,12 +128,7 @@
* @title array type and data size shall be consistent
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_8", VerifyError.class);
}
/**
@@ -166,12 +136,7 @@
* @title offset to table shall be inside method
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_9", VerifyError.class);
}
/**
@@ -179,12 +144,7 @@
* @title the size and the list must be consistent.
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_11", VerifyError.class);
}
@@ -193,12 +153,7 @@
* @title packed-switch-data pseudo-instructions must not be reachable by control flow
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_12", VerifyError.class);
}
/**
@@ -206,11 +161,6 @@
* @title table has wrong ident code
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.fill_array_data.d.T_fill_array_data_13", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/filled_new_array/Test_filled_new_array.java b/tools/vm-tests-tf/src/dot/junit/opcodes/filled_new_array/Test_filled_new_array.java
index b17c29b..8a85a6d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/filled_new_array/Test_filled_new_array.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/filled_new_array/Test_filled_new_array.java
@@ -54,12 +54,7 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_3", VerifyError.class);
}
/**
@@ -67,12 +62,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_4", VerifyError.class);
}
@@ -81,12 +71,7 @@
* @title try to pass obj ref instead of int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_5", VerifyError.class);
}
/**
@@ -94,12 +79,7 @@
* @title try to pass long instead of int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_6", VerifyError.class);
}
/**
@@ -107,12 +87,7 @@
* @title try to create non-array type
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_7", VerifyError.class);
}
/**
@@ -120,12 +95,7 @@
* @title invalid arg count
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_8", VerifyError.class);
}
/**
@@ -133,12 +103,7 @@
* @title attempt to instantiate String[] and fill it with reference to assignment-incompatible class
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_9");
- fail("expected a verification exception");
- } catch(Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_9", VerifyError.class);
}
/**
@@ -146,14 +111,8 @@
* @title attempt to instantiate array of non-existent class
*/
public void testVFE8() {
- //@uses dot.junit.opcodes.filled_new_array.d.T_filled_new_array_10
- try {
- T_filled_new_array_10 T = new T_filled_new_array_10();
- T.run();
- fail("expected a NoClassDefFoundError exception");
- } catch(NoClassDefFoundError t) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_10",
+ NoClassDefFoundError.class);
}
/**
@@ -161,15 +120,9 @@
* @title attempt to instantiate array of inaccessible class
*/
public void testVFE9() {
- //@uses dot.junit.opcodes.filled_new_array.d.T_filled_new_array_11
//@uses dot.junit.opcodes.filled_new_array.TestStubs
- try {
- T_filled_new_array_11 T = new T_filled_new_array_11();
- T.run();
- fail("expected a IllegalAccessError exception");
- } catch(IllegalAccessError t) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.filled_new_array.d.T_filled_new_array_11",
+ IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/filled_new_array_range/Test_filled_new_array_range.java b/tools/vm-tests-tf/src/dot/junit/opcodes/filled_new_array_range/Test_filled_new_array_range.java
index 84b1379..b6da488 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/filled_new_array_range/Test_filled_new_array_range.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/filled_new_array_range/Test_filled_new_array_range.java
@@ -54,12 +54,8 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_3",
+ VerifyError.class);
}
/**
@@ -67,12 +63,8 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_4",
+ VerifyError.class);
}
/**
@@ -80,12 +72,8 @@
* @title try to pass obj ref instead of int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_5",
+ VerifyError.class);
}
/**
@@ -93,12 +81,8 @@
* @title try to pass long instead of int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_6",
+ VerifyError.class);
}
/**
@@ -106,12 +90,8 @@
* @title try to create non-array type
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_7",
+ VerifyError.class);
}
/**
@@ -119,12 +99,8 @@
* @title invalid arg count
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_8",
+ VerifyError.class);
}
/**
@@ -132,12 +108,8 @@
* @title attempt to instantiate String[] and fill it with reference to assignment-incompatible class
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_9");
- fail("expected a verification exception");
- } catch(Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_9",
+ VerifyError.class);
}
/**
@@ -145,13 +117,8 @@
* @title attempt to instantiate array of non-existent class
*/
public void testVFE8() {
- T_filled_new_array_range_10 t = new T_filled_new_array_range_10();
- try {
- t.run();
- fail("expected NoClassDefFoundError exception");
- } catch (NoClassDefFoundError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_10",
+ NoClassDefFoundError.class);
}
/**
@@ -159,14 +126,8 @@
* @title attempt to instantiate array of inaccessible class
*/
public void testVFE9() {
- //@uses dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_11
//@uses dot.junit.opcodes.filled_new_array_range.TestStubs
- T_filled_new_array_range_11 t = new T_filled_new_array_range_11();
- try {
- t.run();
- fail("expected IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.filled_new_array_range.d.T_filled_new_array_range_11",
+ IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_double/Test_float_to_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_double/Test_float_to_double.java
index 4f53011..1c4d788 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_double/Test_float_to_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_double/Test_float_to_double.java
@@ -103,12 +103,7 @@
* @title type of argument - double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.float_to_double.d.T_float_to_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_double.d.T_float_to_double_2", VerifyError.class);
}
/**
@@ -117,12 +112,7 @@
* @title type of argument - long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.float_to_double.d.T_float_to_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_double.d.T_float_to_double_3", VerifyError.class);
}
/**
@@ -130,12 +120,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.float_to_double.d.T_float_to_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_double.d.T_float_to_double_4", VerifyError.class);
}
/**
@@ -143,12 +128,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.float_to_double.d.T_float_to_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_double.d.T_float_to_double_5", VerifyError.class);
}
/**
@@ -156,12 +136,7 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.float_to_double.d.T_float_to_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_double.d.T_float_to_double_6", VerifyError.class);
}
/**
@@ -170,12 +145,7 @@
* and floats are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.float_to_double.d.T_float_to_double_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_double.d.T_float_to_double_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_int/Test_float_to_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_int/Test_float_to_int.java
index e8b7f86..0c0b8cc 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_int/Test_float_to_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_int/Test_float_to_int.java
@@ -101,12 +101,7 @@
* @title type of argument - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.float_to_int.d.T_float_to_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_int.d.T_float_to_int_2", VerifyError.class);
}
/**
@@ -115,12 +110,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.float_to_int.d.T_float_to_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_int.d.T_float_to_int_3", VerifyError.class);
}
/**
@@ -129,12 +119,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.float_to_int.d.T_float_to_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_int.d.T_float_to_int_4", VerifyError.class);
}
/**
@@ -142,12 +127,7 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.float_to_int.d.T_float_to_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_int.d.T_float_to_int_6", VerifyError.class);
}
/**
@@ -156,11 +136,6 @@
* and floats are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.float_to_int.d.T_float_to_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_int.d.T_float_to_int_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_long/Test_float_to_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_long/Test_float_to_long.java
index 9627d82..39d4cf8 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_long/Test_float_to_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/float_to_long/Test_float_to_long.java
@@ -99,13 +99,7 @@
* @title number of arguments
*/
public void testVFE1() {
- try
- {
- Class.forName("dxc.junit.opcodes.float_to_long.jm.T_float_to_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_long.d.T_float_to_long_2", VerifyError.class);
}
@@ -115,13 +109,7 @@
* @title type of argument - double
*/
public void testVFE2() {
- try
- {
- Class.forName("dot.junit.opcodes.float_to_long.d.T_float_to_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_long.d.T_float_to_long_2", VerifyError.class);
}
/**
@@ -130,13 +118,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try
- {
- Class.forName("dot.junit.opcodes.float_to_long.d.T_float_to_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_long.d.T_float_to_long_3", VerifyError.class);
}
/**
@@ -144,13 +126,7 @@
* @title number of registers
*/
public void testVFE4() {
- try
- {
- Class.forName("dot.junit.opcodes.float_to_long.d.T_float_to_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_long.d.T_float_to_long_4", VerifyError.class);
}
/**
@@ -158,13 +134,7 @@
* @title type of argument - reference
*/
public void testVFE5() {
- try
- {
- Class.forName("dot.junit.opcodes.float_to_long.d.T_float_to_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_long.d.T_float_to_long_5", VerifyError.class);
}
/**
@@ -172,12 +142,7 @@
* @title number of registers
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.float_to_long.d.T_float_to_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_long.d.T_float_to_long_6", VerifyError.class);
}
/**
@@ -186,11 +151,6 @@
* and floats are not used interchangeably.
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.float_to_long.d.T_float_to_long_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.float_to_long.d.T_float_to_long_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/goto_16/Test_goto_16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/goto_16/Test_goto_16.java
index 2891fc4..48f3b71 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/goto_16/Test_goto_16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/goto_16/Test_goto_16.java
@@ -35,12 +35,7 @@
* @title branch target is inside instruction
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.goto_16.d.T_goto_16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.goto_16.d.T_goto_16_3", VerifyError.class);
}
/**
@@ -48,12 +43,7 @@
* @title branch target shall be inside the method
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.goto_16.d.T_goto_16_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.goto_16.d.T_goto_16_2", VerifyError.class);
}
/**
@@ -61,11 +51,6 @@
* @title zero offset
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.goto_16.d.T_goto_16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.goto_16.d.T_goto_16_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/goto_32/Test_goto_32.java b/tools/vm-tests-tf/src/dot/junit/opcodes/goto_32/Test_goto_32.java
index 5f7a4dc..0e8b373 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/goto_32/Test_goto_32.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/goto_32/Test_goto_32.java
@@ -35,12 +35,7 @@
* @title branch target is inside instruction
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.goto_32.d.T_goto_32_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.goto_32.d.T_goto_32_2", VerifyError.class);
}
/**
@@ -48,12 +43,7 @@
* @title branch target shall be inside the method
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.goto_32.d.T_goto_32_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.goto_32.d.T_goto_32_3", VerifyError.class);
}
/**
@@ -62,12 +52,7 @@
* @title zero offset - no exception expected
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.goto_32.d.T_goto_32_4");
- // no exception is expected
- } catch (Throwable t) {
- fail("not expected" + t);
- }
+ load("dot.junit.opcodes.goto_32.d.T_goto_32_4", null);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_eq/Test_if_eq.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_eq/Test_if_eq.java
index bb89f67..c68525a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_eq/Test_if_eq.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_eq/Test_if_eq.java
@@ -125,12 +125,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_eq.d.T_if_eq_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eq.d.T_if_eq_5", VerifyError.class);
}
@@ -139,12 +134,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_eq.d.T_if_eq_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eq.d.T_if_eq_7", VerifyError.class);
}
/**
@@ -152,12 +142,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_eq.d.T_if_eq_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eq.d.T_if_eq_8", VerifyError.class);
}
/**
@@ -165,12 +150,7 @@
* @title types of arguments - int, reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_eq.d.T_if_eq_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eq.d.T_if_eq_9", VerifyError.class);
}
/**
@@ -178,12 +158,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_eq.d.T_if_eq_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eq.d.T_if_eq_10", VerifyError.class);
}
/**
@@ -191,12 +166,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_eq.d.T_if_eq_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eq.d.T_if_eq_11", VerifyError.class);
}
/**
@@ -204,12 +174,7 @@
* @title zero offset
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_eq.d.T_if_eq_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eq.d.T_if_eq_12", VerifyError.class);
}
/**
@@ -218,11 +183,6 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_eq.d.T_if_eq_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eq.d.T_if_eq_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_eqz/Test_if_eqz.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_eqz/Test_if_eqz.java
index ebedd7f..fac0c9b 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_eqz/Test_if_eqz.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_eqz/Test_if_eqz.java
@@ -68,12 +68,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_eqz.d.T_if_eqz_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eqz.d.T_if_eqz_5", VerifyError.class);
}
@@ -82,12 +77,7 @@
* @title types of arguments - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_eqz.d.T_if_eqz_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eqz.d.T_if_eqz_6", VerifyError.class);
}
/**
@@ -95,12 +85,7 @@
* @title types of arguments - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_eqz.d.T_if_eqz_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eqz.d.T_if_eqz_7", VerifyError.class);
}
/**
@@ -108,12 +93,7 @@
* @title branch target shall be inside the method
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_eqz.d.T_if_eqz_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eqz.d.T_if_eqz_9", VerifyError.class);
}
/**
@@ -121,12 +101,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_eqz.d.T_if_eqz_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eqz.d.T_if_eqz_10", VerifyError.class);
}
/**
@@ -134,12 +109,7 @@
* @title branch must not be 0
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_eqz.d.T_if_eqz_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eqz.d.T_if_eqz_11", VerifyError.class);
}
/**
@@ -148,12 +118,7 @@
* and floats are not used interchangeably.
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_eqz.d.T_if_eqz_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_eqz.d.T_if_eqz_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_ge/Test_if_ge.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_ge/Test_if_ge.java
index c56a616..e5a4f1e 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_ge/Test_if_ge.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_ge/Test_if_ge.java
@@ -76,12 +76,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_ge.d.T_if_ge_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ge.d.T_if_ge_4", VerifyError.class);
}
@@ -91,12 +86,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_ge.d.T_if_ge_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ge.d.T_if_ge_5", VerifyError.class);
}
/**
@@ -104,12 +94,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_ge.d.T_if_ge_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ge.d.T_if_ge_6", VerifyError.class);
}
/**
@@ -117,12 +102,7 @@
* @title types of arguments - int, reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_ge.d.T_if_ge_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ge.d.T_if_ge_7", VerifyError.class);
}
/**
@@ -131,12 +111,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_ge.d.T_if_ge_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ge.d.T_if_ge_3", VerifyError.class);
}
/**
@@ -144,12 +119,7 @@
* @title branch target shall be inside the method
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_ge.d.T_if_ge_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ge.d.T_if_ge_9", VerifyError.class);
}
/**
@@ -157,12 +127,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_ge.d.T_if_ge_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ge.d.T_if_ge_10", VerifyError.class);
}
/**
@@ -170,12 +135,7 @@
* @title branch target shall 0
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_ge.d.T_if_ge_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ge.d.T_if_ge_11", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_gez/Test_if_gez.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_gez/Test_if_gez.java
index 432485f..5042943 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_gez/Test_if_gez.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_gez/Test_if_gez.java
@@ -52,12 +52,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_gez.d.T_if_gez_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gez.d.T_if_gez_3", VerifyError.class);
}
@@ -67,12 +62,7 @@
* @title types of arguments - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_gez.d.T_if_gez_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gez.d.T_if_gez_4", VerifyError.class);
}
/**
@@ -80,12 +70,7 @@
* @title types of arguments - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_gez.d.T_if_gez_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gez.d.T_if_gez_5", VerifyError.class);
}
/**
@@ -93,12 +78,7 @@
* @title types of arguments - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_gez.d.T_if_gez_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gez.d.T_if_gez_6", VerifyError.class);
}
/**
@@ -106,12 +86,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_gez.d.T_if_gez_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gez.d.T_if_gez_8", VerifyError.class);
}
/**
@@ -119,12 +94,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_gez.d.T_if_gez_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gez.d.T_if_gez_9", VerifyError.class);
}
/**
@@ -132,12 +102,7 @@
* @title branch must not be 0
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_gez.d.T_if_gez_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gez.d.T_if_gez_10", VerifyError.class);
}
/**
@@ -146,12 +111,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_gez.d.T_if_gez_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gez.d.T_if_gez_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_gt/Test_if_gt.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_gt/Test_if_gt.java
index b977e57..8209480 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_gt/Test_if_gt.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_gt/Test_if_gt.java
@@ -76,12 +76,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_gt.d.T_if_gt_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gt.d.T_if_gt_4", VerifyError.class);
}
@@ -90,12 +85,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_gt.d.T_if_gt_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gt.d.T_if_gt_5", VerifyError.class);
}
/**
@@ -103,12 +93,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_gt.d.T_if_gt_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gt.d.T_if_gt_6", VerifyError.class);
}
/**
@@ -116,12 +101,7 @@
* @title types of arguments - int, reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_gt.d.T_if_gt_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gt.d.T_if_gt_7", VerifyError.class);
}
/**
@@ -129,12 +109,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_gt.d.T_if_gt_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gt.d.T_if_gt_9", VerifyError.class);
}
/**
@@ -142,12 +117,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_gt.d.T_if_gt_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gt.d.T_if_gt_10", VerifyError.class);
}
/**
@@ -155,12 +125,7 @@
* @title branch target shall not be 0
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_gt.d.T_if_gt_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gt.d.T_if_gt_11", VerifyError.class);
}
/**
@@ -169,12 +134,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_gt.d.T_if_gt_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gt.d.T_if_gt_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_gtz/Test_if_gtz.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_gtz/Test_if_gtz.java
index 242cf26..ead93fe 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_gtz/Test_if_gtz.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_gtz/Test_if_gtz.java
@@ -52,12 +52,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_gtz.d.T_if_gtz_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gtz.d.T_if_gtz_3", VerifyError.class);
}
@@ -66,12 +61,7 @@
* @title types of arguments - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_gtz.d.T_if_gtz_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gtz.d.T_if_gtz_4", VerifyError.class);
}
/**
@@ -79,12 +69,7 @@
* @title types of arguments - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_gtz.d.T_if_gtz_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gtz.d.T_if_gtz_5", VerifyError.class);
}
/**
@@ -92,12 +77,7 @@
* @title types of arguments - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_gtz.d.T_if_gtz_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gtz.d.T_if_gtz_6", VerifyError.class);
}
/**
@@ -105,12 +85,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_gtz.d.T_if_gtz_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gtz.d.T_if_gtz_8", VerifyError.class);
}
/**
@@ -118,12 +93,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_gtz.d.T_if_gtz_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gtz.d.T_if_gtz_9", VerifyError.class);
}
/**
@@ -131,12 +101,7 @@
* @title branch must not be 0
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_gtz.d.T_if_gtz_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gtz.d.T_if_gtz_10", VerifyError.class);
}
/**
@@ -145,12 +110,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_gtz.d.T_if_gtz_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_gtz.d.T_if_gtz_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_le/Test_if_le.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_le/Test_if_le.java
index e0653b4..49e9bf8 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_le/Test_if_le.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_le/Test_if_le.java
@@ -76,12 +76,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_le.d.T_if_le_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_le.d.T_if_le_4", VerifyError.class);
}
@@ -91,12 +86,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_le.d.T_if_le_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_le.d.T_if_le_5", VerifyError.class);
}
/**
@@ -104,12 +94,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_le.d.T_if_le_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_le.d.T_if_le_6", VerifyError.class);
}
/**
@@ -117,12 +102,7 @@
* @title types of arguments - int, reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_le.d.T_if_le_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_le.d.T_if_le_7", VerifyError.class);
}
/**
@@ -130,12 +110,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_le.d.T_if_le_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_le.d.T_if_le_9", VerifyError.class);
}
/**
@@ -143,12 +118,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_le.d.T_if_le_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_le.d.T_if_le_10", VerifyError.class);
}
/**
@@ -156,12 +126,7 @@
* @title branch target shall not be 0
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_le.d.T_if_le_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_le.d.T_if_le_12", VerifyError.class);
}
/**
@@ -170,11 +135,6 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_le.d.T_if_le_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_le.d.T_if_le_11", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_lez/Test_if_lez.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_lez/Test_if_lez.java
index 74599d5..a6097fe 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_lez/Test_if_lez.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_lez/Test_if_lez.java
@@ -52,12 +52,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_lez.d.T_if_lez_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lez.d.T_if_lez_3", VerifyError.class);
}
@@ -67,12 +62,7 @@
* @title types of arguments - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_lez.d.T_if_lez_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lez.d.T_if_lez_4", VerifyError.class);
}
/**
@@ -80,12 +70,7 @@
* @title types of arguments - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_lez.d.T_if_lez_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lez.d.T_if_lez_5", VerifyError.class);
}
/**
@@ -93,12 +78,7 @@
* @title types of arguments - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_lez.d.T_if_lez_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lez.d.T_if_lez_6", VerifyError.class);
}
/**
@@ -106,12 +86,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_lez.d.T_if_lez_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lez.d.T_if_lez_8", VerifyError.class);
}
/**
@@ -119,12 +94,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_lez.d.T_if_lez_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lez.d.T_if_lez_9", VerifyError.class);
}
/**
@@ -132,12 +102,7 @@
* @title branch must not be 0
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_lez.d.T_if_lez_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lez.d.T_if_lez_10", VerifyError.class);
}
/**
@@ -146,12 +111,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_lez.d.T_if_lez_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lez.d.T_if_lez_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_lt/Test_if_lt.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_lt/Test_if_lt.java
index 7f186d9..3be2998 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_lt/Test_if_lt.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_lt/Test_if_lt.java
@@ -76,12 +76,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_lt.d.T_if_lt_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lt.d.T_if_lt_4", VerifyError.class);
}
@@ -90,12 +85,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_lt.d.T_if_lt_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lt.d.T_if_lt_5", VerifyError.class);
}
/**
@@ -103,12 +93,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_lt.d.T_if_lt_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lt.d.T_if_lt_6", VerifyError.class);
}
/**
@@ -116,12 +101,7 @@
* @title types of arguments - int, reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_lt.d.T_if_lt_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lt.d.T_if_lt_7", VerifyError.class);
}
/**
@@ -129,12 +109,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_lt.d.T_if_lt_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lt.d.T_if_lt_9", VerifyError.class);
}
/**
@@ -142,12 +117,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_lt.d.T_if_lt_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lt.d.T_if_lt_10", VerifyError.class);
}
/**
@@ -155,12 +125,7 @@
* @title branch target shall not be 0
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_lt.d.T_if_lt_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lt.d.T_if_lt_12", VerifyError.class);
}
/**
@@ -169,12 +134,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_lt.d.T_if_lt_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_lt.d.T_if_lt_11", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_ltz/Test_if_ltz.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_ltz/Test_if_ltz.java
index a73b95b..471deee 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_ltz/Test_if_ltz.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_ltz/Test_if_ltz.java
@@ -52,12 +52,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_ltz.d.T_if_ltz_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ltz.d.T_if_ltz_3", VerifyError.class);
}
@@ -66,12 +61,7 @@
* @title types of arguments - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_ltz.d.T_if_ltz_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ltz.d.T_if_ltz_4", VerifyError.class);
}
/**
@@ -79,12 +69,7 @@
* @title types of arguments - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_ltz.d.T_if_ltz_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ltz.d.T_if_ltz_5", VerifyError.class);
}
/**
@@ -92,12 +77,7 @@
* @title types of arguments - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_ltz.d.T_if_ltz_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ltz.d.T_if_ltz_6", VerifyError.class);
}
/**
@@ -105,12 +85,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_ltz.d.T_if_ltz_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ltz.d.T_if_ltz_8", VerifyError.class);
}
/**
@@ -118,12 +93,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_ltz.d.T_if_ltz_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ltz.d.T_if_ltz_9", VerifyError.class);
}
/**
@@ -131,12 +101,7 @@
* @title branch must not be 0
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_ltz.d.T_if_ltz_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ltz.d.T_if_ltz_7", VerifyError.class);
}
/**
@@ -145,12 +110,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_ltz.d.T_if_ltz_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ltz.d.T_if_ltz_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_ne/Test_if_ne.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_ne/Test_if_ne.java
index 9f69a12..e104de6 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_ne/Test_if_ne.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_ne/Test_if_ne.java
@@ -105,12 +105,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_ne.d.T_if_ne_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ne.d.T_if_ne_5", VerifyError.class);
}
@@ -120,12 +115,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_ne.d.T_if_ne_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ne.d.T_if_ne_7", VerifyError.class);
}
/**
@@ -133,12 +123,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_ne.d.T_if_ne_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ne.d.T_if_ne_8", VerifyError.class);
}
/**
@@ -146,12 +131,7 @@
* @title types of arguments - int, reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_ne.d.T_if_ne_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ne.d.T_if_ne_9", VerifyError.class);
}
/**
@@ -159,12 +139,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_ne.d.T_if_ne_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ne.d.T_if_ne_10", VerifyError.class);
}
/**
@@ -172,12 +147,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_ne.d.T_if_ne_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ne.d.T_if_ne_11", VerifyError.class);
}
/**
@@ -185,12 +155,7 @@
* @title branch target shall not be 0
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_ne.d.T_if_ne_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ne.d.T_if_ne_12", VerifyError.class);
}
/**
@@ -199,12 +164,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.if_ne.d.T_if_ne_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_ne.d.T_if_ne_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/if_nez/Test_if_nez.java b/tools/vm-tests-tf/src/dot/junit/opcodes/if_nez/Test_if_nez.java
index a8dece5..2a7761a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/if_nez/Test_if_nez.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/if_nez/Test_if_nez.java
@@ -73,12 +73,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.if_nez.d.T_if_nez_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_nez.d.T_if_nez_5", VerifyError.class);
}
@@ -87,12 +82,7 @@
* @title types of arguments - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.if_nez.d.T_if_nez_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_nez.d.T_if_nez_6", VerifyError.class);
}
/**
@@ -100,12 +90,7 @@
* @title types of arguments - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.if_nez.d.T_if_nez_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_nez.d.T_if_nez_7", VerifyError.class);
}
/**
@@ -114,12 +99,7 @@
* and floats are not used interchangeably.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.if_nez.d.T_if_nez_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_nez.d.T_if_nez_3", VerifyError.class);
}
/**
@@ -127,12 +107,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.if_nez.d.T_if_nez_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_nez.d.T_if_nez_9", VerifyError.class);
}
/**
@@ -140,12 +115,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.if_nez.d.T_if_nez_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_nez.d.T_if_nez_10", VerifyError.class);
}
/**
@@ -153,11 +123,6 @@
* @title branch must not be 0
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.if_nez.d.T_if_nez_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.if_nez.d.T_if_nez_11", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget/Test_iget.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iget/Test_iget.java
index 50658ce..c3a0f09 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iget/Test_iget.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget/Test_iget.java
@@ -62,13 +62,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iget_9 t = new T_iget_9();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget.d.T_iget_9", NullPointerException.class);
}
/**
@@ -76,12 +70,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_4", VerifyError.class);
}
/**
@@ -90,12 +79,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_3", VerifyError.class);
}
/**
@@ -104,12 +88,7 @@
* different type exist
*/
public void testVFE3() {
- try {
- new T_iget_13().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget.d.T_iget_13", NoSuchFieldError.class);
}
/**
@@ -117,14 +96,8 @@
* @title Attempt to read inaccessible private field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.iget.d.T_iget_6
//@uses dot.junit.opcodes.iget.TestStubs
- try {
- new T_iget_6().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget.d.T_iget_6", IllegalAccessError.class);
}
/**
@@ -132,12 +105,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_iget_7().run();
- fail("expected a NoClassDefFoundError exception");
- } catch (NoClassDefFoundError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget.d.T_iget_7", NoClassDefFoundError.class);
}
/**
@@ -145,12 +113,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_iget_8().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget.d.T_iget_8", NoSuchFieldError.class);
}
/**
@@ -158,14 +121,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.iget.d.T_iget_12
//@uses dot.junit.opcodes.iget.d.T_iget_1
- try {
- new T_iget_12().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget.d.T_iget_12", IllegalAccessError.class);
}
/**
@@ -173,12 +130,7 @@
* @title iget shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_14", VerifyError.class);
}
/**
@@ -187,12 +139,7 @@
* @title iget shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_15", VerifyError.class);
}
/**
@@ -201,12 +148,7 @@
* @title iget shall not work for boolean fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_16", VerifyError.class);
}
/**
@@ -215,12 +157,7 @@
* @title iget shall not work for char fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_17", VerifyError.class);
}
/**
@@ -229,12 +166,7 @@
* @title iget shall not work for byte fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_18", VerifyError.class);
}
/**
@@ -243,12 +175,7 @@
* @title iget shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_19", VerifyError.class);
}
/**
@@ -257,12 +184,7 @@
* @title iget shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_20", VerifyError.class);
}
/**
@@ -270,14 +192,8 @@
* @title Attempt to read protected field of unrelated class.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.iget.d.T_iget_21
//@uses dot.junit.opcodes.iget.TestStubs
- try {
- new T_iget_21().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget.d.T_iget_21", IllegalAccessError.class);
}
/**
@@ -285,27 +201,24 @@
* @title Attempt to read static field.
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.iget.d.T_iget_5
//@uses dot.junit.opcodes.iget.TestStubs
- try {
- new T_iget_5().run();
- fail("expected an IncompatibleClassChangeError exception");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget.d.T_iget_5", IncompatibleClassChangeError.class);
}
/**
* @constraint B6
- * @title instance fields may only be accessed on already initialized instances.
+ * @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iget.d.T_iget_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget.d.T_iget_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference values.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iget.d.T_iget_31", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget/d/T_iget_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iget/d/T_iget_31.d
new file mode 100644
index 0000000..3659b15
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget/d/T_iget_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iget_31.java
+.class public dot.junit.opcodes.iget.d.T_iget_31
+.super java/lang/Object
+
+.field public st_i1 I
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()I
+.limit regs 3
+ iget v0, v0, dot.junit.opcodes.iget.d.T_iget_31.st_i1 I
+ return v0
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_boolean/Test_iget_boolean.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_boolean/Test_iget_boolean.java
index b23f330..f16b89c 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_boolean/Test_iget_boolean.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_boolean/Test_iget_boolean.java
@@ -54,28 +54,16 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iget_boolean_9 t = new T_iget_boolean_9();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_9",
+ NullPointerException.class);
}
-
-
/**
* @constraint A11
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_4", VerifyError.class);
}
/**
@@ -83,12 +71,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_3", VerifyError.class);
}
/**
@@ -97,12 +80,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_iget_boolean_13().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_13", NoSuchFieldError.class);
}
/**
@@ -110,14 +88,8 @@
* @title Attempt to read inaccessible field
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_6
//@uses dot.junit.opcodes.iget_boolean.TestStubs
- try {
- new T_iget_boolean_6().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_6", IllegalAccessError.class);
}
/**
@@ -125,12 +97,8 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_iget_boolean_7().run();
- fail("expected a NoClassDefFoundError exception");
- } catch (NoClassDefFoundError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_7",
+ NoClassDefFoundError.class);
}
/**
@@ -138,12 +106,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_iget_boolean_8().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_8", NoSuchFieldError.class);
}
/**
@@ -151,14 +114,9 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_12
//@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_1
- try {
- new T_iget_boolean_12().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ //@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_12
+ loadAndRun("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_12", IllegalAccessError.class);
}
/**
@@ -166,12 +124,7 @@
* @title iget_boolean shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_14", VerifyError.class);
}
/**
@@ -180,12 +133,7 @@
* @title iget_boolean shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_15", VerifyError.class);
}
/**
@@ -193,12 +141,7 @@
* @title iget_boolean shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_16", VerifyError.class);
}
/**
@@ -206,12 +149,7 @@
* @title iget_boolean shall not work for char fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_17", VerifyError.class);
}
/**
@@ -219,12 +157,7 @@
* @title iget_boolean shall not work for byte fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_18", VerifyError.class);
}
/**
@@ -232,12 +165,7 @@
* @title iget_boolean shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_19", VerifyError.class);
}
/**
@@ -245,12 +173,7 @@
* @title iget_boolean shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_20", VerifyError.class);
}
/**
@@ -258,14 +181,8 @@
* @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_21
//@uses dot.junit.opcodes.iget_boolean.TestStubs
- try {
- new T_iget_boolean_21().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_21", IllegalAccessError.class);
}
@@ -274,14 +191,9 @@
* @title Attempt to read static field.
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.iget_boolean.d.T_iget_boolean_5
//@uses dot.junit.opcodes.iget_boolean.TestStubs
- try {
- new T_iget_boolean_5().run();
- fail("expected an IncompatibleClassChangeError exception");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_5",
+ IncompatibleClassChangeError.class);
}
/**
@@ -289,11 +201,14 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference values.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iget_boolean.d.T_iget_boolean_31", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_31.d
new file mode 100644
index 0000000..ade9e7b
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_boolean/d/T_iget_boolean_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iget_boolean_31.java
+.class public dot.junit.opcodes.iget_boolean.d.T_iget_boolean_31
+.super java/lang/Object
+
+.field public st_i1 Z
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()Z
+.limit regs 3
+ iget v0, v0, dot.junit.opcodes.iget_boolean.d.T_iget_boolean_31.st_i1 Z
+ return v0
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_byte/Test_iget_byte.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_byte/Test_iget_byte.java
index de48192..410dad4 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_byte/Test_iget_byte.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_byte/Test_iget_byte.java
@@ -54,13 +54,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iget_byte_9 t = new T_iget_byte_9();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_byte.d.T_iget_byte_9", NullPointerException.class);
}
/**
@@ -68,12 +62,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_4", VerifyError.class);
}
/**
@@ -81,12 +70,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_3", VerifyError.class);
}
/**
@@ -95,12 +79,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_iget_byte_13().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_byte.d.T_iget_byte_13", NoSuchFieldError.class);
}
/**
@@ -108,14 +87,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_6
//@uses dot.junit.opcodes.iget_byte.TestStubs
- try {
- new T_iget_byte_6().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_byte.d.T_iget_byte_6", IllegalAccessError.class);
}
/**
@@ -123,12 +96,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_iget_byte_7().run();
- fail("expected a NoClassDefFoundError exception");
- } catch (NoClassDefFoundError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_byte.d.T_iget_byte_7", NoClassDefFoundError.class);
}
/**
@@ -136,12 +104,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_iget_byte_8().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_byte.d.T_iget_byte_8", NoSuchFieldError.class);
}
/**
@@ -149,14 +112,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_12
//@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_1
- try {
- new T_iget_byte_12().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_byte.d.T_iget_byte_12", IllegalAccessError.class);
}
/**
@@ -164,12 +121,7 @@
* @title iget_byte shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_14", VerifyError.class);
}
/**
@@ -177,12 +129,7 @@
* @title iget_byte shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_15", VerifyError.class);
}
/**
@@ -190,12 +137,7 @@
* @title iget_byte shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_16", VerifyError.class);
}
/**
@@ -203,12 +145,7 @@
* @title iget_byte shall not work for char fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_17", VerifyError.class);
}
/**
@@ -216,12 +153,7 @@
* @title iget_byte shall not work for boolean fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_18", VerifyError.class);
}
/**
@@ -229,12 +161,7 @@
* @title iget_byte shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_19", VerifyError.class);
}
/**
@@ -242,12 +169,7 @@
* @title iget_byte shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_20", VerifyError.class);
}
/**
@@ -255,14 +177,8 @@
* @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_21
//@uses dot.junit.opcodes.iget_byte.TestStubs
- try {
- new T_iget_byte_21().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_byte.d.T_iget_byte_21", IllegalAccessError.class);
}
@@ -271,14 +187,9 @@
* @title Attempt to read static field.
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.iget_byte.d.T_iget_byte_5
- //@uses dot.junit.opcodes.iget_byte.TestStubs
- try {
- new T_iget_byte_5().run();
- fail("expected an IncompatibleClassChangeError exception");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ //@uses dot.junit.opcodes.iget_byte.TestStubs
+ loadAndRun("dot.junit.opcodes.iget_byte.d.T_iget_byte_5",
+ IncompatibleClassChangeError.class);
}
/**
@@ -286,11 +197,14 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iget_byte.d.T_iget_byte_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference values.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iget_byte.d.T_iget_byte_31", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_31.d
new file mode 100644
index 0000000..0a84091
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_byte/d/T_iget_byte_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iget_byte_31.java
+.class public dot.junit.opcodes.iget_byte.d.T_iget_byte_31
+.super java/lang/Object
+
+.field public st_i1 B
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()B
+.limit regs 3
+ iget v0, v0, dot.junit.opcodes.iget_byte.d.T_iget_byte_31.st_i1 B
+ return v0
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_char/Test_iget_char.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_char/Test_iget_char.java
index c7516e8..ff86ae3 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_char/Test_iget_char.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_char/Test_iget_char.java
@@ -54,13 +54,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iget_char_9 t = new T_iget_char_9();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_char.d.T_iget_char_9", NullPointerException.class);
}
@@ -69,12 +63,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_4", VerifyError.class);
}
/**
@@ -83,12 +72,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_3", VerifyError.class);
}
/**
@@ -98,12 +82,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_iget_char_13().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError t) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_char.d.T_iget_char_13", NoSuchFieldError.class);
}
/**
@@ -111,14 +90,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.iget_char.d.T_iget_char_6
//@uses dot.junit.opcodes.iget_char.TestStubs
- try {
- new T_iget_char_6().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError t) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_char.d.T_iget_char_6", IllegalAccessError.class);
}
/**
@@ -126,12 +99,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_iget_char_7().run();
- fail("expected a NoClassDefFoundError exception");
- } catch (NoClassDefFoundError t) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_char.d.T_iget_char_7", NoClassDefFoundError.class);
}
/**
@@ -139,12 +107,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_iget_char_8().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError t) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_char.d.T_iget_char_8", NoSuchFieldError.class);
}
/**
@@ -152,14 +115,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.iget_char.d.T_iget_char_12
//@uses dot.junit.opcodes.iget_char.d.T_iget_char_1
- try {
- new T_iget_char_12().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError t) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_char.d.T_iget_char_12", IllegalAccessError.class);
}
/**
@@ -167,12 +124,7 @@
* @title iget_char shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_14", VerifyError.class);
}
/**
@@ -181,12 +133,7 @@
* @title iget_char shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_15", VerifyError.class);
}
/**
@@ -195,12 +142,7 @@
* @title iget_char shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_16", VerifyError.class);
}
/**
@@ -209,12 +151,7 @@
* @title iget_char shall not work for byte fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_17", VerifyError.class);
}
/**
@@ -223,12 +160,7 @@
* @title iget_char shall not work for boolean fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_18", VerifyError.class);
}
/**
@@ -236,12 +168,7 @@
* @title iget_char shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_19", VerifyError.class);
}
/**
@@ -249,12 +176,7 @@
* @title iget_char shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_20", VerifyError.class);
}
/**
@@ -262,14 +184,8 @@
* @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.iget_char.d.T_iget_char_21
//@uses dot.junit.opcodes.iget_char.TestStubs
- try {
- new T_iget_char_21().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError t) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_char.d.T_iget_char_21", IllegalAccessError.class);
}
@@ -278,14 +194,9 @@
* @title Attempt to read static field.
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.iget_char.d.T_iget_char_5
//@uses dot.junit.opcodes.iget_char.TestStubs
- try {
- new T_iget_char_5().run();
- fail("expected an IncompatibleClassChangeError exception");
- } catch (IncompatibleClassChangeError t) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_char.d.T_iget_char_5",
+ IncompatibleClassChangeError.class);
}
@@ -294,11 +205,14 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iget_char.d.T_iget_char_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference values.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iget_char.d.T_iget_char_31", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_char/d/T_iget_char_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_char/d/T_iget_char_31.d
new file mode 100644
index 0000000..0f5c6d7
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_char/d/T_iget_char_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iget_char_31.java
+.class public dot.junit.opcodes.iget_char.d.T_iget_char_31
+.super java/lang/Object
+
+.field public st_i1 C
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()C
+.limit regs 3
+ iget v0, v0, dot.junit.opcodes.iget_char.d.T_iget_char_31.st_i1 C
+ return v0
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_object/Test_iget_object.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_object/Test_iget_object.java
index 3a735b6..7314141 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_object/Test_iget_object.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_object/Test_iget_object.java
@@ -55,13 +55,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iget_object_9 t = new T_iget_object_9();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_object.d.T_iget_object_9", NullPointerException.class);
}
/**
@@ -69,12 +63,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_4", VerifyError.class);
}
/**
@@ -83,12 +72,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_3", VerifyError.class);
}
/**
@@ -98,12 +82,7 @@
* different type exists)
*/
public void testVFE3() {
- try {
- new T_iget_object_13().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_object.d.T_iget_object_13", NoSuchFieldError.class);
}
/**
@@ -111,14 +90,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.iget_object.d.T_iget_object_6
//@uses dot.junit.opcodes.iget_object.TestStubs
- try {
- new T_iget_object_6().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_object.d.T_iget_object_6", IllegalAccessError.class);
}
/**
@@ -126,12 +99,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_iget_object_7().run();
- fail("expected a NoClassDefFoundError exception");
- } catch (NoClassDefFoundError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_object.d.T_iget_object_7", NoClassDefFoundError.class);
}
/**
@@ -139,12 +107,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_iget_object_8().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_object.d.T_iget_object_8", NoSuchFieldError.class);
}
/**
@@ -152,14 +115,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.iget_object.d.T_iget_object_12
//@uses dot.junit.opcodes.iget_object.d.T_iget_object_1
- try {
- new T_iget_object_12().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_object.d.T_iget_object_12", IllegalAccessError.class);
}
/**
@@ -167,12 +124,7 @@
* @title iget_object shall not work for short fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_14", VerifyError.class);
}
/**
@@ -181,12 +133,7 @@
* @title iget_object shall not work for char fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_15", VerifyError.class);
}
/**
@@ -195,12 +142,7 @@
* @title iget_object shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_16", VerifyError.class);
}
/**
@@ -209,12 +151,7 @@
* @title iget_object shall not work for byte fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_17", VerifyError.class);
}
/**
@@ -223,12 +160,7 @@
* @title iget_object shall not work for boolean fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_18", VerifyError.class);
}
/**
@@ -237,12 +169,7 @@
* @title iget_object shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_19", VerifyError.class);
}
/**
@@ -251,12 +178,7 @@
* @title iget_object shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_20", VerifyError.class);
}
/**
@@ -265,12 +187,7 @@
* @title only field of different type exists
*/
public void testVFE15() {
- try {
- new T_iget_object_21().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_object.d.T_iget_object_21", NoSuchFieldError.class);
}
/**
@@ -278,14 +195,8 @@
* @title Attempt to read inaccessible protected field.
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.iget_object.d.T_iget_object_22
//@uses dot.junit.opcodes.iget_object.TestStubs
- try {
- new T_iget_object_22().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_object.d.T_iget_object_22", IllegalAccessError.class);
}
/**
@@ -293,14 +204,9 @@
* @title Attempt to read static field.
*/
public void testVFE17() {
- //@uses dot.junit.opcodes.iget_object.d.T_iget_object_5
//@uses dot.junit.opcodes.iget_object.TestStubs
- try {
- new T_iget_object_5().run();
- fail("expected an IncompatibleClassChangeError exception");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_object.d.T_iget_object_5",
+ IncompatibleClassChangeError.class);
}
/**
@@ -308,11 +214,14 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iget_object.d.T_iget_object_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on already initialized instances.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iget_object.d.T_iget_object_31", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_object/d/T_iget_object_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_object/d/T_iget_object_31.d
new file mode 100644
index 0000000..f194ecd
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_object/d/T_iget_object_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iget_object_31.java
+.class public dot.junit.opcodes.iget_object.d.T_iget_object_31
+.super java/lang/Object
+
+.field public st_i1 Ldot/junit/opcodes/iget_object/d/T_iget_object_31;
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()Ldot/junit/opcodes/iget_object/d/T_iget_object_31;
+.limit regs 3
+ iget v0, v0, dot.junit.opcodes.iget_object.d.T_iget_object_31.st_i1 Ldot/junit/opcodes/iget_object/d/T_iget_object_31;
+ return v0
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_short/Test_iget_short.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_short/Test_iget_short.java
index a7d3658..566ec3f 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_short/Test_iget_short.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_short/Test_iget_short.java
@@ -54,28 +54,15 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iget_short_9 t = new T_iget_short_9();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_short.d.T_iget_short_9", NullPointerException.class);
}
-
-
/**
* @constraint A11
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_4", VerifyError.class);
}
/**
@@ -84,12 +71,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_3", VerifyError.class);
}
/**
@@ -99,12 +81,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_iget_short_13().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_short.d.T_iget_short_13", NoSuchFieldError.class);
}
/**
@@ -112,14 +89,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.iget_short.d.T_iget_short_6
//@uses dot.junit.opcodes.iget_short.TestStubs
- try {
- new T_iget_short_6().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_short.d.T_iget_short_6", IllegalAccessError.class);
}
/**
@@ -127,12 +98,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_iget_short_7().run();
- fail("expected a NoClassDefFoundError exception");
- } catch (NoClassDefFoundError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_short.d.T_iget_short_7", NoClassDefFoundError.class);
}
/**
@@ -140,12 +106,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_iget_short_8().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_short.d.T_iget_short_8", NoSuchFieldError.class);
}
/**
@@ -153,14 +114,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.iget_short.d.T_iget_short_12
//@uses dot.junit.opcodes.iget_short.d.T_iget_short_1
- try {
- new T_iget_short_12().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_short.d.T_iget_short_12", IllegalAccessError.class);
}
/**
@@ -168,12 +123,7 @@
* @title iget_short shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_14", VerifyError.class);
}
/**
@@ -182,12 +132,7 @@
* @title iget_short shall not work for char fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_15", VerifyError.class);
}
/**
@@ -196,12 +141,7 @@
* @title iget_short shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_16", VerifyError.class);
}
/**
@@ -210,12 +150,7 @@
* @title iget_short shall not work for byte fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_17", VerifyError.class);
}
/**
@@ -224,12 +159,7 @@
* @title iget_short shall not work for boolean fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_18", VerifyError.class);
}
/**
@@ -238,12 +168,7 @@
* @title iget_short shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_19", VerifyError.class);
}
/**
@@ -252,12 +177,7 @@
* @title iget_short shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_20", VerifyError.class);
}
/**
@@ -265,30 +185,18 @@
* @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.iget_short.d.T_iget_short_21
//@uses dot.junit.opcodes.iget_short.TestStubs
- try {
- new T_iget_short_21().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_short.d.T_iget_short_21", IllegalAccessError.class);
}
-
/**
* @constraint A11
* @title Attempt to read static field.
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.iget_short.d.T_iget_short_5
//@uses dot.junit.opcodes.iget_short.TestStubs
- try {
- new T_iget_short_5().run();
- fail("expected an IncompatibleClassChangeError exception");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_short.d.T_iget_short_5",
+ IncompatibleClassChangeError.class);
}
/**
@@ -296,11 +204,14 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iget_short.d.T_iget_short_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on already initialized instances.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iget_short.d.T_iget_short_31", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_short/d/T_iget_short_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_short/d/T_iget_short_31.d
new file mode 100644
index 0000000..af8a395
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_short/d/T_iget_short_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iget_short_31.java
+.class public dot.junit.opcodes.iget_short.d.T_iget_short_31
+.super java/lang/Object
+
+.field public st_i1 S
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()S
+.limit regs 3
+ iget v0, v0, dot.junit.opcodes.iget_short.d.T_iget_short_31.st_i1 S
+ return v0
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_wide/Test_iget_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_wide/Test_iget_wide.java
index 7e42d32..f82a1d3 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_wide/Test_iget_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_wide/Test_iget_wide.java
@@ -62,13 +62,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iget_wide_9 t = new T_iget_wide_9();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_wide.d.T_iget_wide_9", NullPointerException.class);
}
/**
@@ -76,12 +70,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_4", VerifyError.class);
}
/**
@@ -90,12 +79,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_3", VerifyError.class);
}
/**
@@ -105,12 +89,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_iget_wide_13().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_wide.d.T_iget_wide_13", NoSuchFieldError.class);
}
/**
@@ -118,14 +97,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_6
//@uses dot.junit.opcodes.iget_wide.TestStubs
- try {
- new T_iget_wide_6().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_wide.d.T_iget_wide_6", IllegalAccessError.class);
}
/**
@@ -133,12 +106,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_iget_wide_7().run();
- fail("expected a NoClassDefFoundError exception");
- } catch (NoClassDefFoundError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_wide.d.T_iget_wide_7", NoClassDefFoundError.class);
}
/**
@@ -146,12 +114,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_iget_wide_8().run();
- fail("expected a NoSuchFieldError exception");
- } catch (NoSuchFieldError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_wide.d.T_iget_wide_8", NoSuchFieldError.class);
}
/**
@@ -159,14 +122,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_12
//@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_1
- try {
- new T_iget_wide_12().run();
- fail("expected a IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_wide.d.T_iget_wide_12", IllegalAccessError.class);
}
/**
@@ -174,12 +131,7 @@
* @title iget-wide shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_14", VerifyError.class);
}
/**
@@ -188,12 +140,7 @@
* @title iget-wide shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_15", VerifyError.class);
}
/**
@@ -202,12 +149,7 @@
* @title iget-wide shall not work for boolean fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_16", VerifyError.class);
}
/**
@@ -216,12 +158,7 @@
* @title iget-wide shall not work for char fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_17", VerifyError.class);
}
/**
@@ -230,12 +167,7 @@
* @title iget-wide shall not work for byte fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_18", VerifyError.class);
}
/**
@@ -244,12 +176,7 @@
* @title iget-wide shall not work for float fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_19", VerifyError.class);
}
/**
@@ -258,12 +185,7 @@
* @title iget-wide shall not work for int fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_20", VerifyError.class);
}
/**
@@ -271,14 +193,8 @@
* @title Attempt to read inaccessible protected field.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_21
//@uses dot.junit.opcodes.iget_wide.TestStubs
- try {
- new T_iget_wide_21().run();
- fail("expected an IllegalAccessError exception");
- } catch (IllegalAccessError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_wide.d.T_iget_wide_21", IllegalAccessError.class);
}
/**
@@ -286,14 +202,9 @@
* @title Attempt to read static field.
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.iget_wide.d.T_iget_wide_5
//@uses dot.junit.opcodes.iget_wide.TestStubs
- try {
- new T_iget_wide_5().run();
- fail("expected a IncompatibleClassChangeError exception");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iget_wide.d.T_iget_wide_5",
+ IncompatibleClassChangeError.class);
}
/**
@@ -301,11 +212,14 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iget_wide.d.T_iget_wide_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on already initialized instances.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iget_wide.d.T_iget_wide_31", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_31.d
new file mode 100644
index 0000000..7f97a07
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iget_wide/d/T_iget_wide_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iget_wide_31.java
+.class public dot.junit.opcodes.iget_wide.d.T_iget_wide_31
+.super java/lang/Object
+
+.field public st_i1 J
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()J
+.limit regs 3
+ iget v0, v0, dot.junit.opcodes.iget_wide.d.T_iget_wide_31.st_i1 J
+ return v0
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/instance_of/Test_instance_of.java b/tools/vm-tests-tf/src/dot/junit/opcodes/instance_of/Test_instance_of.java
index b0a6cc6..f35e147 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/instance_of/Test_instance_of.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/instance_of/Test_instance_of.java
@@ -64,28 +64,14 @@
*/
public void testE2() {
//@uses dot.junit.opcodes.instance_of.TestStubs
- //@uses dot.junit.opcodes.instance_of.d.T_instance_of_3
- try {
- T_instance_of_3 tt = new T_instance_of_3();
- tt.run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError e) {
- }
+ loadAndRun("dot.junit.opcodes.instance_of.d.T_instance_of_3", IllegalAccessError.class);
}
/**
* @title Attempt to access undefined class.
*/
public void testE3() {
- try {
- T_instance_of_7 tt = new T_instance_of_7();
- tt.run();
- fail("expected a verification exception");
- } catch (NoClassDefFoundError e) {
- // expected
- } catch(VerifyError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.instance_of.d.T_instance_of_7", NoClassDefFoundError.class);
}
/**
@@ -93,12 +79,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.instance_of.d.T_instance_of_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.instance_of.d.T_instance_of_4", VerifyError.class);
}
/**
@@ -107,12 +88,7 @@
* @title type of argument - int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.instance_of.d.T_instance_of_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.instance_of.d.T_instance_of_5", VerifyError.class);
}
/**
@@ -121,12 +97,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.instance_of.d.T_instance_of_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.instance_of.d.T_instance_of_8", VerifyError.class);
}
/**
@@ -135,12 +106,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.instance_of.d.T_instance_of_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.instance_of.d.T_instance_of_6", VerifyError.class);
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_byte/Test_int_to_byte.java b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_byte/Test_int_to_byte.java
index ad50cb6..9401e14 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_byte/Test_int_to_byte.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_byte/Test_int_to_byte.java
@@ -134,12 +134,7 @@
* @title type of argument - double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_2", VerifyError.class);
}
/**
@@ -148,12 +143,7 @@
* @title type of argument - long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_3", VerifyError.class);
}
/**
@@ -162,12 +152,7 @@
* @title type of argument - reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_4", VerifyError.class);
}
/**
@@ -175,12 +160,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_6", VerifyError.class);
}
/**
@@ -189,12 +169,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_byte.d.T_int_to_byte_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_char/Test_int_to_char.java b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_char/Test_int_to_char.java
index c6aa047..4c3f8ac 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_char/Test_int_to_char.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_char/Test_int_to_char.java
@@ -93,12 +93,7 @@
* @title type of argument - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.int_to_char.d.T_int_to_char_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_char.d.T_int_to_char_2", VerifyError.class);
}
/**
@@ -106,12 +101,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.int_to_char.d.T_int_to_char_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_char.d.T_int_to_char_3", VerifyError.class);
}
/**
@@ -119,12 +109,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.int_to_char.d.T_int_to_char_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_char.d.T_int_to_char_4", VerifyError.class);
}
/**
@@ -132,12 +117,7 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.int_to_char.d.T_int_to_char_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_char.d.T_int_to_char_6", VerifyError.class);
}
/**
@@ -146,12 +126,7 @@
* and floats are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.int_to_char.d.T_int_to_char_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_char.d.T_int_to_char_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_double/Test_int_to_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_double/Test_int_to_double.java
index 675821b..892f461 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_double/Test_int_to_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_double/Test_int_to_double.java
@@ -77,12 +77,7 @@
* @title type of argument - long
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.int_to_double.d.T_int_to_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_double.d.T_int_to_double_3", VerifyError.class);
}
/**
@@ -90,12 +85,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.int_to_double.d.T_int_to_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_double.d.T_int_to_double_4", VerifyError.class);
}
/**
@@ -103,12 +93,7 @@
* @title type of argument - reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.int_to_double.d.T_int_to_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_double.d.T_int_to_double_5", VerifyError.class);
}
/**
@@ -116,12 +101,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.int_to_double.d.T_int_to_double_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_double.d.T_int_to_double_7", VerifyError.class);
}
/**
@@ -130,11 +110,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.int_to_double.d.T_int_to_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_double.d.T_int_to_double_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_float/Test_int_to_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_float/Test_int_to_float.java
index eaa7a31..a6f1742 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_float/Test_int_to_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_float/Test_int_to_float.java
@@ -85,12 +85,7 @@
* @title (type of argument - double)
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.int_to_float.d.T_int_to_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_float.d.T_int_to_float_2", VerifyError.class);
}
/**
@@ -99,12 +94,7 @@
* @title type of argument - long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.int_to_float.d.T_int_to_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_float.d.T_int_to_float_3", VerifyError.class);
}
/**
@@ -113,12 +103,7 @@
* @title type of argument - reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.int_to_float.d.T_int_to_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_float.d.T_int_to_float_4", VerifyError.class);
}
/**
@@ -126,12 +111,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.int_to_float.d.T_int_to_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_float.d.T_int_to_float_6", VerifyError.class);
}
/**
@@ -140,12 +120,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.int_to_float.d.T_int_to_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_float.d.T_int_to_float_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_long/Test_int_to_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_long/Test_int_to_long.java
index 41db35d..931b79c 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_long/Test_int_to_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_long/Test_int_to_long.java
@@ -77,12 +77,7 @@
* @title type of argument - double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.int_to_long.d.T_int_to_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_long.d.T_int_to_long_2", VerifyError.class);
}
/**
@@ -91,12 +86,7 @@
* @title type of argument - long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.int_to_long.d.T_int_to_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_long.d.T_int_to_long_3", VerifyError.class);
}
/**
@@ -104,12 +94,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.int_to_long.d.T_int_to_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_long.d.T_int_to_long_4", VerifyError.class);
}
/**
@@ -117,12 +102,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.int_to_long.d.T_int_to_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_long.d.T_int_to_long_5", VerifyError.class);
}
/**
@@ -130,12 +110,7 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.int_to_long.d.T_int_to_long_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_long.d.T_int_to_long_7", VerifyError.class);
}
/**
@@ -144,11 +119,6 @@
* and floats are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.int_to_long.d.T_int_to_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_long.d.T_int_to_long_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_short/Test_int_to_short.java b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_short/Test_int_to_short.java
index b245fc1..898b8ad 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_short/Test_int_to_short.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/int_to_short/Test_int_to_short.java
@@ -109,12 +109,7 @@
* @title type of argument - double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.int_to_short.d.T_int_to_short_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_short.d.T_int_to_short_2", VerifyError.class);
}
/**
@@ -123,12 +118,7 @@
* @title type of argument - long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.int_to_short.d.T_int_to_short_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_short.d.T_int_to_short_3", VerifyError.class);
}
/**
@@ -137,12 +127,7 @@
* @title type of argument - reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.int_to_short.d.T_int_to_short_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_short.d.T_int_to_short_4", VerifyError.class);
}
/**
@@ -150,12 +135,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.int_to_short.d.T_int_to_short_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_short.d.T_int_to_short_6", VerifyError.class);
}
/**
@@ -164,12 +144,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.int_to_short.d.T_int_to_short_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.int_to_short.d.T_int_to_short_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_direct/Test_invoke_direct.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_direct/Test_invoke_direct.java
index c5402b3..34462f6 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_direct/Test_invoke_direct.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_direct/Test_invoke_direct.java
@@ -54,26 +54,16 @@
* @title objref is null
*/
public void testE3() {
- T_invoke_direct_8 t = new T_invoke_direct_8();
- try {
- assertEquals(5, t.run());
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_8",
+ NullPointerException.class);
}
/**
* @title Native method can't be linked
*/
public void testE5() {
- T_invoke_direct_9 t = new T_invoke_direct_9();
- try {
- assertEquals(5, t.run());
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_9",
+ UnsatisfiedLinkError.class);
}
/**
@@ -81,12 +71,7 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_3", VerifyError.class);
}
/**
@@ -94,12 +79,7 @@
* @title invoke-direct may not be used to invoke <clinit>
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_4", VerifyError.class);
}
/**
@@ -107,14 +87,8 @@
* @title invoke-direct target must be in self or superclass
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.invoke_direct.d.T_invoke_direct_6
//@uses dot.junit.opcodes.invoke_direct.TSuper
- try {
- new T_invoke_direct_6();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_6", VerifyError.class);
}
/**
@@ -122,12 +96,7 @@
* @title number of arguments
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_5", VerifyError.class);
}
/**
@@ -135,12 +104,7 @@
* @title int is passed instead of obj ref
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_10", VerifyError.class);
}
@@ -149,12 +113,7 @@
* @title number of arguments passed to method
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_14", VerifyError.class);
}
/**
@@ -162,12 +121,7 @@
* @title types of arguments passed to method
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_24", VerifyError.class);
}
/**
@@ -175,15 +129,9 @@
* @title assignment incompatible references when accessing protected method
*/
public void testVFE10() {
- //@uses dot.junit.opcodes.invoke_direct.d.T_invoke_direct_25
//@uses dot.junit.opcodes.invoke_direct.TPlain
//@uses dot.junit.opcodes.invoke_direct.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_25");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_25", VerifyError.class);
}
/**
@@ -191,14 +139,9 @@
* @title Superclass' method call
*/
public void testVFE11() {
- //@uses dot.junit.opcodes.invoke_direct.d.T_invoke_direct_25
//@uses dot.junit.opcodes.invoke_direct.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_1");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_1",
+ IncompatibleClassChangeError.class);
}
/**
@@ -206,12 +149,7 @@
* @title number of registers
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_15", VerifyError.class);
}
@@ -220,11 +158,7 @@
* @title Attempt to call undefined method.
*/
public void testVFE13() {
- try {
- new T_invoke_direct_7().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_7", NoSuchMethodError.class);
}
/**
@@ -232,11 +166,7 @@
* @title Method has different signature.
*/
public void testVFE14() {
- try {
- new T_invoke_direct_16().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_16", NoSuchMethodError.class);
}
/**
@@ -245,20 +175,8 @@
* on first access. Dalvik threw VerifyError on class loading.
*/
public void testVFE15() {
- try {
- Class<?> c = Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_11");
- // Attempt to instantiate and run.
- Object o = c.newInstance();
- java.lang.reflect.Method m = c.getDeclaredMethod("run");
- m.invoke(o);
- fail("expected an invocation target exception with an incompatible class change error");
- } catch (java.lang.reflect.InvocationTargetException ite) {
- if (!(ite.getCause() instanceof IncompatibleClassChangeError)) {
- fail("expected an incompatible class change error");
- }
- } catch (Throwable t) {
- throw new RuntimeException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_11",
+ IncompatibleClassChangeError.class);
}
@@ -267,13 +185,9 @@
* @title Attempt to invoke private method of superclass.
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.invoke_direct.d.T_invoke_direct_12
//@uses dot.junit.opcodes.invoke_direct.TSuper
- try {
- new T_invoke_direct_12().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_12",
+ IllegalAccessError.class);
}
@@ -282,14 +196,9 @@
* @title Attempt to invoke abstract method
*/
public void testVFE17() {
- //@uses dot.junit.opcodes.invoke_direct.d.T_invoke_direct_13
//@uses dot.junit.opcodes.invoke_direct.TAbstract
- try {
- new T_invoke_direct_13().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_13",
+ IncompatibleClassChangeError.class);
}
/**
@@ -297,12 +206,7 @@
* @title An instance initializer must only be invoked on an uninitialized instance.
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_17", VerifyError.class);
}
/**
@@ -310,14 +214,8 @@
* @title attempt to access inherited instance field before <init> is called
*/
public void testVFE19() {
- //@uses dot.junit.opcodes.invoke_direct.d.T_invoke_direct_18
//@uses dot.junit.opcodes.invoke_direct.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_18", VerifyError.class);
}
/**
@@ -325,13 +223,8 @@
* @title attempt to invoke interface method
*/
public void testVFE20() {
- //@uses dot.junit.opcodes.invoke_direct.d.T_invoke_direct_26
- try {
- new T_invoke_direct_26().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_26",
+ IncompatibleClassChangeError.class);
}
/**
@@ -339,11 +232,6 @@
* @title instance methods may only be invoked on already initialized instances.
*/
public void testVFE21() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_27");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct.d.T_invoke_direct_27", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_direct_range/Test_invoke_direct_range.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_direct_range/Test_invoke_direct_range.java
index 1fe95c2..2a926e7 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_direct_range/Test_invoke_direct_range.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_direct_range/Test_invoke_direct_range.java
@@ -54,26 +54,16 @@
* @title objref is null
*/
public void testE3() {
- T_invoke_direct_range_8 t = new T_invoke_direct_range_8();
- try {
- assertEquals(5, t.run());
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_8",
+ NullPointerException.class);
}
/**
* @title Native method can't be linked
*/
public void testE5() {
- T_invoke_direct_range_9 t = new T_invoke_direct_range_9();
- try {
- assertEquals(5, t.run());
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_9",
+ UnsatisfiedLinkError.class);
}
/**
@@ -81,12 +71,7 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_3", VerifyError.class);
}
/**
@@ -94,12 +79,7 @@
* @title invoke-direct may not be used to invoke <clinit>
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_4", VerifyError.class);
}
/**
@@ -107,14 +87,8 @@
* @title invoke-direct target must be in self or superclass
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_6
//@uses dot.junit.opcodes.invoke_direct_range.TSuper
- try {
- new T_invoke_direct_range_6();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_6", VerifyError.class);
}
/**
@@ -122,12 +96,7 @@
* @title number of arguments
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_5", VerifyError.class);
}
/**
@@ -135,12 +104,7 @@
* @title int is passed instead of obj ref
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_10", VerifyError.class);
}
@@ -149,12 +113,7 @@
* @title number of arguments passed to method
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_14", VerifyError.class);
}
/**
@@ -162,12 +121,7 @@
* @title types of arguments passed to method
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_24", VerifyError.class);
}
/**
@@ -175,15 +129,9 @@
* @title assignment incompatible references when accessing protected method
*/
public void testVFE10() {
- //@uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_25
//@uses dot.junit.opcodes.invoke_direct_range.TPlain
//@uses dot.junit.opcodes.invoke_direct_range.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_25");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_25", VerifyError.class);
}
/**
@@ -191,14 +139,9 @@
* @title Superclass' method call
*/
public void testVFE11() {
- //@uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_25
//@uses dot.junit.opcodes.invoke_direct_range.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_1");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_1",
+ IncompatibleClassChangeError.class);
}
/**
@@ -206,12 +149,7 @@
* @title number of registers
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_15", VerifyError.class);
}
@@ -220,11 +158,8 @@
* @title Attempt to call undefined method.
*/
public void testVFE13() {
- try {
- new T_invoke_direct_range_7().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_7",
+ NoSuchMethodError.class);
}
/**
@@ -232,11 +167,8 @@
* @title Method has different signature.
*/
public void testVFE14() {
- try {
- new T_invoke_direct_range_16().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_16",
+ NoSuchMethodError.class);
}
/**
@@ -245,20 +177,8 @@
* on first access. Dalvik threw VerifyError on class loading.
*/
public void testVFE15() {
- try {
- Class<?> c = Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_11");
- // Attempt to instantiate and run.
- Object o = c.newInstance();
- java.lang.reflect.Method m = c.getDeclaredMethod("run");
- m.invoke(o);
- fail("expected an invocation target exception with an incompatible class change error");
- } catch (java.lang.reflect.InvocationTargetException ite) {
- if (!(ite.getCause() instanceof IncompatibleClassChangeError)) {
- fail("expected an incompatible class change error");
- }
- } catch (Throwable t) {
- throw new RuntimeException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_11",
+ IncompatibleClassChangeError.class);
}
@@ -268,13 +188,9 @@
* on first access but Dalvik throws VerifyError on class loading.
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_12
//@uses dot.junit.opcodes.invoke_direct_range.TSuper
- try {
- new T_invoke_direct_range_12().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_12",
+ IllegalAccessError.class);
}
@@ -283,14 +199,9 @@
* @title Attempt to invoke abstract method
*/
public void testVFE17() {
- //@uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_13
//@uses dot.junit.opcodes.invoke_direct_range.TAbstract
- try {
- new T_invoke_direct_range_13().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_13",
+ IncompatibleClassChangeError.class);
}
/**
@@ -298,12 +209,7 @@
* @title An instance initializer must only be invoked on an uninitialized instance.
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_17", VerifyError.class);
}
/**
@@ -311,14 +217,8 @@
* @title attempt to access inherited instance field before <init> is called
*/
public void testVFE19() {
- //@uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_18
//@uses dot.junit.opcodes.invoke_direct_range.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_18", VerifyError.class);
}
/**
@@ -326,13 +226,8 @@
* @title attempt to invoke interface method
*/
public void testVFE20() {
- //@uses dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_26
- try {
- new T_invoke_direct_range_26().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_26",
+ IncompatibleClassChangeError.class);
}
/**
@@ -340,11 +235,6 @@
* @title instance methods may only be invoked on already initialized instances.
*/
public void testVFE21() {
- try {
- Class.forName("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_27");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_direct_range.d.T_invoke_direct_range_27", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/Test_invoke_interface.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/Test_invoke_interface.java
index 69c54e1..6972253 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/Test_invoke_interface.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/Test_invoke_interface.java
@@ -63,30 +63,19 @@
* @title objref is null
*/
public void testE3() {
- //@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_3
//@uses dot.junit.opcodes.invoke_interface.ITest
- try {
- new T_invoke_interface_3(null);
- fail("expected NullPointerException");
- } catch (NullPointerException npe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_3",
+ NullPointerException.class);
}
/**
* @title object doesn't implement interface
*/
public void testE4() {
- //@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_11
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
- T_invoke_interface_11 t = new T_invoke_interface_11();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_11",
+ IncompatibleClassChangeError.class);
}
/**
@@ -99,51 +88,31 @@
//@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_11
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
- T_invoke_interface_11 t = new T_invoke_interface_11();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError expected) {
- }
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError expected) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_11",
+ IncompatibleClassChangeError.class);
+ loadAndRun("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_11",
+ IncompatibleClassChangeError.class);
}
/**
* @title Native method can't be linked
*/
public void testE5() {
- //@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_12
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
- T_invoke_interface_12 t = new T_invoke_interface_12();
- ITestImpl impl = new ITestImpl();
- try {
- t.run(impl);
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_12",
+ UnsatisfiedLinkError.class, new ITestImpl());
}
/**
* @title Attempt to invoke abstract method
*/
public void testE6() {
- //@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_13
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
//@uses dot.junit.opcodes.invoke_interface.ITestImplAbstract
- T_invoke_interface_13 t = new T_invoke_interface_13();
- try {
- t.run();
- fail("expected AbstractMethodError");
- } catch (AbstractMethodError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_13",
+ AbstractMethodError.class);
}
/**
@@ -151,12 +120,7 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_2", VerifyError.class);
}
/**
@@ -164,11 +128,8 @@
* @title The referenced method_id must belong to an interface (not a class).
*/
public void testVFE2() {
- try {
- new T_invoke_interface_4().run();
- fail("expected an IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_4",
+ IncompatibleClassChangeError.class);
}
/**
@@ -178,11 +139,7 @@
public void testVFE5() {
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
- try {
- new T_invoke_interface_5(new ITestImpl());
- fail("expected VerifyError");
- } catch (VerifyError t) {
- }
+ load("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_5", VerifyError.class);
}
/**
@@ -190,12 +147,7 @@
* @title int is passed instead of objref
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_10", VerifyError.class);
}
/**
@@ -203,12 +155,7 @@
* @title number of arguments passed to method
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_9", VerifyError.class);
}
/**
@@ -217,12 +164,7 @@
*/
public void testVFE10() {
//@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_18
- try {
- new T_invoke_interface_18().run(new ITestImpl());
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_18", VerifyError.class);
}
/**
@@ -232,12 +174,7 @@
public void testVFE11() {
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
- try {
- new T_invoke_interface_20().run(new ITestImpl());
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_20", VerifyError.class);
}
/**
@@ -247,11 +184,7 @@
public void testVFE12() {
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
- try {
- new T_invoke_interface_21().run(new ITestImpl());
- fail("expected VerifyError");
- } catch (VerifyError t) {
- }
+ load("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_21", VerifyError.class);
}
/**
@@ -259,12 +192,7 @@
* @title number of registers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_8", VerifyError.class);
}
/**
@@ -272,14 +200,10 @@
* @title Attempt to call undefined method.
*/
public void testVFE14() {
- //@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_7
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
- try {
- new T_invoke_interface_7().run(new ITestImpl());
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_7",
+ NoSuchMethodError.class, new ITestImpl());
}
/**
@@ -287,14 +211,10 @@
* @title Method has different signature.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_16
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
- try {
- new T_invoke_interface_16().run(new ITestImpl());
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_16",
+ NoSuchMethodError.class, new ITestImpl());
}
@@ -303,14 +223,8 @@
* @title instance methods may only be invoked on already initialized instances.
*/
public void testVFE21() {
- //@uses dot.junit.opcodes.invoke_interface.d.T_invoke_interface_22
//@uses dot.junit.opcodes.invoke_interface.ITest
//@uses dot.junit.opcodes.invoke_interface.ITestImpl
- try {
- Class.forName("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface.d.T_invoke_interface_22", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/d/T_invoke_interface_3.d b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/d/T_invoke_interface_3.d
index debf41a..44251bf 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/d/T_invoke_interface_3.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface/d/T_invoke_interface_3.d
@@ -16,14 +16,15 @@
.class public dot.junit.opcodes.invoke_interface.d.T_invoke_interface_3
.super java/lang/Object
-
-.method public <init>(Ldot/junit/opcodes/invoke_interface/ITest;)V
-.limit regs 5
-Label0:
- invoke-direct {v3}, java/lang/Object/<init>()V
-
- invoke-interface {v4}, dot/junit/opcodes/invoke_interface/ITest/doit()V
+.method public <init>()V
+.limit regs 2
+ invoke-direct {v1}, java/lang/Object/<init>()V
return-void
.end method
-
+.method public run()V
+.limit regs 5
+ const/4 v1, 0
+ invoke-interface {v1}, dot/junit/opcodes/invoke_interface/ITest/doit()V
+ return-void
+.end method
\ No newline at end of file
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface_range/Test_invoke_interface_range.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface_range/Test_invoke_interface_range.java
index 5af318a..8faa506 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface_range/Test_invoke_interface_range.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface_range/Test_invoke_interface_range.java
@@ -63,64 +63,40 @@
* @title objref is null
*/
public void testE3() {
- //@uses dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_3
//@uses dot.junit.opcodes.invoke_interface_range.ITest
- try {
- new T_invoke_interface_range_3(null);
- fail("expected NullPointerException");
- } catch (NullPointerException npe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_3",
+ NullPointerException.class);
}
/**
* @title object doesn't implement interface
*/
public void testE4() {
- //@uses dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_11
//@uses dot.junit.opcodes.invoke_interface_range.ITest
//@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
- T_invoke_interface_range_11 t = new T_invoke_interface_range_11();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_11",
+ IncompatibleClassChangeError.class);
}
/**
* @title Native method can't be linked
*/
public void testE5() {
- //@uses dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_12
//@uses dot.junit.opcodes.invoke_interface_range.ITest
//@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
- T_invoke_interface_range_12 t = new T_invoke_interface_range_12();
- ITestImpl impl = new ITestImpl();
- try {
- t.run(impl);
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_12",
+ UnsatisfiedLinkError.class, new ITestImpl());
}
/**
* @title Attempt to invoke abstract method
*/
public void testE6() {
- //@uses dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_13
//@uses dot.junit.opcodes.invoke_interface_range.ITest
//@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
//@uses dot.junit.opcodes.invoke_interface_range.ITestImplAbstract
- T_invoke_interface_range_13 t = new T_invoke_interface_range_13();
- try {
- t.run();
- fail("expected AbstractMethodError");
- } catch (AbstractMethodError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_13",
+ AbstractMethodError.class);
}
/**
@@ -128,12 +104,8 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_2",
+ VerifyError.class);
}
/**
@@ -141,11 +113,8 @@
* @title The referenced method_id must belong to an interface (not a class).
*/
public void testVFE2() {
- try {
- new T_invoke_interface_range_4().run();
- fail("expected an IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_4",
+ IncompatibleClassChangeError.class);
}
/**
@@ -155,11 +124,8 @@
public void testVFE5() {
//@uses dot.junit.opcodes.invoke_interface_range.ITest
//@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
- try {
- new T_invoke_interface_range_5(new ITestImpl());
- fail("expected VerifyError");
- } catch (VerifyError t) {
- }
+ load("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_5",
+ VerifyError.class);
}
/**
@@ -167,12 +133,8 @@
* @title int is passed instead of objref
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_10",
+ VerifyError.class);
}
/**
@@ -180,12 +142,8 @@
* @title number of arguments passed to method
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_9",
+ VerifyError.class);
}
/**
@@ -193,13 +151,10 @@
* @title invoke-interface may not be used to call <init>.
*/
public void testVFE10() {
- //@uses dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_18
- try {
- new T_invoke_interface_range_18().run(new ITestImpl());
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ //@uses dot.junit.opcodes.invoke_interface_range.ITest
+ //@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
+ load("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_18",
+ VerifyError.class);
}
/**
@@ -209,12 +164,8 @@
public void testVFE11() {
//@uses dot.junit.opcodes.invoke_interface_range.ITest
//@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
- try {
- new T_invoke_interface_range_20().run(new ITestImpl());
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_20",
+ VerifyError.class);
}
/**
@@ -224,11 +175,8 @@
public void testVFE12() {
//@uses dot.junit.opcodes.invoke_interface_range.ITest
//@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
- try {
- new T_invoke_interface_range_21().run(new ITestImpl());
- fail("expected VerifyError");
- } catch (VerifyError t) {
- }
+ load("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_21",
+ VerifyError.class);
}
/**
@@ -236,12 +184,8 @@
* @title number of registers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_8",
+ VerifyError.class);
}
/**
@@ -249,14 +193,10 @@
* @title Attempt to call undefined method.
*/
public void testVFE14() {
- //@uses dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_7
//@uses dot.junit.opcodes.invoke_interface_range.ITest
//@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
- try {
- new T_invoke_interface_range_7().run(new ITestImpl());
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_7",
+ NoSuchMethodError.class, new ITestImpl());
}
/**
@@ -264,15 +204,10 @@
* @title Method has different signature.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_16
//@uses dot.junit.opcodes.invoke_interface_range.ITest
//@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
- try {
- new T_invoke_interface_range_16().run(new ITestImpl());
- fail("expected NoSuchMethodError");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_16",
+ NoSuchMethodError.class, new ITestImpl());
}
/**
@@ -283,11 +218,7 @@
//@uses dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_22
//@uses dot.junit.opcodes.invoke_interface_range.ITest
//@uses dot.junit.opcodes.invoke_interface_range.ITestImpl
- try {
- Class.forName("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_22",
+ VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface_range/d/T_invoke_interface_range_3.d b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface_range/d/T_invoke_interface_range_3.d
index ca4948d..eaf5408 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface_range/d/T_invoke_interface_range_3.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_interface_range/d/T_invoke_interface_range_3.d
@@ -16,13 +16,16 @@
.class public dot.junit.opcodes.invoke_interface_range.d.T_invoke_interface_range_3
.super java/lang/Object
+.method public <init>()V
+.limit regs 2
+ invoke-direct {v1}, java/lang/Object/<init>()V
+ return-void
+.end method
-.method public <init>(Ldot/junit/opcodes/invoke_interface_range/ITest;)V
+.method public run()V
.limit regs 5
-Label0:
- invoke-direct {v3}, java/lang/Object/<init>()V
-
- invoke-interface/range {v4}, dot/junit/opcodes/invoke_interface_range/ITest/doit()V
+ const/4 v1, 0
+ invoke-interface/range {v1}, dot/junit/opcodes/invoke_interface_range/ITest/doit()V
return-void
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/Test_invoke_static.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/Test_invoke_static.java
index 02793fd..efcdf23 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/Test_invoke_static.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/Test_invoke_static.java
@@ -87,41 +87,24 @@
*
*/
public void testE2() {
- T_invoke_static_6 t = new T_invoke_static_6();
- try {
- t.run();
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError ule) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_static.d.T_invoke_static_6",
+ UnsatisfiedLinkError.class);
}
-
/**
* @title initialization of referenced class throws exception
*/
public void testE7() {
- T_invoke_static_14 t = new T_invoke_static_14();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_static.d.T_invoke_static_14",
+ ExceptionInInitializerError.class);
}
-
/**
* @constraint A13
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static.d.T_invoke_static_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static.d.T_invoke_static_3", VerifyError.class);
}
/**
@@ -129,12 +112,7 @@
* @title <clinit> may not be called using invoke-static
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static.d.T_invoke_static_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static.d.T_invoke_static_10", VerifyError.class);
}
/**
@@ -142,12 +120,7 @@
* @title number of arguments passed to method.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static.d.T_invoke_static_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static.d.T_invoke_static_11", VerifyError.class);
}
/**
@@ -155,12 +128,7 @@
* @title <init> may not be called using invoke_static
*/
public void testVFE5() {
- try {
- new T_invoke_static_19().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static.d.T_invoke_static_19", VerifyError.class);
}
/**
@@ -168,12 +136,7 @@
* @title types of arguments passed to method
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static.d.T_invoke_static_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static.d.T_invoke_static_20", VerifyError.class);
}
@@ -182,11 +145,8 @@
* @title Attempt to call non-static method.
*/
public void testVFE7() {
- try {
- new T_invoke_static_5().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static.d.T_invoke_static_5",
+ IncompatibleClassChangeError.class);
}
/**
@@ -194,11 +154,7 @@
* @title Attempt to call undefined method.
*/
public void testVFE8() {
- try {
- new T_invoke_static_7().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static.d.T_invoke_static_7", NoSuchMethodError.class);
}
/**
@@ -206,13 +162,8 @@
* @title Attempt to call private method of other class.
*/
public void testVFE9() {
- //@uses dot.junit.opcodes.invoke_static.d.T_invoke_static_8
//@uses dot.junit.opcodes.invoke_static.TestClass
- try {
- new T_invoke_static_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static.d.T_invoke_static_8", IllegalAccessError.class);
}
/**
@@ -220,28 +171,18 @@
* @title Method has different signature.
*/
public void testVFE10() {
- //@uses dot.junit.opcodes.invoke_static.d.T_invoke_static_13
//@uses dot.junit.opcodes.invoke_static.TestClass
- try {
- new T_invoke_static_13().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static.d.T_invoke_static_13", NoSuchMethodError.class);
}
-
/**
* @constraint B12
* @title Attempt to call protected method of unrelated class.
*/
public void testVFE12() {
- //@uses dot.junit.opcodes.invoke_static.d.T_invoke_static_17
//@uses dot.junit.opcodes.invoke_static.TestClass
- try {
- new T_invoke_static_17().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static.d.T_invoke_static_17",
+ IllegalAccessError.class);
}
/**
@@ -249,12 +190,7 @@
* @title number of registers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static.d.T_invoke_static_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static.d.T_invoke_static_16", VerifyError.class);
}
/**
@@ -262,12 +198,6 @@
* @title attempt to invoke interface method
*/
public void testVFE18() {
- //@uses dot.junit.opcodes.invoke_static.d.T_invoke_static_24
- try {
- new T_invoke_static_24().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static.d.T_invoke_static_24", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/d/T_invoke_static_14.d b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/d/T_invoke_static_14.d
index ed2aa2b..ed833e2 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/d/T_invoke_static_14.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static/d/T_invoke_static_14.d
@@ -22,6 +22,7 @@
const v0, 1
const v1, 0
div-int v0, v0, v1
+ return-void
.end method
.method static public test()V
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/Test_invoke_static_range.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/Test_invoke_static_range.java
index 7db6776..a2db910 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/Test_invoke_static_range.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/Test_invoke_static_range.java
@@ -87,13 +87,8 @@
*
*/
public void testE2() {
- T_invoke_static_range_6 t = new T_invoke_static_range_6();
- try {
- t.run();
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError ule) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_6",
+ UnsatisfiedLinkError.class);
}
@@ -101,13 +96,8 @@
* @title initialization of referenced class throws exception
*/
public void testE7() {
- T_invoke_static_range_14 t = new T_invoke_static_range_14();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_14",
+ ExceptionInInitializerError.class);
}
/**
@@ -115,12 +105,7 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_3", VerifyError.class);
}
/**
@@ -128,12 +113,7 @@
* @title <clinit> may not be called using invoke_static_range
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_10", VerifyError.class);
}
/**
@@ -141,12 +121,7 @@
* @title number of arguments passed to method
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_11", VerifyError.class);
}
/**
@@ -154,12 +129,7 @@
* @title <init> may not be called using invoke_static_range
*/
public void testVFE5() {
- try {
- new T_invoke_static_range_19().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_19", VerifyError.class);
}
/**
@@ -167,12 +137,7 @@
* @title types of arguments passed to method
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_20", VerifyError.class);
}
@@ -181,11 +146,8 @@
* @title Attempt to call non-static method.
*/
public void testVFE7() {
- try {
- new T_invoke_static_range_5().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_5",
+ IncompatibleClassChangeError.class);
}
/**
@@ -193,11 +155,8 @@
* @title Attempt to call undefined method.
*/
public void testVFE8() {
- try {
- new T_invoke_static_range_7().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_7",
+ NoSuchMethodError.class);
}
/**
@@ -205,13 +164,9 @@
* @title Attempt to call private method of other class.
*/
public void testVFE9() {
- //@uses dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_8
//@uses dot.junit.opcodes.invoke_static_range.TestClass
- try {
- new T_invoke_static_range_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_8",
+ IllegalAccessError.class);
}
/**
@@ -219,13 +174,9 @@
* @title Method has different signature.
*/
public void testVFE10() {
- //@uses dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_13
//@uses dot.junit.opcodes.invoke_static_range.TestClass
- try {
- new T_invoke_static_range_13().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_13",
+ NoSuchMethodError.class);
}
@@ -234,13 +185,9 @@
* @title Attempt to call protected method of unrelated class.
*/
public void testVFE12() {
- //@uses dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_17
//@uses dot.junit.opcodes.invoke_static_range.TestClass
- try {
- new T_invoke_static_range_17().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_17",
+ IllegalAccessError.class);
}
/**
@@ -248,12 +195,7 @@
* @title number of registers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_16", VerifyError.class);
}
/**
@@ -261,12 +203,6 @@
* @title attempt to invoke interface method
*/
public void testVFE18() {
- //@uses dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_24
- try {
- new T_invoke_static_range_24().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_static_range.d.T_invoke_static_range_24", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/d/T_invoke_static_range_14.d b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/d/T_invoke_static_range_14.d
index e4c1bd3..08c04ff 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/d/T_invoke_static_range_14.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_static_range/d/T_invoke_static_range_14.d
@@ -22,6 +22,7 @@
const v0, 1
const v1, 0
div-int v0, v0, v1
+ return-void
.end method
.method static public test()V
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/Test_invoke_super.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/Test_invoke_super.java
index b1602b6..0995fb0 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/Test_invoke_super.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/Test_invoke_super.java
@@ -82,45 +82,25 @@
* @title obj ref is null
*/
public void testE1() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_1
//@uses dot.junit.opcodes.invoke_super.d.TSuper
+ loadAndRun("dot.junit.opcodes.invoke_super.d.T_invoke_super_2", NullPointerException.class);
T_invoke_super_2 t = new T_invoke_super_2();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException npe) {
- // expected
- }
}
/**
* @title Native method can't be linked
*/
public void testE2() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_4
//@uses dot.junit.opcodes.invoke_super.d.TSuper
- T_invoke_super_4 t = new T_invoke_super_4();
- try {
- t.run();
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError ule) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_super.d.T_invoke_super_4", UnsatisfiedLinkError.class);
}
/**
* @title Attempt to invoke abstract method
*/
public void testE4() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_6
//@uses dot.junit.opcodes.invoke_super.ATest
- T_invoke_super_6 t = new T_invoke_super_6();
- try {
- t.run();
- fail("expected AbstractMethodError");
- } catch (AbstractMethodError iae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_super.d.T_invoke_super_6", AbstractMethodError.class);
}
/**
@@ -128,12 +108,7 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_super.d.T_invoke_super_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_8", ClassNotFoundException.class);
}
/**
@@ -141,12 +116,7 @@
* @title <clinit> may not be called using invoke-super
*/
public void testVFE3() {
- try {
- new T_invoke_super_10().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_10", VerifyError.class);
}
/**
@@ -154,12 +124,7 @@
* @title number of arguments passed to method
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.invoke_super.d.T_invoke_super_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_11", VerifyError.class);
}
/**
@@ -167,14 +132,8 @@
* @title types of arguments passed to method.
*/
public void testVFE5() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_12
//@uses dot.junit.opcodes.invoke_super.d.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_super.d.T_invoke_super_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_12", VerifyError.class);
}
/**
@@ -182,12 +141,7 @@
* @title <init> may not be called using invoke_super
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_super.d.T_invoke_super_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_16", VerifyError.class);
}
/**
@@ -196,15 +150,9 @@
* protected method
*/
public void testVFE8() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_22
//@uses dot.junit.opcodes.invoke_super.d.TSuper
//@uses dot.junit.opcodes.invoke_super.d.TPlain
- try {
- Class.forName("dot.junit.opcodes.invoke_super.d.T_invoke_super_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_22", VerifyError.class);
}
/**
@@ -213,15 +161,9 @@
* public method
*/
public void testVFE9() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_23
//@uses dot.junit.opcodes.invoke_super.d.TSuper
//@uses dot.junit.opcodes.invoke_super.d.TSuper2
- try {
- Class.forName("dot.junit.opcodes.invoke_super.d.T_invoke_super_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_23", VerifyError.class);
}
/**
@@ -229,13 +171,9 @@
* @title Attempt to call static method.
*/
public void testVFE10() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_5
//@uses dot.junit.opcodes.invoke_super.d.TSuper
- try {
- new T_invoke_super_5().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super.d.T_invoke_super_5",
+ IncompatibleClassChangeError.class);
}
@@ -244,11 +182,7 @@
* @title Attempt to invoke non-existing method.
*/
public void testVFE12() {
- try {
- new T_invoke_super_15().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super.d.T_invoke_super_15", NoSuchMethodError.class);
}
/**
@@ -256,13 +190,9 @@
* @title Attempt to invoke private method of other class.
*/
public void testVFE13() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_18
//@uses dot.junit.opcodes.invoke_super.TestStubs
- try {
- new T_invoke_super_18().run(new TestStubs());
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super.d.T_invoke_super_18", IllegalAccessError.class,
+ new TestStubs());
}
/**
@@ -270,13 +200,9 @@
* @title Attempt to invoke protected method of unrelated class.
*/
public void testVFE14() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_20
//@uses dot.junit.opcodes.invoke_super.TestStubs
- try {
- new T_invoke_super_20().run(new TestStubs());
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super.d.T_invoke_super_20", IllegalAccessError.class,
+ new TestStubs());
}
/**
@@ -284,13 +210,8 @@
* @title Method has different signature.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_19
//@uses dot.junit.opcodes.invoke_super.d.TSuper
- try {
- new T_invoke_super_19().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super.d.T_invoke_super_19", NoSuchMethodError.class);
}
/**
@@ -298,14 +219,8 @@
* @title invoke-super shall be used to invoke private methods
*/
public void testVFE16() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_13
//@uses dot.junit.opcodes.invoke_super.d.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_super.d.T_invoke_super_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_13", VerifyError.class);
}
/**
@@ -313,12 +228,7 @@
* @title number of registers
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.invoke_super.d.T_invoke_super_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_9", VerifyError.class);
}
/**
@@ -326,13 +236,8 @@
* @title attempt to invoke interface method
*/
public void testVFE18() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_24
- try {
- new T_invoke_super_24().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_super.d.T_invoke_super_24",
+ IncompatibleClassChangeError.class);
}
/**
@@ -340,13 +245,7 @@
* @title instance methods may only be invoked on already initialized instances.
*/
public void testVFE19() {
- //@uses dot.junit.opcodes.invoke_super.d.T_invoke_super_25
//@uses dot.junit.opcodes.invoke_super.d.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_super.d.T_invoke_super_25");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super.d.T_invoke_super_25", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/d/T_invoke_super_24.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/d/T_invoke_super_24.java
index 38ebc44..58bbd63 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/d/T_invoke_super_24.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super/d/T_invoke_super_24.java
@@ -18,7 +18,6 @@
public class T_invoke_super_24 {
- public int run() {
- return 0;
+ public void run() {
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super_range/Test_invoke_super_range.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super_range/Test_invoke_super_range.java
index 51291f1..9007ef4 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super_range/Test_invoke_super_range.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_super_range/Test_invoke_super_range.java
@@ -82,45 +82,27 @@
* @title obj ref is null
*/
public void testE1() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_1
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper
- T_invoke_super_range_2 t = new T_invoke_super_range_2();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException npe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_2",
+ NullPointerException.class);
}
/**
* @title Native method can't be linked
*/
public void testE2() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_4
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper
- T_invoke_super_range_4 t = new T_invoke_super_range_4();
- try {
- t.run();
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError ule) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_4",
+ UnsatisfiedLinkError.class);
}
/**
* @title Attempt to invoke abstract method
*/
public void testE4() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_6
//@uses dot.junit.opcodes.invoke_super_range.ATest
- T_invoke_super_range_6 t = new T_invoke_super_range_6();
- try {
- t.run();
- fail("expected AbstractMethodError");
- } catch (AbstractMethodError iae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_6",
+ AbstractMethodError.class);
}
/**
@@ -128,12 +110,7 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_8", VerifyError.class);
}
/**
@@ -141,12 +118,7 @@
* @title <clinit> may not be called using invoke-super
*/
public void testVFE3() {
- try {
- new T_invoke_super_range_10().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_10", VerifyError.class);
}
/**
@@ -154,12 +126,7 @@
* @title number of arguments passed to method
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_11", VerifyError.class);
}
/**
@@ -167,14 +134,8 @@
* @title types of arguments passed to method.
*/
public void testVFE5() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_12
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_12", VerifyError.class);
}
/**
@@ -182,12 +143,7 @@
* @title <init> may not be called using invoke_super_range
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_16", VerifyError.class);
}
/**
@@ -196,15 +152,9 @@
* protected method
*/
public void testVFE8() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_22
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper
//@uses dot.junit.opcodes.invoke_super_range.d.TPlain
- try {
- Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_22", VerifyError.class);
}
/**
@@ -213,15 +163,9 @@
* public method
*/
public void testVFE9() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_23
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper2
- try {
- Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_23", VerifyError.class);
}
/**
@@ -229,13 +173,9 @@
* @title Attempt to call static method.
*/
public void testVFE10() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_5
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper
- try {
- new T_invoke_super_range_5().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_5",
+ IncompatibleClassChangeError.class);
}
@@ -244,11 +184,8 @@
* @title Attempt to invoke non-existing method.
*/
public void testVFE12() {
- try {
- new T_invoke_super_range_15().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_15",
+ NoSuchMethodError.class);
}
/**
@@ -256,13 +193,9 @@
* @title Attempt to invoke private method of other class.
*/
public void testVFE13() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_18
//@uses dot.junit.opcodes.invoke_super_range.TestStubs
- try {
- new T_invoke_super_range_18().run(new TestStubs());
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_18",
+ IllegalAccessError.class, new TestStubs());
}
/**
@@ -270,13 +203,9 @@
* @title Attempt to invoke protected method of unrelated class.
*/
public void testVFE14() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_20
//@uses dot.junit.opcodes.invoke_super_range.TestStubs
- try {
- new T_invoke_super_range_20().run(new TestStubs());
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_20",
+ IllegalAccessError.class, new TestStubs());
}
/**
@@ -284,13 +213,9 @@
* @title Method has different signature.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_19
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper
- try {
- new T_invoke_super_range_19().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_19",
+ NoSuchMethodError.class);
}
/**
@@ -300,12 +225,7 @@
public void testVFE16() {
//@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_13
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_13", VerifyError.class);
}
/**
@@ -313,12 +233,7 @@
* @title number of registers
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_9", VerifyError.class);
}
/**
@@ -327,12 +242,8 @@
*/
public void testVFE18() {
//@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_24
- try {
- new T_invoke_super_range_24().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_24",
+ IncompatibleClassChangeError.class);
}
/**
@@ -340,14 +251,8 @@
* @title instance methods may only be invoked on already initialized instances.
*/
public void testVFE19() {
- //@uses dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_25
//@uses dot.junit.opcodes.invoke_super_range.d.TSuper
- try {
- Class.forName("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_25");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_super_range.d.T_invoke_super_range_25", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual/Test_invoke_virtual.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual/Test_invoke_virtual.java
index 03f2bb6..55423f4 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual/Test_invoke_virtual.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual/Test_invoke_virtual.java
@@ -82,42 +82,25 @@
* @title expected NullPointerException
*/
public void testE1() {
- T_invoke_virtual_1 t = new T_invoke_virtual_1();
- String s = "s";
- try {
- t.run(null, s);
- fail("expected NullPointerException");
- } catch (NullPointerException npe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_1",
+ NullPointerException.class, null, "Test");
}
/**
* @title Native method can't be linked
*/
public void testE2() {
- T_invoke_virtual_4 t = new T_invoke_virtual_4();
- try {
- t.run();
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError ule) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_4",
+ UnsatisfiedLinkError.class);
}
/**
* @title Attempt to invoke abstract method
*/
public void testE4() {
- //@uses dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_6
//@uses dot.junit.opcodes.invoke_virtual.ATest
- T_invoke_virtual_6 t = new T_invoke_virtual_6();
- try {
- t.run();
- fail("expected AbstractMethodError");
- } catch (AbstractMethodError iae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_6",
+ AbstractMethodError.class);
}
/**
@@ -125,12 +108,7 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_8", VerifyError.class);
}
/**
@@ -138,12 +116,7 @@
* @title <clinit> may not be called using invoke-virtual
*/
public void testVFE3() {
- try {
- new T_invoke_virtual_10().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_10", VerifyError.class);
}
/**
@@ -151,12 +124,7 @@
* @title number of arguments passed to method
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_11", VerifyError.class);
}
/**
@@ -164,12 +132,7 @@
* @title types of arguments passed to method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_12", VerifyError.class);
}
/**
@@ -177,12 +140,7 @@
* @title <init> may not be called using invoke_virtual
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_16", VerifyError.class);
}
/**
@@ -194,12 +152,7 @@
//@uses dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_22
//@uses dot.junit.opcodes.invoke_virtual.d.TSuper
//@uses dot.junit.opcodes.invoke_virtual.d.TPlain
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_22", VerifyError.class);
}
/**
@@ -211,12 +164,7 @@
//@uses dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_23
//@uses dot.junit.opcodes.invoke_virtual.d.TSuper
//@uses dot.junit.opcodes.invoke_virtual.d.TSuper2
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_23", VerifyError.class);
}
@@ -225,11 +173,8 @@
* @title Attempt to call static method.
*/
public void testVFE10() {
- try {
- new T_invoke_virtual_5().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_5",
+ IncompatibleClassChangeError.class);
}
@@ -238,11 +183,8 @@
* @title Attempt to invoke non-existing method.
*/
public void testVFE12() {
- try {
- new T_invoke_virtual_15().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_15",
+ NoSuchMethodError.class);
}
/**
@@ -250,13 +192,9 @@
* @title Attempt to invoke private method of other class.
*/
public void testVFE13() {
- //@uses dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_18
//@uses dot.junit.opcodes.invoke_virtual.TestStubs
- try {
- new T_invoke_virtual_18().run(new TestStubs());
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_18",
+ IllegalAccessError.class, new TestStubs());
}
/**
@@ -264,13 +202,9 @@
* @title Attempt to invoke protected method of unrelated class.
*/
public void testVFE14() {
- //@uses dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_20
//@uses dot.junit.opcodes.invoke_virtual.TestStubs
- try {
- new T_invoke_virtual_20().run(new TestStubs());
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_20",
+ IllegalAccessError.class, new TestStubs());
}
/**
@@ -278,13 +212,9 @@
* @title Method has different signature.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_19
//@uses dot.junit.opcodes.invoke_virtual.d.TSuper
- try {
- new T_invoke_virtual_19().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_19",
+ NoSuchMethodError.class);
}
/**
@@ -292,12 +222,7 @@
* @title invoke-virtual shall be used to invoke private methods
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_13", VerifyError.class);
}
/**
@@ -305,12 +230,7 @@
* @title number of registers
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_9", VerifyError.class);
}
/**
@@ -318,13 +238,8 @@
* @title attempt to invoke interface method
*/
public void testVFE18() {
- //@uses dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_24
- try {
- new T_invoke_virtual_24().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_24",
+ IncompatibleClassChangeError.class);
}
/**
@@ -332,12 +247,7 @@
* @title instance methods may only be invoked on already initialized instances.
*/
public void testVFE19() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_25");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual.d.T_invoke_virtual_25", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual_range/Test_invoke_virtual_range.java b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual_range/Test_invoke_virtual_range.java
index 6200ce7..5aa7d33 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual_range/Test_invoke_virtual_range.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/invoke_virtual_range/Test_invoke_virtual_range.java
@@ -91,42 +91,25 @@
* @title expected NullPointerException
*/
public void testE1() {
- T_invoke_virtual_range_1 t = new T_invoke_virtual_range_1();
- String s = "s";
- try {
- t.run(null, s);
- fail("expected NullPointerException");
- } catch (NullPointerException npe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_1",
+ NullPointerException.class, null, "Test");
}
/**
* @title Native method can't be linked
*/
public void testE2() {
- T_invoke_virtual_range_4 t = new T_invoke_virtual_range_4();
- try {
- t.run();
- fail("expected UnsatisfiedLinkError");
- } catch (UnsatisfiedLinkError ule) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_4",
+ UnsatisfiedLinkError.class);
}
/**
* @title Attempt to invoke abstract method
*/
public void testE4() {
- //@uses dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_6
//@uses dot.junit.opcodes.invoke_virtual_range.ATest
- T_invoke_virtual_range_6 t = new T_invoke_virtual_range_6();
- try {
- t.run();
- fail("expected AbstractMethodError");
- } catch (AbstractMethodError iae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_6",
+ AbstractMethodError.class);
}
/**
@@ -134,12 +117,8 @@
* @title invalid constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_8",
+ VerifyError.class);
}
/**
@@ -147,12 +126,8 @@
* @title <clinit> may not be called using invoke-virtual
*/
public void testVFE3() {
- try {
- new T_invoke_virtual_range_10().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_10",
+ VerifyError.class);
}
/**
@@ -160,12 +135,8 @@
* @title number of arguments passed to method
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_11",
+ VerifyError.class);
}
/**
@@ -173,12 +144,8 @@
* @title types of arguments passed to method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_12",
+ VerifyError.class);
}
/**
@@ -186,12 +153,8 @@
* @title <init> may not be called using invoke_virtual_range
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_16",
+ VerifyError.class);
}
/**
@@ -200,15 +163,10 @@
* protected method
*/
public void testVFE8() {
- //@uses dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_22
//@uses dot.junit.opcodes.invoke_virtual_range.d.TSuper
//@uses dot.junit.opcodes.invoke_virtual_range.d.TPlain
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_22",
+ VerifyError.class);
}
/**
@@ -217,15 +175,10 @@
* public method
*/
public void testVFE9() {
- //@uses dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_23
//@uses dot.junit.opcodes.invoke_virtual_range.d.TSuper
//@uses dot.junit.opcodes.invoke_virtual_range.d.TSuper2
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_23",
+ VerifyError.class);
}
/**
@@ -233,11 +186,8 @@
* @title Attempt to call static method.
*/
public void testVFE10() {
- try {
- new T_invoke_virtual_range_5().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_5",
+ IncompatibleClassChangeError.class);
}
@@ -246,11 +196,8 @@
* @title Attempt to invoke non-existing method.
*/
public void testVFE12() {
- try {
- new T_invoke_virtual_range_15().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_15",
+ NoSuchMethodError.class);
}
/**
@@ -258,13 +205,9 @@
* @title Attempt to invoke private method of other class.
*/
public void testVFE13() {
- //@uses dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_18
//@uses dot.junit.opcodes.invoke_virtual_range.TestStubs
- try {
- new T_invoke_virtual_range_18().run(new TestStubs());
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_18",
+ IllegalAccessError.class, new TestStubs());
}
/**
@@ -272,13 +215,9 @@
* @title Attempt to invoke protected method of unrelated class.
*/
public void testVFE14() {
- //@uses dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_20
//@uses dot.junit.opcodes.invoke_virtual_range.TestStubs
- try {
- new T_invoke_virtual_range_20().run(new TestStubs());
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_20",
+ IllegalAccessError.class, new TestStubs());
}
/**
@@ -286,13 +225,9 @@
* @title Method has different signature.
*/
public void testVFE15() {
- //@uses dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_19
//@uses dot.junit.opcodes.invoke_virtual_range.d.TSuper
- try {
- new T_invoke_virtual_range_19().run();
- fail("expected NoSuchMethodError");
- } catch (NoSuchMethodError t) {
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_19",
+ NoSuchMethodError.class);
}
/**
@@ -300,12 +235,8 @@
* @title invoke-virtual/range shall be used to invoke private methods
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_13",
+ VerifyError.class);
}
/**
@@ -313,12 +244,8 @@
* @title number of registers
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_9",
+ VerifyError.class);
}
/**
@@ -326,13 +253,8 @@
* @title attempt to invoke interface method
*/
public void testVFE18() {
- //@uses dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_24
- try {
- new T_invoke_virtual_range_24().run();
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_24",
+ IncompatibleClassChangeError.class);
}
/**
@@ -340,11 +262,7 @@
* @title instance methods may only be invoked on already initialized instances.
*/
public void testVFE19() {
- try {
- Class.forName("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_25");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.invoke_virtual_range.d.T_invoke_virtual_range_25",
+ VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput/Test_iput.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iput/Test_iput.java
index daa6b24..cc3e8c8 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iput/Test_iput.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput/Test_iput.java
@@ -82,13 +82,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iput_13 t = new T_iput_13();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iput.d.T_iput_13", NullPointerException.class);
}
/**
@@ -96,12 +90,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_3", VerifyError.class);
}
/**
@@ -110,12 +99,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_4", VerifyError.class);
}
@@ -126,12 +110,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_iput_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.iput.d.T_iput_17", NoSuchFieldError.class);
}
/**
@@ -140,12 +119,7 @@
* and floats are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_5", VerifyError.class);
}
/**
@@ -155,12 +129,7 @@
* with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_18", VerifyError.class);
}
/**
@@ -168,11 +137,7 @@
* @title Attempt to set static field.
*/
public void testVFE8() {
- try {
- new T_iput_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput.d.T_iput_7", IncompatibleClassChangeError.class);
}
/**
@@ -181,12 +146,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput.TestStubs
- //@uses dot.junit.opcodes.iput.d.T_iput_8
- try {
- new T_iput_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput.d.T_iput_8", IllegalAccessError.class);
}
/**
@@ -194,11 +154,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_iput_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput.d.T_iput_9", NoClassDefFoundError.class);
}
/**
@@ -206,42 +162,24 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_iput_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput.d.T_iput_10", NoSuchFieldError.class);
}
-
-
/**
* @constraint n/a
* @title Attempt to modify superclass' private field from subclass.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.iput.d.T_iput_1
- //@uses dot.junit.opcodes.iput.d.T_iput_15
- try {
- new T_iput_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.iput.d.T_iput_15", IllegalAccessError.class);
}
-
/**
* @constraint B1
* @title iput shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_2", VerifyError.class);
}
/**
@@ -250,12 +188,7 @@
* @title iput shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_20", VerifyError.class);
}
/**
@@ -264,12 +197,7 @@
* @title iput shall not work for short fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_21", VerifyError.class);
}
/**
@@ -278,12 +206,7 @@
* @title iput shall not work for boolean fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_22", VerifyError.class);
}
/**
@@ -292,12 +215,7 @@
* @title iput shall not work for char fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_23", VerifyError.class);
}
/**
@@ -306,12 +224,7 @@
* @title iput shall not work for byte fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_24", VerifyError.class);
}
@@ -320,12 +233,15 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iput.d.T_iput_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput.d.T_iput_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference registers
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iput.d.T_iput_31", VerifyError.class);
}
/**
@@ -334,11 +250,6 @@
*/
public void testE5() {
//@uses dot.junit.opcodes.iput.TestStubs
- //@uses dot.junit.opcodes.iput.d.T_iput_11
- try {
- new T_iput_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput.d.T_iput_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput/d/T_iput_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iput/d/T_iput_31.d
new file mode 100644
index 0000000..dd8b4f0
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput/d/T_iput_31.d
@@ -0,0 +1,31 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iput_31.java
+.class public dot.junit.opcodes.iput.d.T_iput_31
+.super java/lang/Object
+
+.field public st_i1 I
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()V
+.limit regs 3
+ const v1, 0
+ iput v1, v0, dot.junit.opcodes.iput.d.T_iput_31.st_i1 I
+.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_boolean/Test_iput_boolean.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_boolean/Test_iput_boolean.java
index 5736c7c..9903cbb 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_boolean/Test_iput_boolean.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_boolean/Test_iput_boolean.java
@@ -72,13 +72,8 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iput_boolean_13 t = new T_iput_boolean_13();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_13",
+ NullPointerException.class);
}
/**
@@ -86,12 +81,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_3", VerifyError.class);
}
/**
@@ -99,26 +89,16 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_4", VerifyError.class);
}
-
/**
* @constraint B14
* @title put boolean into long field - only field with same name but
* different type exists
*/
public void testVFE5() {
- try {
- new T_iput_boolean_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_17", NoSuchFieldError.class);
}
/**
@@ -128,12 +108,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_18", VerifyError.class);
}
/**
@@ -142,11 +117,8 @@
* @title Attempt to set static field.
*/
public void testVFE8() {
- try {
- new T_iput_boolean_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -155,12 +127,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_boolean.TestStubs
- //@uses dot.junit.opcodes.iput_boolean.d.T_iput_boolean_8
- try {
- new T_iput_boolean_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_8", IllegalAccessError.class);
}
/**
@@ -168,11 +135,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_iput_boolean_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_9", NoClassDefFoundError.class);
}
/**
@@ -180,27 +143,16 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_iput_boolean_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_10", NoSuchFieldError.class);
}
-
-
/**
* @constraint n/a
* @title Attempt to modify superclass' private field from subclass.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.iput_boolean.d.T_iput_boolean_1
- //@uses dot.junit.opcodes.iput_boolean.d.T_iput_boolean_15
- try {
- new T_iput_boolean_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_15", IllegalAccessError.class);
}
@@ -209,12 +161,7 @@
* @title iput_boolean shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_2", VerifyError.class);
}
/**
@@ -223,12 +170,7 @@
* @title iput_boolean shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_20", VerifyError.class);
}
/**
@@ -237,12 +179,7 @@
* @title iput_boolean shall not work for short fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_21", VerifyError.class);
}
/**
@@ -251,12 +188,7 @@
* @title iput_boolean shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_22", VerifyError.class);
}
/**
@@ -264,12 +196,7 @@
* @title iput_boolean shall not work for char fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_23", VerifyError.class);
}
/**
@@ -277,12 +204,7 @@
* @title iput_boolean shall not work for byte fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_24", VerifyError.class);
}
/**
@@ -290,12 +212,15 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference registers.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_31", VerifyError.class);
}
/**
@@ -304,12 +229,7 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.iput_boolean.TestStubs
- //@uses dot.junit.opcodes.iput_boolean.d.T_iput_boolean_11
- try {
- new T_iput_boolean_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_boolean.d.T_iput_boolean_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_31.d
new file mode 100644
index 0000000..039f79f
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_boolean/d/T_iput_boolean_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iput_boolean_31.java
+.class public dot.junit.opcodes.iput_boolean.d.T_iput_boolean_31
+.super java/lang/Object
+
+.field public st_i1 Z
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()V
+.limit regs 3
+ const v1, 0
+ iput-boolean v1, v0, dot.junit.opcodes.iput_boolean.d.T_iput_boolean_31.st_i1 Z
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_byte/Test_iput_byte.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_byte/Test_iput_byte.java
index d421980..e87831b 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_byte/Test_iput_byte.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_byte/Test_iput_byte.java
@@ -68,13 +68,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iput_byte_13 t = new T_iput_byte_13();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iput_byte.d.T_iput_byte_13", NullPointerException.class);
}
/**
@@ -82,12 +76,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_3", VerifyError.class);
}
/**
@@ -96,12 +85,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_4", VerifyError.class);
}
@@ -112,11 +96,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_iput_byte_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_byte.d.T_iput_byte_17", NoSuchFieldError.class);
}
/**
@@ -126,12 +106,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_18", VerifyError.class);
}
/**
@@ -140,11 +115,8 @@
* @title Attempt to set static field.
*/
public void testVFE8() {
- try {
- new T_iput_byte_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_byte.d.T_iput_byte_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -153,12 +125,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_byte.TestStubs
- //@uses dot.junit.opcodes.iput_byte.d.T_iput_byte_8
- try {
- new T_iput_byte_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_byte.d.T_iput_byte_8", IllegalAccessError.class);
}
/**
@@ -166,11 +133,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_iput_byte_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_byte.d.T_iput_byte_9", NoClassDefFoundError.class);
}
/**
@@ -178,11 +141,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_iput_byte_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_byte.d.T_iput_byte_10", NoSuchFieldError.class);
}
@@ -193,12 +152,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.iput_byte.d.T_iput_byte_1
- //@uses dot.junit.opcodes.iput_byte.d.T_iput_byte_15
- try {
- new T_iput_byte_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_byte.d.T_iput_byte_15", IllegalAccessError.class);
}
@@ -207,12 +161,7 @@
* @title iput-byte shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_2", VerifyError.class);
}
/**
@@ -221,12 +170,7 @@
* @title iput-byte shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_20", VerifyError.class);
}
/**
@@ -235,12 +179,7 @@
* @title iput-byte shall not work for short fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_21", VerifyError.class);
}
/**
@@ -249,12 +188,7 @@
* @title iput-byte shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_22", VerifyError.class);
}
/**
@@ -263,12 +197,7 @@
* @title iput-byte shall not work for char fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_23", VerifyError.class);
}
/**
@@ -277,12 +206,7 @@
* @title iput-byte shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_24", VerifyError.class);
}
@@ -291,12 +215,15 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iput_byte.d.T_iput_byte_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference registers.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iput_byte.d.T_iput_byte_31", VerifyError.class);
}
/**
@@ -305,12 +232,7 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.iput_byte.TestStubs
- //@uses dot.junit.opcodes.iput_byte.d.T_iput_byte_11
- try {
- new T_iput_byte_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_byte.d.T_iput_byte_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_31.d
new file mode 100644
index 0000000..7c26ab6
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_byte/d/T_iput_byte_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iput_byte_31.java
+.class public dot.junit.opcodes.iput_byte.d.T_iput_byte_31
+.super java/lang/Object
+
+.field public st_i1 B
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()V
+.limit regs 3
+ const v1, 0
+ iput-byte v1, v0, dot.junit.opcodes.iput_byte.d.T_iput_byte_31.st_i1 B
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_char/Test_iput_char.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_char/Test_iput_char.java
index 87634c7..57eee7b 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_char/Test_iput_char.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_char/Test_iput_char.java
@@ -68,13 +68,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iput_char_13 t = new T_iput_char_13();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iput_char.d.T_iput_char_13", NullPointerException.class);
}
@@ -83,12 +77,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_3", VerifyError.class);
}
/**
@@ -97,12 +86,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_4", VerifyError.class);
}
@@ -113,11 +97,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_iput_char_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_char.d.T_iput_char_17", NoSuchFieldError.class);
}
/**
@@ -127,12 +107,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_18", VerifyError.class);
}
/**
@@ -141,11 +116,8 @@
* @title Attempt to set static field.
*/
public void testVFE8() {
- try {
- new T_iput_char_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_char.d.T_iput_char_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -154,12 +126,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_char.TestStubs
- //@uses dot.junit.opcodes.iput_char.d.T_iput_char_8
- try {
- new T_iput_char_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_char.d.T_iput_char_8", IllegalAccessError.class);
}
/**
@@ -167,11 +134,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_iput_char_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_char.d.T_iput_char_9", NoClassDefFoundError.class);
}
@@ -180,11 +143,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_iput_char_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_char.d.T_iput_char_10", NoSuchFieldError.class);
}
@@ -195,12 +154,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.iput_char.d.T_iput_char_1
- //@uses dot.junit.opcodes.iput_char.d.T_iput_char_15
- try {
- new T_iput_char_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_char.d.T_iput_char_15", IllegalAccessError.class);
}
@@ -209,12 +163,7 @@
* @title iput-char shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_2", VerifyError.class);
}
/**
@@ -223,12 +172,7 @@
* @title iput-char shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_20", VerifyError.class);
}
/**
@@ -237,12 +181,7 @@
* @title iput-char shall not work for short fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_21", VerifyError.class);
}
/**
@@ -251,12 +190,7 @@
* @title iput-char shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_22", VerifyError.class);
}
/**
@@ -265,12 +199,7 @@
* @title iput-char shall not work for byte fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_23", VerifyError.class);
}
/**
@@ -279,12 +208,7 @@
* @title iput-char shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_24", VerifyError.class);
}
@@ -293,12 +217,15 @@
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iput_char.d.T_iput_char_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference registers.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iput_char.d.T_iput_char_31", VerifyError.class);
}
/**
@@ -307,12 +234,7 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.iput_char.TestStubs
- //@uses dot.junit.opcodes.iput_char.d.T_iput_char_11
- try {
- new T_iput_char_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_char.d.T_iput_char_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_char/d/T_iput_char_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_char/d/T_iput_char_31.d
new file mode 100644
index 0000000..bd52754
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_char/d/T_iput_char_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iput_char_31.java
+.class public dot.junit.opcodes.iput_char.d.T_iput_char_31
+.super java/lang/Object
+
+.field public st_i1 C
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()V
+.limit regs 3
+ const v1, 0
+ iput-char v1, v0, dot.junit.opcodes.iput_char.d.T_iput_char_31.st_i1 C
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_object/Test_iput_object.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_object/Test_iput_object.java
index e2f8fa4..d52c55c 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_object/Test_iput_object.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_object/Test_iput_object.java
@@ -68,13 +68,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iput_object_13 t = new T_iput_object_13();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iput_object.d.T_iput_object_13", NullPointerException.class);
}
@@ -83,12 +77,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_3", VerifyError.class);
}
/**
@@ -97,12 +86,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_4", VerifyError.class);
}
@@ -113,11 +97,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_iput_object_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_object.d.T_iput_object_17", NoSuchFieldError.class);
}
@@ -128,12 +108,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_18", VerifyError.class);
}
/**
@@ -142,11 +117,8 @@
* @title Attempt to set non-static field.
*/
public void testVFE8() {
- try {
- new T_iput_object_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_object.d.T_iput_object_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -155,12 +127,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_object.TestStubs
- //@uses dot.junit.opcodes.iput_object.d.T_iput_object_8
- try {
- new T_iput_object_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_object.d.T_iput_object_8", IllegalAccessError.class);
}
/**
@@ -168,11 +135,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_iput_object_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_object.d.T_iput_object_9", NoClassDefFoundError.class);
}
/**
@@ -180,11 +143,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_iput_object_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_object.d.T_iput_object_10", NoSuchFieldError.class);
}
@@ -195,12 +154,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.iput_object.d.T_iput_object_1
- //@uses dot.junit.opcodes.iput_object.d.T_iput_object_15
- try {
- new T_iput_object_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_object.d.T_iput_object_15", IllegalAccessError.class);
}
@@ -209,12 +163,7 @@
* @title iput-object shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_2", VerifyError.class);
}
/**
@@ -223,12 +172,7 @@
* @title assignment incompatible references
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_20", VerifyError.class);
}
/**
@@ -237,12 +181,7 @@
* @title iput-object shall not work for char fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_21", VerifyError.class);
}
/**
@@ -251,12 +190,7 @@
* @title iput-object shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_22", VerifyError.class);
}
/**
@@ -265,12 +199,7 @@
* @title iput-object shall not work for byte fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_23", VerifyError.class);
}
/**
@@ -279,12 +208,7 @@
* @title iput-object shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_24", VerifyError.class);
}
/**
@@ -293,27 +217,23 @@
* @title iput-object shall not work for short fields
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_6", VerifyError.class);
}
-
-
/**
* @constraint B6
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iput_object.d.T_iput_object_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference registers.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iput_object.d.T_iput_object_31", VerifyError.class);
}
/**
@@ -322,12 +242,7 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.iput_object.TestStubs
- //@uses dot.junit.opcodes.iput_object.d.T_iput_object_11
- try {
- new T_iput_object_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_object.d.T_iput_object_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_object/d/T_iput_object_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_object/d/T_iput_object_31.d
new file mode 100644
index 0000000..7b1b507
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_object/d/T_iput_object_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iput_object_31.java
+.class public dot.junit.opcodes.iput_object.d.T_iput_object_31
+.super java/lang/Object
+
+.field public st_i1 Ljava/lang/Object;
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()V
+.limit regs 3
+ const v1, 0
+ iput-object v1, v0, dot.junit.opcodes.iput_object.d.T_iput_object_31.st_i1 Ljava/lang/Object;
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_short/Test_iput_short.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_short/Test_iput_short.java
index 1895953..1d9f6d3 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_short/Test_iput_short.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_short/Test_iput_short.java
@@ -68,13 +68,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iput_short_13 t = new T_iput_short_13();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iput_short.d.T_iput_short_13", NullPointerException.class);
}
@@ -84,12 +78,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_3", VerifyError.class);
}
/**
@@ -98,12 +87,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_4", VerifyError.class);
}
@@ -114,11 +98,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_iput_short_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_short.d.T_iput_short_17", NoSuchFieldError.class);
}
/**
@@ -128,12 +108,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_18", VerifyError.class);
}
/**
@@ -142,11 +117,8 @@
* @title Attempt to set static field.
*/
public void testVFE8() {
- try {
- new T_iput_short_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_short.d.T_iput_short_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -155,12 +127,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_short.TestStubs
- //@uses dot.junit.opcodes.iput_short.d.T_iput_short_8
- try {
- new T_iput_short_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_short.d.T_iput_short_8", IllegalAccessError.class);
}
/**
@@ -168,11 +135,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_iput_short_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_short.d.T_iput_short_9", NoClassDefFoundError.class);
}
/**
@@ -180,11 +143,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_iput_short_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_short.d.T_iput_short_10", NoSuchFieldError.class);
}
@@ -195,12 +154,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.iput_short.d.T_iput_short_1
- //@uses dot.junit.opcodes.iput_short.d.T_iput_short_15
- try {
- new T_iput_short_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_short.d.T_iput_short_15", IllegalAccessError.class);
}
@@ -209,12 +163,7 @@
* @title iput-short shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_2", VerifyError.class);
}
/**
@@ -223,12 +172,7 @@
* @title iput-short shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_20", VerifyError.class);
}
/**
@@ -237,12 +181,7 @@
* @title iput-short shall not work for char fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_21", VerifyError.class);
}
/**
@@ -251,12 +190,7 @@
* @title iput-short shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_22", VerifyError.class);
}
/**
@@ -265,12 +199,7 @@
* @title iput-short shall not work for byte fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_23", VerifyError.class);
}
/**
@@ -279,26 +208,23 @@
* @title iput-short shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_24", VerifyError.class);
}
-
/**
* @constraint B6
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iput_short.d.T_iput_short_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference registers.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iput_short.d.T_iput_short_31", VerifyError.class);
}
/**
@@ -307,12 +233,7 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.iput_short.TestStubs
- //@uses dot.junit.opcodes.iput_short.d.T_iput_short_11
- try {
- new T_iput_short_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_short.d.T_iput_short_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_short/d/T_iput_short_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_short/d/T_iput_short_31.d
new file mode 100644
index 0000000..790c99e
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_short/d/T_iput_short_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iput_short_31.java
+.class public dot.junit.opcodes.iput_short.d.T_iput_short_31
+.super java/lang/Object
+
+.field public st_i1 S
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()V
+.limit regs 3
+ const v1, 0
+ iput-short v1, v0, dot.junit.opcodes.iput_short.d.T_iput_short_31.st_i1 S
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_wide/Test_iput_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_wide/Test_iput_wide.java
index a61bb70..2a3bf63 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_wide/Test_iput_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_wide/Test_iput_wide.java
@@ -79,13 +79,7 @@
* @title expected NullPointerException
*/
public void testE2() {
- T_iput_wide_13 t = new T_iput_wide_13();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.iput_wide.d.T_iput_wide_13", NullPointerException.class);
}
@@ -95,12 +89,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_3", VerifyError.class);
}
/**
@@ -109,15 +98,9 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_4", VerifyError.class);
}
-
/**
*
* @constraint B14
@@ -125,15 +108,9 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_iput_wide_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_wide.d.T_iput_wide_17", NoSuchFieldError.class);
}
-
-
/**
*
* @constraint B14
@@ -141,12 +118,7 @@
* field with double-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_18", VerifyError.class);
}
/**
@@ -155,11 +127,8 @@
* @title Attempt to set non-static field.
*/
public void testVFE8() {
- try {
- new T_iput_wide_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_wide.d.T_iput_wide_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -168,25 +137,15 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.iput_wide.TestStubs
- //@uses dot.junit.opcodes.iput_wide.d.T_iput_wide_8
- try {
- new T_iput_wide_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_wide.d.T_iput_wide_8", IllegalAccessError.class);
}
-
/**
* @constraint n/a
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_iput_wide_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_wide.d.T_iput_wide_9", NoClassDefFoundError.class);
}
/**
@@ -194,41 +153,24 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_iput_wide_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_wide.d.T_iput_wide_10", NoSuchFieldError.class);
}
-
-
/**
* @constraint n/a
* @title Attempt to modify superclass' private field from subclass.
*/
public void testVFE12() {
//@uses dot.junit.opcodes.iput_wide.d.T_iput_wide_1
- //@uses dot.junit.opcodes.iput_wide.d.T_iput_wide_15
- try {
- new T_iput_wide_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_wide.d.T_iput_wide_15", IllegalAccessError.class);
}
-
/**
* @constraint B1
* @title iput-wide shall not work for single-width numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_2", VerifyError.class);
}
/**
@@ -237,12 +179,7 @@
* @title iput-wide shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_20", VerifyError.class);
}
/**
@@ -251,12 +188,7 @@
* @title iput-wide shall not work for char fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_21", VerifyError.class);
}
/**
@@ -265,12 +197,7 @@
* @title iput-wide shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_22", VerifyError.class);
}
/**
@@ -279,12 +206,7 @@
* @title iput-wide shall not work for byte fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_23", VerifyError.class);
}
/**
@@ -293,12 +215,7 @@
* @title iput-wide shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_24", VerifyError.class);
}
/**
@@ -307,27 +224,23 @@
* @title iput-wide shall not work for short fields
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_6", VerifyError.class);
}
-
-
/**
* @constraint B6
* @title instance fields may only be accessed on already initialized instances.
*/
public void testVFE30() {
- try {
- Class.forName("dot.junit.opcodes.iput_wide.d.T_iput_wide_30");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_30", VerifyError.class);
+ }
+
+ /**
+ * @constraint N/A
+ * @title instance fields may only be accessed on reference registers.
+ */
+ public void testVFE31() {
+ load("dot.junit.opcodes.iput_wide.d.T_iput_wide_31", VerifyError.class);
}
/**
@@ -336,12 +249,7 @@
*/
public void testE5() {
//@uses dot.junit.opcodes.iput_wide.TestStubs
- //@uses dot.junit.opcodes.iput_wide.d.T_iput_wide_11
- try {
- new T_iput_wide_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.iput_wide.d.T_iput_wide_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_31.d b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_31.d
new file mode 100644
index 0000000..0e5e112
--- /dev/null
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/iput_wide/d/T_iput_wide_31.d
@@ -0,0 +1,32 @@
+; Copyright (C) 2014 The Android Open Source Project
+;
+; Licensed under the Apache License, Version 2.0 (the "License");
+; you may not use this file except in compliance with the License.
+; You may obtain a copy of the License at
+;
+; http://www.apache.org/licenses/LICENSE-2.0
+;
+; Unless required by applicable law or agreed to in writing, software
+; distributed under the License is distributed on an "AS IS" BASIS,
+; WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+; See the License for the specific language governing permissions and
+; limitations under the License.
+
+.source T_iput_wide_31.java
+.class public dot.junit.opcodes.iput_wide.d.T_iput_wide_31
+.super java/lang/Object
+
+.field public st_i1 J
+
+.method public <init>()V
+.limit regs 1
+ invoke-direct {v0}, java/lang/Object/<init>()V
+ return-void
+.end method
+
+.method public run()V
+.limit regs 3
+ const-wide v1, 0
+ iput-wide v1, v0, dot.junit.opcodes.iput_wide.d.T_iput_wide_31.st_i1 J
+.end method
+
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_double/Test_long_to_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_double/Test_long_to_double.java
index f432220..c1a1f1c 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_double/Test_long_to_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_double/Test_long_to_double.java
@@ -77,12 +77,7 @@
* @title type of argument - float
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.long_to_double.d.T_long_to_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_double.d.T_long_to_double_2", VerifyError.class);
}
/**
@@ -91,12 +86,7 @@
* @title type of argument - integer
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.long_to_double.d.T_long_to_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_double.d.T_long_to_double_3", VerifyError.class);
}
/**
@@ -105,12 +95,7 @@
* @title type of argument - reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.long_to_double.d.T_long_to_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_double.d.T_long_to_double_4", VerifyError.class);
}
/**
@@ -119,12 +104,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.long_to_double.d.T_long_to_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_double.d.T_long_to_double_5", VerifyError.class);
}
/**
@@ -133,12 +113,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.long_to_double.d.T_long_to_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_double.d.T_long_to_double_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_float/Test_long_to_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_float/Test_long_to_float.java
index e769e6b..d2cedd9 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_float/Test_long_to_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_float/Test_long_to_float.java
@@ -79,12 +79,7 @@
* doubles are not used interchangeably.
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.long_to_float.d.T_long_to_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_float.d.T_long_to_float_2", VerifyError.class);
}
/**
@@ -92,12 +87,7 @@
* @title type of argument - integer
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.long_to_float.d.T_long_to_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_float.d.T_long_to_float_3", VerifyError.class);
}
/**
@@ -106,12 +96,7 @@
* @title type of argument - reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.long_to_float.d.T_long_to_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_float.d.T_long_to_float_4", VerifyError.class);
}
/**
@@ -120,12 +105,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.long_to_float.d.T_long_to_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_float.d.T_long_to_float_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_int/Test_long_to_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_int/Test_long_to_int.java
index dd39d3e..a6b6cda 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_int/Test_long_to_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/long_to_int/Test_long_to_int.java
@@ -85,12 +85,7 @@
* @title type of argument - float
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.long_to_int.d.T_long_to_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_int.d.T_long_to_int_3", VerifyError.class);
}
/**
@@ -99,12 +94,7 @@
* @title type of argument - reference
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.long_to_int.d.T_long_to_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_int.d.T_long_to_int_4", VerifyError.class);
}
/**
@@ -113,12 +103,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.long_to_int.d.T_long_to_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_int.d.T_long_to_int_5", VerifyError.class);
}
/**
@@ -126,12 +111,7 @@
* @title type of argument - int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.long_to_int.d.T_long_to_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_int.d.T_long_to_int_6", VerifyError.class);
}
/**
@@ -140,11 +120,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.long_to_int.d.T_long_to_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.long_to_int.d.T_long_to_int_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/monitor_enter/Test_monitor_enter.java b/tools/vm-tests-tf/src/dot/junit/opcodes/monitor_enter/Test_monitor_enter.java
index 3608793..fbff132 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/monitor_enter/Test_monitor_enter.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/monitor_enter/Test_monitor_enter.java
@@ -83,12 +83,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_4", VerifyError.class);
}
/**
@@ -96,12 +91,7 @@
* @title types of arguments - int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_5", VerifyError.class);
}
/**
@@ -109,12 +99,7 @@
* @title types of arguments - float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_6", VerifyError.class);
}
/**
@@ -122,12 +107,7 @@
* @title types of arguments - long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_7", VerifyError.class);
}
/**
@@ -135,12 +115,7 @@
* @title types of arguments - double
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_enter.d.T_monitor_enter_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/monitor_exit/Test_monitor_exit.java b/tools/vm-tests-tf/src/dot/junit/opcodes/monitor_exit/Test_monitor_exit.java
index d4f5842..051e951 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/monitor_exit/Test_monitor_exit.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/monitor_exit/Test_monitor_exit.java
@@ -47,13 +47,7 @@
* @title expected NullPointerException
*/
public void testE3() {
- T_monitor_exit_3 t = new T_monitor_exit_3();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException npe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_3", NullPointerException.class);
}
/**
@@ -61,12 +55,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_4", VerifyError.class);
}
@@ -76,12 +65,7 @@
* @title type of arguments - int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_5", VerifyError.class);
}
/**
@@ -89,12 +73,7 @@
* @title type of arguments - float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_6", VerifyError.class);
}
/**
@@ -102,12 +81,7 @@
* @title type of arguments - long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_7", VerifyError.class);
}
/**
@@ -115,12 +89,7 @@
* @title type of arguments - double
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.monitor_exit.d.T_monitor_exit_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move/Test_move.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move/Test_move.java
index d503890..8269dc9 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move/Test_move.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move/Test_move.java
@@ -34,12 +34,7 @@
* @title number of registers - src is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move.d.T_move_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move.d.T_move_2", VerifyError.class);
}
/**
@@ -47,12 +42,7 @@
* @title number of registers - dst is not valid
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move.d.T_move_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move.d.T_move_3", VerifyError.class);
}
/**
@@ -60,12 +50,7 @@
* @title src register contains reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move.d.T_move_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move.d.T_move_4", VerifyError.class);
}
/**
@@ -73,12 +58,7 @@
* @title src register contains wide
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move.d.T_move_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move.d.T_move_5", VerifyError.class);
}
/**
@@ -86,12 +66,7 @@
* @title src register is a part of reg pair
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move.d.T_move_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move.d.T_move_6", VerifyError.class);
}
/**
@@ -101,12 +76,7 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move.d.T_move_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move.d.T_move_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_16/Test_move_16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_16/Test_move_16.java
index f3e2ab0..c27e5d9 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_16/Test_move_16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_16/Test_move_16.java
@@ -41,12 +41,7 @@
* @title number of registers - src is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_16.d.T_move_16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_16.d.T_move_16_3", VerifyError.class);
}
/**
@@ -54,12 +49,7 @@
* @title number of registers - dst is not valid
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_16.d.T_move_16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_16.d.T_move_16_4", VerifyError.class);
}
/**
@@ -67,12 +57,7 @@
* @title src register contains reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_16.d.T_move_16_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_16.d.T_move_16_5", VerifyError.class);
}
/**
@@ -80,12 +65,7 @@
* @title src register contains wide
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_16.d.T_move_16_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_16.d.T_move_16_6", VerifyError.class);
}
/**
@@ -93,12 +73,7 @@
* @title src register is a part of reg pair
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_16.d.T_move_16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_16.d.T_move_16_7", VerifyError.class);
}
/**
@@ -108,11 +83,6 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_16.d.T_move_16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_16.d.T_move_16_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_exception/Test_move_exception.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_exception/Test_move_exception.java
index b4fd87c..be22e89 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_exception/Test_move_exception.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_exception/Test_move_exception.java
@@ -27,15 +27,8 @@
* @title tests move-exception functionality
*/
public void testN1() {
- T_move_exception_1 t = new T_move_exception_1();
- try {
- t.run();
- fail("ArithmeticException was not thrown");
- } catch (ArithmeticException ae) {
- //expected
- } catch (Exception ex) {
- fail("Exception " + ex + " was thrown instead off ArithmeticException");
- }
+ loadAndRun("dot.junit.opcodes.move_exception.d.T_move_exception_1",
+ ArithmeticException.class);
}
/**
@@ -51,12 +44,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_exception.d.T_move_exception_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_exception.d.T_move_exception_3", VerifyError.class);
}
/**
@@ -64,12 +52,7 @@
* @title move-exception is not first instruction in an exception handler
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_exception.d.T_move_exception_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_exception.d.T_move_exception_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_from16/Test_move_from16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_from16/Test_move_from16.java
index 725cbd8..f6de2c3 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_from16/Test_move_from16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_from16/Test_move_from16.java
@@ -33,12 +33,7 @@
* @title number of registers - src is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_from16.d.T_move_from16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_from16.d.T_move_from16_3", VerifyError.class);
}
/**
@@ -46,12 +41,7 @@
* @title number of registers - dst is not valid
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_from16.d.T_move_from16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_from16.d.T_move_from16_4", VerifyError.class);
}
/**
@@ -59,12 +49,7 @@
* @title src register contains reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_from16.d.T_move_from16_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_from16.d.T_move_from16_5", VerifyError.class);
}
/**
@@ -72,12 +57,7 @@
* @title src register contains wide
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_from16.d.T_move_from16_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_from16.d.T_move_from16_6", VerifyError.class);
}
/**
@@ -85,12 +65,7 @@
* @title src register is a part of reg pair
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_from16.d.T_move_from16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_from16.d.T_move_from16_7", VerifyError.class);
}
/**
@@ -100,12 +75,7 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_from16.d.T_move_from16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_from16.d.T_move_from16_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_object/Test_move_object.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_object/Test_move_object.java
index d67be88..8ec2368 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_object/Test_move_object.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_object/Test_move_object.java
@@ -35,12 +35,7 @@
* @title number of registers - src is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_object.d.T_move_object_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object.d.T_move_object_2", VerifyError.class);
}
/**
@@ -48,12 +43,7 @@
* @title number of registers - dst is not valid
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_object.d.T_move_object_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object.d.T_move_object_3", VerifyError.class);
}
/**
@@ -61,12 +51,7 @@
* @title src register contains integer
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_object.d.T_move_object_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object.d.T_move_object_4", VerifyError.class);
}
/**
@@ -74,12 +59,7 @@
* @title src register contains wide
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_object.d.T_move_object_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object.d.T_move_object_5", VerifyError.class);
}
/**
@@ -87,12 +67,7 @@
* @title src register is a part of reg pair
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_object.d.T_move_object_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object.d.T_move_object_6", VerifyError.class);
}
/**
@@ -102,11 +77,6 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_object.d.T_move_object_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object.d.T_move_object_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_object_16/Test_move_object_16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_object_16/Test_move_object_16.java
index c3780cf..e8847bd 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_object_16/Test_move_object_16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_object_16/Test_move_object_16.java
@@ -34,12 +34,7 @@
* @title number of registers - src is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_object_16.d.T_move_object_16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_16.d.T_move_object_16_3", VerifyError.class);
}
/**
@@ -47,12 +42,7 @@
* @title number of registers - dst is not valid
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_object_16.d.T_move_object_16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_16.d.T_move_object_16_4", VerifyError.class);
}
/**
@@ -60,12 +50,7 @@
* @title src register contains integer
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_object_16.d.T_move_object_16_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_16.d.T_move_object_16_5", VerifyError.class);
}
/**
@@ -73,12 +58,7 @@
* @title src register contains wide
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_object_16.d.T_move_object_16_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_16.d.T_move_object_16_6", VerifyError.class);
}
/**
@@ -86,12 +66,7 @@
* @title src register is a part of reg pair
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_object_16.d.T_move_object_16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_16.d.T_move_object_16_7", VerifyError.class);
}
/**
@@ -101,11 +76,6 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_object_16.d.T_move_object_16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_16.d.T_move_object_16_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_object_from16/Test_move_object_from16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_object_from16/Test_move_object_from16.java
index 2fe17d3..a07f889 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_object_from16/Test_move_object_from16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_object_from16/Test_move_object_from16.java
@@ -35,12 +35,7 @@
* @title number of registers - src is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_3", VerifyError.class);
}
/**
@@ -48,12 +43,7 @@
* @title number of registers - dst is not valid
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_4", VerifyError.class);
}
/**
@@ -61,12 +51,7 @@
* @title src register contains integer
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_5", VerifyError.class);
}
/**
@@ -74,12 +59,7 @@
* @title src register contains wide
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_6", VerifyError.class);
}
/**
@@ -87,12 +67,7 @@
* @title src register is a part of reg pair
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_7", VerifyError.class);
}
/**
@@ -102,12 +77,7 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_object_from16.d.T_move_object_from16_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_result/Test_move_result.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_result/Test_move_result.java
index 9a0eaba..b9dc99d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_result/Test_move_result.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_result/Test_move_result.java
@@ -34,12 +34,7 @@
* @title number of registers - dest is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_result.d.T_move_result_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result.d.T_move_result_2", VerifyError.class);
}
@@ -48,12 +43,7 @@
* @title reference
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_result.d.T_move_result_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result.d.T_move_result_3", VerifyError.class);
}
/**
@@ -61,12 +51,7 @@
* @title wide
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_result.d.T_move_result_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result.d.T_move_result_4", VerifyError.class);
}
@@ -77,12 +62,7 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_result.d.T_move_result_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result.d.T_move_result_5", VerifyError.class);
}
/**
@@ -91,12 +71,7 @@
* (in the insns array) by an <invoke-kind> instruction
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_result.d.T_move_result_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result.d.T_move_result_6", VerifyError.class);
}
/**
@@ -105,12 +80,7 @@
* (in actual control flow) by an <invoke-kind> instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_result.d.T_move_result_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result.d.T_move_result_7", VerifyError.class);
}
/**
@@ -118,11 +88,6 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.move_result.d.T_move_result_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result.d.T_move_result_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_result_object/Test_move_result_object.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_result_object/Test_move_result_object.java
index 9ee2ed1..4371f53 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_result_object/Test_move_result_object.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_result_object/Test_move_result_object.java
@@ -45,12 +45,7 @@
* @title number of registers - dest is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_result_object.d.T_move_result_object_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_object.d.T_move_result_object_2", VerifyError.class);
}
@@ -59,12 +54,7 @@
* @title integer
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_result_object.d.T_move_result_object_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_object.d.T_move_result_object_3", VerifyError.class);
}
/**
@@ -72,12 +62,7 @@
* @title wide
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_result_object.d.T_move_result_object_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_object.d.T_move_result_object_4", VerifyError.class);
}
@@ -88,12 +73,7 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_result_object.d.T_move_result_object_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_object.d.T_move_result_object_5", VerifyError.class);
}
/**
@@ -102,12 +82,7 @@
* (in the insns array) by an <invoke-kind> instruction
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_result_object.d.T_move_result_object_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_object.d.T_move_result_object_6", VerifyError.class);
}
/**
@@ -116,12 +91,7 @@
* (in actual control flow) by an <invoke-kind> instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_result_object.d.T_move_result_object_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_object.d.T_move_result_object_7", VerifyError.class);
}
/**
@@ -129,12 +99,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.move_result_object.d.T_move_result_object_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_object.d.T_move_result_object_9", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_result_wide/Test_move_result_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_result_wide/Test_move_result_wide.java
index 6c849dc..7ad8925 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_result_wide/Test_move_result_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_result_wide/Test_move_result_wide.java
@@ -34,12 +34,7 @@
* @title number of registers - dest is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_2", VerifyError.class);
}
@@ -48,12 +43,7 @@
* @title reference
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_3", VerifyError.class);
}
/**
@@ -61,12 +51,7 @@
* @title 32-bit value
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_4", VerifyError.class);
}
@@ -77,12 +62,7 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_5", VerifyError.class);
}
/**
@@ -91,12 +71,7 @@
* (in the insns array) by an <invoke-kind> instruction
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_6", VerifyError.class);
}
/**
@@ -105,12 +80,7 @@
* (in actual control flow) by an <invoke-kind> instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_7", VerifyError.class);
}
/**
@@ -118,12 +88,7 @@
* @title number of registers
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_result_wide.d.T_move_result_wide_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide/Test_move_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide/Test_move_wide.java
index 4ab7421..a83bf41 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide/Test_move_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide/Test_move_wide.java
@@ -42,12 +42,7 @@
* @title number of registers - src is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_wide.d.T_move_wide_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide.d.T_move_wide_2", VerifyError.class);
}
/**
@@ -55,12 +50,7 @@
* @title number of registers - dst is not valid
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_wide.d.T_move_wide_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide.d.T_move_wide_3", VerifyError.class);
}
/**
@@ -68,12 +58,7 @@
* @title src register contains reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_wide.d.T_move_wide_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide.d.T_move_wide_4", VerifyError.class);
}
/**
@@ -81,12 +66,7 @@
* @title src register contains 32-bit value
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_wide.d.T_move_wide_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide.d.T_move_wide_5", VerifyError.class);
}
/**
@@ -96,12 +76,7 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_wide.d.T_move_wide_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide.d.T_move_wide_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide_16/Test_move_wide_16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide_16/Test_move_wide_16.java
index a2b776d..7c34b61 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide_16/Test_move_wide_16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide_16/Test_move_wide_16.java
@@ -48,12 +48,7 @@
* @title number of registers - src is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_3", VerifyError.class);
}
/**
@@ -61,12 +56,7 @@
* @title number of registers - dst is not valid
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_4", VerifyError.class);
}
/**
@@ -74,12 +64,7 @@
* @title src register contains reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_5", VerifyError.class);
}
/**
@@ -87,12 +72,7 @@
* @title src register contains 32-bit value
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_6", VerifyError.class);
}
/**
@@ -100,12 +80,7 @@
* @title src register is a part of reg pair
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_7", VerifyError.class);
}
/**
@@ -115,12 +90,7 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_16.d.T_move_wide_16_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide_from16/Test_move_wide_from16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide_from16/Test_move_wide_from16.java
index 2434e92..3c8918f 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide_from16/Test_move_wide_from16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/move_wide_from16/Test_move_wide_from16.java
@@ -41,12 +41,7 @@
* @title number of registers - src is not valid
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_3", VerifyError.class);
}
/**
@@ -54,12 +49,7 @@
* @title number of registers - dst is not valid
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_4", VerifyError.class);
}
/**
@@ -67,12 +57,7 @@
* @title src register contains reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_5", VerifyError.class);
}
/**
@@ -80,12 +65,7 @@
* @title src register contains 32-bit value
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_6", VerifyError.class);
}
/**
@@ -93,12 +73,7 @@
* @title src register is a part of reg pair
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_7", VerifyError.class);
}
/**
@@ -108,12 +83,7 @@
* up, and the other register involved in it becomes undefined.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.move_wide_from16.d.T_move_wide_from16_8", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_double/Test_mul_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_double/Test_mul_double.java
index 9f5f173..85718da 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_double/Test_mul_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_double/Test_mul_double.java
@@ -120,12 +120,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_double.d.T_mul_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_double.d.T_mul_double_2", VerifyError.class);
}
@@ -135,12 +130,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_double.d.T_mul_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_double.d.T_mul_double_3", VerifyError.class);
}
/**
@@ -148,12 +138,7 @@
* @title types of arguments - double, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_double.d.T_mul_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_double.d.T_mul_double_5", VerifyError.class);
}
/**
@@ -162,11 +147,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_double.d.T_mul_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_double.d.T_mul_double_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_double_2addr/Test_mul_double_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_double_2addr/Test_mul_double_2addr.java
index 8689e85..9770407 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_double_2addr/Test_mul_double_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_double_2addr/Test_mul_double_2addr.java
@@ -121,12 +121,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_double_2addr.d.T_mul_double_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_double_2addr.d.T_mul_double_2addr_2", VerifyError.class);
}
@@ -136,12 +131,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_double_2addr.d.T_mul_double_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_double_2addr.d.T_mul_double_2addr_3", VerifyError.class);
}
/**
@@ -149,12 +139,7 @@
* @title types of arguments - double, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_double_2addr.d.T_mul_double_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_double_2addr.d.T_mul_double_2addr_5", VerifyError.class);
}
/**
@@ -163,12 +148,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_double_2addr.d.T_mul_double_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_double_2addr.d.T_mul_double_2addr_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_float/Test_mul_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_float/Test_mul_float.java
index f486966..9506361 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_float/Test_mul_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_float/Test_mul_float.java
@@ -120,12 +120,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_float.d.T_mul_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float.d.T_mul_float_2", VerifyError.class);
}
@@ -135,12 +130,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_float.d.T_mul_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float.d.T_mul_float_3", VerifyError.class);
}
/**
@@ -148,12 +138,7 @@
* @title types of arguments - long, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_float.d.T_mul_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float.d.T_mul_float_4", VerifyError.class);
}
/**
@@ -161,12 +146,7 @@
* @title types of arguments - reference, float
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_float.d.T_mul_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float.d.T_mul_float_5", VerifyError.class);
}
/**
@@ -175,11 +155,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.mul_float.d.T_mul_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float.d.T_mul_float_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_float_2addr/Test_mul_float_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_float_2addr/Test_mul_float_2addr.java
index 3a222bb..9b9271b 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_float_2addr/Test_mul_float_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_float_2addr/Test_mul_float_2addr.java
@@ -120,12 +120,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_2", VerifyError.class);
}
@@ -135,12 +130,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_3", VerifyError.class);
}
/**
@@ -148,12 +138,7 @@
* @title types of arguments - long, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_4", VerifyError.class);
}
/**
@@ -161,12 +146,7 @@
* @title types of arguments - reference, float
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_5", VerifyError.class);
}
/**
@@ -175,11 +155,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_float_2addr.d.T_mul_float_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int/Test_mul_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int/Test_mul_int.java
index d363abc..1797c4d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int/Test_mul_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int/Test_mul_int.java
@@ -101,12 +101,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_int.d.T_mul_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int.d.T_mul_int_2", VerifyError.class);
}
@@ -116,12 +111,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_int.d.T_mul_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int.d.T_mul_int_3", VerifyError.class);
}
/**
@@ -129,12 +119,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_int.d.T_mul_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int.d.T_mul_int_4", VerifyError.class);
}
/**
@@ -142,12 +127,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_int.d.T_mul_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int.d.T_mul_int_5", VerifyError.class);
}
/**
@@ -156,11 +136,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.mul_int.d.T_mul_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int.d.T_mul_int_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_2addr/Test_mul_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_2addr/Test_mul_int_2addr.java
index 744d73e..5cd574f 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_2addr/Test_mul_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_2addr/Test_mul_int_2addr.java
@@ -101,12 +101,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_2", VerifyError.class);
}
@@ -116,12 +111,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_3", VerifyError.class);
}
/**
@@ -129,12 +119,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_4", VerifyError.class);
}
/**
@@ -142,12 +127,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_5", VerifyError.class);
}
/**
@@ -156,11 +136,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_2addr.d.T_mul_int_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_lit16/Test_mul_int_lit16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_lit16/Test_mul_int_lit16.java
index 9ff4b9a..2fcfd83 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_lit16/Test_mul_int_lit16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_lit16/Test_mul_int_lit16.java
@@ -104,12 +104,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_7", VerifyError.class);
}
@@ -119,12 +114,7 @@
* @title types of arguments - int * double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_8", VerifyError.class);
}
/**
@@ -132,12 +122,7 @@
* @title types of arguments - long * int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_9", VerifyError.class);
}
/**
@@ -145,12 +130,7 @@
* @title types of arguments - reference * int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_10", VerifyError.class);
}
/**
@@ -159,11 +139,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit16.d.T_mul_int_lit16_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_lit8/Test_mul_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_lit8/Test_mul_int_lit8.java
index 86031b8..84b2620 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_lit8/Test_mul_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_int_lit8/Test_mul_int_lit8.java
@@ -104,12 +104,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_7", VerifyError.class);
}
@@ -119,12 +114,7 @@
* @title types of arguments - int * double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_8", VerifyError.class);
}
/**
@@ -132,12 +122,7 @@
* @title types of arguments - long * int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_9", VerifyError.class);
}
/**
@@ -145,12 +130,7 @@
* @title types of arguments - reference * int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_10", VerifyError.class);
}
/**
@@ -159,11 +139,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_int_lit8.d.T_mul_int_lit8_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_long/Test_mul_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_long/Test_mul_long.java
index dbf08de..a3e4bf2 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_long/Test_mul_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_long/Test_mul_long.java
@@ -109,12 +109,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_long.d.T_mul_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long.d.T_mul_long_2", VerifyError.class);
}
@@ -125,12 +120,7 @@
* @title types of arguments - long * int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_long.d.T_mul_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long.d.T_mul_long_4", VerifyError.class);
}
/**
@@ -138,12 +128,7 @@
* @title types of arguments - float * long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_long.d.T_mul_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long.d.T_mul_long_5", VerifyError.class);
}
/**
@@ -151,12 +136,7 @@
* @title types of arguments - reference * long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_long.d.T_mul_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long.d.T_mul_long_6", VerifyError.class);
}
/**
@@ -165,11 +145,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.mul_long.d.T_mul_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long.d.T_mul_long_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_long_2addr/Test_mul_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_long_2addr/Test_mul_long_2addr.java
index 1e66348..95e0469 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/mul_long_2addr/Test_mul_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/mul_long_2addr/Test_mul_long_2addr.java
@@ -109,12 +109,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_2", VerifyError.class);
}
@@ -124,12 +119,7 @@
* @title types of arguments - long * int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_4", VerifyError.class);
}
/**
@@ -137,12 +127,7 @@
* @title types of arguments - float * long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_5", VerifyError.class);
}
/**
@@ -150,12 +135,7 @@
* @title types of arguments - reference * long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_6", VerifyError.class);
}
/**
@@ -164,11 +144,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.mul_long_2addr.d.T_mul_long_2addr_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/neg_double/Test_neg_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/neg_double/Test_neg_double.java
index a16763f..1618921 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/neg_double/Test_neg_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/neg_double/Test_neg_double.java
@@ -101,12 +101,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.neg_double.d.T_neg_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_double.d.T_neg_double_2", VerifyError.class);
}
@@ -117,12 +112,7 @@
* @title type of argument - float
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.neg_double.d.T_neg_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_double.d.T_neg_double_3", VerifyError.class);
}
/**
@@ -131,12 +121,7 @@
* @title type of argument - int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.neg_double.d.T_neg_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_double.d.T_neg_double_5", VerifyError.class);
}
/**
@@ -145,12 +130,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.neg_double.d.T_neg_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_double.d.T_neg_double_6", VerifyError.class);
}
/**
@@ -159,12 +139,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.neg_double.d.T_neg_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_double.d.T_neg_double_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/neg_float/Test_neg_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/neg_float/Test_neg_float.java
index 8544b18..a5933d7 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/neg_float/Test_neg_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/neg_float/Test_neg_float.java
@@ -100,12 +100,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.neg_float.d.T_neg_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_float.d.T_neg_float_2", VerifyError.class);
}
@@ -116,12 +111,7 @@
* @title type of argument - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.neg_float.d.T_neg_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_float.d.T_neg_float_3", VerifyError.class);
}
/**
@@ -130,12 +120,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.neg_float.d.T_neg_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_float.d.T_neg_float_4", VerifyError.class);
}
/**
@@ -144,12 +129,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.neg_float.d.T_neg_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_float.d.T_neg_float_5", VerifyError.class);
}
/**
@@ -158,11 +138,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.neg_float.d.T_neg_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_float.d.T_neg_float_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/neg_int/Test_neg_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/neg_int/Test_neg_int.java
index 97290f6..47b29f0 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/neg_int/Test_neg_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/neg_int/Test_neg_int.java
@@ -85,12 +85,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.neg_int.d.T_neg_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_int.d.T_neg_int_3", VerifyError.class);
}
@@ -101,12 +96,7 @@
* @title type of argument - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.neg_int.d.T_neg_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_int.d.T_neg_int_4", VerifyError.class);
}
/**
@@ -115,12 +105,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.neg_int.d.T_neg_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_int.d.T_neg_int_5", VerifyError.class);
}
/**
@@ -129,12 +114,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.neg_int.d.T_neg_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_int.d.T_neg_int_6", VerifyError.class);
}
/**
@@ -143,11 +123,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.neg_int.d.T_neg_int_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_int.d.T_neg_int_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/neg_long/Test_neg_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/neg_long/Test_neg_long.java
index 6880c94..8a1049e 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/neg_long/Test_neg_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/neg_long/Test_neg_long.java
@@ -86,12 +86,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.neg_long.d.T_neg_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_long.d.T_neg_long_3", VerifyError.class);
}
@@ -101,12 +96,7 @@
* @title type of argument - int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.neg_long.d.T_neg_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_long.d.T_neg_long_5", VerifyError.class);
}
/**
@@ -115,12 +105,7 @@
* @title type of argument - float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.neg_long.d.T_neg_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_long.d.T_neg_long_6", VerifyError.class);
}
/**
@@ -129,12 +114,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.neg_long.d.T_neg_long_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_long.d.T_neg_long_7", VerifyError.class);
}
/**
@@ -143,11 +123,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.neg_long.d.T_neg_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.neg_long.d.T_neg_long_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/new_array/Test_new_array.java b/tools/vm-tests-tf/src/dot/junit/opcodes/new_array/Test_new_array.java
index 44aedaa..1e990c2 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/new_array/Test_new_array.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/new_array/Test_new_array.java
@@ -86,13 +86,8 @@
* @title expected NegativeArraySizeException
*/
public void testE1() {
- T_new_array_2 t = new T_new_array_2();
- try {
- t.run(-1);
- fail("expected NegativeArraySizeException");
- } catch (NegativeArraySizeException nase) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.new_array.d.T_new_array_2", NegativeArraySizeException.class,
+ -1);
}
@@ -101,12 +96,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.new_array.d.T_new_array_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_array.d.T_new_array_4", VerifyError.class);
}
/**
@@ -115,12 +105,7 @@
* @title size argument - long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.new_array.d.T_new_array_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_array.d.T_new_array_5", VerifyError.class);
}
/**
@@ -129,12 +114,7 @@
* @title size argument - reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.new_array.d.T_new_array_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_array.d.T_new_array_9", VerifyError.class);
}
/**
@@ -143,12 +123,7 @@
* @title constant pool index
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.new_array.d.T_new_array_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_array.d.T_new_array_6", VerifyError.class);
}
/**
@@ -157,12 +132,7 @@
* @title attempt to create object
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.new_array.d.T_new_array_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_array.d.T_new_array_7", VerifyError.class);
}
/**
@@ -171,12 +141,7 @@
* @title array of more than 255 dimensions
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.new_array.d.T_new_array_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_array.d.T_new_array_8", ClassNotFoundException.class);
}
/**
@@ -184,11 +149,7 @@
* @title Attempt to instantiate array of non-existent class.
*/
public void testVFE7() {
- try {
- new T_new_array_11().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.new_array.d.T_new_array_11", NoClassDefFoundError.class);
}
/**
@@ -197,11 +158,7 @@
*/
public void testVFE8() {
//@uses dot.junit.opcodes.new_array.TestStubs
- try {
- new T_new_array_10().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.new_array.d.T_new_array_10", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/new_instance/Test_new_instance.java b/tools/vm-tests-tf/src/dot/junit/opcodes/new_instance/Test_new_instance.java
index d994f65..3209553 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/new_instance/Test_new_instance.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/new_instance/Test_new_instance.java
@@ -42,12 +42,8 @@
* @title class initialization throws exception
*/
public void testE1() {
- try {
- T_new_instance_3.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ load("dot.junit.opcodes.new_instance.d.T_new_instance_3",
+ ExceptionInInitializerError.class);
}
/**
@@ -56,14 +52,7 @@
*/
public void testE4() {
//@uses dot.junit.opcodes.new_instance.d.TestAbstractClass
- //@uses dot.junit.opcodes.new_instance.d.T_new_instance_8
- T_new_instance_8 t = new T_new_instance_8();
- try {
- t.run();
- fail("expected InstantiationError");
- } catch (InstantiationError ie) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.new_instance.d.T_new_instance_8", InstantiationError.class);
}
/**
@@ -73,14 +62,7 @@
*/
public void testE5() {
//@uses dot.junit.opcodes.new_instance.d.TestAbstractClass
- //@uses dot.junit.opcodes.new_instance.d.T_new_instance_9
- T_new_instance_9 t = new T_new_instance_9();
- try {
- t.run();
- fail("expected Error");
- } catch (Error iae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.new_instance.d.T_new_instance_9", InstantiationError.class);
}
/**
@@ -88,12 +70,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.new_instance.d.T_new_instance_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_instance.d.T_new_instance_6", VerifyError.class);
}
/**
@@ -102,12 +79,7 @@
* @title attempt to create array using new
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.new_instance.d.T_new_instance_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_instance.d.T_new_instance_7", VerifyError.class);
}
/**
@@ -116,12 +88,7 @@
* called
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.new_instance.d.T_new_instance_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_instance.d.T_new_instance_2", VerifyError.class);
}
/**
@@ -129,12 +96,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.new_instance.d.T_new_instance_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_instance.d.T_new_instance_10", VerifyError.class);
}
/**
@@ -143,12 +105,7 @@
*/
public void testVFE5() {
//@uses dot.junit.opcodes.new_instance.TestStubs
- //@uses dot.junit.opcodes.new_instance.d.T_new_instance_4
- try {
- new T_new_instance_4().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.new_instance.d.T_new_instance_4", IllegalAccessError.class);
}
/**
@@ -156,11 +113,7 @@
* @title Attempt to instantiate array of non-existent class.
*/
public void testVFE6() {
- try {
- new T_new_instance_5().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.new_instance.d.T_new_instance_5", NoClassDefFoundError.class);
}
/**
@@ -169,12 +122,7 @@
* if the same new-instance instruction is again executed before the instance is initialized
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.new_instance.d.T_new_instance_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_instance.d.T_new_instance_11", VerifyError.class);
}
/**
@@ -183,11 +131,6 @@
* if the same new-instance instruction is again executed before the instance is initialized
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.new_instance.d.T_new_instance_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.new_instance.d.T_new_instance_12", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/not_int/Test_not_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/not_int/Test_not_int.java
index 110a842..1bf3f15 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/not_int/Test_not_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/not_int/Test_not_int.java
@@ -111,12 +111,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.not_int.d.T_not_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_int.d.T_not_int_3", VerifyError.class);
}
@@ -126,12 +121,7 @@
* @title types of arguments - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.not_int.d.T_not_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_int.d.T_not_int_4", VerifyError.class);
}
/**
@@ -139,12 +129,7 @@
* @title types of arguments - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.not_int.d.T_not_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_int.d.T_not_int_5", VerifyError.class);
}
/**
@@ -152,12 +137,7 @@
* @title types of arguments - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.not_int.d.T_not_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_int.d.T_not_int_6", VerifyError.class);
}
/**
@@ -166,12 +146,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.not_int.d.T_not_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_int.d.T_not_int_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/not_long/Test_not_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/not_long/Test_not_long.java
index 9e3c614..acb656d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/not_long/Test_not_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/not_long/Test_not_long.java
@@ -93,12 +93,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.not_long.d.T_not_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_long.d.T_not_long_3", VerifyError.class);
}
@@ -108,12 +103,7 @@
* @title types of arguments - int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.not_long.d.T_not_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_long.d.T_not_long_4", VerifyError.class);
}
/**
@@ -121,12 +111,7 @@
* @title types of arguments - float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.not_long.d.T_not_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_long.d.T_not_long_5", VerifyError.class);
}
/**
@@ -134,12 +119,7 @@
* @title types of arguments - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.not_long.d.T_not_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_long.d.T_not_long_6", VerifyError.class);
}
/**
@@ -148,11 +128,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.not_long.d.T_not_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.not_long.d.T_not_long_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/opc_const/Test_opc_const.java b/tools/vm-tests-tf/src/dot/junit/opcodes/opc_const/Test_opc_const.java
index aa19e6c..87383ce 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/opc_const/Test_opc_const.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/opc_const/Test_opc_const.java
@@ -48,12 +48,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.opc_const.d.T_opc_const_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_const.d.T_opc_const_3", VerifyError.class);
}
/**
@@ -63,12 +58,7 @@
* other register involved in it becomes undefined
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.opc_const.d.T_opc_const_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_const.d.T_opc_const_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/opc_goto/Test_opc_goto.java b/tools/vm-tests-tf/src/dot/junit/opcodes/opc_goto/Test_opc_goto.java
index a3558fe..64f0d5a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/opc_goto/Test_opc_goto.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/opc_goto/Test_opc_goto.java
@@ -35,12 +35,7 @@
* @title branch target is inside instruction
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.opc_goto.d.T_opc_goto_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_goto.d.T_opc_goto_2", VerifyError.class);
}
/**
@@ -48,12 +43,7 @@
* @title branch target shall be inside the method
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.opc_goto.d.T_opc_goto_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_goto.d.T_opc_goto_3", VerifyError.class);
}
/**
@@ -61,12 +51,7 @@
* @title zero offset
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.opc_goto.d.T_opc_goto_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_goto.d.T_opc_goto_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/opc_return/Test_opc_return.java b/tools/vm-tests-tf/src/dot/junit/opcodes/opc_return/Test_opc_return.java
index 2fe8323..3d69bfa 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/opc_return/Test_opc_return.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/opc_return/Test_opc_return.java
@@ -30,32 +30,20 @@
assertEquals(123456, t.run());
}
-
/**
* @title Method is synchronized but thread is not monitor owner
*/
public void testE1() {
- T_opc_return_3 t = new T_opc_return_3();
- try {
- assertTrue(t.run());
- fail("expected IllegalMonitorStateException");
- } catch (IllegalMonitorStateException imse) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.opc_return.d.T_opc_return_3",
+ IllegalMonitorStateException.class);
}
-
/**
* @constraint B11
* @title method's return type - long
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.opc_return.d.T_opc_return_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_return.d.T_opc_return_5", VerifyError.class);
}
/**
@@ -63,12 +51,7 @@
* @title method's return type - reference
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.opc_return.d.T_opc_return_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_return.d.T_opc_return_6", VerifyError.class);
}
/**
@@ -76,12 +59,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.opc_return.d.T_opc_return_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_return.d.T_opc_return_7", VerifyError.class);
}
/**
@@ -89,12 +67,6 @@
* @title return on wide register pair
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.opc_return.d.T_opc_return_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_return.d.T_opc_return_8", VerifyError.class);
}
-
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/opc_throw/Test_opc_throw.java b/tools/vm-tests-tf/src/dot/junit/opcodes/opc_throw/Test_opc_throw.java
index 5055336..7baf67d 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/opc_throw/Test_opc_throw.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/opc_throw/Test_opc_throw.java
@@ -79,26 +79,15 @@
* a NullPointerException instead of objectref
*/
public void testE1() {
- T_opc_throw_4 t = new T_opc_throw_4();
- try {
- t.run();
- fail("expected NullPointerException");
- } catch (NullPointerException npe) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.opc_throw.d.T_opc_throw_4", NullPointerException.class);
}
/**
* @title expected IllegalMonitorStateException
*/
public void testE2() {
- T_opc_throw_5 t = new T_opc_throw_5();
- try {
- t.run();
- fail("expected IllegalMonitorStateException");
- } catch (IllegalMonitorStateException imse) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.opc_throw.d.T_opc_throw_5",
+ IllegalMonitorStateException.class);
}
/**
@@ -106,12 +95,7 @@
* @title (number of registers)
*/
public void testVFE2() {
- try {
- Class.forName("dxc.junit.opcodes.opc_throw.jm.T_opc_throw_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_throw.d.T_opc_throw_6", VerifyError.class);
}
@@ -122,12 +106,7 @@
* @title type of argument - float
*/
public void testVFE3() {
- try {
- Class.forName("dxc.junit.opcodes.opc_throw.jm.T_opc_throw_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_throw.d.T_opc_throw_7", VerifyError.class);
}
/**
@@ -136,12 +115,7 @@
* @title type of argument - long
*/
public void testVFE4() {
- try {
- Class.forName("dxc.junit.opcodes.opc_throw.jm.T_opc_throw_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_throw.d.T_opc_throw_7", VerifyError.class);
}
/**
@@ -151,11 +125,6 @@
*/
public void testVFE5() {
- try {
- Class.forName("dxc.junit.opcodes.opc_throw.jm.T_opc_throw_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.opc_throw.d.T_opc_throw_10", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/or_int/Test_or_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/or_int/Test_or_int.java
index a7eb005..7a34434 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/or_int/Test_or_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/or_int/Test_or_int.java
@@ -68,12 +68,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.or_int.d.T_or_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int.d.T_or_int_2", VerifyError.class);
}
@@ -83,12 +78,7 @@
* @title types of arguments - double & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.or_int.d.T_or_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int.d.T_or_int_3", VerifyError.class);
}
/**
@@ -96,12 +86,7 @@
* @title types of arguments - long & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.or_int.d.T_or_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int.d.T_or_int_4", VerifyError.class);
}
/**
@@ -109,12 +94,7 @@
* @title types of arguments - reference & int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.or_int.d.T_or_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int.d.T_or_int_5", VerifyError.class);
}
/**
@@ -123,11 +103,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.or_int.d.T_or_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int.d.T_or_int_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_2addr/Test_or_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_2addr/Test_or_int_2addr.java
index 0a0a66c..b453125 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_2addr/Test_or_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_2addr/Test_or_int_2addr.java
@@ -68,12 +68,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_2", VerifyError.class);
}
@@ -83,12 +78,7 @@
* @title types of arguments - double & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_3", VerifyError.class);
}
/**
@@ -96,12 +86,7 @@
* @title types of arguments - long & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_4", VerifyError.class);
}
/**
@@ -109,12 +94,7 @@
* @title types of arguments - reference & int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_5", VerifyError.class);
}
/**
@@ -123,11 +103,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_2addr.d.T_or_int_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_lit16/Test_or_int_lit16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_lit16/Test_or_int_lit16.java
index eff9cbc..efabaec 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_lit16/Test_or_int_lit16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_lit16/Test_or_int_lit16.java
@@ -71,12 +71,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_6", VerifyError.class);
}
@@ -86,12 +81,7 @@
* @title types of arguments - double & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_7", VerifyError.class);
}
/**
@@ -99,12 +89,7 @@
* @title types of arguments - long & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_8", VerifyError.class);
}
/**
@@ -112,12 +97,7 @@
* @title types of arguments - reference & int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_9", VerifyError.class);
}
/**
@@ -126,11 +106,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit16.d.T_or_int_lit16_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_lit8/Test_or_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_lit8/Test_or_int_lit8.java
index cfddb9b..90f4679 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_lit8/Test_or_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/or_int_lit8/Test_or_int_lit8.java
@@ -71,12 +71,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_6", VerifyError.class);
}
@@ -86,12 +81,7 @@
* @title types of arguments - double & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_7", VerifyError.class);
}
/**
@@ -99,12 +89,7 @@
* @title types of arguments - long & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_8", VerifyError.class);
}
/**
@@ -112,12 +97,7 @@
* @title types of arguments - reference & int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_9", VerifyError.class);
}
/**
@@ -126,11 +106,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_int_lit8.d.T_or_int_lit8_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/or_long/Test_or_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/or_long/Test_or_long.java
index 6076ad3..7b3e50f 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/or_long/Test_or_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/or_long/Test_or_long.java
@@ -69,12 +69,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.or_long.d.T_or_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long.d.T_or_long_2", VerifyError.class);
}
@@ -84,12 +79,7 @@
* @title types of arguments - int & long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.or_long.d.T_or_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long.d.T_or_long_4", VerifyError.class);
}
/**
@@ -97,12 +87,7 @@
* @title types of arguments - float & long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.or_long.d.T_or_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long.d.T_or_long_5", VerifyError.class);
}
/**
@@ -110,12 +95,7 @@
* @title types of arguments - reference & long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.or_long.d.T_or_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long.d.T_or_long_6", VerifyError.class);
}
/**
@@ -124,11 +104,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.or_long.d.T_or_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long.d.T_or_long_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/or_long_2addr/Test_or_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/or_long_2addr/Test_or_long_2addr.java
index c9aa587..98532de 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/or_long_2addr/Test_or_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/or_long_2addr/Test_or_long_2addr.java
@@ -69,12 +69,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_2", VerifyError.class);
}
@@ -84,12 +79,7 @@
* @title types of arguments - int & long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_4", VerifyError.class);
}
/**
@@ -97,12 +87,7 @@
* @title types of arguments - float & long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_5", VerifyError.class);
}
/**
@@ -110,12 +95,7 @@
* @title types of arguments - reference & long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_6", VerifyError.class);
}
/**
@@ -124,11 +104,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.or_long_2addr.d.T_or_long_2addr_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/packed_switch/Test_packed_switch.java b/tools/vm-tests-tf/src/dot/junit/opcodes/packed_switch/Test_packed_switch.java
index 5b983e1..992dd59 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/packed_switch/Test_packed_switch.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/packed_switch/Test_packed_switch.java
@@ -68,12 +68,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_3", VerifyError.class);
}
@@ -83,12 +78,7 @@
* @title type of argument - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_4", VerifyError.class);
}
/**
@@ -96,12 +86,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_5", VerifyError.class);
}
/**
@@ -109,12 +94,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_6", VerifyError.class);
}
/**
@@ -122,12 +102,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_7", VerifyError.class);
}
/**
@@ -135,12 +110,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_8", VerifyError.class);
}
@@ -149,12 +119,7 @@
* @title offset to table shall be inside method
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_9", VerifyError.class);
}
/**
@@ -163,12 +128,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_2", VerifyError.class);
}
/**
@@ -176,12 +136,7 @@
* @title the size and the list of targets must be consistent.
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_11", VerifyError.class);
}
@@ -190,12 +145,7 @@
* @title packed-switch-data pseudo-instructions must not be reachable by control flow
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_12", VerifyError.class);
}
/**
@@ -203,11 +153,6 @@
* @title table has wrong ident code
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.packed_switch.d.T_packed_switch_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.packed_switch.d.T_packed_switch_13", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_double/Test_rem_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_double/Test_rem_double.java
index b3a9c92..c019053 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_double/Test_rem_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_double/Test_rem_double.java
@@ -127,12 +127,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_double.d.T_rem_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double.d.T_rem_double_2", VerifyError.class);
}
@@ -142,12 +137,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_double.d.T_rem_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double.d.T_rem_double_3", VerifyError.class);
}
/**
@@ -155,12 +145,7 @@
* @title types of arguments - double, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_double.d.T_rem_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double.d.T_rem_double_5", VerifyError.class);
}
/**
@@ -168,12 +153,7 @@
* @title types of arguments - double, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_double.d.T_rem_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double.d.T_rem_double_6", VerifyError.class);
}
/**
@@ -182,11 +162,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_double.d.T_rem_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double.d.T_rem_double_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_double_2addr/Test_rem_double_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_double_2addr/Test_rem_double_2addr.java
index 15020da..6e32b1a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_double_2addr/Test_rem_double_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_double_2addr/Test_rem_double_2addr.java
@@ -127,12 +127,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_2", VerifyError.class);
}
@@ -142,12 +137,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_3", VerifyError.class);
}
/**
@@ -155,12 +145,7 @@
* @title types of arguments - double, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_5", VerifyError.class);
}
/**
@@ -168,12 +153,7 @@
* @title types of arguments - double, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_6", VerifyError.class);
}
/**
@@ -182,11 +162,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_double_2addr.d.T_rem_double_2addr_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_float/Test_rem_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_float/Test_rem_float.java
index b028af7..004f4ad 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_float/Test_rem_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_float/Test_rem_float.java
@@ -126,12 +126,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_float.d.T_rem_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float.d.T_rem_float_2", VerifyError.class);
}
@@ -141,12 +136,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_float.d.T_rem_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float.d.T_rem_float_3", VerifyError.class);
}
/**
@@ -154,12 +144,7 @@
* @title types of arguments - long, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_float.d.T_rem_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float.d.T_rem_float_4", VerifyError.class);
}
/**
@@ -167,12 +152,7 @@
* @title types of arguments - reference, float
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_float.d.T_rem_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float.d.T_rem_float_5", VerifyError.class);
}
/**
@@ -181,11 +161,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_float.d.T_rem_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float.d.T_rem_float_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_float_2addr/Test_rem_float_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_float_2addr/Test_rem_float_2addr.java
index 29a1e49..f5055b2 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_float_2addr/Test_rem_float_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_float_2addr/Test_rem_float_2addr.java
@@ -126,12 +126,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_2", VerifyError.class);
}
@@ -141,12 +136,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_3", VerifyError.class);
}
/**
@@ -154,12 +144,7 @@
* @title types of arguments - long, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_4", VerifyError.class);
}
/**
@@ -167,12 +152,7 @@
* @title types of arguments - reference, float
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_5", VerifyError.class);
}
/**
@@ -182,11 +162,6 @@
* Note: This test works only in ICS and beyond.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_float_2addr.d.T_rem_float_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int/Test_rem_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int/Test_rem_int.java
index 5dd0915..dbecced 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int/Test_rem_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int/Test_rem_int.java
@@ -123,13 +123,7 @@
* @title Divisor is 0
*/
public void testE1() {
- T_rem_int_1 t = new T_rem_int_1();
- try {
- t.run(1, 0);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.rem_int.d.T_rem_int_1", ArithmeticException.class, 1, 0);
}
/**
@@ -137,12 +131,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_int.d.T_rem_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int.d.T_rem_int_2", VerifyError.class);
}
@@ -152,12 +141,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_int.d.T_rem_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int.d.T_rem_int_3", VerifyError.class);
}
/**
@@ -165,12 +149,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_int.d.T_rem_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int.d.T_rem_int_4", VerifyError.class);
}
/**
@@ -178,12 +157,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_int.d.T_rem_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int.d.T_rem_int_5", VerifyError.class);
}
/**
@@ -192,12 +166,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_int.d.T_rem_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int.d.T_rem_int_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_2addr/Test_rem_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_2addr/Test_rem_int_2addr.java
index 5972821..9c5d1df 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_2addr/Test_rem_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_2addr/Test_rem_int_2addr.java
@@ -123,13 +123,8 @@
* @title Divisor is 0
*/
public void testE1() {
- T_rem_int_2addr_1 t = new T_rem_int_2addr_1();
- try {
- t.run(1, 0);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_1", ArithmeticException.class,
+ 1, 0);
}
/**
@@ -137,12 +132,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_2", VerifyError.class);
}
@@ -152,12 +142,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_3", VerifyError.class);
}
/**
@@ -165,12 +150,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_4", VerifyError.class);
}
/**
@@ -178,12 +158,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_5", VerifyError.class);
}
/**
@@ -192,12 +167,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_2addr.d.T_rem_int_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_lit16/Test_rem_int_lit16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_lit16/Test_rem_int_lit16.java
index 725391c..ce4c842 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_lit16/Test_rem_int_lit16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_lit16/Test_rem_int_lit16.java
@@ -130,13 +130,8 @@
* @title Divisor is 0
*/
public void testE1() {
- T_rem_int_lit16_9 t = new T_rem_int_lit16_9();
- try {
- t.run(1);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_9", ArithmeticException.class,
+ 1);
}
/**
@@ -144,12 +139,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_10", VerifyError.class);
}
@@ -159,12 +149,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_11", VerifyError.class);
}
/**
@@ -172,12 +157,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_12", VerifyError.class);
}
/**
@@ -185,12 +165,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_13", VerifyError.class);
}
/**
@@ -199,11 +174,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit16.d.T_rem_int_lit16_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_lit8/Test_rem_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_lit8/Test_rem_int_lit8.java
index 62b4f5b..54c2e6c 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_lit8/Test_rem_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_int_lit8/Test_rem_int_lit8.java
@@ -130,13 +130,8 @@
* @title Divisor is 0
*/
public void testE1() {
- T_rem_int_lit8_9 t = new T_rem_int_lit8_9();
- try {
- t.run(1);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_9", ArithmeticException.class,
+ 1);
}
/**
@@ -144,12 +139,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_10", VerifyError.class);
}
@@ -159,12 +149,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_11", VerifyError.class);
}
/**
@@ -172,12 +157,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_12", VerifyError.class);
}
/**
@@ -185,12 +165,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_13", VerifyError.class);
}
/**
@@ -199,12 +174,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_int_lit8.d.T_rem_int_lit8_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_long/Test_rem_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_long/Test_rem_long.java
index d5493a7..c3edea6 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_long/Test_rem_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_long/Test_rem_long.java
@@ -123,13 +123,8 @@
* @title Divisor is 0
*/
public void testE1() {
- T_rem_long_1 t = new T_rem_long_1();
- try {
- t.run(1234567890123l, 0l);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.rem_long.d.T_rem_long_1", ArithmeticException.class,
+ 1234567890123l, 0l);
}
/**
@@ -137,12 +132,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_long.d.T_rem_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long.d.T_rem_long_2", VerifyError.class);
}
@@ -152,12 +142,7 @@
* @title types of arguments - int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_long.d.T_rem_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long.d.T_rem_long_4", VerifyError.class);
}
/**
@@ -165,12 +150,7 @@
* @title types of arguments - long, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_long.d.T_rem_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long.d.T_rem_long_5", VerifyError.class);
}
/**
@@ -178,12 +158,7 @@
* @title types of arguments - reference, long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_long.d.T_rem_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long.d.T_rem_long_6", VerifyError.class);
}
/**
@@ -192,11 +167,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_long.d.T_rem_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long.d.T_rem_long_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_long_2addr/Test_rem_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_long_2addr/Test_rem_long_2addr.java
index 16f38a6..6919e22 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rem_long_2addr/Test_rem_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rem_long_2addr/Test_rem_long_2addr.java
@@ -123,13 +123,8 @@
* @title Divisor is 0
*/
public void testE1() {
- T_rem_long_2addr_1 t = new T_rem_long_2addr_1();
- try {
- t.run(1234567890123l, 0l);
- fail("expected ArithmeticException");
- } catch (ArithmeticException ae) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_1",
+ ArithmeticException.class, 1234567890123l, 0l);
}
/**
@@ -137,12 +132,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_2", VerifyError.class);
}
@@ -152,12 +142,7 @@
* @title (types of arguments - int, long).
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_4", VerifyError.class);
}
/**
@@ -165,12 +150,7 @@
* @title types of arguments - long, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_5", VerifyError.class);
}
/**
@@ -178,12 +158,7 @@
* @title types of arguments - reference, long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_6", VerifyError.class);
}
/**
@@ -192,12 +167,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rem_long_2addr.d.T_rem_long_2addr_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/return_object/Test_return_object.java b/tools/vm-tests-tf/src/dot/junit/opcodes/return_object/Test_return_object.java
index 9336829..9f0e639 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/return_object/Test_return_object.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/return_object/Test_return_object.java
@@ -88,13 +88,8 @@
* @title Method is synchronized but thread is not monitor owner
*/
public void testE1() {
- T_return_object_8 t = new T_return_object_8();
- try {
- assertTrue(t.run());
- fail("expected IllegalMonitorStateException");
- } catch (IllegalMonitorStateException imse) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.return_object.d.T_return_object_8",
+ IllegalMonitorStateException.class);
}
@@ -103,12 +98,7 @@
* @title method's return type - void
*/
public void testVFE1() {
- try {
- Class.forName("dxc.junit.opcodes.return_object.jm.T_return_object_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_object.d.T_return_object_3", VerifyError.class);
}
/**
@@ -116,12 +106,7 @@
* @title method's return type - float
*/
public void testVFE2() {
- try {
- Class.forName("dxc.junit.opcodes.return_object.jm.T_return_object_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_object.d.T_return_object_4", VerifyError.class);
}
/**
@@ -129,12 +114,7 @@
* @title method's return type - long
*/
public void testVFE3() {
- try {
- Class.forName("dxc.junit.opcodes.return_object.jm.T_return_object_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_object.d.T_return_object_16", VerifyError.class);
}
/**
@@ -142,12 +122,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dxc.junit.opcodes.return_object.jm.T_return_object_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_object.d.T_return_object_5", VerifyError.class);
}
@@ -156,12 +131,7 @@
* @title types of argument - int
*/
public void testVFE6() {
- try {
- Class.forName("dxc.junit.opcodes.return_object.jm.T_return_object_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_object.d.T_return_object_10", VerifyError.class);
}
/**
@@ -169,12 +139,7 @@
* @title types of argument - long
*/
public void testVFE7() {
- try {
- Class.forName("dxc.junit.opcodes.return_object.jm.T_return_object_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_object.d.T_return_object_11", VerifyError.class);
}
/**
@@ -186,12 +151,7 @@
//@uses dot.junit.opcodes.return_object.d.TChild
//@uses dot.junit.opcodes.return_object.d.TSuper
//@uses dot.junit.opcodes.return_object.d.TInterface
- try {
- Class.forName("dxc.junit.opcodes.return_object.jm.T_return_object_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_object.d.T_return_object_14", VerifyError.class);
}
/**
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/return_void/Test_return_void.java b/tools/vm-tests-tf/src/dot/junit/opcodes/return_void/Test_return_void.java
index e5903e3..634ec7a 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/return_void/Test_return_void.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/return_void/Test_return_void.java
@@ -30,33 +30,20 @@
assertEquals(123456, t.run());
}
-
/**
* @title Method is synchronized but thread is not monitor owner
*/
public void testE1() {
- T_return_void_3 t = new T_return_void_3();
- try {
- assertTrue(t.run());
- fail("expected IllegalMonitorStateException");
- } catch (IllegalMonitorStateException imse) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.return_void.d.T_return_void_3",
+ IllegalMonitorStateException.class);
}
-
-
/**
* @constraint B11
* @title method's return type - int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.return_void.d.T_return_void_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_void.d.T_return_void_5", VerifyError.class);
}
/**
@@ -64,12 +51,7 @@
* @title method's return type - reference
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.return_void.d.T_return_void_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_void.d.T_return_void_6", VerifyError.class);
}
/**
@@ -77,12 +59,7 @@
* @title method's return type - wide
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.return_void.d.T_return_void_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_void.d.T_return_void_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/return_wide/Test_return_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/return_wide/Test_return_wide.java
index c97f0d2..e8afde0 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/return_wide/Test_return_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/return_wide/Test_return_wide.java
@@ -34,13 +34,8 @@
* @title Method is synchronized but thread is not monitor owner
*/
public void testE1() {
- T_return_wide_3 t = new T_return_wide_3();
- try {
- assertTrue(t.run());
- fail("expected IllegalMonitorStateException");
- } catch (IllegalMonitorStateException imse) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.return_wide.d.T_return_wide_3",
+ IllegalMonitorStateException.class);
}
@@ -49,12 +44,7 @@
* @title method's return type - int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.return_wide.d.T_return_wide_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_wide.d.T_return_wide_5", VerifyError.class);
}
/**
@@ -62,12 +52,7 @@
* @title method's return type - reference
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.return_wide.d.T_return_wide_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_wide.d.T_return_wide_6", VerifyError.class);
}
/**
@@ -75,12 +60,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.return_wide.d.T_return_wide_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_wide.d.T_return_wide_7", VerifyError.class);
}
/**
@@ -88,12 +68,7 @@
* @title return-wide on single-width register
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.return_wide.d.T_return_wide_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.return_wide.d.T_return_wide_8", VerifyError.class);
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rsub_int/Test_rsub_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rsub_int/Test_rsub_int.java
index 334d79f..ae25759 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rsub_int/Test_rsub_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rsub_int/Test_rsub_int.java
@@ -192,12 +192,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int.d.T_rsub_int_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int.d.T_rsub_int_8", VerifyError.class);
}
@@ -207,12 +202,7 @@
* @title types of arguments - double, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int.d.T_rsub_int_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int.d.T_rsub_int_9", VerifyError.class);
}
/**
@@ -220,12 +210,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int.d.T_rsub_int_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int.d.T_rsub_int_10", VerifyError.class);
}
/**
@@ -233,12 +218,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int.d.T_rsub_int_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int.d.T_rsub_int_11", VerifyError.class);
}
/**
@@ -247,11 +227,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int.d.T_rsub_int_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int.d.T_rsub_int_12", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/rsub_int_lit8/Test_rsub_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/rsub_int_lit8/Test_rsub_int_lit8.java
index 1f4b602..4c38f79 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/rsub_int_lit8/Test_rsub_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/rsub_int_lit8/Test_rsub_int_lit8.java
@@ -192,12 +192,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_8", VerifyError.class);
}
@@ -207,12 +202,7 @@
* @title types of arguments - double, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_9", VerifyError.class);
}
/**
@@ -220,12 +210,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_10", VerifyError.class);
}
/**
@@ -233,12 +218,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_11", VerifyError.class);
}
/**
@@ -247,11 +227,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.rsub_int_lit8.d.T_rsub_int_lit8_12", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sget/Test_sget.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sget/Test_sget.java
index 981b19a..f45f7e6 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sget/Test_sget.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sget/Test_sget.java
@@ -62,26 +62,14 @@
* @title attempt to access non-static field
*/
public void testE1() {
- T_sget_5 t = new T_sget_5();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget.d.T_sget_5", IncompatibleClassChangeError.class);
}
/**
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sget_9 t = new T_sget_9();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget.d.T_sget_9", ExceptionInInitializerError.class);
}
/**
@@ -89,12 +77,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget.d.T_sget_4", VerifyError.class);
}
/**
@@ -103,12 +86,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget.d.T_sget_3", VerifyError.class);
}
/**
@@ -118,11 +96,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_sget_13().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget.d.T_sget_13", NoSuchFieldError.class);
}
/**
@@ -130,13 +104,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.sget.d.T_sget_6
//@uses dot.junit.opcodes.sget.TestStubs
- try {
- new T_sget_6().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget.d.T_sget_6", IllegalAccessError.class);
}
/**
@@ -144,11 +113,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_sget_7().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget.d.T_sget_7", NoClassDefFoundError.class);
}
/**
@@ -156,11 +121,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_sget_8().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget.d.T_sget_8", NoSuchFieldError.class);
}
/**
@@ -168,13 +129,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.sget.d.T_sget_12
//@uses dot.junit.opcodes.sget.d.T_sget_1
- try {
- new T_sget_12().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget.d.T_sget_12", IllegalAccessError.class);
}
/**
@@ -182,12 +138,7 @@
* @title sget shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget.d.T_sget_14", VerifyError.class);
}
/**
@@ -196,12 +147,7 @@
* @title sget shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget.d.T_sget_15", VerifyError.class);
}
/**
@@ -210,12 +156,7 @@
* @title sget shall not work for boolean fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget.d.T_sget_16", VerifyError.class);
}
/**
@@ -224,12 +165,7 @@
* @title sget shall not work for char fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget.d.T_sget_17", VerifyError.class);
}
/**
@@ -238,12 +174,7 @@
* @title sget shall not work for byte fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget.d.T_sget_18", VerifyError.class);
}
/**
@@ -252,12 +183,7 @@
* @title sget shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget.d.T_sget_19", VerifyError.class);
}
/**
@@ -266,11 +192,6 @@
* @title sget shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sget.d.T_sget_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget.d.T_sget_20", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_boolean/Test_sget_boolean.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_boolean/Test_sget_boolean.java
index ccbeb09..855c8fd 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_boolean/Test_sget_boolean.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_boolean/Test_sget_boolean.java
@@ -54,42 +54,24 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
- T_sget_boolean_5 t = new T_sget_boolean_5();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_5",
+ IncompatibleClassChangeError.class);
}
/**
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sget_boolean_9 t = new T_sget_boolean_9();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_9",
+ ExceptionInInitializerError.class);
}
-
-
/**
* @constraint A12
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_4", VerifyError.class);
}
/**
@@ -98,12 +80,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_3", VerifyError.class);
}
/**
@@ -113,11 +90,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_sget_boolean_13().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_13", NoSuchFieldError.class);
}
/**
@@ -125,12 +98,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.sget_boolean.d.T_sget_boolean_6
//@uses dot.junit.opcodes.sget_boolean.TestStubs
- try {
- new T_sget_boolean_6().run();
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_6", IllegalAccessError.class);
}
/**
@@ -138,11 +107,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_sget_boolean_7().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_7", NoClassDefFoundError.class);
}
/**
@@ -150,11 +115,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_sget_boolean_8().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_8", NoSuchFieldError.class);
}
/**
@@ -162,13 +123,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.sget_boolean.d.T_sget_boolean_12
//@uses dot.junit.opcodes.sget_boolean.d.T_sget_boolean_1
- try {
- new T_sget_boolean_12().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_12", IllegalAccessError.class);
}
/**
@@ -176,12 +132,7 @@
* @title sget_boolean shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_14", VerifyError.class);
}
/**
@@ -190,12 +141,7 @@
* @title sget_boolean shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_15", VerifyError.class);
}
/**
@@ -204,12 +150,7 @@
* @title sget_boolean shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_16", VerifyError.class);
}
/**
@@ -218,12 +159,7 @@
* @title sget_boolean shall not work for char fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_17", VerifyError.class);
}
/**
@@ -232,12 +168,7 @@
* @title sget_boolean shall not work for byte fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_18", VerifyError.class);
}
/**
@@ -246,12 +177,7 @@
* @title sget_boolean shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_19", VerifyError.class);
}
/**
@@ -260,11 +186,6 @@
* @title sget_boolean shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_boolean.d.T_sget_boolean_20", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_byte/Test_sget_byte.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_byte/Test_sget_byte.java
index 9a19f98..9cf4306 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_byte/Test_sget_byte.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_byte/Test_sget_byte.java
@@ -54,27 +54,16 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
- T_sget_byte_5 t = new T_sget_byte_5();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_byte.d.T_sget_byte_5",
+ IncompatibleClassChangeError.class);
}
/**
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sget_byte_9 t = new T_sget_byte_9();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_byte.d.T_sget_byte_9",
+ ExceptionInInitializerError.class);
}
@@ -84,12 +73,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_byte.d.T_sget_byte_4", VerifyError.class);
}
/**
@@ -98,12 +82,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_byte.d.T_sget_byte_3", VerifyError.class);
}
/**
@@ -113,11 +92,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_sget_byte_13().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_byte.d.T_sget_byte_13", NoSuchFieldError.class);
}
/**
@@ -125,13 +100,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.sget_byte.d.T_sget_byte_6
//@uses dot.junit.opcodes.sget_byte.TestStubs
- try {
- new T_sget_byte_6().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_byte.d.T_sget_byte_6", IllegalAccessError.class);
}
/**
@@ -139,11 +109,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_sget_byte_7().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_byte.d.T_sget_byte_7", NoClassDefFoundError.class);
}
/**
@@ -151,11 +117,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_sget_byte_8().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_byte.d.T_sget_byte_8", NoSuchFieldError.class);
}
/**
@@ -163,13 +125,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.sget_byte.d.T_sget_byte_12
//@uses dot.junit.opcodes.sget_byte.d.T_sget_byte_1
- try {
- new T_sget_byte_12().run();
- fail("expected a verification exception");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_byte.d.T_sget_byte_12", IllegalAccessError.class);
}
/**
@@ -177,12 +134,7 @@
* @title sget_byte shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_byte.d.T_sget_byte_14", VerifyError.class);
}
/**
@@ -191,12 +143,7 @@
* @title sget_byte shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_byte.d.T_sget_byte_15", VerifyError.class);
}
/**
@@ -205,12 +152,7 @@
* @title sget_byte shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_byte.d.T_sget_byte_16", VerifyError.class);
}
/**
@@ -219,12 +161,7 @@
* @title sget_byte shall not work for char fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_byte.d.T_sget_byte_17", VerifyError.class);
}
/**
@@ -233,12 +170,7 @@
* @title sget_byte shall not work for boolean fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_byte.d.T_sget_byte_18", VerifyError.class);
}
/**
@@ -247,12 +179,7 @@
* @title sget_byte shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_byte.d.T_sget_byte_19", VerifyError.class);
}
/**
@@ -261,11 +188,6 @@
* @title sget_byte shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sget_byte.d.T_sget_byte_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_byte.d.T_sget_byte_20", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_char/Test_sget_char.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_char/Test_sget_char.java
index 10324a5..babc8f9 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_char/Test_sget_char.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_char/Test_sget_char.java
@@ -54,27 +54,16 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
- T_sget_char_5 t = new T_sget_char_5();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_char.d.T_sget_char_5",
+ IncompatibleClassChangeError.class);
}
/**
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sget_char_9 t = new T_sget_char_9();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_char.d.T_sget_char_9",
+ ExceptionInInitializerError.class);
}
@@ -84,12 +73,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_char.d.T_sget_char_4", VerifyError.class);
}
/**
@@ -98,12 +82,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_char.d.T_sget_char_3", VerifyError.class);
}
/**
@@ -113,11 +92,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_sget_char_13().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_char.d.T_sget_char_13", NoSuchFieldError.class);
}
/**
@@ -125,13 +100,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.sget_char.d.T_sget_char_6
//@uses dot.junit.opcodes.sget_char.TestStubs
- try {
- new T_sget_char_6().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_char.d.T_sget_char_6", IllegalAccessError.class);
}
/**
@@ -139,11 +109,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_sget_char_7().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_char.d.T_sget_char_7", NoClassDefFoundError.class);
}
/**
@@ -151,11 +117,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_sget_char_8().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_char.d.T_sget_char_8", NoSuchFieldError.class);
}
/**
@@ -163,13 +125,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.sget_char.d.T_sget_char_12
//@uses dot.junit.opcodes.sget_char.d.T_sget_char_1
- try {
- new T_sget_char_12().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_char.d.T_sget_char_12", IllegalAccessError.class);
}
/**
@@ -177,12 +134,7 @@
* @title sget_char shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_char.d.T_sget_char_14", VerifyError.class);
}
/**
@@ -191,12 +143,7 @@
* @title sget_char shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_char.d.T_sget_char_15", VerifyError.class);
}
/**
@@ -205,12 +152,7 @@
* @title sget_char shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_char.d.T_sget_char_16", VerifyError.class);
}
/**
@@ -219,12 +161,7 @@
* @title sget_char shall not work for byte fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_char.d.T_sget_char_17", VerifyError.class);
}
/**
@@ -233,12 +170,7 @@
* @title sget_char shall not work for boolean fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_char.d.T_sget_char_18", VerifyError.class);
}
/**
@@ -247,12 +179,7 @@
* @title sget_char shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_char.d.T_sget_char_19", VerifyError.class);
}
/**
@@ -261,11 +188,6 @@
* @title sget_char shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sget_char.d.T_sget_char_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_char.d.T_sget_char_20", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_object/Test_sget_object.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_object/Test_sget_object.java
index 88aa4cb..db118e5 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_object/Test_sget_object.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_object/Test_sget_object.java
@@ -55,27 +55,16 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
- T_sget_object_5 t = new T_sget_object_5();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_object.d.T_sget_object_5",
+ IncompatibleClassChangeError.class);
}
/**
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sget_object_9 t = new T_sget_object_9();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_object.d.T_sget_object_9",
+ ExceptionInInitializerError.class);
}
@@ -85,12 +74,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_object.d.T_sget_object_4", VerifyError.class);
}
/**
@@ -99,12 +83,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_object.d.T_sget_object_3", VerifyError.class);
}
/**
@@ -114,11 +93,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_sget_object_13().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_object.d.T_sget_object_13", NoSuchFieldError.class);
}
/**
@@ -126,13 +101,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.sget_object.d.T_sget_object_6
//@uses dot.junit.opcodes.sget_object.TestStubs
- try {
- new T_sget_object_6().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_object.d.T_sget_object_6", IllegalAccessError.class);
}
/**
@@ -140,11 +110,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_sget_object_7().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_object.d.T_sget_object_7", NoClassDefFoundError.class);
}
/**
@@ -152,11 +118,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_sget_object_8().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_object.d.T_sget_object_8", NoSuchFieldError.class);
}
/**
@@ -164,13 +126,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.sget_object.d.T_sget_object_12
//@uses dot.junit.opcodes.sget_object.d.T_sget_object_1
- try {
- new T_sget_object_12().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_object.d.T_sget_object_12", IllegalAccessError.class);
}
/**
@@ -178,12 +135,7 @@
* @title sget_object shall not work for short fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_object.d.T_sget_object_14", VerifyError.class);
}
/**
@@ -192,12 +144,7 @@
* @title sget_object shall not work for char fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_object.d.T_sget_object_15", VerifyError.class);
}
/**
@@ -206,12 +153,7 @@
* @title sget_object shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_object.d.T_sget_object_16", VerifyError.class);
}
/**
@@ -220,12 +162,7 @@
* @title sget_object shall not work for byte fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_object.d.T_sget_object_17", VerifyError.class);
}
/**
@@ -234,12 +171,7 @@
* @title sget_object shall not work for boolean fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_object.d.T_sget_object_18", VerifyError.class);
}
/**
@@ -248,12 +180,7 @@
* @title sget_object shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_object.d.T_sget_object_19", VerifyError.class);
}
/**
@@ -262,12 +189,7 @@
* @title sget_object shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sget_object.d.T_sget_object_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_object.d.T_sget_object_20", VerifyError.class);
}
/**
@@ -276,10 +198,6 @@
* @title only field of different type exists)
*/
public void testVFE15() {
- try {
- new T_sget_object_21().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_object.d.T_sget_object_21", NoSuchFieldError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_short/Test_sget_short.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_short/Test_sget_short.java
index b38ef29..fa7c3c4 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_short/Test_sget_short.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_short/Test_sget_short.java
@@ -54,27 +54,16 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
- T_sget_short_5 t = new T_sget_short_5();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_short.d.T_sget_short_5",
+ IncompatibleClassChangeError.class);
}
/**
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sget_short_9 t = new T_sget_short_9();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_short.d.T_sget_short_9",
+ ExceptionInInitializerError.class);
}
@@ -84,12 +73,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_short.d.T_sget_short_4", VerifyError.class);
}
/**
@@ -98,12 +82,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_short.d.T_sget_short_3", VerifyError.class);
}
/**
@@ -113,11 +92,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_sget_short_13().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_short.d.T_sget_short_13", NoSuchFieldError.class);
}
/**
@@ -125,13 +100,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.sget_short.d.T_sget_short_6
//@uses dot.junit.opcodes.sget_short.TestStubs
- try {
- new T_sget_short_6().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_short.d.T_sget_short_6", IllegalAccessError.class);
}
/**
@@ -139,11 +109,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_sget_short_7().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_short.d.T_sget_short_7", NoClassDefFoundError.class);
}
/**
@@ -151,11 +117,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_sget_short_8().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_short.d.T_sget_short_8", NoSuchFieldError.class);
}
/**
@@ -163,13 +125,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.sget_short.d.T_sget_short_12
//@uses dot.junit.opcodes.sget_short.d.T_sget_short_1
- try {
- new T_sget_short_12().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_short.d.T_sget_short_12", IllegalAccessError.class);
}
/**
@@ -177,12 +134,7 @@
* @title sget_short shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_short.d.T_sget_short_14", VerifyError.class);
}
/**
@@ -191,12 +143,7 @@
* @title sget_short shall not work for char fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_short.d.T_sget_short_15", VerifyError.class);
}
/**
@@ -205,12 +152,7 @@
* @title sget_short shall not work for int fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_short.d.T_sget_short_16", VerifyError.class);
}
/**
@@ -219,12 +161,7 @@
* @title sget_short shall not work for byte fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_short.d.T_sget_short_17", VerifyError.class);
}
/**
@@ -233,12 +170,7 @@
* @title sget_short shall not work for boolean fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_short.d.T_sget_short_18", VerifyError.class);
}
/**
@@ -247,12 +179,7 @@
* @title sget_short shall not work for double fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_short.d.T_sget_short_19", VerifyError.class);
}
/**
@@ -261,11 +188,6 @@
* @title sget_short shall not work for long fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sget_short.d.T_sget_short_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_short.d.T_sget_short_20", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_wide/Test_sget_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_wide/Test_sget_wide.java
index 8ecbeb7..bcf7497 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sget_wide/Test_sget_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sget_wide/Test_sget_wide.java
@@ -62,28 +62,16 @@
* @title attempt to access non-static field
*/
public void testE1() {
-
- T_sget_wide_5 t = new T_sget_wide_5();
- try {
- t.run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_wide.d.T_sget_wide_5",
+ IncompatibleClassChangeError.class);
}
/**
* @title initialization of referenced class throws exception
*/
public void testE6() {
-
- T_sget_wide_9 t = new T_sget_wide_9();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sget_wide.d.T_sget_wide_9",
+ ExceptionInInitializerError.class);
}
@@ -93,12 +81,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_wide.d.T_sget_wide_4", VerifyError.class);
}
/**
@@ -107,12 +90,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_wide.d.T_sget_wide_3", VerifyError.class);
}
/**
@@ -122,11 +100,7 @@
* different type exists
*/
public void testVFE3() {
- try {
- new T_sget_wide_13().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_wide.d.T_sget_wide_13", NoSuchFieldError.class);
}
/**
@@ -134,13 +108,8 @@
* @title Attempt to read inaccessible field.
*/
public void testVFE4() {
- //@uses dot.junit.opcodes.sget_wide.d.T_sget_wide_6
//@uses dot.junit.opcodes.sget_wide.TestStubs
- try {
- new T_sget_wide_6().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_wide.d.T_sget_wide_6", IllegalAccessError.class);
}
/**
@@ -148,11 +117,7 @@
* @title Attempt to read field of undefined class.
*/
public void testVFE5() {
- try {
- new T_sget_wide_7().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_wide.d.T_sget_wide_7", NoClassDefFoundError.class);
}
/**
@@ -160,11 +125,7 @@
* @title Attempt to read undefined field.
*/
public void testVFE6() {
- try {
- new T_sget_wide_8().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_wide.d.T_sget_wide_8", NoSuchFieldError.class);
}
/**
@@ -172,13 +133,8 @@
* @title Attempt to read superclass' private field from subclass.
*/
public void testVFE7() {
- //@uses dot.junit.opcodes.sget_wide.d.T_sget_wide_12
//@uses dot.junit.opcodes.sget_wide.d.T_sget_wide_1
- try {
- new T_sget_wide_12().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sget_wide.d.T_sget_wide_12", IllegalAccessError.class);
}
/**
@@ -186,12 +142,7 @@
* @title sget-wide shall not work for reference fields
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_wide.d.T_sget_wide_14", VerifyError.class);
}
/**
@@ -200,12 +151,7 @@
* @title sget-wide shall not work for short fields
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_15");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_wide.d.T_sget_wide_15", VerifyError.class);
}
/**
@@ -214,12 +160,7 @@
* @title sget-wide shall not work for boolean fields
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_16");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_wide.d.T_sget_wide_16", VerifyError.class);
}
/**
@@ -228,12 +169,7 @@
* @title sget-wide shall not work for char fields
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_17");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_wide.d.T_sget_wide_17", VerifyError.class);
}
/**
@@ -242,12 +178,7 @@
* @title sget-wide shall not work for byte fields
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_wide.d.T_sget_wide_18", VerifyError.class);
}
/**
@@ -256,12 +187,7 @@
* @title sget-wide shall not work for float fields
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_19");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_wide.d.T_sget_wide_19", VerifyError.class);
}
/**
@@ -270,11 +196,6 @@
* @title sget-wide shall not work for int fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sget_wide.d.T_sget_wide_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sget_wide.d.T_sget_wide_20", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int/Test_shl_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int/Test_shl_int.java
index 55b7cb9..07b0ba9 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int/Test_shl_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int/Test_shl_int.java
@@ -85,12 +85,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shl_int.d.T_shl_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int.d.T_shl_int_2", VerifyError.class);
}
@@ -100,12 +95,7 @@
* @title types of arguments - double & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shl_int.d.T_shl_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int.d.T_shl_int_3", VerifyError.class);
}
/**
@@ -113,12 +103,7 @@
* @title types of arguments - long & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shl_int.d.T_shl_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int.d.T_shl_int_4", VerifyError.class);
}
/**
@@ -126,12 +111,7 @@
* @title types of arguments - reference & int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shl_int.d.T_shl_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int.d.T_shl_int_5", VerifyError.class);
}
/**
@@ -140,12 +120,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shl_int.d.T_shl_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int.d.T_shl_int_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int_2addr/Test_shl_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int_2addr/Test_shl_int_2addr.java
index f44959a..ff46973 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int_2addr/Test_shl_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int_2addr/Test_shl_int_2addr.java
@@ -85,12 +85,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_2", VerifyError.class);
}
@@ -100,12 +95,7 @@
* @title types of arguments - double & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_3", VerifyError.class);
}
/**
@@ -113,12 +103,7 @@
* @title types of arguments - long & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_4", VerifyError.class);
}
/**
@@ -126,12 +111,7 @@
* @title types of arguments - reference & int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_5", VerifyError.class);
}
/**
@@ -140,12 +120,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_2addr.d.T_shl_int_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int_lit8/Test_shl_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int_lit8/Test_shl_int_lit8.java
index 47e10bb..5cfcdc8 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int_lit8/Test_shl_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_int_lit8/Test_shl_int_lit8.java
@@ -90,12 +90,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_7", VerifyError.class);
}
@@ -105,12 +100,7 @@
* @title types of arguments - double & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_8", VerifyError.class);
}
/**
@@ -118,12 +108,7 @@
* @title types of arguments - long & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_9", VerifyError.class);
}
/**
@@ -131,12 +116,7 @@
* @title types of arguments - reference & int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_10", VerifyError.class);
}
/**
@@ -145,11 +125,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_int_lit8.d.T_shl_int_lit8_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_long/Test_shl_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_long/Test_shl_long.java
index 7e29009..d51b29b 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_long/Test_shl_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_long/Test_shl_long.java
@@ -86,12 +86,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shl_long.d.T_shl_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long.d.T_shl_long_2", VerifyError.class);
}
@@ -101,12 +96,7 @@
* @title types of arguments - long & double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shl_long.d.T_shl_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long.d.T_shl_long_3", VerifyError.class);
}
/**
@@ -114,12 +104,7 @@
* @title types of arguments - int & int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shl_long.d.T_shl_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long.d.T_shl_long_4", VerifyError.class);
}
/**
@@ -127,12 +112,7 @@
* @title types of arguments - float & int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shl_long.d.T_shl_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long.d.T_shl_long_5", VerifyError.class);
}
/**
@@ -140,12 +120,7 @@
* @title types of arguments - reference & int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shl_long.d.T_shl_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long.d.T_shl_long_6", VerifyError.class);
}
/**
@@ -154,12 +129,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.shl_long.d.T_shl_long_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long.d.T_shl_long_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_long_2addr/Test_shl_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_long_2addr/Test_shl_long_2addr.java
index 0dbe218..b065c35 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shl_long_2addr/Test_shl_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shl_long_2addr/Test_shl_long_2addr.java
@@ -86,12 +86,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_2", VerifyError.class);
}
@@ -101,12 +96,7 @@
* @title types of arguments - long, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_3", VerifyError.class);
}
/**
@@ -114,12 +104,7 @@
* @title types of arguments - int, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_4", VerifyError.class);
}
/**
@@ -127,12 +112,7 @@
* @title types of arguments - float, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_5", VerifyError.class);
}
/**
@@ -140,12 +120,7 @@
* @title types of arguments - reference, int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_6", VerifyError.class);
}
/**
@@ -154,12 +129,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shl_long_2addr.d.T_shl_long_2addr_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int/Test_shr_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int/Test_shr_int.java
index f7f1ae8..1f056e3 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int/Test_shr_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int/Test_shr_int.java
@@ -86,12 +86,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shr_int.d.T_shr_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int.d.T_shr_int_2", VerifyError.class);
}
@@ -101,12 +96,7 @@
* @title types of arguments - double, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shr_int.d.T_shr_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int.d.T_shr_int_3", VerifyError.class);
}
/**
@@ -114,12 +104,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shr_int.d.T_shr_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int.d.T_shr_int_4", VerifyError.class);
}
/**
@@ -127,12 +112,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shr_int.d.T_shr_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int.d.T_shr_int_5", VerifyError.class);
}
/**
@@ -141,12 +121,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shr_int.d.T_shr_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int.d.T_shr_int_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int_2addr/Test_shr_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int_2addr/Test_shr_int_2addr.java
index 5b31961..2ace377 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int_2addr/Test_shr_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int_2addr/Test_shr_int_2addr.java
@@ -86,12 +86,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_2", VerifyError.class);
}
@@ -101,12 +96,7 @@
* @title types of arguments - double, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_3", VerifyError.class);
}
/**
@@ -114,12 +104,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_4", VerifyError.class);
}
/**
@@ -127,12 +112,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_5", VerifyError.class);
}
/**
@@ -141,12 +121,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_2addr.d.T_shr_int_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int_lit8/Test_shr_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int_lit8/Test_shr_int_lit8.java
index 3c86bbb..cb90cbe 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int_lit8/Test_shr_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_int_lit8/Test_shr_int_lit8.java
@@ -89,12 +89,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_7", VerifyError.class);
}
@@ -104,12 +99,7 @@
* @title types of arguments - double, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_8", VerifyError.class);
}
/**
@@ -117,12 +107,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_9", VerifyError.class);
}
/**
@@ -130,12 +115,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_10", VerifyError.class);
}
/**
@@ -144,11 +124,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_int_lit8.d.T_shr_int_lit8_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_long/Test_shr_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_long/Test_shr_long.java
index 42afd24..b6c5fc3 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_long/Test_shr_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_long/Test_shr_long.java
@@ -86,12 +86,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shr_long.d.T_shr_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long.d.T_shr_long_2", VerifyError.class);
}
@@ -101,12 +96,7 @@
* @title types of arguments - long, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shr_long.d.T_shr_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long.d.T_shr_long_3", VerifyError.class);
}
/**
@@ -114,12 +104,7 @@
* @title types of arguments - int, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shr_long.d.T_shr_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long.d.T_shr_long_4", VerifyError.class);
}
/**
@@ -127,12 +112,7 @@
* @title types of arguments - float, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shr_long.d.T_shr_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long.d.T_shr_long_5", VerifyError.class);
}
/**
@@ -140,12 +120,7 @@
* @title types of arguments - reference, int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shr_long.d.T_shr_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long.d.T_shr_long_6", VerifyError.class);
}
/**
@@ -154,11 +129,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.shr_long.d.T_shr_long_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long.d.T_shr_long_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_long_2addr/Test_shr_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_long_2addr/Test_shr_long_2addr.java
index bb3c2ad..74548cf 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/shr_long_2addr/Test_shr_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/shr_long_2addr/Test_shr_long_2addr.java
@@ -86,12 +86,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_2", VerifyError.class);
}
@@ -101,12 +96,7 @@
* @title types of arguments - long, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_3", VerifyError.class);
}
/**
@@ -114,12 +104,7 @@
* @title types of arguments - int, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_4", VerifyError.class);
}
/**
@@ -127,12 +112,7 @@
* @title types of arguments - float, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_5", VerifyError.class);
}
/**
@@ -140,12 +120,7 @@
* @title types of arguments - reference, int
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_6", VerifyError.class);
}
/**
@@ -154,12 +129,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.shr_long_2addr.d.T_shr_long_2addr_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sparse_switch/Test_sparse_switch.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sparse_switch/Test_sparse_switch.java
index 7579dae..6ed7986 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sparse_switch/Test_sparse_switch.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sparse_switch/Test_sparse_switch.java
@@ -69,12 +69,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_3", VerifyError.class);
}
@@ -84,12 +79,7 @@
* @title type of argument - double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_4", VerifyError.class);
}
/**
@@ -97,12 +87,7 @@
* @title type of argument - long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_5", VerifyError.class);
}
/**
@@ -110,12 +95,7 @@
* @title type of argument - reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_6", VerifyError.class);
}
/**
@@ -123,12 +103,7 @@
* @title branch target shall be inside the method
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_7", VerifyError.class);
}
/**
@@ -136,12 +111,7 @@
* @title branch target shall not be "inside" instruction
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_8", VerifyError.class);
}
/**
@@ -149,12 +119,7 @@
* @title offset to table shall be inside method
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_9");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_9", VerifyError.class);
}
/**
@@ -163,12 +128,7 @@
* and floats are not used interchangeably.
*/
public void testVFE8() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_2", VerifyError.class);
}
/**
@@ -176,12 +136,7 @@
* @title pairs shall be sorted in ascending order
*/
public void testVFE9() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_11", VerifyError.class);
}
/**
@@ -189,12 +144,7 @@
* @title number of entries in jump table
*/
public void testVFE10() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_12", VerifyError.class);
}
/**
@@ -202,12 +152,7 @@
* @title sparse-switch-data pseudo-instructions must not be reachable by control flow
*/
public void testVFE11() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_13", VerifyError.class);
}
/**
@@ -215,11 +160,6 @@
* @title table has wrong ident code
*/
public void testVFE12() {
- try {
- Class.forName("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sparse_switch.d.T_sparse_switch_14", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sput/Test_sput.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sput/Test_sput.java
index 0c432f3..7f27ae9 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sput/Test_sput.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sput/Test_sput.java
@@ -84,13 +84,7 @@
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sput_13 t = new T_sput_13();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sput.d.T_sput_13", ExceptionInInitializerError.class);
}
/**
@@ -98,12 +92,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_3", VerifyError.class);
}
/**
@@ -112,12 +101,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_4", VerifyError.class);
}
@@ -128,11 +112,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_sput_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput.d.T_sput_17", NoSuchFieldError.class);
}
/**
@@ -141,12 +121,7 @@
* and floats are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_5", VerifyError.class);
}
/**
@@ -156,12 +131,7 @@
* with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_18", VerifyError.class);
}
/**
@@ -170,11 +140,7 @@
* @title Attempt to set non-static field.
*/
public void testVFE8() {
- try {
- new T_sput_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput.d.T_sput_7", IncompatibleClassChangeError.class);
}
/**
@@ -183,12 +149,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput.TestStubs
- //@uses dot.junit.opcodes.sput.d.T_sput_8
- try {
- new T_sput_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput.d.T_sput_8", IllegalAccessError.class);
}
/**
@@ -196,11 +157,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_sput_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput.d.T_sput_9", NoClassDefFoundError.class);
}
/**
@@ -208,11 +165,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_sput_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput.d.T_sput_10", NoSuchFieldError.class);
}
@@ -223,12 +176,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput.d.T_sput_1
- //@uses dot.junit.opcodes.sput.d.T_sput_15
- try {
- new T_sput_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput.d.T_sput_15", IllegalAccessError.class);
}
@@ -237,12 +185,7 @@
* @title sput shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_2", VerifyError.class);
}
/**
@@ -251,12 +194,7 @@
* @title sput shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_20", VerifyError.class);
}
/**
@@ -265,12 +203,7 @@
* @title sput shall not work for short fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_21", VerifyError.class);
}
/**
@@ -279,12 +212,7 @@
* @title sput shall not work for boolean fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_22", VerifyError.class);
}
/**
@@ -293,12 +221,7 @@
* @title sput shall not work for char fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_23", VerifyError.class);
}
/**
@@ -307,12 +230,7 @@
* @title sput shall not work for byte fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.sput.d.T_sput_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput.d.T_sput_24", VerifyError.class);
}
/**
@@ -321,12 +239,7 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.sput.TestStubs
- //@uses dot.junit.opcodes.sput.d.T_sput_11
- try {
- new T_sput_11().run();
- fail("expected a verification exception");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput.d.T_sput_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_boolean/Test_sput_boolean.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_boolean/Test_sput_boolean.java
index 1b8d96c..aae04aa 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_boolean/Test_sput_boolean.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_boolean/Test_sput_boolean.java
@@ -71,13 +71,8 @@
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sput_boolean_13 t = new T_sput_boolean_13();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_13",
+ ExceptionInInitializerError.class);
}
/**
@@ -85,12 +80,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_3", VerifyError.class);
}
/**
@@ -99,12 +89,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_4", VerifyError.class);
}
@@ -115,11 +100,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_sput_boolean_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_17", NoSuchFieldError.class);
}
/**
@@ -129,12 +110,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_18", VerifyError.class);
}
/**
@@ -143,11 +119,8 @@
* @title Attempt to set non-static field.
*/
public void testVFE8() {
- try {
- new T_sput_boolean_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -156,12 +129,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_boolean.TestStubs
- //@uses dot.junit.opcodes.sput_boolean.d.T_sput_boolean_8
- try {
- new T_sput_boolean_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_8", IllegalAccessError.class);
}
/**
@@ -169,11 +137,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_sput_boolean_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_9", NoClassDefFoundError.class);
}
/**
@@ -181,11 +145,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_sput_boolean_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_10", NoSuchFieldError.class);
}
@@ -196,12 +156,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_boolean.d.T_sput_boolean_1
- //@uses dot.junit.opcodes.sput_boolean.d.T_sput_boolean_15
- try {
- new T_sput_boolean_15().run();
- fail("expected a verification exception");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_15", IllegalAccessError.class);
}
@@ -210,12 +165,7 @@
* @title sput_boolean shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_2", VerifyError.class);
}
/**
@@ -224,12 +174,7 @@
* @title sput_boolean shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_20", VerifyError.class);
}
/**
@@ -238,12 +183,7 @@
* @title sput_boolean shall not work for short fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_21", VerifyError.class);
}
/**
@@ -252,12 +192,7 @@
* @title sput_boolean shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_22", VerifyError.class);
}
/**
@@ -266,12 +201,7 @@
* @title sput_boolean shall not work for char fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_23", VerifyError.class);
}
/**
@@ -280,12 +210,7 @@
* @title sput_boolean shall not work for byte fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_24", VerifyError.class);
}
/**
@@ -294,12 +219,6 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.sput_boolean.TestStubs
- //@uses dot.junit.opcodes.sput_boolean.d.T_sput_boolean_11
-
- try {
- new T_sput_boolean_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_boolean.d.T_sput_boolean_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_byte/Test_sput_byte.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_byte/Test_sput_byte.java
index 5ac828d..6791589 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_byte/Test_sput_byte.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_byte/Test_sput_byte.java
@@ -69,13 +69,8 @@
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sput_byte_13 t = new T_sput_byte_13();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sput_byte.d.T_sput_byte_13",
+ ExceptionInInitializerError.class);
}
/**
@@ -83,12 +78,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_byte.d.T_sput_byte_3", VerifyError.class);
}
/**
@@ -97,12 +87,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_byte.d.T_sput_byte_4", VerifyError.class);
}
@@ -113,11 +98,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_sput_byte_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_byte.d.T_sput_byte_17", NoSuchFieldError.class);
}
/**
@@ -127,12 +108,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_byte.d.T_sput_byte_18", VerifyError.class);
}
/**
@@ -141,11 +117,8 @@
* @title Attempt to set non-static field.
*/
public void testVFE8() {
- try {
- new T_sput_byte_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_byte.d.T_sput_byte_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -154,12 +127,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_byte.TestStubs
- //@uses dot.junit.opcodes.sput_byte.d.T_sput_byte_8
- try {
- new T_sput_byte_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_byte.d.T_sput_byte_8", IllegalAccessError.class);
}
/**
@@ -167,11 +135,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_sput_byte_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_byte.d.T_sput_byte_9", NoClassDefFoundError.class);
}
/**
@@ -179,11 +143,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_sput_byte_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_byte.d.T_sput_byte_10", NoSuchFieldError.class);
}
@@ -194,12 +154,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_byte.d.T_sput_byte_1
- //@uses dot.junit.opcodes.sput_byte.d.T_sput_byte_15
- try {
- new T_sput_byte_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_byte.d.T_sput_byte_15", IllegalAccessError.class);
}
@@ -208,12 +163,7 @@
* @title sput-byte shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_byte.d.T_sput_byte_2", VerifyError.class);
}
/**
@@ -222,12 +172,7 @@
* @title sput-byte shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_byte.d.T_sput_byte_20", VerifyError.class);
}
/**
@@ -236,12 +181,7 @@
* @title sput-byte shall not work for short fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_byte.d.T_sput_byte_21", VerifyError.class);
}
/**
@@ -250,12 +190,7 @@
* @title sput-byte shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_byte.d.T_sput_byte_22", VerifyError.class);
}
/**
@@ -264,12 +199,7 @@
* @title sput-byte shall not work for char fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_byte.d.T_sput_byte_23", VerifyError.class);
}
/**
@@ -277,12 +207,7 @@
* @title sput-byte shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.sput_byte.d.T_sput_byte_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_byte.d.T_sput_byte_24", VerifyError.class);
}
/**
@@ -291,12 +216,7 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.sput_byte.TestStubs
- //@uses dot.junit.opcodes.sput_byte.d.T_sput_byte_11
- try {
- new T_sput_byte_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_byte.d.T_sput_byte_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_char/Test_sput_char.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_char/Test_sput_char.java
index 8585365..a525c7e 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_char/Test_sput_char.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_char/Test_sput_char.java
@@ -69,13 +69,8 @@
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sput_char_13 t = new T_sput_char_13();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sput_char.d.T_sput_char_13",
+ ExceptionInInitializerError.class);
}
/**
@@ -83,12 +78,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_char.d.T_sput_char_3", VerifyError.class);
}
/**
@@ -97,12 +87,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_char.d.T_sput_char_4", VerifyError.class);
}
@@ -113,11 +98,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_sput_char_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_char.d.T_sput_char_17", NoSuchFieldError.class);
}
/**
@@ -127,12 +108,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_char.d.T_sput_char_18", VerifyError.class);
}
/**
@@ -141,11 +117,8 @@
* @title Attempt to set non-static field.
*/
public void testVFE8() {
- try {
- new T_sput_char_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_char.d.T_sput_char_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -154,12 +127,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_char.TestStubs
- //@uses dot.junit.opcodes.sput_char.d.T_sput_char_8
- try {
- new T_sput_char_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_char.d.T_sput_char_8", IllegalAccessError.class);
}
/**
@@ -167,11 +135,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_sput_char_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_char.d.T_sput_char_9", NoClassDefFoundError.class);
}
/**
@@ -179,11 +143,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_sput_char_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_char.d.T_sput_char_10", NoSuchFieldError.class);
}
@@ -194,12 +154,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_char.d.T_sput_char_1
- //@uses dot.junit.opcodes.sput_char.d.T_sput_char_15
- try {
- new T_sput_char_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_char.d.T_sput_char_15", IllegalAccessError.class);
}
@@ -208,12 +163,7 @@
* @title sput-char shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_char.d.T_sput_char_2", VerifyError.class);
}
/**
@@ -222,12 +172,7 @@
* @title sput-char shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_char.d.T_sput_char_20", VerifyError.class);
}
/**
@@ -236,12 +181,7 @@
* @title sput-char shall not work for short fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_char.d.T_sput_char_21", VerifyError.class);
}
/**
@@ -250,12 +190,7 @@
* @title sput-char shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_char.d.T_sput_char_22", VerifyError.class);
}
/**
@@ -264,12 +199,7 @@
* @title sput-char shall not work for byte fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_char.d.T_sput_char_23", VerifyError.class);
}
/**
@@ -278,12 +208,7 @@
* @title sput-char shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.sput_char.d.T_sput_char_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_char.d.T_sput_char_24", VerifyError.class);
}
/**
@@ -292,11 +217,6 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.sput_char.TestStubs
- //@uses dot.junit.opcodes.sput_char.d.T_sput_char_11
- try {
- new T_sput_char_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_char.d.T_sput_char_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_object/Test_sput_object.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_object/Test_sput_object.java
index cd070a7..8d52f7f 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_object/Test_sput_object.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_object/Test_sput_object.java
@@ -69,13 +69,8 @@
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sput_object_13 t = new T_sput_object_13();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sput_object.d.T_sput_object_13",
+ ExceptionInInitializerError.class);
}
/**
@@ -83,12 +78,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_3", VerifyError.class);
}
/**
@@ -97,12 +87,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_4", VerifyError.class);
}
@@ -113,11 +98,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_sput_object_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_object.d.T_sput_object_17", NoSuchFieldError.class);
}
@@ -128,12 +109,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_18", VerifyError.class);
}
/**
@@ -142,12 +118,9 @@
* @title Attempt to set non-static field.
*/
public void testVFE8() {
- try {
- new T_sput_object_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
- }
+ loadAndRun("dot.junit.opcodes.sput_object.d.T_sput_object_7",
+ IncompatibleClassChangeError.class);
+ }
/**
* @constraint n/a
@@ -155,12 +128,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_object.TestStubs
- //@uses dot.junit.opcodes.sput_object.d.T_sput_object_8
- try {
- new T_sput_object_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_object.d.T_sput_object_8", IllegalAccessError.class);
}
/**
@@ -168,11 +136,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_sput_object_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_object.d.T_sput_object_9", NoClassDefFoundError.class);
}
/**
@@ -180,11 +144,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_sput_object_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_object.d.T_sput_object_10", NoSuchFieldError.class);
}
@@ -195,12 +155,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_object.d.T_sput_object_1
- //@uses dot.junit.opcodes.sput_object.d.T_sput_object_15
- try {
- new T_sput_object_15().run();
- fail("expected a verification exception");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_object.d.T_sput_object_15", IllegalAccessError.class);
}
@@ -209,12 +164,7 @@
* @title sput-object shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_2", VerifyError.class);
}
/**
@@ -223,12 +173,7 @@
* @title assignment incompatible references
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_20", VerifyError.class);
}
/**
@@ -237,12 +182,7 @@
* @title sput-object shall not work for char fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_21", VerifyError.class);
}
/**
@@ -251,12 +191,7 @@
* @title sput-object shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_22", VerifyError.class);
}
/**
@@ -265,12 +200,7 @@
* @title sput-object shall not work for byte fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_23", VerifyError.class);
}
/**
@@ -279,12 +209,7 @@
* @title sput-object shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_24", VerifyError.class);
}
/**
@@ -293,12 +218,7 @@
* @title sput-object shall not work for short fields
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.sput_object.d.T_sput_object_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_object.d.T_sput_object_6", VerifyError.class);
}
@@ -308,11 +228,6 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.sput_object.TestStubs
- //@uses dot.junit.opcodes.sput_object.d.T_sput_object_11
- try {
- new T_sput_object_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_object.d.T_sput_object_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_short/Test_sput_short.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_short/Test_sput_short.java
index 5fcbe58..b6ec230 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_short/Test_sput_short.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_short/Test_sput_short.java
@@ -69,13 +69,8 @@
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sput_short_13 t = new T_sput_short_13();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sput_short.d.T_sput_short_13",
+ ExceptionInInitializerError.class);
}
/**
@@ -83,12 +78,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_short.d.T_sput_short_3", VerifyError.class);
}
/**
@@ -97,12 +87,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_short.d.T_sput_short_4", VerifyError.class);
}
@@ -113,11 +98,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_sput_short_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_short.d.T_sput_short_17", NoSuchFieldError.class);
}
/**
@@ -127,12 +108,7 @@
* field with single-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_short.d.T_sput_short_18", VerifyError.class);
}
/**
@@ -141,11 +117,8 @@
* @title Attempt to set non-static field.
*/
public void testVFE8() {
- try {
- new T_sput_short_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_short.d.T_sput_short_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -154,12 +127,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_short.TestStubs
- //@uses dot.junit.opcodes.sput_short.d.T_sput_short_8
- try {
- new T_sput_short_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_short.d.T_sput_short_8", IllegalAccessError.class);
}
/**
@@ -167,11 +135,7 @@
* @title Attempt to modify field of undefined class.
*/
public void testVFE10() {
- try {
- new T_sput_short_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_short.d.T_sput_short_9", NoClassDefFoundError.class);
}
/**
@@ -179,11 +143,7 @@
* @title Attempt to modify undefined field.
*/
public void testVFE11() {
- try {
- new T_sput_short_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_short.d.T_sput_short_10", NoSuchFieldError.class);
}
@@ -194,12 +154,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_short.d.T_sput_short_1
- //@uses dot.junit.opcodes.sput_short.d.T_sput_short_15
- try {
- new T_sput_short_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_short.d.T_sput_short_15", IllegalAccessError.class);
}
@@ -208,12 +163,7 @@
* @title sput-short shall not work for wide numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_short.d.T_sput_short_2", VerifyError.class);
}
/**
@@ -222,12 +172,7 @@
* @title sput-short shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_short.d.T_sput_short_20", VerifyError.class);
}
/**
@@ -236,12 +181,7 @@
* @title sput-short shall not work for char fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_short.d.T_sput_short_21", VerifyError.class);
}
/**
@@ -250,12 +190,7 @@
* @title sput-short shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_short.d.T_sput_short_22", VerifyError.class);
}
/**
@@ -264,12 +199,7 @@
* @title sput-short shall not work for byte fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_short.d.T_sput_short_23", VerifyError.class);
}
/**
@@ -278,12 +208,7 @@
* @title sput-short shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.sput_short.d.T_sput_short_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_short.d.T_sput_short_24", VerifyError.class);
}
/**
@@ -292,11 +217,6 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.sput_short.TestStubs
- //@uses dot.junit.opcodes.sput_short.d.T_sput_short_11
- try {
- new T_sput_short_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_short.d.T_sput_short_11", IllegalAccessError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_wide/Test_sput_wide.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_wide/Test_sput_wide.java
index 29ff21b..d015912 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_wide/Test_sput_wide.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_wide/Test_sput_wide.java
@@ -79,13 +79,8 @@
* @title initialization of referenced class throws exception
*/
public void testE6() {
- T_sput_wide_13 t = new T_sput_wide_13();
- try {
- t.run();
- fail("expected Error");
- } catch (Error e) {
- // expected
- }
+ loadAndRun("dot.junit.opcodes.sput_wide.d.T_sput_wide_13",
+ ExceptionInInitializerError.class);
}
/**
@@ -93,12 +88,7 @@
* @title constant pool index
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_3", VerifyError.class);
}
/**
@@ -107,12 +97,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_4", VerifyError.class);
}
@@ -123,11 +108,7 @@
* different type exists
*/
public void testVFE5() {
- try {
- new T_sput_wide_17().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_wide.d.T_sput_wide_17", NoSuchFieldError.class);
}
@@ -139,12 +120,7 @@
* field with double-width register
*/
public void testVFE7() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_18");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_18", VerifyError.class);
}
/**
@@ -154,11 +130,8 @@
* executing the code.
*/
public void testVFE8() {
- try {
- new T_sput_wide_7().run();
- fail("expected IncompatibleClassChangeError");
- } catch (IncompatibleClassChangeError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_wide.d.T_sput_wide_7",
+ IncompatibleClassChangeError.class);
}
/**
@@ -168,12 +141,7 @@
*/
public void testVFE9() {
//@uses dot.junit.opcodes.sput_wide.TestStubs
- //@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_8
- try {
- new T_sput_wide_8().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_wide.d.T_sput_wide_8", IllegalAccessError.class);
}
/**
@@ -182,12 +150,7 @@
* executing the code.
*/
public void testVFE10() {
- //@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_9
- try {
- new T_sput_wide_9().run();
- fail("expected NoClassDefFoundError");
- } catch (NoClassDefFoundError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_wide.d.T_sput_wide_9", NoClassDefFoundError.class);
}
/**
@@ -196,12 +159,7 @@
* code.
*/
public void testVFE11() {
- //@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_10
- try {
- new T_sput_wide_10().run();
- fail("expected NoSuchFieldError");
- } catch (NoSuchFieldError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_wide.d.T_sput_wide_10", NoSuchFieldError.class);
}
@@ -213,13 +171,7 @@
*/
public void testVFE12() {
//@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_1
- //@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_15
- try {
- new T_sput_wide_15().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- DxUtil.checkVerifyException(t);
- }
+ loadAndRun("dot.junit.opcodes.sput_wide.d.T_sput_wide_15", IllegalAccessError.class);
}
@@ -228,12 +180,7 @@
* @title sput-wide shall not work for single-width numbers
*/
public void testVFE13() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_2", VerifyError.class);
}
/**
@@ -242,12 +189,7 @@
* @title sput-wide shall not work for reference fields
*/
public void testVFE14() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_20");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_20", VerifyError.class);
}
/**
@@ -256,12 +198,7 @@
* @title sput-wide shall not work for char fields
*/
public void testVFE15() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_21");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_21", VerifyError.class);
}
/**
@@ -270,12 +207,7 @@
* @title sput-wide shall not work for int fields
*/
public void testVFE16() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_22");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_22", VerifyError.class);
}
/**
@@ -284,12 +216,7 @@
* @title sput-wide shall not work for byte fields
*/
public void testVFE17() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_23");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_23", VerifyError.class);
}
/**
@@ -298,12 +225,7 @@
* @title sput-wide shall not work for boolean fields
*/
public void testVFE18() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_24");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_24", VerifyError.class);
}
/**
@@ -312,12 +234,7 @@
* @title sput-wide shall not work for short fields
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.sput_wide.d.T_sput_wide_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sput_wide.d.T_sput_wide_6", VerifyError.class);
}
/**
@@ -326,12 +243,7 @@
*/
public void testVFE19() {
//@uses dot.junit.opcodes.sput_wide.TestStubs
- //@uses dot.junit.opcodes.sput_wide.d.T_sput_wide_11
- try {
- new T_sput_wide_11().run();
- fail("expected IllegalAccessError");
- } catch (IllegalAccessError t) {
- }
+ loadAndRun("dot.junit.opcodes.sput_wide.d.T_sput_wide_11", IllegalAccessError.class);
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_13.d b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_13.d
index a130809..ae7d1df 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_13.d
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sput_wide/d/T_sput_wide_13.d
@@ -25,7 +25,8 @@
const/4 v1, 5
div-int/2addr v1, v0
- sput-wide v1, dot.junit.opcodes.sput_wide.d.JtubInitError.value J
+ int-to-long v0, v0
+ sput-wide v0, dot.junit.opcodes.sput_wide.d.JtubInitError.value J
return-void
.end method
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_double/Test_sub_double.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_double/Test_sub_double.java
index 78bd961..36996cb 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_double/Test_sub_double.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_double/Test_sub_double.java
@@ -140,12 +140,7 @@
* @title types of arguments - float, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sub_double.d.T_sub_double_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double.d.T_sub_double_2", VerifyError.class);
}
/**
@@ -153,12 +148,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sub_double.d.T_sub_double_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double.d.T_sub_double_5", VerifyError.class);
}
/**
@@ -166,12 +156,7 @@
* @title types of arguments - double, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.sub_double.d.T_sub_double_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double.d.T_sub_double_4", VerifyError.class);
}
/**
@@ -179,12 +164,7 @@
* @title types of arguments - int, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.sub_double.d.T_sub_double_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double.d.T_sub_double_6", VerifyError.class);
}
/**
@@ -193,12 +173,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.sub_double.d.T_sub_double_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double.d.T_sub_double_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_double_2addr/Test_sub_double_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_double_2addr/Test_sub_double_2addr.java
index 058a3ac..3369e31 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_double_2addr/Test_sub_double_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_double_2addr/Test_sub_double_2addr.java
@@ -139,12 +139,7 @@
* @title types of arguments - float, double
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_2", VerifyError.class);
}
/**
@@ -152,12 +147,7 @@
* @title number of registers
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_5", VerifyError.class);
}
/**
@@ -165,12 +155,7 @@
* @title types of arguments - double, reference
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_4", VerifyError.class);
}
/**
@@ -178,12 +163,7 @@
* @title types of arguments - int, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_6", VerifyError.class);
}
/**
@@ -192,12 +172,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_double_2addr.d.T_sub_double_2addr_3", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_float/Test_sub_float.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_float/Test_sub_float.java
index 0b30a66..44d33e4 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_float/Test_sub_float.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_float/Test_sub_float.java
@@ -151,12 +151,7 @@
* and floats are not used interchangeably.
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sub_float.d.T_sub_float_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float.d.T_sub_float_5", VerifyError.class);
}
/**
@@ -164,12 +159,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sub_float.d.T_sub_float_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float.d.T_sub_float_2", VerifyError.class);
}
/**
@@ -177,12 +167,7 @@
* @title types of arguments - long, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.sub_float.d.T_sub_float_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float.d.T_sub_float_3", VerifyError.class);
}
/**
@@ -190,12 +175,7 @@
* @title types of arguments - reference, float
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.sub_float.d.T_sub_float_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float.d.T_sub_float_4", VerifyError.class);
}
/**
@@ -203,12 +183,7 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.sub_float.d.T_sub_float_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float.d.T_sub_float_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_float_2addr/Test_sub_float_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_float_2addr/Test_sub_float_2addr.java
index 36c7408..5ae37cd 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_float_2addr/Test_sub_float_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_float_2addr/Test_sub_float_2addr.java
@@ -149,12 +149,7 @@
* and floats are not used interchangeably.
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_5", VerifyError.class);
}
/**
@@ -162,12 +157,7 @@
* @title types of arguments - float, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_2", VerifyError.class);
}
/**
@@ -175,12 +165,7 @@
* @title types of arguments - long, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_3", VerifyError.class);
}
/**
@@ -188,12 +173,7 @@
* @title types of arguments - reference, float
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_4", VerifyError.class);
}
/**
@@ -201,12 +181,7 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_float_2addr.d.T_sub_float_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_int/Test_sub_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_int/Test_sub_int.java
index 3b7ef07..ae00539 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_int/Test_sub_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_int/Test_sub_int.java
@@ -135,12 +135,7 @@
* and floats are not used interchangeably.
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sub_int.d.T_sub_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int.d.T_sub_int_5", VerifyError.class);
}
/**
@@ -148,12 +143,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sub_int.d.T_sub_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int.d.T_sub_int_2", VerifyError.class);
}
/**
@@ -161,12 +151,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.sub_int.d.T_sub_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int.d.T_sub_int_3", VerifyError.class);
}
/**
@@ -174,12 +159,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.sub_int.d.T_sub_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int.d.T_sub_int_4", VerifyError.class);
}
/**
@@ -187,12 +167,7 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.sub_int.d.T_sub_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int.d.T_sub_int_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_int_2addr/Test_sub_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_int_2addr/Test_sub_int_2addr.java
index 0ec67f4..275c7ec 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_int_2addr/Test_sub_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_int_2addr/Test_sub_int_2addr.java
@@ -134,12 +134,7 @@
* and floats are not used interchangeably.
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_5", VerifyError.class);
}
/**
@@ -147,12 +142,7 @@
* @title types of arguments - int, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_2", VerifyError.class);
}
/**
@@ -160,12 +150,7 @@
* @title types of arguments - long, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_3", VerifyError.class);
}
/**
@@ -173,12 +158,7 @@
* @title types of arguments - reference, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_4", VerifyError.class);
}
/**
@@ -186,11 +166,6 @@
* @title number of registers
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_int_2addr.d.T_sub_int_2addr_6", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_long/Test_sub_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_long/Test_sub_long.java
index 77f30d6..f306375 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_long/Test_sub_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_long/Test_sub_long.java
@@ -102,12 +102,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sub_long.d.T_sub_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long.d.T_sub_long_6", VerifyError.class);
}
/**
@@ -115,12 +110,7 @@
* @title types of arguments - int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sub_long.d.T_sub_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long.d.T_sub_long_3", VerifyError.class);
}
/**
@@ -128,12 +118,7 @@
* @title types of arguments - long, float
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.sub_long.d.T_sub_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long.d.T_sub_long_4", VerifyError.class);
}
/**
@@ -141,12 +126,7 @@
* @title types of arguments - long, reference
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.sub_long.d.T_sub_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long.d.T_sub_long_5", VerifyError.class);
}
/**
@@ -155,12 +135,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.sub_long.d.T_sub_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long.d.T_sub_long_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_long_2addr/Test_sub_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_long_2addr/Test_sub_long_2addr.java
index 1f2161d..2a784e1 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/sub_long_2addr/Test_sub_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/sub_long_2addr/Test_sub_long_2addr.java
@@ -102,12 +102,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_6", VerifyError.class);
}
/**
@@ -116,12 +111,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_2", VerifyError.class);
}
/**
@@ -129,12 +119,7 @@
* @title types of arguments - int, long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_3", VerifyError.class);
}
/**
@@ -142,12 +127,7 @@
* @title types of arguments - long, float
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_4", VerifyError.class);
}
/**
@@ -155,11 +135,6 @@
* @title types of arguments - long, reference
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.sub_long_2addr.d.T_sub_long_2addr_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int/Test_ushr_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int/Test_ushr_int.java
index 09f2948..763e1c5 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int/Test_ushr_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int/Test_ushr_int.java
@@ -102,12 +102,7 @@
* @title types of arguments - double, int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int.d.T_ushr_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int.d.T_ushr_int_2", VerifyError.class);
}
/**
@@ -115,12 +110,7 @@
* @title types of arguments - int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int.d.T_ushr_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int.d.T_ushr_int_3", VerifyError.class);
}
/**
@@ -128,12 +118,7 @@
* @title types of arguments - reference, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int.d.T_ushr_int_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int.d.T_ushr_int_4", VerifyError.class);
}
/**
@@ -141,12 +126,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int.d.T_ushr_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int.d.T_ushr_int_6", VerifyError.class);
}
/**
@@ -155,12 +135,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int.d.T_ushr_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int.d.T_ushr_int_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int_2addr/Test_ushr_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int_2addr/Test_ushr_int_2addr.java
index fadd00c..ff00a78 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int_2addr/Test_ushr_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int_2addr/Test_ushr_int_2addr.java
@@ -102,12 +102,7 @@
* @title types of arguments - double, int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_2", VerifyError.class);
}
/**
@@ -115,12 +110,7 @@
* @title types of arguments - int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_3", VerifyError.class);
}
/**
@@ -128,12 +118,7 @@
* @title types of arguments - reference, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_4", VerifyError.class);
}
/**
@@ -141,12 +126,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_6", VerifyError.class);
}
/**
@@ -155,11 +135,6 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_2addr.d.T_ushr_int_2addr_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int_lit8/Test_ushr_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int_lit8/Test_ushr_int_lit8.java
index 7739b3e..420acbc 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int_lit8/Test_ushr_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_int_lit8/Test_ushr_int_lit8.java
@@ -111,12 +111,7 @@
* @title types of arguments - double, int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_10");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_10", VerifyError.class);
}
/**
@@ -124,12 +119,7 @@
* @title types of arguments - long, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_11");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_11", VerifyError.class);
}
/**
@@ -137,12 +127,7 @@
* @title types of arguments - reference, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_12");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_12", VerifyError.class);
}
/**
@@ -150,12 +135,7 @@
* @title number of registers
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_14");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_14", VerifyError.class);
}
/**
@@ -164,12 +144,7 @@
* and floats are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_13");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_int_lit8.d.T_ushr_int_lit8_13", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_long/Test_ushr_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_long/Test_ushr_long.java
index d8541dd..6b4e4d2 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_long/Test_ushr_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_long/Test_ushr_long.java
@@ -107,12 +107,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long.d.T_ushr_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long.d.T_ushr_long_6", VerifyError.class);
}
@@ -122,12 +117,7 @@
* @title types of arguments - long, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long.d.T_ushr_long_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long.d.T_ushr_long_7", VerifyError.class);
}
/**
@@ -135,12 +125,7 @@
* @title types of arguments - int, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long.d.T_ushr_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long.d.T_ushr_long_3", VerifyError.class);
}
/**
@@ -148,12 +133,7 @@
* @title types of arguments - float, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long.d.T_ushr_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long.d.T_ushr_long_4", VerifyError.class);
}
/**
@@ -161,12 +141,7 @@
* @title types of arguments - long, reference
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long.d.T_ushr_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long.d.T_ushr_long_5", VerifyError.class);
}
/**
@@ -175,12 +150,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long.d.T_ushr_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long.d.T_ushr_long_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_long_2addr/Test_ushr_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_long_2addr/Test_ushr_long_2addr.java
index 09e0880..99501f4 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_long_2addr/Test_ushr_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/ushr_long_2addr/Test_ushr_long_2addr.java
@@ -108,12 +108,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_6", VerifyError.class);
}
@@ -123,12 +118,7 @@
* @title types of arguments - long, double
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_7", VerifyError.class);
}
/**
@@ -136,12 +126,7 @@
* @title types of arguments - int, int
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_3", VerifyError.class);
}
/**
@@ -149,12 +134,7 @@
* @title types of arguments - float, int
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_4", VerifyError.class);
}
/**
@@ -162,12 +142,7 @@
* @title types of arguments - long, reference
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_5", VerifyError.class);
}
/**
@@ -176,12 +151,7 @@
* and doubles are not used interchangeably.
*/
public void testVFE6() {
- try {
- Class.forName("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.ushr_long_2addr.d.T_ushr_long_2addr_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int/Test_xor_int.java b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int/Test_xor_int.java
index 2f2197f..4081a96 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int/Test_xor_int.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int/Test_xor_int.java
@@ -69,12 +69,7 @@
* @title types of arguments - long, int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.xor_int.d.T_xor_int_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int.d.T_xor_int_2", VerifyError.class);
}
/**
@@ -82,12 +77,7 @@
* @title types of arguments - reference, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.xor_int.d.T_xor_int_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int.d.T_xor_int_3", VerifyError.class);
}
@@ -96,12 +86,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.xor_int.d.T_xor_int_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int.d.T_xor_int_6", VerifyError.class);
}
/**
@@ -110,11 +95,6 @@
* and floats are not used interchangeably.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.xor_int.d.T_xor_int_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int.d.T_xor_int_5", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_2addr/Test_xor_int_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_2addr/Test_xor_int_2addr.java
index 0ee2ca7..dbac319 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_2addr/Test_xor_int_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_2addr/Test_xor_int_2addr.java
@@ -69,12 +69,7 @@
* @title types of arguments - long, int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_2addr.d.T_xor_int_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_2addr.d.T_xor_int_2addr_2", VerifyError.class);
}
/**
@@ -82,12 +77,7 @@
* @title types of arguments - reference, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_2addr.d.T_xor_int_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_2addr.d.T_xor_int_2addr_3", VerifyError.class);
}
/**
@@ -95,12 +85,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_2addr.d.T_xor_int_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_2addr.d.T_xor_int_2addr_5", VerifyError.class);
}
/**
@@ -109,11 +94,6 @@
* and floats are not used interchangeably.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_2addr.d.T_xor_int_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_2addr.d.T_xor_int_2addr_4", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit16/Test_xor_int_lit16.java b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit16/Test_xor_int_lit16.java
index 383f82f..4a3c635 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit16/Test_xor_int_lit16.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit16/Test_xor_int_lit16.java
@@ -65,12 +65,7 @@
* @title types of arguments - long & int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_lit16.d.T_xor_int_lit16_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_lit16.d.T_xor_int_lit16_5", VerifyError.class);
}
/**
@@ -78,12 +73,7 @@
* @title types of arguments - reference & int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_lit16.d.T_xor_int_lit16_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_lit16.d.T_xor_int_lit16_6", VerifyError.class);
}
/**
@@ -91,12 +81,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_lit16.d.T_xor_int_lit16_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_lit16.d.T_xor_int_lit16_8", VerifyError.class);
}
/**
@@ -105,11 +90,6 @@
* and floats are not used interchangeably.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_lit16.d.T_xor_int_lit16_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_lit16.d.T_xor_int_lit16_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/Test_xor_int_lit8.java b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/Test_xor_int_lit8.java
index a87103b..770ffa8 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/Test_xor_int_lit8.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_int_lit8/Test_xor_int_lit8.java
@@ -64,12 +64,7 @@
* @title types of arguments - long, int
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_lit8.d.T_xor_int_lit8_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_lit8.d.T_xor_int_lit8_5", VerifyError.class);
}
/**
@@ -77,12 +72,7 @@
* @title types of arguments - reference, int
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_lit8.d.T_xor_int_lit8_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_lit8.d.T_xor_int_lit8_6", VerifyError.class);
}
/**
@@ -90,12 +80,7 @@
* @title number of registers
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_lit8.d.T_xor_int_lit8_8");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_lit8.d.T_xor_int_lit8_8", VerifyError.class);
}
/**
@@ -104,11 +89,6 @@
* and floats are not used interchangeably.
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.xor_int_lit8.d.T_xor_int_lit8_7");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_int_lit8.d.T_xor_int_lit8_7", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long/Test_xor_long.java b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long/Test_xor_long.java
index a24d884..7e94a03 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long/Test_xor_long.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long/Test_xor_long.java
@@ -75,12 +75,7 @@
* @title number of registers
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.xor_long.d.T_xor_long_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long.d.T_xor_long_6", VerifyError.class);
}
@@ -91,12 +86,7 @@
* @title types of arguments - int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.xor_long.d.T_xor_long_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long.d.T_xor_long_3", VerifyError.class);
}
/**
@@ -105,12 +95,7 @@
* @title types of arguments - float, long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.xor_long.d.T_xor_long_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long.d.T_xor_long_4", VerifyError.class);
}
/**
@@ -119,12 +104,7 @@
* @title types of arguments - reference, long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.xor_long.d.T_xor_long_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long.d.T_xor_long_5", VerifyError.class);
}
/**
@@ -133,11 +113,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.xor_long.d.T_xor_long_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long.d.T_xor_long_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long_2addr/Test_xor_long_2addr.java b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long_2addr/Test_xor_long_2addr.java
index 93885fb..af4ee9b 100644
--- a/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long_2addr/Test_xor_long_2addr.java
+++ b/tools/vm-tests-tf/src/dot/junit/opcodes/xor_long_2addr/Test_xor_long_2addr.java
@@ -76,12 +76,7 @@
* @title (number of registers).
*/
public void testVFE1() {
- try {
- Class.forName("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_6");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_6", VerifyError.class);
}
@@ -92,12 +87,7 @@
* @title types of arguments - int, long
*/
public void testVFE2() {
- try {
- Class.forName("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_3");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_3", VerifyError.class);
}
/**
@@ -106,12 +96,7 @@
* @title types of arguments - float, long
*/
public void testVFE3() {
- try {
- Class.forName("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_4");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_4", VerifyError.class);
}
/**
@@ -120,12 +105,7 @@
* @title types of arguments - reference, long
*/
public void testVFE4() {
- try {
- Class.forName("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_5");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_5", VerifyError.class);
}
/**
@@ -134,11 +114,6 @@
* and doubles are not used interchangeably.
*/
public void testVFE5() {
- try {
- Class.forName("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_2");
- fail("expected a verification exception");
- } catch (Throwable t) {
- DxUtil.checkVerifyException(t);
- }
+ load("dot.junit.opcodes.xor_long_2addr.d.T_xor_long_2addr_2", VerifyError.class);
}
}
diff --git a/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java b/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java
index 6f5226c..3630446 100644
--- a/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java
+++ b/tools/vm-tests-tf/src/util/build/BuildDalvikSuite.java
@@ -599,6 +599,22 @@
entries.add(res.trim());
}
+ // search for " load(\"...\" " and add as dependency
+ Pattern loadPattern = Pattern.compile("load\\(\"([^\"]*)\"", Pattern.MULTILINE);
+ Matcher loadMatcher = loadPattern.matcher(methodSource);
+ while (loadMatcher.find()) {
+ String res = loadMatcher.group(1);
+ entries.add(res.trim());
+ }
+
+ // search for " loadAndRun(\"...\" " and add as dependency
+ Pattern loadAndRunPattern = Pattern.compile("loadAndRun\\(\"([^\"]*)\"", Pattern.MULTILINE);
+ Matcher loadAndRunMatcher = loadAndRunPattern.matcher(methodSource);
+ while (loadAndRunMatcher.find()) {
+ String res = loadAndRunMatcher.group(1);
+ entries.add(res.trim());
+ }
+
// lines with the form @uses
// dot.junit.opcodes.add_double.jm.T_add_double_2
// one dependency per one @uses