6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
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 package jdk.vm.ci.hotspot.test;
25
26 import static jdk.vm.ci.hotspot.test.TestHelper.CONSTANT_REFLECTION_PROVIDER;
27 import static jdk.vm.ci.hotspot.test.TestHelper.DUMMY_CLASS_INSTANCE;
28
29 import java.util.HashMap;
30 import java.util.LinkedList;
31 import java.util.Objects;
32 import jdk.vm.ci.meta.Constant;
33 import jdk.vm.ci.meta.JavaConstant;
34 import org.testng.annotations.DataProvider;
35
36 public class ConstantEqualsDataProvider {
37 @DataProvider(name = "constantEqualsDataProvider")
38 public static Object[][] constantEqualsDataProvider() {
39 HashMap<Object, Constant> constMap = new HashMap<>();
40 constMap.put(DUMMY_CLASS_INSTANCE.booleanField, JavaConstant.forBoolean(DUMMY_CLASS_INSTANCE.booleanField));
41 constMap.put(DUMMY_CLASS_INSTANCE.stableDefaultBooleanField,
42 JavaConstant.forBoolean(DUMMY_CLASS_INSTANCE.stableDefaultBooleanField));
43 constMap.put(DUMMY_CLASS_INSTANCE.byteField, JavaConstant.forByte(DUMMY_CLASS_INSTANCE.byteField));
44 constMap.put(DUMMY_CLASS_INSTANCE.finalByteField, JavaConstant.forByte(DUMMY_CLASS_INSTANCE.finalByteField));
45 constMap.put(DUMMY_CLASS_INSTANCE.stableDefaultByteField,
46 JavaConstant.forByte(DUMMY_CLASS_INSTANCE.stableDefaultByteField));
47 constMap.put(DUMMY_CLASS_INSTANCE.shortField, JavaConstant.forShort(DUMMY_CLASS_INSTANCE.shortField));
48 constMap.put(DUMMY_CLASS_INSTANCE.finalShortField, JavaConstant.forShort(DUMMY_CLASS_INSTANCE.finalShortField));
49 constMap.put(DUMMY_CLASS_INSTANCE.stableDefaultShortField,
50 JavaConstant.forShort(DUMMY_CLASS_INSTANCE.stableDefaultShortField));
51 constMap.put(DUMMY_CLASS_INSTANCE.intField, JavaConstant.forInt(DUMMY_CLASS_INSTANCE.intField));
52 constMap.put(DUMMY_CLASS_INSTANCE.finalIntField, JavaConstant.forInt(DUMMY_CLASS_INSTANCE.finalIntField));
53 constMap.put(DUMMY_CLASS_INSTANCE.stableDefaultIntField,
54 JavaConstant.forInt(DUMMY_CLASS_INSTANCE.stableDefaultIntField));
55 constMap.put(DUMMY_CLASS_INSTANCE.longField, JavaConstant.forLong(DUMMY_CLASS_INSTANCE.longField));
|
6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation.
8 *
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 package jdk.vm.ci.hotspot.test;
25
26 import jdk.vm.ci.meta.Constant;
27 import jdk.vm.ci.meta.JavaConstant;
28 import org.testng.annotations.DataProvider;
29
30 import java.util.HashMap;
31 import java.util.LinkedList;
32 import java.util.Objects;
33
34 import static jdk.vm.ci.hotspot.test.TestHelper.CONSTANT_REFLECTION_PROVIDER;
35 import static jdk.vm.ci.hotspot.test.TestHelper.DUMMY_CLASS_INSTANCE;
36
37 public class ConstantEqualsDataProvider {
38 @DataProvider(name = "constantEqualsDataProvider")
39 public static Object[][] constantEqualsDataProvider() {
40 HashMap<Object, Constant> constMap = new HashMap<>();
41 constMap.put(DUMMY_CLASS_INSTANCE.booleanField, JavaConstant.forBoolean(DUMMY_CLASS_INSTANCE.booleanField));
42 constMap.put(DUMMY_CLASS_INSTANCE.stableDefaultBooleanField,
43 JavaConstant.forBoolean(DUMMY_CLASS_INSTANCE.stableDefaultBooleanField));
44 constMap.put(DUMMY_CLASS_INSTANCE.byteField, JavaConstant.forByte(DUMMY_CLASS_INSTANCE.byteField));
45 constMap.put(DUMMY_CLASS_INSTANCE.finalByteField, JavaConstant.forByte(DUMMY_CLASS_INSTANCE.finalByteField));
46 constMap.put(DUMMY_CLASS_INSTANCE.stableDefaultByteField,
47 JavaConstant.forByte(DUMMY_CLASS_INSTANCE.stableDefaultByteField));
48 constMap.put(DUMMY_CLASS_INSTANCE.shortField, JavaConstant.forShort(DUMMY_CLASS_INSTANCE.shortField));
49 constMap.put(DUMMY_CLASS_INSTANCE.finalShortField, JavaConstant.forShort(DUMMY_CLASS_INSTANCE.finalShortField));
50 constMap.put(DUMMY_CLASS_INSTANCE.stableDefaultShortField,
51 JavaConstant.forShort(DUMMY_CLASS_INSTANCE.stableDefaultShortField));
52 constMap.put(DUMMY_CLASS_INSTANCE.intField, JavaConstant.forInt(DUMMY_CLASS_INSTANCE.intField));
53 constMap.put(DUMMY_CLASS_INSTANCE.finalIntField, JavaConstant.forInt(DUMMY_CLASS_INSTANCE.finalIntField));
54 constMap.put(DUMMY_CLASS_INSTANCE.stableDefaultIntField,
55 JavaConstant.forInt(DUMMY_CLASS_INSTANCE.stableDefaultIntField));
56 constMap.put(DUMMY_CLASS_INSTANCE.longField, JavaConstant.forLong(DUMMY_CLASS_INSTANCE.longField));
|