VBA-tools / vba-test

Add testing and TDD to VBA on Windows and Mac
MIT License
205 stars 46 forks source link

Additional array test functionality and RegEx Matching #22

Closed connerk closed 6 years ago

connerk commented 6 years ago

ToBeIn() ToNotBeIn() (Syntactic Sugar.) works inverse of ToContain() and ToNotContain(), checking if a value is (not) in an array instead of if an array contains a value.

Contains() Now capable of accepting multi dimensional arrays arrays Now capable of accepting arrays for both Actual and Expected arguments. i.e. see if all items in an array are found within another array.

ToMatchRegEx() allows for Regular Expression matching

Expect() (CreateFailureMessage()) can now have fail message overridden with a more descriptive string

timhall commented 6 years ago

I wasn't able to merge this directly, but I included your Contains changes as .Includes Values, Value and Expect() as .Fail("Message") in #23. I will revisit the RegEx proposal later as I would really like to have it, but I want to maintain Mac compatibility with VBA-TDD/vba-test. It will most like start out behind a feature flag like #Const EnableIsMatch, but I need to think about the API more.

Thanks for the contribution!