-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rework tests to actually work, update buildscript and dependencies (#71)
- Loading branch information
Showing
43 changed files
with
667 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,3 +17,4 @@ | |
#gradle | ||
**/build | ||
**/.gradle | ||
/coremods-test/logs/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* | ||
* Copyright (c) Forge Development LLC | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
*/ | ||
|
||
open module net.minecraftforge.coremod.testjar { | ||
exports net.minecraftforge.coremod.testjar; | ||
} |
29 changes: 29 additions & 0 deletions
29
coremods-test-jar/src/main/java/net/minecraftforge/coremod/testjar/Counter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright (c) Forge Development LLC | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
*/ | ||
|
||
package net.minecraftforge.coremod.testjar; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
public class Counter { | ||
private final List<Integer> counts = new ArrayList<>(); | ||
|
||
public Counter() { | ||
push(); | ||
} | ||
|
||
public int[] getCounts() { | ||
return counts.stream().mapToInt(Integer::intValue).toArray(); | ||
} | ||
|
||
public void push() { | ||
counts.add(0); | ||
} | ||
|
||
public void increment() { | ||
counts.set(counts.size() - 1, counts.get(counts.size() - 1) + 1); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
coremods-test-jar/src/main/java/net/minecraftforge/coremod/testjar/TestClass.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) Forge Development LLC | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
*/ | ||
|
||
package net.minecraftforge.coremod.testjar; | ||
|
||
public class TestClass { | ||
public static boolean False() { | ||
return false; | ||
} | ||
|
||
public static int[] testCounter() { | ||
var counts = new Counter(); | ||
counts.push(); | ||
return counts.getCounts(); | ||
} | ||
|
||
public static String testString() { | ||
return "raw"; | ||
} | ||
} |
10 changes: 10 additions & 0 deletions
10
coremods-test-jar/src/main/java/net/minecraftforge/coremod/testjar/TestMarker.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/* | ||
* Copyright (c) Forge Development LLC | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
*/ | ||
|
||
package net.minecraftforge.coremod.testjar; | ||
|
||
// Marker class to let the arms length find the test resources | ||
public class TestMarker { | ||
} |
31 changes: 0 additions & 31 deletions
31
coremods-test-jar/src/main/java/net/minecraftforge/coremods/testjar/RedirectClass.java
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
coremods-test-jar/src/main/java/net/minecraftforge/coremods/testjar/TestClass.java
This file was deleted.
Oops, something went wrong.
12 changes: 0 additions & 12 deletions
12
coremods-test-jar/src/main/java/net/minecraftforge/coremods/testjar/TestTarget.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 0 additions & 29 deletions
29
coremods-test/src/test/java/net/minecraftforge/coremod/test/ArmsLengthHandler.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.