From 87c831fb73f37b34bcac28ad8ce4473bc3812254 Mon Sep 17 00:00:00 2001 From: stephengold Date: Mon, 8 Jul 2024 11:52:26 -0700 Subject: [PATCH] Test002: check return codes from PhysicsSystem.update() --- src/test/java/testjoltjni/junit/Test002.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/java/testjoltjni/junit/Test002.java b/src/test/java/testjoltjni/junit/Test002.java index ade08403..65161e28 100644 --- a/src/test/java/testjoltjni/junit/Test002.java +++ b/src/test/java/testjoltjni/junit/Test002.java @@ -29,6 +29,7 @@ of this software and associated documentation files (the "Software"), to deal import com.github.stephengold.joltjni.EActivation; import com.github.stephengold.joltjni.EMotionQuality; import com.github.stephengold.joltjni.EMotionType; +import com.github.stephengold.joltjni.EPhysicsUpdateError; import com.github.stephengold.joltjni.Float3; import com.github.stephengold.joltjni.IndexedTriangle; import com.github.stephengold.joltjni.IndexedTriangleList; @@ -138,11 +139,12 @@ public void test002() { Jolt.cMaxPhysicsJobs, Jolt.cMaxPhysicsBarriers, numThreads); // Simulate physics for half a second: - float deltaTime = 1f / 60; for (int stepCounter = 0; stepCounter < 30; ++stepCounter) { - int numCollisionSteps = 1; - physicsSystem.update( + final float deltaTime = 1f / 60; + final int numCollisionSteps = 1; + int errors = physicsSystem.update( deltaTime, numCollisionSteps, tempAllocator, jobSystem); + Assert.assertEquals(EPhysicsUpdateError.None, errors); } jobSystem.close();