From 6b4aff907b0fa89ba6f271e3e1a2975f48ffac8d Mon Sep 17 00:00:00 2001 From: Ben Liblit Date: Sun, 15 Oct 2023 19:34:23 -0400 Subject: [PATCH] Expose some types that are used in exposed APIs `com.ibm.wala.cast.test.TestCAstTranslator.checkAssertions` is a `public` method that takes an argument of type `com.ibm.wala.cast.test.TestCAstTranslator.TranslatorAssertions`. The latter, therefore, needs to be `public` as well or else the checkAssertions` method can never be called. Similarly, `com.ibm.wala.core.tests.shrike.DynamicCallGraphTestBase.check` is a `protected` method that takes an argument of type `com.ibm.wala.core.tests.shrike.DynamicCallGraphTestBase.EdgesTest`. The latter must at least have `protected` visibility too, or else the `check` method can never be called. --- .../test/java/com/ibm/wala/cast/test/TestCAstTranslator.java | 2 +- .../ibm/wala/core/tests/shrike/DynamicCallGraphTestBase.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cast/src/test/java/com/ibm/wala/cast/test/TestCAstTranslator.java b/cast/src/test/java/com/ibm/wala/cast/test/TestCAstTranslator.java index c1ce4ce706..b997bc8ff2 100644 --- a/cast/src/test/java/com/ibm/wala/cast/test/TestCAstTranslator.java +++ b/cast/src/test/java/com/ibm/wala/cast/test/TestCAstTranslator.java @@ -41,7 +41,7 @@ public abstract class TestCAstTranslator { - protected static class TranslatorAssertions { + public static class TranslatorAssertions { private final Set classes = new HashSet<>(); private final Map supers = new HashMap<>(); diff --git a/core/src/testFixtures/java/com/ibm/wala/core/tests/shrike/DynamicCallGraphTestBase.java b/core/src/testFixtures/java/com/ibm/wala/core/tests/shrike/DynamicCallGraphTestBase.java index 6c2da36fdd..9bedaa0270 100644 --- a/core/src/testFixtures/java/com/ibm/wala/core/tests/shrike/DynamicCallGraphTestBase.java +++ b/core/src/testFixtures/java/com/ibm/wala/core/tests/shrike/DynamicCallGraphTestBase.java @@ -143,7 +143,7 @@ protected void run(String mainClass, String exclusionsFile, String... args) assertTrue(Files.exists(cgLocation), "expected to create call graph"); } - interface EdgesTest { + protected interface EdgesTest { void edgesTest(CallGraph staticCG, CGNode caller, MethodReference callee); }