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

Tests for MapDiff #255

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Conversation

Akkihi
Copy link

@Akkihi Akkihi commented May 12, 2023

Tests:

For <K, V> Map<K, V>.diff()

  • Check that deletions, changing, additions are correct.
  • Check that deletions, changing, additions are correct with compareFun.
  • Check that deletions, changing, additions are correct with strictComparison.

For <K, V> MutableMap<K, V>.applyDiff()

  • Check that deletions, changing, additions are correct.
  • Check that deletions, changing, additions are correct with compareFun.
  • Check that deletions, changing, additions are correct with strictComparison.

And additional mixed functions for general testing.

}

@Test
fun testApplyMapDiffWorksWithEqualValuesStrictComparison() {
Copy link
Owner

Choose a reason for hiding this comment

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

Here you should check that:

  1. Values from old map (before changes) presented in diffs with strict (===) comparison
  2. Values from old map absent in the oldMap after applyDiff (with strict check too)
  3. Values in oldMap after applyDiff strictly (===) equal to the values from newMap by the same keys

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.

2 participants