rename TestUtil to more-specific DemandPATestUtil

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@4481 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
msridhar1 2012-02-17 20:18:54 +00:00
parent a1a62d4793
commit 72af88f25e
32 changed files with 49 additions and 49 deletions

View File

@ -44,7 +44,7 @@ package demandpa;
* @author manu
*
*/
public class TestUtil {
public class DemandPATestUtil {
public static void makeVarUsed(Object o) {
}

View File

@ -23,7 +23,7 @@ public class FlowsToTestArraySetIter {
s2.add(new B());
A a = (A) s1.iterator().next();
B b = (B) s2.iterator().next();
TestUtil.makeVarUsed(b);
TestUtil.makeVarUsed(a);
DemandPATestUtil.makeVarUsed(b);
DemandPATestUtil.makeVarUsed(a);
}
}

View File

@ -28,7 +28,7 @@ public class FlowsToTestFields {
a2.f = o2;
Object o3 = a1.f;
Object o4 = a2.f;
TestUtil.makeVarUsed(o3);
TestUtil.makeVarUsed(o4);
DemandPATestUtil.makeVarUsed(o3);
DemandPATestUtil.makeVarUsed(o4);
}
}

View File

@ -27,6 +27,6 @@ public class FlowsToTestFieldsHarder {
a2.f = a1;
A a3 = (A) a2.f;
Object o2 = a3.f;
TestUtil.makeVarUsed(o2);
DemandPATestUtil.makeVarUsed(o2);
}
}

View File

@ -24,7 +24,7 @@ public class FlowsToTestHashSet {
s2.add(new Object());
Object o1 = s1.iterator().next();
Object o2 = s2.iterator().next();
TestUtil.makeVarUsed(o1);
TestUtil.makeVarUsed(o2);
DemandPATestUtil.makeVarUsed(o1);
DemandPATestUtil.makeVarUsed(o2);
}
}

View File

@ -28,8 +28,8 @@ public class FlowsToTestId {
Object o2 = new Object();
Object o3 = id(o1);
Object o4 = id(o2);
TestUtil.makeVarUsed(o3);
TestUtil.makeVarUsed(o4);
DemandPATestUtil.makeVarUsed(o3);
DemandPATestUtil.makeVarUsed(o4);
}
}

View File

@ -17,7 +17,7 @@ public class FlowsToTestLocals {
*/
public static void main(String[] args) {
Object x = new FlowsToType();
TestUtil.makeVarUsed(x);
DemandPATestUtil.makeVarUsed(x);
}
}

View File

@ -52,8 +52,8 @@ public class TestArrayList {
l2.add(new Object());
Object o1 = l1.get(0);
Object o2 = l2.get(0);
TestUtil.makeVarUsed(o1);
TestUtil.testThisVar(o2);
DemandPATestUtil.makeVarUsed(o1);
DemandPATestUtil.testThisVar(o2);
}
}

View File

@ -46,8 +46,8 @@ public class TestArraySet {
s2.add(new B());
A a = (A) s1.get();
B b = (B) s2.get();
TestUtil.makeVarUsed(b);
TestUtil.testThisVar(a);
DemandPATestUtil.makeVarUsed(b);
DemandPATestUtil.testThisVar(a);
}

View File

@ -46,7 +46,7 @@ class TestArraySetIter {
s2.add(new B());
A a = (A) s1.iterator().next();
B b = (B) s2.iterator().next();
TestUtil.makeVarUsed(b);
TestUtil.testThisVar(a);
DemandPATestUtil.makeVarUsed(b);
DemandPATestUtil.testThisVar(a);
}
}

View File

@ -46,7 +46,7 @@ public class TestArrays {
Object[] arr = new Object[10];
arr[0] = new Object();
arr[1] = new Object();
TestUtil.testThisVar(arr[1]);
DemandPATestUtil.testThisVar(arr[1]);
}
}

View File

@ -62,7 +62,7 @@ public class TestClone {
public static void main(String[] args) {
A a = new B();
A a2 = a.copy();
TestUtil.testThisVar(a2);
DemandPATestUtil.testThisVar(a2);
}
}

View File

@ -46,7 +46,7 @@ public class TestCond {
Object x = arr[0];
if (x instanceof B) {
B b = (B) x;
TestUtil.testThisVar(b);
DemandPATestUtil.testThisVar(b);
}
}

View File

@ -46,7 +46,7 @@ public class TestException {
try {
foo(null);
} catch (Exception e) {
TestUtil.testThisVar(e);
DemandPATestUtil.testThisVar(e);
}
}

View File

@ -49,8 +49,8 @@ public class TestFactory {
public static void main(String[] args) {
A a1 = makeA();
A a2 = makeA();
TestUtil.makeVarUsed(a1);
TestUtil.testThisVar(a2);
DemandPATestUtil.makeVarUsed(a1);
DemandPATestUtil.testThisVar(a2);
}
}

View File

@ -51,8 +51,8 @@ public class TestFields {
a2.f = o2;
Object o3 = a1.f;
Object o4 = a2.f;
TestUtil.makeVarUsed(o3);
TestUtil.testThisVar(o4);
DemandPATestUtil.makeVarUsed(o3);
DemandPATestUtil.testThisVar(o4);
}
}

