diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-10 19:50:26 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-12-10 19:50:26 +0100 |
commit | 770496ee9d0e45480c0e0f8951adb8eee247bfe1 (patch) | |
tree | 98c68b0d37d8a1c0c8b8013ea7884d56f04aaa28 /src/test/ParticleTest.cpp | |
parent | 0cb7f2f82ca167656b3c5cb9f0cc3b44c59cb0eb (diff) |
big WIP
Diffstat (limited to 'src/test/ParticleTest.cpp')
-rw-r--r-- | src/test/ParticleTest.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/test/ParticleTest.cpp b/src/test/ParticleTest.cpp index 1409c4f..c2a3c14 100644 --- a/src/test/ParticleTest.cpp +++ b/src/test/ParticleTest.cpp @@ -93,18 +93,18 @@ TEST_F(ParticlesTest, spawnParticle) { emitter.data.max_angle = 0.1; emitter.data.max_speed = 10; emitter.data.max_angle = 10; - particle_system.update(); + particle_system.frame_update(); //check if nothing happend EXPECT_EQ(emitter.data.particles[0].active, false); emitter.data.emission_rate = 1; //check particle spawnes - particle_system.update(); + particle_system.frame_update(); EXPECT_EQ(emitter.data.particles[0].active, true); - particle_system.update(); + particle_system.frame_update(); EXPECT_EQ(emitter.data.particles[1].active, true); - particle_system.update(); + particle_system.frame_update(); EXPECT_EQ(emitter.data.particles[2].active, true); - particle_system.update(); + particle_system.frame_update(); EXPECT_EQ(emitter.data.particles[3].active, true); for (auto & particle : emitter.data.particles) { @@ -138,7 +138,7 @@ TEST_F(ParticlesTest, moveParticleHorizontal) { emitter.data.max_angle = 0; emitter.data.emission_rate = 1; for (int a = 1; a < emitter.data.boundary.width / 2; a++) { - particle_system.update(); + particle_system.frame_update(); EXPECT_EQ(emitter.data.particles[0].position.x, a); } } @@ -156,7 +156,7 @@ TEST_F(ParticlesTest, moveParticleVertical) { emitter.data.max_angle = 90; emitter.data.emission_rate = 1; for (int a = 1; a < emitter.data.boundary.width / 2; a++) { - particle_system.update(); + particle_system.frame_update(); EXPECT_EQ(emitter.data.particles[0].position.y, a); } } @@ -175,7 +175,7 @@ TEST_F(ParticlesTest, boundaryParticleReset) { emitter.data.max_angle = 90; emitter.data.emission_rate = 1; for (int a = 0; a < emitter.data.boundary.width / 2 + 1; a++) { - particle_system.update(); + particle_system.frame_update(); } EXPECT_EQ(emitter.data.particles[0].active, false); } @@ -194,7 +194,7 @@ TEST_F(ParticlesTest, boundaryParticleStop) { emitter.data.max_angle = 90; emitter.data.emission_rate = 1; for (int a = 0; a < emitter.data.boundary.width / 2 + 1; a++) { - particle_system.update(); + particle_system.frame_update(); } const double TOLERANCE = 0.01; EXPECT_NEAR(emitter.data.particles[0].velocity.x, 0, TOLERANCE); |