diff options
author | Sebastian Bazley <sebb@apache.org> | 2015-08-12 15:29:23 +0000 |
---|---|---|
committer | Sebastian Bazley <sebb@apache.org> | 2015-08-12 15:29:23 +0000 |
commit | db84d4027bf3c4e2ea9f3c011e10fee7866235a4 (patch) | |
tree | cb87bc7c7048201ec7003511984c9844d589d15a /src/test | |
parent | 0af0fb3158488b64b4b02a794a757891bb636de9 (diff) | |
download | apache-commons-bcel-db84d4027bf3c4e2ea9f3c011e10fee7866235a4.tar.gz |
BCEL-239 Interfaces should not be used to define constants
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/bcel/trunk@1695556 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/test')
5 files changed, 20 insertions, 20 deletions
diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java index 23a16b4a..e4f3c739 100644 --- a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java +++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess02Creator.java @@ -33,13 +33,13 @@ import org.apache.commons.bcel6.generic.PUSH; import org.apache.commons.bcel6.generic.Type; import org.junit.Assert; -public class TestArrayAccess02Creator extends TestCreator implements Constants { +public class TestArrayAccess02Creator extends TestCreator { private InstructionFactory _factory; private ConstantPoolGen _cp; private ClassGen _cg; public TestArrayAccess02Creator() { - _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", "java.lang.Object", "TestArrayAccess02.java", ACC_PUBLIC | ACC_SUPER, new String[] { }); + _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", "java.lang.Object", "TestArrayAccess02.java", Constants.ACC_PUBLIC | Constants.ACC_SUPER, new String[] { }); _cp = _cg.getConstantPool(); _factory = new InstructionFactory(_cg, _cp); @@ -53,7 +53,7 @@ public class TestArrayAccess02Creator extends TestCreator implements Constants { private void createMethod_0() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", il, _cp); InstructionHandle ih_0 = il.append(InstructionFactory.createLoad(Type.OBJECT, 0)); Assert.assertNotNull(ih_0); // TODO why is this not used @@ -68,7 +68,7 @@ public class TestArrayAccess02Creator extends TestCreator implements Constants { private void createMethod_1() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.VOID, Type.NO_ARGS, new String[] { }, "test", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC | Constants.ACC_STATIC, Type.VOID, Type.NO_ARGS, new String[] { }, "test", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess02", il, _cp); InstructionHandle ih_0 = il.append(new PUSH(_cp, 1)); Assert.assertNotNull(ih_0); // TODO why is this not used diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java index 16cdabc4..2f7ca304 100644 --- a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java +++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess03Creator.java @@ -33,13 +33,13 @@ import org.apache.commons.bcel6.generic.PUSH; import org.apache.commons.bcel6.generic.Type; import org.junit.Assert; -public class TestArrayAccess03Creator extends TestCreator implements Constants { +public class TestArrayAccess03Creator extends TestCreator { private InstructionFactory _factory; private ConstantPoolGen _cp; private ClassGen _cg; public TestArrayAccess03Creator() { - _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", "java.lang.Object", "TestArrayAccess03.java", ACC_PUBLIC | ACC_SUPER, new String[] { }); + _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", "java.lang.Object", "TestArrayAccess03.java", Constants.ACC_PUBLIC | Constants.ACC_SUPER, new String[] { }); _cp = _cg.getConstantPool(); _factory = new InstructionFactory(_cg, _cp); @@ -53,7 +53,7 @@ public class TestArrayAccess03Creator extends TestCreator implements Constants { private void createMethod_0() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", il, _cp); InstructionHandle ih_0 = il.append(InstructionFactory.createLoad(Type.OBJECT, 0)); Assert.assertNotNull(ih_0); // TODO why is this not used @@ -68,7 +68,7 @@ public class TestArrayAccess03Creator extends TestCreator implements Constants { private void createMethod_1() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.VOID, new Type[] { Type.OBJECT }, new String[] { "arg0" }, "test", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC | Constants.ACC_STATIC, Type.VOID, new Type[] { Type.OBJECT }, new String[] { "arg0" }, "test", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess03", il, _cp); InstructionHandle ih_0 = il.append(new PUSH(_cp, 1)); Assert.assertNotNull(ih_0); // TODO why is this not used diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java index b94f1c98..e64fa6f3 100644 --- a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java +++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestArrayAccess04Creator.java @@ -31,13 +31,13 @@ import org.apache.commons.bcel6.generic.PUSH; import org.apache.commons.bcel6.generic.Type; import org.junit.Assert; -public class TestArrayAccess04Creator extends TestCreator implements Constants { +public class TestArrayAccess04Creator extends TestCreator { private InstructionFactory _factory; private ConstantPoolGen _cp; private ClassGen _cg; public TestArrayAccess04Creator() { - _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", "java.lang.Object", "TestArrayAccess04.java", ACC_PUBLIC | ACC_SUPER, new String[] { }); + _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", "java.lang.Object", "TestArrayAccess04.java", Constants.ACC_PUBLIC | Constants.ACC_SUPER, new String[] { }); _cp = _cg.getConstantPool(); _factory = new InstructionFactory(_cg, _cp); @@ -51,7 +51,7 @@ public class TestArrayAccess04Creator extends TestCreator implements Constants { private void createMethod_0() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", il, _cp); InstructionHandle ih_0 = il.append(InstructionFactory.createLoad(Type.OBJECT, 0)); Assert.assertNotNull(ih_0); // TODO why is this not used @@ -66,7 +66,7 @@ public class TestArrayAccess04Creator extends TestCreator implements Constants { private void createMethod_1() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.VOID, new Type[] { Type.OBJECT }, new String[] { "arg0" }, "test", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC | Constants.ACC_STATIC, Type.VOID, new Type[] { Type.OBJECT }, new String[] { "arg0" }, "test", "org.apache.commons.bcel6.verifier.tests.TestArrayAccess04", il, _cp); InstructionHandle ih_0 = il.append(new PUSH(_cp, 1)); Assert.assertNotNull(ih_0); // TODO why is this not used diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java index 1cdf82a5..5505a495 100644 --- a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java +++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn01Creator.java @@ -31,13 +31,13 @@ import org.apache.commons.bcel6.generic.MethodGen; import org.apache.commons.bcel6.generic.Type; import org.junit.Assert; -public class TestReturn01Creator extends TestCreator implements Constants { +public class TestReturn01Creator extends TestCreator { private InstructionFactory _factory; private ConstantPoolGen _cp; private ClassGen _cg; public TestReturn01Creator() { - _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestReturn01", "java.lang.Object", "TestReturn01.java", ACC_PUBLIC | ACC_SUPER, new String[] { }); + _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestReturn01", "java.lang.Object", "TestReturn01.java", Constants.ACC_PUBLIC | Constants.ACC_SUPER, new String[] { }); _cp = _cg.getConstantPool(); _factory = new InstructionFactory(_cg, _cp); @@ -51,7 +51,7 @@ public class TestReturn01Creator extends TestCreator implements Constants { private void createMethod_0() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestReturn01", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestReturn01", il, _cp); InstructionHandle ih_0 = il.append(InstructionFactory.createLoad(Type.OBJECT, 0)); Assert.assertNotNull(ih_0); // TODO why is this not used @@ -66,7 +66,7 @@ public class TestReturn01Creator extends TestCreator implements Constants { private void createMethod_1() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.VOID, Type.NO_ARGS, new String[] { }, "foo", "org.apache.commons.bcel6.verifier.tests.TestReturn01", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC | Constants.ACC_STATIC, Type.VOID, Type.NO_ARGS, new String[] { }, "foo", "org.apache.commons.bcel6.verifier.tests.TestReturn01", il, _cp); InstructionHandle ih_0 = il.append(_factory.createNew("java.lang.Object")); Assert.assertNotNull(ih_0); // TODO why is this not used diff --git a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java index d3d59fc8..2f651087 100644 --- a/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java +++ b/src/test/java/org/apache/commons/bcel6/verifier/tests/TestReturn03Creator.java @@ -31,13 +31,13 @@ import org.apache.commons.bcel6.generic.MethodGen; import org.apache.commons.bcel6.generic.Type; import org.junit.Assert; -public class TestReturn03Creator extends TestCreator implements Constants { +public class TestReturn03Creator extends TestCreator { private InstructionFactory _factory; private ConstantPoolGen _cp; private ClassGen _cg; public TestReturn03Creator() { - _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestReturn03", "java.lang.Object", "TestReturn03.java", ACC_PUBLIC | ACC_SUPER, new String[] { }); + _cg = new ClassGen("org.apache.commons.bcel6.verifier.tests.TestReturn03", "java.lang.Object", "TestReturn03.java", Constants.ACC_PUBLIC | Constants.ACC_SUPER, new String[] { }); _cp = _cg.getConstantPool(); _factory = new InstructionFactory(_cg, _cp); @@ -51,7 +51,7 @@ public class TestReturn03Creator extends TestCreator implements Constants { private void createMethod_0() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestReturn03", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC, Type.VOID, Type.NO_ARGS, new String[] { }, "<init>", "org.apache.commons.bcel6.verifier.tests.TestReturn03", il, _cp); InstructionHandle ih_0 = il.append(InstructionFactory.createLoad(Type.OBJECT, 0)); Assert.assertNotNull(ih_0); // TODO why is this not used @@ -66,7 +66,7 @@ public class TestReturn03Creator extends TestCreator implements Constants { private void createMethod_1() { InstructionList il = new InstructionList(); - MethodGen method = new MethodGen(ACC_PUBLIC | ACC_STATIC, Type.INT, Type.NO_ARGS, new String[] { }, "test3", "org.apache.commons.bcel6.verifier.tests.TestReturn03", il, _cp); + MethodGen method = new MethodGen(Constants.ACC_PUBLIC | Constants.ACC_STATIC, Type.INT, Type.NO_ARGS, new String[] { }, "test3", "org.apache.commons.bcel6.verifier.tests.TestReturn03", il, _cp); InstructionHandle ih_0 = il.append(InstructionConstants.ACONST_NULL); Assert.assertNotNull(ih_0); // TODO why is this not used |