Closed pixelzoom closed 10 years ago
I added this assertion:
40 assert && assert( score <= perfectScore );
Assigning to @jbphet to review.
The assert looks reasonable to me. Tested a sim that uses the progress indicator with assertions turned on and saw no spurious asserts. Closing.
I ran into this when adding some 'dev' mode features to balancing-chemical-equations.
ProgressIndicator's constructor looks like:
It observes scoreProperty, and computes the number of 'filled' stars like this:
The problem here is that there's no check to verify that the score is <= perfectScore. If it's not, then it will create more stars than numStars.