2017-07-23 21:39:33 +02:00
|
|
|
Option VBASupport 1
|
|
|
|
Option Explicit
|
|
|
|
|
|
|
|
Function doUnitTest() As String
|
2020-12-16 22:28:02 +00:00
|
|
|
verify_testSIN
|
|
|
|
doUnitTest = TestUtilModule.GetResult()
|
2017-07-23 21:39:33 +02:00
|
|
|
End Function
|
|
|
|
|
2020-12-16 22:28:02 +00:00
|
|
|
Sub verify_testSIN()
|
2017-07-23 21:39:33 +02:00
|
|
|
|
2020-12-16 22:28:02 +00:00
|
|
|
TestUtilModule.TestInit
|
2017-07-23 21:39:33 +02:00
|
|
|
|
|
|
|
Dim testName As String
|
|
|
|
Dim date1, date2
|
|
|
|
testName = "Test SIN function"
|
|
|
|
On Error GoTo errorHandler
|
|
|
|
|
|
|
|
date2 = 0.43
|
|
|
|
date1 = Sin(0.45)
|
2020-12-16 22:28:02 +00:00
|
|
|
TestUtilModule.AssertTrue(Round(date1, 2) = Round(date2, 2), "the return SIN is: " & date1)
|
2017-07-23 21:39:33 +02:00
|
|
|
|
2020-12-16 22:28:02 +00:00
|
|
|
TestUtilModule.TestEnd
|
2017-07-23 21:39:33 +02:00
|
|
|
|
2020-12-16 22:28:02 +00:00
|
|
|
Exit Sub
|
2017-07-23 21:39:33 +02:00
|
|
|
errorHandler:
|
2020-12-16 22:28:02 +00:00
|
|
|
TestUtilModule.AssertTrue(False, testName & ": hit error handler")
|
2017-07-23 21:39:33 +02:00
|
|
|
End Sub
|
|
|
|
|