engine/particle/src/test/test_particle.cpp
/**
 * Verify that no particles are spawned if rate is negative
 */
Verify that no particles are spawned if rate is negative
Verify that no particles are spawned if rate is negative
TEST_F(ParticleTest, NegativeRateSpread)
{
    float dt = 1.0f;
    ASSERT_TRUE(LoadPrototype("negative_rate.particlefxc", &m_Prototype));
    dmParticle::HInstance instance = dmParticle::CreateInstance(m_Context, m_Prototype, 0x0);
    dmParticle::Emitter* e = GetEmitter(m_Context, instance, 0);
    dmParticle::StartInstance(m_Context, instance);
    dmParticle::Update(m_Context, dt, 0x0);
    ASSERT_EQ(0u, ParticleCount(e));
    dmParticle::DestroyInstance(m_Context, instance);
}
TEST_F ( ParticleTest , NegativeRateSpread ) { float dt = 1.0f ; ASSERT_TRUE ( LoadPrototype ( " " , & m_Prototype ) ) ; dmParticle :: HInstance instance = dmParticle :: CreateInstance ( m_Context , m_Prototype , 0x0 ) ; dmParticle :: Emitter * e = GetEmitter ( m_Context , instance , 0 ) ; dmParticle :: StartInstance ( m_Context , instance ) ; dmParticle :: Update ( m_Context , dt , 0x0 ) ; ASSERT_EQ ( 0u , ParticleCount ( e ) ) ; dmParticle :: DestroyInstance ( m_Context , instance ) ; }
Verify that no particles are spawned if rate is negative
Verify that no particles are spawned if rate is negative