From 3113dcf99fab5677de9c4a509168fe452a68ed72 Mon Sep 17 00:00:00 2001 From: Jonas Klauke Date: Fri, 17 Nov 2023 10:45:30 +0100 Subject: [PATCH] removed warnings in testcases --- .../java/sootup/callgraph/CallGraphTestBase.java | 2 +- .../ClassHierarchyAnalysisAlgorithmTest.java | 12 ------------ .../callgraph/RapidTypeAnalysisAlgorithmTest.java | 11 ----------- 3 files changed, 1 insertion(+), 24 deletions(-) diff --git a/sootup.callgraph/src/test/java/sootup/callgraph/CallGraphTestBase.java b/sootup.callgraph/src/test/java/sootup/callgraph/CallGraphTestBase.java index 7e814509f86..26c41ee37b8 100644 --- a/sootup.callgraph/src/test/java/sootup/callgraph/CallGraphTestBase.java +++ b/sootup.callgraph/src/test/java/sootup/callgraph/CallGraphTestBase.java @@ -741,7 +741,7 @@ public void testStopAtLibraryClass() { CallGraphAlgorithm algorithm = createAlgorithm(view); CallGraph cg = algorithm.initialize(Collections.singletonList(mainMethodSignature)); - assertTrue(!cg.callsFrom(mainMethodSignature).isEmpty()); + assertFalse(cg.callsFrom(mainMethodSignature).isEmpty()); SootClass libraryClass = view.getClass(view.getIdentifierFactory().getClassType("lib.Library")).orElse(null); diff --git a/sootup.callgraph/src/test/java/sootup/callgraph/ClassHierarchyAnalysisAlgorithmTest.java b/sootup.callgraph/src/test/java/sootup/callgraph/ClassHierarchyAnalysisAlgorithmTest.java index 403ffae5674..f9c6bdc1875 100644 --- a/sootup.callgraph/src/test/java/sootup/callgraph/ClassHierarchyAnalysisAlgorithmTest.java +++ b/sootup.callgraph/src/test/java/sootup/callgraph/ClassHierarchyAnalysisAlgorithmTest.java @@ -194,38 +194,28 @@ public void testMiscExample1() { + "from ()>" + "from ()>" + "from ()>" - + "" + ":" + "from " - + "" + "()>:" + "to ()>" + "from " - + "" + ":" + "from " - + "" + ":" + "from " - + "" + "()>:" + "to ()>" + "from " - + "" + "()>:" + "to ()>" + "from ()>" - + "" + ":" + "from " - + "" + "()>:" + "to ()>" + "from " - + "" + ":" + "from " - + "" + ":" + "to " + "to ()>" @@ -236,10 +226,8 @@ public void testMiscExample1() { + "to ()>" + "to " + "to ()>" - + "" + "()>:" + "from " - + "" + "()>:" + "from ()>"); } diff --git a/sootup.callgraph/src/test/java/sootup/callgraph/RapidTypeAnalysisAlgorithmTest.java b/sootup.callgraph/src/test/java/sootup/callgraph/RapidTypeAnalysisAlgorithmTest.java index 24876c7e1b3..19781a95323 100644 --- a/sootup.callgraph/src/test/java/sootup/callgraph/RapidTypeAnalysisAlgorithmTest.java +++ b/sootup.callgraph/src/test/java/sootup/callgraph/RapidTypeAnalysisAlgorithmTest.java @@ -186,35 +186,26 @@ public void testMiscExample1() { + "from ()>" + "from ()>" + "from ()>" - + "" + "()>:" + "to ()>" + "from " - + "" + ":" + "from " - + "" + ":" + "from " - + "" + "()>:" + "to ()>" + "from " - + "" + "()>:" + "to ()>" + "from ()>" - + "" + ":" + "from " - + "" + "()>:" + "to ()>" + "from " - + "" + ":" + "from " - + "" + ":" + "to ()>" + "to " @@ -224,10 +215,8 @@ public void testMiscExample1() { + "to ()>" + "to " + "to ()>" - + "" + "()>:" + "from " - + "" + "()>:" + "from ()>"); }