engine/particle/src/test/test_particle.cpp
/**
 * Verify creation/destruction from ddf message, check leaks
 */
Verify creation/destruction from ddf message, check leaks
Verify creation / destruction from ddf message check leaks
TEST_F(ParticleTest, CreationSuccessFromDDF)
{
    ASSERT_TRUE(LoadPrototypeFromDDF("once.particlefxc", &m_Prototype));
    dmParticle::HInstance instance = dmParticle::CreateInstance(m_Context, m_Prototype, 0x0);
    ASSERT_NE(dmParticle::INVALID_INSTANCE, instance);
    ASSERT_TRUE(IsSleeping(m_Context, instance));
    ASSERT_EQ(1U, m_Context->m_InstanceIndexPool.Size());
    dmParticle::DestroyInstance(m_Context, instance);
    ASSERT_EQ(0U, m_Context->m_InstanceIndexPool.Size());
}
TEST_F ( ParticleTest , CreationSuccessFromDDF ) { ASSERT_TRUE ( LoadPrototypeFromDDF ( " " , & m_Prototype ) ) ; dmParticle :: HInstance instance = dmParticle :: CreateInstance ( m_Context , m_Prototype , 0x0 ) ; ASSERT_NE ( dmParticle :: INVALID_INSTANCE , instance ) ; ASSERT_TRUE ( IsSleeping ( m_Context , instance ) ) ; ASSERT_EQ ( 1U , m_Context -> m_InstanceIndexPool . Size ( ) ) ; dmParticle :: DestroyInstance ( m_Context , instance ) ; ASSERT_EQ ( 0U , m_Context -> m_InstanceIndexPool . Size ( ) ) ; }
Verify creation/destruction from ddf message, check leaks
Verify creation / destruction from ddf message check leaks