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

Support for deep Map equality with asserts#equal #3236

Merged
merged 5 commits into from
Oct 30, 2019
Merged

Support for deep Map equality with asserts#equal #3236

merged 5 commits into from
Oct 30, 2019

Conversation

jamesseanwright
Copy link
Contributor

As per #3235, here is my fix for supporting for deeply comparing Map instances in the asserts module's equal function. Much like the conditional branches for Set comparisons, this logic has been inlined within equal itself.

I've also included a set of test cases (simple equality, nested Maps , arrays and objects as Map values etc.)

messages.push(c(`${createSign(result.type)}${result.value}`));
}
);
diffResult.forEach((result: DiffResult<string>): void => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Strangely, this unrelated block seems to have been changed when formatting this module. Shall I revert this? I appreciate it's a bit misleading given it isn't directly related to my changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disregard. This was a symptom of my using deno fmt directly slaps self on wrist.

@CLAassistant
Copy link

CLAassistant commented Oct 29, 2019

CLA assistant check
All committers have signed the CLA.

@jamesseanwright
Copy link
Contributor Author

Noticed the lint check is failing. I'll take a look shortly.

@jamesseanwright
Copy link
Contributor Author

Noticed the lint check is failing. I'll take a look shortly.

Looks like I've fixed it.

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

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

LGTM

@ry ry merged commit 64957d9 into denoland:master Oct 30, 2019
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 21, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 24, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Jan 31, 2021
caspervonb pushed a commit to caspervonb/deno_std that referenced this pull request Feb 1, 2021
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