Private Function PercentVerify() ' Test the Percent function. Debug.Assert Percent(50, 100) = 50 Debug.Assert Percent(2, 100) = 2 Debug.Assert Percent(100, 100) = 100 Debug.Assert Percent(200, 100) = 200 Debug.Assert Percent(50, 50) = 25 Debug.Assert Percent(2, 50) = 1 Debug.Assert Percent(100, 50) = 50 Debug.Assert Percent(200, 50) = 100 Debug.Assert Percent(-50, 50) = -25 Debug.Assert Percent(-2, 50) = -1 Debug.Assert Percent(100, -50) = -50 Debug.Assert Percent(200, -50) = -100 Debug.Assert IsNull(Percent(Null, 3)) Debug.Assert IsNull(Percent("Joe", 3)) Debug.Assert IsNull(Percent(3, Null)) Debug.Assert IsNull(Percent(3, "Joe")) End Function
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.