From 5144ea2eab3f78da690400e4fd3e1309077c3136 Mon Sep 17 00:00:00 2001 From: Manu Sridharan Date: Sun, 26 May 2024 20:27:09 -0700 Subject: [PATCH] add assertions --- .../core/tests/cha/JunitEntrypointSupportTest.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/com/ibm/wala/core/tests/cha/JunitEntrypointSupportTest.java b/core/src/test/java/com/ibm/wala/core/tests/cha/JunitEntrypointSupportTest.java index fa4d299bb..b6e776576 100644 --- a/core/src/test/java/com/ibm/wala/core/tests/cha/JunitEntrypointSupportTest.java +++ b/core/src/test/java/com/ibm/wala/core/tests/cha/JunitEntrypointSupportTest.java @@ -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; @@ -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; @@ -23,7 +26,14 @@ public void basic() CallGraphTestUtil.makeJ2SEAnalysisScope( TestConstants.WALA_TESTDATA, CallGraphTestUtil.REGRESSION_EXCLUSIONS); ClassHierarchy cha = ClassHierarchyFactory.make(scope); - Set entrypoints = Iterator2Collection.toSet(JUnitEntryPoints.make(cha).iterator()); - System.err.println(entrypoints); + List entrypoints = + Iterator2Collection.toList(JUnitEntryPoints.make(cha).iterator()); + assertEquals(2, entrypoints.size()); + assertEquals( + "< Application, Ljunit/JunitTests, test1()V >([])", + entrypoints.get(0).toString()); + assertEquals( + "< Application, Ljunit/JunitTests, ()V >([])", + entrypoints.get(1).toString()); } }