mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 22:10:18 +00:00
Ran tests under NeoForge 1.21.1
- Classpath scans accept the union filesystem the NeoForge 21.1 test harness mounts and skip test classes merged into it - The 1.21.1 NeoForge server access test checks the cached world array the tick loop reads
This commit is contained in:
1 parent
8917bdc974
commit
97a3f7e7c3
3 files changed
+96
-3
No files matched your search
+2
-1
@@ -74,7 +74,8 @@ public class IrisModLanguageAssetsTest {
|
||||
private Set<String> resourceFiles() throws Exception {
|
||||
URL resource = IrisModLanguageAssetsTest.class.getClassLoader().getResource(ROOT + "en_us.json");
|
||||
assertNotNull("Missing English mod language resource", resource);
|
||||
assertEquals("Mod language resources must resolve to a directory on disk", "file", resource.getProtocol());
|
||||
assertTrue("Mod language resources must resolve to a directory, got " + resource,
|
||||
resource.getProtocol().equals("file") || resource.getProtocol().equals("union"));
|
||||
Path directory = Path.of(resource.toURI()).getParent();
|
||||
try (Stream<Path> paths = Files.list(directory)) {
|
||||
return paths
|
||||
|
||||
+5
-2
@@ -116,7 +116,9 @@ public class ModdedClientPackageIsolationTest {
|
||||
}
|
||||
|
||||
private static boolean isClassFile(Path path) {
|
||||
return Files.isRegularFile(path) && path.getFileName().toString().endsWith(".class");
|
||||
String name = path.getFileName().toString();
|
||||
return Files.isRegularFile(path) && name.endsWith(".class")
|
||||
&& !name.endsWith("Test.class") && !name.contains("Test$");
|
||||
}
|
||||
|
||||
private static String readAsLatin1(Path path) throws IOException {
|
||||
@@ -127,7 +129,8 @@ public class ModdedClientPackageIsolationTest {
|
||||
String anchor = "/art/arcane/iris/modded/ModdedMixinAudit.class";
|
||||
URL located = ModdedClientPackageIsolationTest.class.getResource(anchor);
|
||||
assertNotNull("compiled main classes are not on the test classpath as files", located);
|
||||
assertEquals("expected a directory classpath entry, got " + located, "file", located.getProtocol());
|
||||
assertTrue("expected a directory classpath entry, got " + located,
|
||||
located.getProtocol().equals("file") || located.getProtocol().equals("union"));
|
||||
Path root = Path.of(located.toURI());
|
||||
for (int depth = 0; depth < 5; depth++) {
|
||||
root = root.getParent();
|
||||
|
||||
Reference in new issue
Block a user