View File

@ -42,7 +42,7 @@ public class TestFieldsHarder {
a2.f = a1;
A a3 = (A) a2.f;
Object o2 = a3.f;
TestUtil.testThisVar(o2);
DemandPATestUtil.testThisVar(o2);
}
}

View File

@ -51,8 +51,8 @@ public class TestGetterSetter {
a2.f = o2;
Object o3 = a1.getF();
Object o4 = a2.f;
TestUtil.makeVarUsed(o4);
TestUtil.testThisVar(o3);
DemandPATestUtil.makeVarUsed(o4);
DemandPATestUtil.testThisVar(o3);
}

View File

@ -50,7 +50,7 @@ public class TestGlobal {
}
public static void main(String[] args) {
TestUtil.testThisVar(getGlobal());
DemandPATestUtil.testThisVar(getGlobal());
}
}

View File

@ -49,8 +49,8 @@ public class TestHashMapGet {
s2.put(key2, new Object());
Object o1 = s1.get(key1);
Object o2 = s2.get(key2);
TestUtil.makeVarUsed(o1);
TestUtil.testThisVar(o2);
DemandPATestUtil.makeVarUsed(o1);
DemandPATestUtil.testThisVar(o2);
}
}

View File

@ -47,7 +47,7 @@ public class TestHashSet {
s2.add(new Object());
Object o1 = s1.iterator().next();
Object o2 = s2.iterator().next();
TestUtil.makeVarUsed(o1);
TestUtil.testThisVar(o2);
DemandPATestUtil.makeVarUsed(o1);
DemandPATestUtil.testThisVar(o2);
}
}

View File

@ -52,8 +52,8 @@ public class TestHashtableEnum {
h2.put(key2, new Object());
Object o1 = h1.elements().next();
Object o2 = h2.elements().next();
TestUtil.makeVarUsed(o1);
TestUtil.testThisVar(o2);
DemandPATestUtil.makeVarUsed(o1);
DemandPATestUtil.testThisVar(o2);
}

View File

@ -51,8 +51,8 @@ public class TestId {
Object o2 = new Object();
Object o3 = id(o1);
Object o4 = id(o2);
TestUtil.makeVarUsed(o3);
TestUtil.testThisVar(o4);
DemandPATestUtil.makeVarUsed(o3);
DemandPATestUtil.testThisVar(o4);
}
}

View File

@ -50,8 +50,8 @@ public class TestLinkedList {
l2.add(new Object());
Object o1 = l1.get(0);
Object o2 = l2.get(0);
TestUtil.makeVarUsed(o1);
TestUtil.testThisVar(o2);
DemandPATestUtil.makeVarUsed(o1);
DemandPATestUtil.testThisVar(o2);
}

View File

@ -50,8 +50,8 @@ public class TestLinkedListIter {
l2.add(new Object());
Object o1 = l1.iterator().next();
Object o2 = l2.iterator().next();
TestUtil.makeVarUsed(o1);
TestUtil.testThisVar(o2);
DemandPATestUtil.makeVarUsed(o1);
DemandPATestUtil.testThisVar(o2);
}

View File

@ -44,7 +44,7 @@ public class TestLocals {
*/
public static void main(String[] args) {
Object x = new Object();
TestUtil.testThisVar(x);
DemandPATestUtil.testThisVar(x);
}
}

View File

@ -64,6 +64,6 @@ public class TestMethodRecursion {
Object o1 = new Object();
Object o2 = new Object();
Object o3 = foo(o1, o2, false);
TestUtil.testThisVar(o3);
DemandPATestUtil.testThisVar(o3);
}
}

View File

@ -47,7 +47,7 @@ public class TestMultiDim {
multi[0] = new Object[10][10];
Object[][] t = multi[0];
Object[] t2 = t[0];
TestUtil.testThisVar(t2);
DemandPATestUtil.testThisVar(t2);
}
}

View File

@ -100,6 +100,6 @@ class TestNastyPtrs {
x.next8 = x;
x.next9 = x;
TestUtil.testThisVar(x);
DemandPATestUtil.testThisVar(x);
}
}

View File

@ -48,7 +48,7 @@ public class TestOnTheFlyCS {
static class C2 extends C1 {
@Override
void doSomething(Object o) {
TestUtil.testThisVar(o);
DemandPATestUtil.testThisVar(o);
}
}

View File

@ -52,10 +52,10 @@ public class TestOnTheFlySimple {
*/
public static void main(String[] args) {
A a2 = new A();
TestUtil.makeVarUsed(a2);
DemandPATestUtil.makeVarUsed(a2);
A a = makeA();
Object o = a.foo();
TestUtil.testThisVar(o);
DemandPATestUtil.testThisVar(o);
}
}

View File

@ -48,6 +48,6 @@ public class TestWithinMethodCall {
}
private static void testMethod(Object o) {
TestUtil.testThisVar(o);
DemandPATestUtil.testThisVar(o);
}
}