Skip to content

Commit

Permalink
sorted stdlib
Browse files Browse the repository at this point in the history
  • Loading branch information
aakgna committed Feb 28, 2024
1 parent 89359aa commit ed5500c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import java.lang.reflect.Type;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.HashSet;
import java.util.LinkedHashMap;
import java.util.List;
Expand Down Expand Up @@ -109,6 +110,7 @@ public void testToJsonCustom() throws IOException {
AnalysisScopeTest.class.getClassLoader());
scope.setExclusions(tempScope.getExclusions());
String[] stdlibs = WalaProperties.getJ2SEJarFiles();
Arrays.sort(stdlibs);
int cnt = 0;
for (String stdlib : stdlibs) {
scope.addToScope(ClassLoaderReference.Primordial, new JarFile(stdlib));
Expand All @@ -131,10 +133,10 @@ public void testToJsonCustom() throws IOException {
new HashSet<>(List.of("Primordial", "Extension", "Application", "Synthetic"));
assertEquals(loaders.keySet(), loaderKeys);
assertEquals(5, loaders.get("Primordial").size());
assertThat(loaders.get("Primordial"), hasItem("JarFileModule:/Users/aakgna/Library/Java/JavaVirtualMachines/corretto-11.0.15/Contents/Home/jmods/java.security.sasl.jmod"));
assertThat(loaders.get("Primordial"), hasItem("JarFileModule:/Users/aakgna/Library/Java/JavaVirtualMachines/corretto-11.0.15/Contents/Home/jmods/java.base.jmod"));
assertEquals(5, loaders.get("Application").size());
assertThat(
loaders.get("Application").get(0), containsString("JarFileModule:/Users/aakgna/Library/Java/JavaVirtualMachines/corretto-11.0.15/Contents/Home/jmods/java.security.sasl.jmod"));
loaders.get("Application").get(0), containsString("JarFileModule:/Users/aakgna/Library/Java/JavaVirtualMachines/corretto-11.0.15/Contents/Home/jmods/java.base.jmod"));
assertEquals(0, loaders.get("Extension").size());
assertEquals(0, loaders.get("Synthetic").size());
}
Expand Down

0 comments on commit ed5500c

Please sign in to comment.