Skip to content
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

add AssertAAContains #26

Closed
wants to merge 1 commit into from

Conversation

slheavner
Copy link

@slheavner slheavner commented May 4, 2018

takes an expected and actual AA, and checks that all fields in expected are equal in actual. actual can have extra fields, hence the contains

@slheavner slheavner changed the title add AssertAAContians add AssertAAContains May 4, 2018
Function BTS__AssertAAContains(expected as object, actual as object, msg = "" as string) as string
if TF_Utils__IsAssociativeArray(expected) and TF_Utils__IsAssociativeArray(actual)
for each key in expected
if not actual[key] = expected[key]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it could be better if you use m.eqValues(actual[key], expected[key]) (see BTS__AssertEqual as reference) to compare 2 dynamic values.

@RokuDevTools
Copy link
Contributor

@slheavner thanks you for the pull request, this was already fixed in our major update: https://github.com/rokudev/unit-testing-framework/releases/tag/v.2.0.0

so, closing right now, as code is already present there.
Appreciate your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants