Skip to content

Commit

Permalink
add assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
msridhar committed May 27, 2024
1 parent 4a9523a commit 5144ea2
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package com.ibm.wala.core.tests.cha;

import static org.junit.jupiter.api.Assertions.assertEquals;

import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
import com.ibm.wala.core.tests.util.TestConstants;
import com.ibm.wala.core.util.scope.JUnitEntryPoints;
Expand All @@ -11,6 +13,7 @@
import com.ibm.wala.util.CancelException;
import com.ibm.wala.util.collections.Iterator2Collection;
import java.io.IOException;
import java.util.List;
import java.util.Set;
import org.junit.jupiter.api.Test;

Expand All @@ -23,7 +26,14 @@ public void basic()
CallGraphTestUtil.makeJ2SEAnalysisScope(
TestConstants.WALA_TESTDATA, CallGraphTestUtil.REGRESSION_EXCLUSIONS);
ClassHierarchy cha = ClassHierarchyFactory.make(scope);
Set<Entrypoint> entrypoints = Iterator2Collection.toSet(JUnitEntryPoints.make(cha).iterator());
System.err.println(entrypoints);
List<Entrypoint> entrypoints =
Iterator2Collection.toList(JUnitEntryPoints.make(cha).iterator());
assertEquals(2, entrypoints.size());
assertEquals(
"< Application, Ljunit/JunitTests, test1()V >([<Application,Ljunit/JunitTests>])",
entrypoints.get(0).toString());
assertEquals(
"< Application, Ljunit/JunitTests, <init>()V >([<Application,Ljunit/JunitTests>])",
entrypoints.get(1).toString());
}
}

0 comments on commit 5144ea2

Please sign in to comment.