<-- Previous || Up || Next -->

Median Of Three Verify Sub
Math Statistics Class

Private Sub MedianOfThreeVerify()
    ' Test the MedianOfThree function.

    Debug.Assert MedianOfThree(2, 1, 3) = 2
    Debug.Assert MedianOfThree(2, 3, 1) = 2
    
    Debug.Assert MedianOfThree(1, 2, 3) = 2
    Debug.Assert MedianOfThree(3, 2, 1) = 2
    
    Debug.Assert MedianOfThree(1, 3, 2) = 2
    Debug.Assert MedianOfThree(3, 1, 2) = 2


    Debug.Assert MedianOfThree(2, 2, 1) = 2
    Debug.Assert MedianOfThree(2, 2, 3) = 2
    
    Debug.Assert MedianOfThree(2, 1, 2) = 2
    Debug.Assert MedianOfThree(2, 3, 2) = 2
    
    Debug.Assert MedianOfThree(1, 2, 2) = 2
    Debug.Assert MedianOfThree(3, 2, 2) = 2

    
    Debug.Assert MedianOfThree(2, 2, 2) = 2

End Sub

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.