Skip to content

thus, we may test functions, that return Arrays #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/SpecExpectation.cls
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@ Public Sub ToNotEqual(Expected As Variant)
End Sub

Private Function IsEqual(Actual As Variant, Expected As Variant) As Variant
Dim l_count As Long

If IsArray(Expected) Then
If UBound(Expected) <> UBound(Actual) Then IsEqual = False: Exit Function

For l_count = LBound(Expected) To UBound(Expected)
If Not Expected(l_count) = Actual(l_count) Then IsEqual = False: Exit Function
Next l_count

IsEqual = True
End If

If IsError(Actual) Or IsError(Expected) Then
IsEqual = False
ElseIf IsObject(Actual) Or IsObject(Expected) Then
Expand Down