Skip to content

Commit 0156f75

Browse files
committed
Fix bad tests for machine graph and math
1 parent 0188344 commit 0156f75

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/test/java/dev/compactmods/machines/test/GraphTests.java

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,8 @@ public static void canCreateMultipleRoomsWithSingleLinkedMachine(final GameTestH
122122

123123
verifySingleRoomValid(test, graph, roomIndex, EXPECTED_CHUNK);
124124
}
125+
126+
test.succeed();
125127
}
126128

127129
@GameTest(template = "empty_1x1", batch = TestBatches.MACHINE_GRAPH)
@@ -169,7 +171,7 @@ public static void canSerialize(final GameTestHelper test) {
169171
return;
170172
}
171173

172-
if(!graphData.isEmpty())
174+
if(graphData.isEmpty())
173175
test.fail("Encoded tag does not have any data.");
174176

175177
if(!graphData.contains("connections"))
@@ -195,7 +197,7 @@ public static void canSerialize(final GameTestHelper test) {
195197
test.fail("Room chunk location is not correct.");
196198
});
197199

198-
ListTag roomMachineConnections = room1.getList("connections", Tag.TAG_COMPOUND);
200+
ListTag roomMachineConnections = room1.getList("connections", Tag.TAG_INT);
199201
if(1 != roomMachineConnections.size())
200202
test.fail("Expected exactly 1 machine to be connected to the room.");
201203

@@ -207,12 +209,11 @@ public static void canSerialize(final GameTestHelper test) {
207209
}
208210

209211
@GameTest(template = "empty_1x1", batch = TestBatches.MACHINE_GRAPH)
210-
void simpleNestedMachines() {
212+
public static void simpleNestedMachines(final GameTestHelper test) {
211213
/*
212214
Overworld - Contains Machine 0, linked to Room 0
213215
CompactWorld - Contains Machine 1, linked to Room 1 (Inside Room 0)
214216
*/
215-
216217
CompactMachineConnectionGraph graph = new CompactMachineConnectionGraph();
217218

218219
graph.addMachine(0);
@@ -227,6 +228,7 @@ void simpleNestedMachines() {
227228
graph.connectMachineToRoom(0, room0);
228229
graph.connectMachineToRoom(1, room1);
229230

231+
test.succeed();
230232
}
231233

232234
public static String write(final CompactMachineConnectionGraph graph) {

src/test/java/dev/compactmods/machines/test/MathTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,5 +45,7 @@ public static void positionGeneratorWorksCorrectly(final GameTestHelper test) {
4545
if(!expectedChunk.equals(calculatedChunk))
4646
test.fail(error);
4747
});
48+
49+
test.succeed();
4850
}
4951
}

0 commit comments

Comments
 (0)