-
Notifications
You must be signed in to change notification settings - Fork 1
ParticleSystemComponent Tests
jgremlich edited this page Feb 20, 2016
·
2 revisions
- Invalid Input Data Test: the test will the component to throw an error if an of the following conditions are not met:
- Emitter name must contain at least one character (cannot be blank)
- Emitter Duration cannot be a negative value
- Emitter Delay cannot be a negative value
- Emitter Lifetime cannot contain negative values (both min and max must be positive)
- Initial Size cannot contain negative values (both x and y must be positive)
- Spawn Constant Rate cannot be a negative value
- Spawn Burst cannot be a negative value
- SubUV Images Horizontal cannot be a negative value
- SubUV Images Vertical cannot be a negative value
- SizeOverLife cannot contain negative values for either beginning or end
- ColorOverLife cannot contain negative values for any entry in the Beginning or End vector4
- SubImage Index Over Life cannot contain a negative value for either the Beginning or End index
- SubImage Index Random cannot contain a negative value for either the Min or Max value
- Functionality Test: Performed by creating a ParticleSystemComponent with values to test each of the functionalities specified in each of the below tests, then calling GetParticles() which returns an array of Particle Objects and checking any combination of particle position, orientation, scale or color for expected values. The test fails if the returned values do not match up with the expected values.
- Emitter Origin: do particles spawn at the specified non zero location
- Emitter Duration: Start the emitter with specified duration. Update System up to time of duration, count number of particles, update the system to past the emitter duration and make sure there are fewer or the same amount of particles.
- Looping: Run the Emitter Duration test with false looping. Run the Emitter Duration with true looping, make sure there are more or equal number of particles after specified duration.
- Emitter Delay: Start an emitter with specified delay. Check the number of particles before and after delay time. Make sure there are no particles before the delay, but there are particles after the delay.
- Lifetime: Start a system that spawns only on particle with a given lifetime. After that lifetime has expired, make sure there are no particles in the system.
- Initial Size: Start a system with a specified initial size. Get the particles and make sure they have the given size.
- Initial Velocity: Start a system that spawns a single particle with a given velocity. Get the particle's position at 0 seconds and at 1 second and verify velocity.
- Spawn Constant Rate: Start a system with a specified spawn rate. After 1 second verify that there are exactly the number of particles as the spawn rate.
- Spawn Burst Rate: Start a system with a specified spawn rate. Count number of particles at 0.1 seconds and at 1 second. Both number should be the same and equal to the spawn rate.
- Size Over Life: Start a system with a single particle and a given size over live, and set lifetime to 1. Compare the size of the particle at 0.1 seconds, 0.5 seconds, and 1 second to verify correct change in size.
- Color Over Life: Start a system with a single particle and a given color over live, and set lifetime to 1. Compare the color of the particle at 0.1 seconds, 0.5 seconds, and 1 second to verify correct change in color.
- Initial Rotation Constant: Stat a system with a single particle, and initial rotation both min and max set the the same value. Update, get the particles, and verify that the particle's rotation matches that value.
- Initial Rotation Random: Start a system with several particles, and initial rotation with different min and max. Update the system, get the particles, and verify that the particles' rotations are between the two values (inclusive).
- Initial Rotation Rate Constant:Start a system with a single particle and a given initial rotation rate, min and max set to the same value, and set lifetime to 1. Compare the rotation of the particle at 0.1 seconds, 0.5 seconds, and 1 second to verify correct change in rotation.