9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8026844
27 * @summary Test repeating multiplyExact
28 * @library /testlibrary
29 * @compile MulExactIRepeatTest.java Verify.java
30 * @run main MulExactIRepeatTest
31 *
32 */
33
34 import com.oracle.java.testlibrary.Utils;
35 import java.util.Random;
36
37 public class MulExactIRepeatTest {
38 public static void main(String[] args) {
39 runTest(new Verify.MulExactI());
40 }
41
42 public static int nonExact(int x, int y, Verify.BinaryMethod method) {
43 int result = method.unchecked(x, y);
44 result += method.unchecked(x, y);
45 result += method.unchecked(x, y);
46 result += method.unchecked(x, y);
47 return result;
48 }
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 * @test
26 * @bug 8026844
27 * @summary Test repeating multiplyExact
28 * @library /testlibrary
29 * @build com.oracle.java.testlibrary.*
30 * @compile MulExactIRepeatTest.java Verify.java
31 * @run main MulExactIRepeatTest
32 *
33 */
34
35 import com.oracle.java.testlibrary.Utils;
36 import java.util.Random;
37
38 public class MulExactIRepeatTest {
39 public static void main(String[] args) {
40 runTest(new Verify.MulExactI());
41 }
42
43 public static int nonExact(int x, int y, Verify.BinaryMethod method) {
44 int result = method.unchecked(x, y);
45 result += method.unchecked(x, y);
46 result += method.unchecked(x, y);
47 result += method.unchecked(x, y);
48 return result;
49 }
|