Private Function PercentChangeVerify() ' Test the PercentChange function. Debug.Assert PercentChange(100, 200) = 100 Debug.Assert PercentChange(100, 150) = 50 Debug.Assert PercentChange(100, 100) = 0 Debug.Assert PercentChange(100, 50) = -50 Debug.Assert PercentChange(100, 0) = -100 Debug.Assert PercentChange(10, 100) = 900 Debug.Assert PercentChange(10, 50) = 400 Debug.Assert PercentChange(10, 20) = 100 Debug.Assert PercentChange(10, 15) = 50 Debug.Assert PercentChange(10, 10) = 0 Debug.Assert PercentChange(10, 5) = -50 Debug.Assert PercentChange(10, 0) = -100 Debug.Assert PercentChange(10, -5) = -150 Debug.Assert PercentChange(10, -10) = -200 Debug.Assert IsNull(PercentChange(Null, 3)) Debug.Assert IsNull(PercentChange("Joe", 3)) Debug.Assert IsNull(PercentChange(3, Null)) Debug.Assert IsNull(PercentChange(3, "Joe")) End Function
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.