Skip to content

Commit

Permalink
test: close job systems
Browse files Browse the repository at this point in the history
  • Loading branch information
stephengold committed Jul 8, 2024
1 parent a713e41 commit c35ebb3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/test/java/testjoltjni/junit/Test001.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,9 @@ public void test001() {
Assert.assertEquals(EPhysicsUpdateError.None, errors);
++stepCounter;
}

Assert.assertEquals(48, stepCounter);
jobSystem.close();
allocator.close();

ballLocation = bodyInterface.getCenterOfMassPosition(ballId);
Utils.assertEquals(0f, 0.48f, 0f, ballLocation, 1e-5f);
Expand All @@ -166,7 +167,6 @@ public void test001() {
objVsObjFilter.close();
objVsBpFilter.close();
mapObj2Bp.close();
allocator.close();

Jolt.unregisterTypes();
Jolt.destroyFactory();
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/testjoltjni/junit/Test002.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ public void test002() {
physicsSystem.update(
deltaTime, numCollisionSteps, tempAllocator, jobSystem);
}


jobSystem.close();
Assert.assertEquals(1_765, physicsSystem.getNumBodies());
}
// *************************************************************************
Expand Down

0 comments on commit c35ebb3

Please sign in to comment.