Sub Math Financial Class

StraightLineDepreciationVerify

Signature (Visual Basic / VBA)

Private Sub StraightLineDepreciationVerify()
    'Verify that the StraightLineDepreciation function works correctly.

    Debug.Assert Approx(StraightLineDepreciation(1000000, 300000, 5), 140000)
    Debug.Assert Approx(StraightLineDepreciation(1000000, 300000, 10), 70000)
    Debug.Assert Approx(StraightLineDepreciation(1000000, 0, 5), 200000)

End Sub