We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
example test:
Tests.test("range should contain value").Includes myRange.value2, "myValue"
an error occurs because myRange.Value2 is a 2 dimensional array.
myRange.Value2
in ArrayIncludes(), called by Includes() VBA.IsArray(Value(i)) causes an error if Value() is multidimensional
ArrayIncludes()
Includes()
VBA.IsArray(Value(i))
The text was updated successfully, but these errors were encountered:
quick fix without editing the vba-test library is to run all multi-dimensional arrays through this
Public Function ArrayToFlatCollection(a As Variant) As Collection Dim c As New Collection Dim item As Variant If VBA.TypeName(a) Like "*()" Then For Each item In a c.Add item Next item Else c.Add a End If Set ArrayToFlatCollection = c End Function
as such
Tests.test("range should contain value").Includes ArrayToFlatCollection(myRange.value2), "myValue"
Sorry, something went wrong.
No branches or pull requests
example test:
an error occurs because
myRange.Value2
is a 2 dimensional array.in
ArrayIncludes()
, called byIncludes()
VBA.IsArray(Value(i))
causes an error if Value() is multidimensionalThe text was updated successfully, but these errors were encountered: